View Full Version : Add icon beside Forum Icon
fitaholic
09-15-2008, 03:18 PM
Can someone please tell me how to add an icon to a specific thread. (forum) I want to add an icon beside the thread icon. see www.myls1.com for an example of how he does it.
Thank you in advance for responding,
Mr. Fitaholic
Opserty
09-15-2008, 03:22 PM
Edit the forumhome_forumbit_level2_post template. On that site they have added something like the following:
tr align="center">
<td class="alt2"><img src="images/statusicon/forum_old.gif" alt="" id="forum_statusicon_124" border="0"></td>
<td class="alt1Active" id="f124" align="left">
<div style="margin: 0px; padding: 0px; float: left;">
<img src="images/statusicon/124.gif" alt=""></div>
<div>
<a href="forumdisplay.php?f=124"><strong>Maintenance and Repairs</strong></a>
<span class="smallfont">(6 Viewing)</span>
</div>
<div class="smallfont">General LSX Maintenance and Repairs</div>
</td>
<td class="alt2">
<div class="smallfont" align="left">
<div>
<span style="white-space: nowrap;">
<a href="showthread.php?goto=newpost&t=3171" style="white-space: nowrap;" title="Go to first unread post in thread 'Taylor 10.5 MM wires = JUNK'"><strong>Taylor 10.5 MM wires = JUNK</strong></a></span>
</div>
<div style="white-space: nowrap;">
by <a href="member.php?find=lastposter&f=124" rel="nofollow">dixonk</a>
</div>
<div style="white-space: nowrap;" align="right">
09-06-2008 <span class="time">11:51 AM</span>
<a href="showthread.php?p=39636#post39636"><img title="Go to last post" class="inlineimg" src="images/buttons/lastpost.gif" alt="Go to last post" border="0"></a>
</div>
</div>
</td>
<td class="alt1">31</td>
<td class="alt2">302</td>
</tr>
In the template it probably looks like this:
<div style="margin: 0px; padding: 0px; float: left;">
<img src="images/statusicon/$forum[forumid].gif" alt=""></div>
Then you can just name your forum icons like 19.gif for the forum that has the id number 19 e.t.c.
fitaholic
09-15-2008, 04:19 PM
Thats awesome Opserity, but how do I make it for only one forum id???
Opserty
09-16-2008, 08:33 AM
<if conditon="$forum['forumid'] == XX">
<div style="margin: 0px; padding: 0px; float: left;">
<img src="images/statusicon/$forum[forumid].gif" alt=""></div>
</if>
salava
09-16-2008, 08:59 AM
Thanks. It is useful for me too.
fitaholic
09-16-2008, 12:39 PM
Thank you Opserty you are the bomb. Something is showing wrong with this code though....
When entered I receive an error saying:
The following error occurred when attempting to evaluate this template:
The conditional on line 7 appears to be missing its beginning tag (<if>). This may cause unexpected behavior.
This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.
When I add <if> which is infront of your <if> I continue to get this same error!!!
--------------- Added 1221627582 at 1221627582 ---------------
Can someone please look at Opseritys code and let me know what is missing or why I am receiving an error.
Thank you in advance
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.