phpBB2Refugees.com Logo
Not affiliated with or endorsed by the phpBB Group

Register •  Login 

Continue the legacy...

Welcome to all phpBB2 Refugees!Wave Smilie

This site is intended to continue support for the legacy 2.x line of the phpBB2 bulletin board package. If you are a fan of phpBB2, please, by all means register, post, and help us out by offering your suggestions. We are primarily a community and support network. Our secondary goal is to provide a phpBB2 MOD Author and Styles area.

[RC] Forum Icons


 
Search this topic... | Search MOD Development... | Search Box
Register or Login to Post    Index » MOD Development  Previous TopicPrint TopicNext Topic
Author Message
drathbun
Board Member



Joined: 24 Jul 2008

Posts: 656
Location: Texas


flag
PostPosted: Wed Dec 10, 2008 11:48 pm 
Post subject: Forum Icons

MOD Name: Forum Icons
MOD Version: 1.0
MOD Short Description: Allows a board owner to set up custom icons for each forum

MOD Author Notes
This MOD is installed on the Refugees board. It is intended to let board owners set up different forum icons for each forum (or not) on their board. Note that this is not the same functionality as provided by phpBB3. This MOD changes the forum icon displayed on the index page for the selected forum(s).

One of the challenges with this MOD is how to design it so that the forum icon continues to provide information about the forum status. For example, the standard subSilver icons for forums are as follows:

Image link Standard forum icon
Image link Alternate forum icon designating new posts since last visit

If we change the forum icon, there still has to be some way to designate that there are new posts. Users certainly rely on that indication. Now I had written the code for this well over a year ago, but it wasn't until I got someone with graphics skills that I could actually implement it as seen on this site. icon_smile.gif Kelly and I had a discussion about how to best show the forum status. The standard subSilver icons change the color of the "content" of the graphic (from silver to orange). Our icons change the background color, which is the other thing that could be changed. I suspect that for most folks changing the background is going to be easier and more consistent.

This MOD allows a board owner to set up a forum icon name for each forum. If the forum icon is left blank, the standard icons are used. If the forum icon is specified, the board owner only specifics the base name for the icon, and the MOD expects to find three more files with the following naming convention.

forum_icon.gif
forum_icon_new.gif
forum_icon_locked.gif
forum_icon_new_locked.gif

Only "forum_icon.gif" is stored in the database, the other three are inferred from the base name and set based on the forum status. Given that, this MOD turns out to be fairly simple. The most complicated part is updating the legend at the bottom of the index page.

For example, the forum_icons for the MOD forums here look like this:

Image link Image link Image link Image link

The filenames are:
folder_mod.gif
folder_mod_new.gif
folder_mod_locked.gif
folder_mod_new_locked.gif

Once those files are loaded into the templates/.../images folder there is a simple edit in the ACP to load the name of the icon into the forum row. See attached screenshot for details.



acp.jpg
 Description:
Admin Panel Screen Shot
 Filesize:  47.58 KB
 Viewed:  999 Time(s)

acp.jpg



install.txt
 Description:
Installation instructions (text file)

Download
 Filename:  install.txt
 Filesize:  12.35 KB
 Downloaded:  1027 Time(s)


_________________
phpBBDoctor Blog
Back to top
KellyBean
Board Member



Joined: 07 Nov 2008

Posts: 46
Location: Massachusetts


flag
PostPosted: Thu Dec 11, 2008 12:01 am 
Post subject: Re: Forum Icons

Oh cool... I didn't realize you made ACP access as well. Nice work and great idea! icon_smile.gif
_________________
Kelly | DeLFlo
Back to top
drathbun
Board Member



Joined: 24 Jul 2008

Posts: 656
Location: Texas


flag
PostPosted: Thu Dec 11, 2008 3:10 am 
Post subject: Re: Forum Icons

I found a couple of hard-coded paths in the install notes, so I am fixing those and then will post an install file as an attachment to the first post.

[Edit] Installation file is now provided. It is functional from a syntax point of view (all FIND targets are matched) but I have not done a true install to verify that all of the ADD and REPLACE instructions do not introduce any errors. I will do so soon, but if you beat me too it, please feel free to post errors and I will fix them. Thanks! [/Edit]

_________________
phpBBDoctor Blog
Back to top
Sylver Cheetah 53
Board Member



Joined: 17 Dec 2008

Posts: 426
Location: Milky Way


flag
PostPosted: Wed Dec 17, 2008 8:49 pm 
Post subject: Re: Forum Icons

I have a question about this MOD. In the original phpBB2 way, the locked forums with new messages do not have an icon, or at least, it is not showing up. You still see forum locked without new posts icon. Does this MOD will repair this bug also? icon_smile.gif
_________________
Image link
My Forum || My Blog

phpBB2 forever! icon_smile.gif
Back to top
drathbun
Board Member



Joined: 24 Jul 2008

Posts: 656
Location: Texas


flag
PostPosted: Thu Dec 18, 2008 1:48 am 
Post subject: Re: Forum Icons

Sylver Cheetah 53 wrote:
Does this MOD will repair this bug also? icon_smile.gif

Only if you provide the proper icon. If you leave a forum set to the default, it doesn't change it. I guess it could...

_________________
phpBBDoctor Blog
Back to top
Display posts from previous:   
Register or Login to Post    Index » MOD Development  Previous TopicPrint TopicNext Topic
Page 1 of 1 All times are GMT
 
Jump to:  

Index • About • FAQ • Rules • Privacy • Search •  Register •  Login 
Not affiliated with or endorsed by the phpBB Group
Powered by phpBB2 © phpBB Group
Generated in 0.0297 seconds using 17 queries. (SQL 0.0027 Parse 0.0024 Other 0.0246)
phpBB Customizations by the phpBBDoctor.com
Template Design by DeLFlo and MomentsOfLight.com Moments of Light Logo