sephiroth2m
2010-01-22T06:01:54Z
The idea here is naming the forum's icon with its ID

First, create a folder under the theme's folder called "FORUM", then save forum's icons there with name is forum's ID and extension is "GIF"
UserPostedImage

Second, assign the forumIcon.ID with the forum's ID in ForumList1_ItemCreated method in "/controls/ForumList.ascx.cs"
Quote:


forumIcon.ID = Convert.ToString(row["ForumID"]);
forumIcon.ThemeTag = "FORUM";
forumIcon.LocalizedTitlePage = "ICONLEGEND";
forumIcon.LocalizedTitleTag = "NO_NEW_POSTS";

try
{



Third, add the following lines into GetCurrentThemeItem method in "\YAF.Controls\ThemeImage.cs"
Quote:


protected string GetCurrentThemeItem()
{
string strForumIcon = PageContext.Theme.ThemeDir + "forum/" + ID + ".gif";
System.IO.FileInfo fi = new System.IO.FileInfo(Page.Server.MapPath(strForumIcon));
if (fi.Exists) return strForumIcon;


if (!String.IsNullOrEmpty(this._themePage) && !String.IsNullOrEmpty(this._themeTag))
{



Finally, recompile the project and copy "YAF.Controls.dll" to the "Bin" folder
UserPostedImage
Sponsor
johncocyan09
2010-01-24T15:21:21Z
Firstly, thank you for all the wonderful themes you guys (and girls) have made. Downloading all the extra, user-contributed icons page-by-page is quite a pain, though. Thus, I have decided to write an app that will go through a theme thread and attempt to find all the icons within, along with their names.

It's only in the beginning stages right now, but eventually it will let you can install entire themes, user contributions and all, with a few taps.

What do you guys think?
Users browsing this topic

    About Us

    The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

    Powered by Resharper Donate with PayPal button

    Project Twitter Updates

    Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved