View Full Version : Insert Images In Sub-Forums
jarod1981?
08-05-2006, 11:34 PM
Hi guys
I want insert in all my sub-forums an image before each forums...
I must modify "forumhome_subforumbit_post", right?
I try some time to editing but it's don't work...Can you help me please?
Forumhome_subforumbit_post:
<img class="inlineimg" src="$stylevar[imgdir_statusicon]/subforum_$forum[statusicon].gif" alt="" /> <a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">
<span class="smallfont">$forum[title]</span></a>
Example (http://www.p2psin.net/forum/imagehosting/144d538dcd8174.jpg)
Very thanks..guys
Buraq
08-06-2006, 01:23 AM
I actually just played around with this yesterday on my forum. What you want to do is the following...
You must apply these changes to forumhome_forumbit_level2_post. forumhome_subforumbit_post is when you set the forum to display the subforums of a forum (like the small text under "Premium Modifications" on vb.org).
<tr align="center">
<td class="alt2"><img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" /></td>
<td class="alt1Active" align="$stylevar[left]" id="f$forum[forumid]">
<div>
<div style="float:left"><img src="your image"/></div>
<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><strong>$forum[title]</strong></a>
<if condition="$show['browsers']"><span class="smallfont">(<phrase 1="$forum[browsers]">$vbphrase[x_viewing]</phrase>)</span></if>
</div>
<if condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div></if>
<if condition="$show['forumsubscription']"><div class="smallfont"><strong><a href="subscription.php?$session[sessionurl]do=removesubscription&f=$forum[forumid]" rel="nofollow">$vbphrase[unsubscribe_from_this_forum]</a></strong></div></if>
<if condition="$show['subforums']"><div class="smallfont" style="margin-top:$stylevar[cellpadding]px"><strong>$vbphrase[subforums]</strong>: $forum[subforums]</div></if>
</td>
<td class="alt2" nowrap="nowrap">$forum[lastpostinfo]</td>
<td class="alt1">$forum[threadcount]</td>
<td class="alt2">$forum[replycount]</td>
<if condition="$vboptions['showmoderatorcolumn']">
<td class="alt1"><div class="smallfont">$forum[moderators] </div></td>
</if>
</tr>
$childforumbits
Basically add the green code into the proper template.
You will need to include conditionals on $forum[forumid] if you want to assign forum-specific images.
jarod1981?
08-09-2006, 04:26 PM
Hi Buraq
I have follow your instructions but the images are insert in Forumhome and don't in Sub-Forums....
I want insert a different images for each section in my Sub-Forums, don't in Forumhome!
I want isert image here : Link (http://www.p2psin.net/forum/imagehosting/144da1b841c7d7.jpg)
Which template I must modify? And what code Can I Use, please?
Very thanks ;)
upsetter
08-09-2006, 10:34 PM
will this work for 3.6.0?...
Buraq
08-11-2006, 05:06 AM
My bad, I thought the forums you were trying to edit were on ForumHome (couldn't tell from the picture). I looked through the templates again and what you need to edit for ForumDisplay is forumhome_forumbit_level1_post...
<tbody>
<tr align="center">
<td class="alt1Active" colspan="2" align="$stylevar[left]" id="f$forum[forumid]">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td><img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" /></td>
<td><img src="$vboptions[cleargifurl]" alt="" width="9" height="1" border="0" /></td>
<td>
<div>
<div style="float:left"><img src="your image"/></div>
<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><strong>$forum[title]</strong></a>
<if condition="$show['browsers']"><span class="smallfont">(<phrase 1="$forum">$vbphrase[x_viewing]</phrase>)</span></if>
</div>
<if condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div></if>
<if condition="$show['forumsubscription']"><div class="smallfont"><strong><a href="subscription.php?$session[sessionurl]do=removesubscription&f=$forum[forumid]" rel="nofollow">$vbphrase[unsubscribe_from_this_forum]</a></strong></div></if>
<if condition="$show['subforums']"><div class="smallfont" style="margin-top:$stylevar[cellpadding]px"><strong>$vbphrase[subforums]</strong>: $forum[subforums]</div></if>
</td>
</tr>
</table>
</td>
<td class="alt2" nowrap="nowrap">$forum[lastpostinfo]</td>
<td class="alt1">$forum[threadcount]</td>
<td class="alt2">$forum[replycount]</td>
<if condition="$vboptions['showmoderatorcolumn']">
<td class="alt1"><div class="smallfont">$forum[moderators] </div></td>
</if>
</tr>
</tbody>
<if condition="$childforumbits">
<tbody>
$childforumbits
</tbody>
</if>
If you want the image to show on specific forums, you can do the following...
<if condition="$forum[forumid]==X">
<div style="float:left"><img src="your image" /></div>
</if>
Where "X" is the forum ID you want.
OR If you want multiple forums to have different images (like you showed in your first post), you can include the following code instead...
<if condition="$forum[forumid]==[B]X OR $forum[forumid]==Y OR $forum[forumid]==Z">
<div style="float:left"><img src="your path/$forum[forumid].gif"/></div>
</if>
Here, you would replace your path with the directory where you save the images, and you would name the images X.gif, Y.gif, and Z.gif. X, Y, Z (etc) are the IDs of the forums you wish to give images, we placed a conditional at the top so that you dont get an empty div in Firefox or the missing image icon in IE when the image file doesn't exist (for a forum ID that you didn't make an image for).
hope that helped.
will this work for 3.6.0?...
I haven't installed 3.6.0 yet, but I don't see why not. It's a simple template edit.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.