sephiroth2m
  • Posts: 3
  • Joined: 20/12/2009
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
Forum Jump  
  • You cannot post new topics in this forum.
  • You cannot reply to topics in this forum.
  • You cannot delete your posts in this forum.
  • You cannot edit your posts in this forum.
  • You cannot create polls in this forum.
  • You cannot vote in polls in this forum.

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