XMB Forum Software

Forum Icons (XMB 1.9.11)

bfgadmin - 5-7-2020 at 01:06 PM

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.

Code:
<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:

Code:
<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.