XMB Forum Software
Not logged in [Login - Register]
Go To Bottom

Printable Version  
Author: Subject: Forum Icons (XMB 1.9.11)

Posts: 52
Registered: 5-7-2020
Location: Pittsburgh, PA
Member Is Offline

Mood: Technical

[*] posted on 5-7-2020 at 01:06 PM
Forum Icons (XMB 1.9.11)

Hi XMB community! I run the tech side of a fairly active (but newish) discussion board running the XMB forum software. I love this forum software, and bypassed several other viable choices in favor of XMB.

We've done all sorts of modifications to the site, and I'll try to share whatever I can with you all to support what is left of the XMB community.

So, lets get started on this super-hard (just kidding) "hack."

Forum Icons
This will display an icon to the left of each forum name/description.

Originally, our forum used a varchar pulled from our database's forums table. After realizing this was a waste of resources and time, I greatly simplified it. To install this "hack," make your otherwise unmodified index_forum template look like this.

<tr> <td bgcolor="$altbg1" class="ctrtablerow" width="4%">$folder</td> <td bgcolor="$altbg2" class="tablerow" width="54%"> <table border='0'> <tr> <td valign='middle'><img src='./images/ficons/$forum[fid].png' height='30px' width='30px'></td> <td> <font class="mediumtxt"><a href="./forumdisplay.php?fid=$forum[fid]"><strong>$forum[name]</strong></a></font>&nbsp;<font class="smalltxt">$forum[moderator]&nbsp;</font><br /><font class="smalltxt">$forum[description]$subforums</font> <td> </tr> </table> </td> <td bgcolor="$altbg1" class="ctrtablerow" width="6%"><font class="mediumtxt">$forum[threads]</font></td> <td bgcolor="$altbg2" class="ctrtablerow" width="6%"><font class="mediumtxt">$forum[posts]</font></td> <td bgcolor="$altbg1" class="rghttablerow" width="19%">$lastpostrow</td> </tr>

If your index_forum template is modified, the meat & potatoes comes down to this:

<img src='./images/ficons/$forum[fid].png' height='30px' width='30px'>

To add icons, as you may already have imagined, create the "ficons" directory and add each forum's icon. For fid 1, you'd do 1.png. For fid 10, you'd do 10.png. So on and so forth.

View user's profile Visit user's homepage View All Posts By User

  Go To Top

Powered by XMB 1.9.12 (Debug Mode)
XMB Forum Software © 2001-2024 The XMB Group
[Queries: 16] [PHP: 28.6% - SQL: 71.4%]