PDA

View Full Version : Image on Forumbit (forumhome)


sabret00the
10 May 2004, 12:26
this is for the forumhome, open your "forumhome_forumbit_level2_post" template and find ;
<if condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div></if>

add above that
<if condition="$forum[parentid]==XX OR $forum[parentid]==XX"><img src="$stylevars[imgdir_misc]/[forumhome]/$forum[forumid].gif" alt="$forum[title]" border="0" vspace="2 px" hspace="2 px" align="left"/></if>

if you want it to appear for all forums, remove the conditional, you can also just change the conditional to suit your needs better, the XX's in the conditional are to be replaced by the parentid's of your desire [cyclops] the parentid is just the forumid of the catergory.

Brad
10 May 2004, 13:00
Mind posting a screen shot? :)

sabret00the
10 May 2004, 13:04
added to first post :)

Tony G
10 May 2004, 14:17
Always a useful modification. Good work. ^_^

imported_Synicide
10 May 2004, 23:16
I like this mod, I might use it in the future.

imported_chuanse
09 Jun 2004, 20:34
Hmm, this can be cool with small images :D

kall
10 Jun 2004, 12:50
And if you want to make the images into links to that forum,

find:

<img src="images/forumhome/$forum[forumid].gif" alt="$forum[title]"


add before:

<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">


find

hspace="2 px" align="left"/>


add:

</a>


:)

a-la http://www.nzboards.com

Watson
10 Jun 2004, 16:14
so do I just add this so many times for each image I wanna put in?

imported_Caiman
11 Jun 2004, 02:29
Is there anyway to apply this to 'forum_old.gif' etc ... instead of adding an extra image in the forum description...

imported_Caiman
11 Jun 2004, 02:30
so do I just add this so many times for each image I wanna put in?

as far as I can tell, no- you add it once, and just put images name after the number of each forum in the forumhome directory, such as

23.gif

and so on, it automatically puts them in front of the right forum then

hollyboy
13 Jun 2004, 16:26
I don't understand how to use this.
What are the part I have to edit?

sabret00the
13 Jun 2004, 23:35
i'm not sure how to explain it any simpler than stated in the first post, if you have a specific question on what bits confusing you, then let me know

hollyboy
14 Jun 2004, 09:00
I wanna add pictures for more then one forums.
And still I don't understand what I have to edit of the code you posted. Can u mark it in red please?

sabret00the
14 Jun 2004, 09:04
it's literally copy and paste the whole "forumhome_forumbit_level2_post" template into a text editor, even word would do, find <if condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div></if> and then paste <if condition="$forum[parentid]==XX OR $forum[parentid]==XX"><img src="$stylevars[imgdir_misc]/[forumhome]/$forum[forumid].gif" alt="$forum[title]" border="0" vspace="2 px" hspace="2 px" align="left"/></if> right below it

if you give me the link to your forums and tell me the forums, i'll even post the code on how to add it to those specific forums.

hollyboy
14 Jun 2004, 09:20
http://www.interfans.org/forum/

I'd like to have an image for each subforums of the category FC INTERNAZIONALE

sabret00the
14 Jun 2004, 13:51
this is the code you'll need to add to that to the template:

<if condition="$forum[parentid]==3"><img src="$stylevars[imgdir_misc]/[forumhome]/$forum[forumid].gif" alt="$forum[title]" border="0" vspace="2 px" hspace="2 px" align="left"/></if>

hollyboy
14 Jun 2004, 14:30
and this will add the images I want to all the forums of that category?
The images are different in every forum

sabret00the
14 Jun 2004, 14:36
yup

hollyboy
14 Jun 2004, 14:44
I still don't understand how can this work :(
Where do I have to put the images, in what folder?

sabret00the
14 Jun 2004, 14:50
images go in the directory

images/misc/forumhome/

and you name the images after the forumid

i would say install the mod and then work backwards, you can right click on the red x and get the location and image name for each image from there.

hollyboy
14 Jun 2004, 14:55
since I have more forum I have to copy the cose for as many forums as I have?

sabret00the
14 Jun 2004, 15:26
nope it's all automatic

hollyboy
14 Jun 2004, 20:36
I don't understand :(

Mechanical Mind
19 Jan 2005, 23:00
Hey Sabretooth, I took your advice and stopped in over here to look for support. Only problem is, I think my template mods are a little different than what you have developed here. But you said to stop in for support, so here goes:

Here are my templates:

...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><td><img src="$stylevar/forum_$forum[statusicon].gif" alt="" border="0" /></td><td><img src="$vboptions[cleargifurl]" alt="" width="9" height="1" border="0" /></td><td style="vertical-align:middle;"></td>
<td>

<td>
<if condition="in_array($forum['forumid'], array(20, 21, 22, 23, 34, 26, 41, 24, 25, 36, 27, 28, 29, 30, 31, 32, 39, 37))">
<img src="images/forum_pics/$forum[forumid].gif" alt="" border="0" />
</if>
</td>

<td><img src="$vboptions[cleargifurl]" alt="" width="9" height="1" border="0" /></td>
<td>

<div>
<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><strong>$forum[title]</strong></a>
<if condition="$show['browsers']"><span class="smallfont"><div style = color:#FF0000><phrase 1="$forum[browsers]">$vbphrase[x_viewing]</phrase></div></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&amp;f=$forum[forumid]">$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="alt1" colspan="2">$forum[threadcount]</td>
<td class="alt2">$forum[replycount]</td>
<if condition="$vboptions['showmoderatorcolumn']">
<td class="alt1"><div class="smallfont">$forum[moderators]&nbsp;</div></td>
</if>
</tr>
</tbody>
<if condition="$childforumbits">
<tbody>
$childforumbits
</tbody>
</if>

[I]...forumhome_forumbit_level2_post...

<tr align="center">
<td class="alt2"><img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" /></td>
<td class="alt1Active" align="left" style=valign"middle" id="f$forum[forumid]">

<if condition="in_array($forum['forumid'], array(20, 21, 22, 23, 34, 26, 41, 24, 25, 36, 27, 28, 29, 30, 31, 32, 39, 37))">
<img src="images/forum_pics/$forum[forumid].gif" align="left" style="margin-right: 9px" alt="" border="0" />
</if>

<div>
<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><strong>$forum[title]</strong></a>
<if condition="$show['browsers']"><span class="smallfont"><div style = color:#FF0000><phrase 1="$forum[browsers]">$vbphrase[x_viewing]</phrase></div></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&amp;f=$forum[forumid]">$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="alt1" colspan="2">$forum[threadcount]</td>
<td class="alt2">$forum[replycount]</td>
<if condition="$vboptions['showmoderatorcolumn']">
<td class="alt1"><div class="smallfont">$forum[moderators]&nbsp;</div></td>
</if>
</tr>
$childforumbits

My problem: I can't vertically align the forum title, description, and x_viewing on "index.php".

For a more complete description of the problem that I am having, see this thread over at vB.com : http://www.vbulletin.com/forum/showthread.php?t=126680 My description is a bit wordy, but I tried to effectively describe what I wanted and the problem that I was having.

Any help would be VERY, VERY appreciated! :)

mm

sabret00the
19 Jan 2005, 23:10
lol i said you should've installed my one then you could've come for support, alright i'll look into yours tomorrow morning

but try
<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><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 style="vertical-align:middle;"></td>
<td>

<td valign="top">
<if condition="in_array($forum['forumid'], array(20, 21, 22, 23, 34, 26, 41, 24, 25, 36, 27, 28, 29, 30, 31, 32, 39, 37))">
<img src="images/forum_pics/$forum[forumid].gif" alt="" border="0" />
</if>
</td>

<td><img src="$vboptions[cleargifurl]" alt="" width="9" height="1" border="0" /></td>
<td valign="top">

<div>

<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><strong>$forum[title]</strong></a>
<if condition="$show['browsers']"><span class="smallfont"><div style = color:#FF0000><phrase 1="$forum[browsers]">$vbphrase[x_viewing]</phrase></div></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&amp;f=$forum[forumid]">$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="alt1" colspan="2">$forum[threadcount]</td>
<td class="alt2">$forum[replycount]</td>
<if condition="$vboptions['showmoderatorcolumn']">
<td class="alt1"><div class="smallfont">$forum[moderators]&nbsp;</div></td>
</if>
</tr>
</tbody>
<if condition="$childforumbits">
<tbody>
$childforumbits
</tbody>
</if>

<tr align="center">
<td class="alt2"><img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" /></td>
<td class="alt1Active" align="left" valign="top" id="f$forum[forumid]">

<if condition="in_array($forum['forumid'], array(20, 21, 22, 23, 34, 26, 41, 24, 25, 36, 27, 28, 29, 30, 31, 32, 39, 37))">
<img src="images/forum_pics/$forum[forumid].gif" align="left" style="margin-right: 9px" alt="" border="0" />
</if>

<div>
<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><strong>$forum[title]</strong></a>
<if condition="$show['browsers']"><span class="smallfont"><div style = color:#FF0000><phrase 1="$forum[browsers]">$vbphrase[x_viewing]</phrase></div></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&amp;f=$forum[forumid]">$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="alt1" colspan="2">$forum[threadcount]</td>
<td class="alt2">$forum[replycount]</td>
<if condition="$vboptions['showmoderatorcolumn']">
<td class="alt1"><div class="smallfont">$forum[moderators]&nbsp;</div></td>
</if>
</tr>
$childforumbits

you are trying to vertically align it at the top right?

Mechanical Mind
19 Jan 2005, 23:51
you are trying to vertically align it at the top right?

No. Actually I want it centered vertically.

Dan
21 Jan 2005, 22:11
Does this add one to each forum or is there a way where we can make it only apply to certain forums?

sabret00the
22 Jan 2005, 12:33
Does this add one to each forum or is there a way where we can make it only apply to certain forums?it only applies to the forums you set it too.

sabret00the
22 Jan 2005, 13:41
just change all instances of valign="top" to valign="middle"

Mechanical Mind
22 Jan 2005, 18:16
Thanks sabret00the. But this one was just too difficult for me.

just change all instances of valign="top" to valign="middle"

I tried this ... several times.

There were other hacks or mods that were interfering. Jake B. looked into it and worked his "mojo". And as usual, he's got it running perfectly. I told him, he needs to add whatever he did to vertically align my titles/descriptions into his tutorial for adding images to forumdisplay pages.

Take it easy. :)

mm

Dan
22 Jan 2005, 21:47
Hmm... this really doesn't seem to be working but my templtes are pretty modified ;) So any help would be appreciated.

sabret00the
22 Jan 2005, 21:51
you got your templates?

doubt i'll see this tonight as on my way out, but i'll see your reply tomorrow morning

Mechanical Mind
22 Jan 2005, 23:48
Here are my templates for this. These templates have been modified to add small images next to forum titles AND to vertically align the title and descriptions.

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/forum_$forum[statusicon].gif" alt="" border="0" /></td>
<td><img src="$vboptions[cleargifurl]" alt="" width="9" height="1" border="0" /></td>
<td>

<td>
<if condition="in_array($forum['forumid'], array(20, 21, 22, 23, 34, 26, 41, 24, 25, 36, 27, 28, 29, 30, 31, 32, 39, 37))">
<img src="images/forum_pics/$forum[forumid].gif" alt="" border="0" />
</if>
</td>

<td><img src="$vboptions[cleargifurl]" alt="" width="9" height="1" border="0" /></td>
<td>

<div>
<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><strong>$forum[title]</strong></a>
<if condition="$show['browsers']"><span class="smallfont"><div style = color:#FF0000><phrase 1="$forum[browsers]">$vbphrase[x_viewing]</phrase></div></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&amp;f=$forum[forumid]">$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="alt1" colspan="2">$forum[threadcount]</td>
<td class="alt2">$forum[replycount]</td>
<if condition="$vboptions['showmoderatorcolumn']">
<td class="alt1"><div class="smallfont">$forum[moderators]&nbsp;</div></td>
</if>
</tr>
</tbody>
<if condition="$childforumbits">
<tbody>
$childforumbits
</tbody>
</if>

[I]forumhome_forumbit_level2_post

<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]">

<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>

<if condition="in_array($forum['forumid'], array(20, 21, 22, 23, 34, 26, 41, 24, 25, 36, 27, 28, 29, 30, 31, 32, 39, 37))">
<td>
<img src="images/forum_pics/$forum[forumid].gif" align="left" style="margin-right: 9px" alt="" border="0" />
</td>
</if>

<td width="100%" align="left" valign="middle">

<div>
<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><strong>$forum[title]</strong></a>
<if condition="$show['browsers']"><span class="smallfont"><div style = color:#FF0000><phrase 1="$forum[browsers]">$vbphrase[x_viewing]</phrase></div></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&amp;f=$forum[forumid]">$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="alt1" colspan="2">$forum[threadcount]</td>
<td class="alt2">$forum[replycount]</td>
<if condition="$vboptions['showmoderatorcolumn']">
<td class="alt1"><div class="smallfont">$forum[moderators]&nbsp;</div></td>
</if>
</tr>
$childforumbits

This might help somebody else.

Take it easy. :)

mm

Dan
23 Jan 2005, 02:38
you got your templates?

doubt i'll see this tonight as on my way out, but i'll see your reply tomorrow morning
Here it is....

forumhome_forumbit_level2_post


<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>
<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&amp;f=$forum[forumid]">$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]&nbsp;</div></td>
</if>
</tr>
$childforumbits

EDDIE!
22 Feb 2005, 00:50
how would I do this so it shows only on certain styles? I'm putting this code inside the Forum Description so I can show a logo in the Forum Bit of each forum.

thinkpixels
08 Mar 2005, 04:45
Love this mod. I tried to install it on my board, and removed the conditional since I want a different image to show up for every forum (movie titles).

However I get red x's on titles that have no image uploaded to my image folder. Ideally I would love to have a default image to show if there is no corresponding image for that forum (ie. 59.jpg) Is there a way to get rid of the red x's? (they only show in IE) and write a conditional to show a default image if there is no image corresponding to that forum id? Thanks in advance.

Here is my code: forumhome_forumbit_level2_post
<tr align="center">
<td class="thumb"><img src="$stylevars[imgdir_misc]/images/misc/forumhome/$forum[forumid].jpg" class="picborder"></td>
<!-- <img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" /></td> -->
<!-- <td class="alt1Active" align="$stylevar[left]" id="f$forum[forumid]"> -->
<!-- hover code -->
<td class="alt1Active" align="$stylevar[left]" id="f$forum[forumid]" style="cursor:hand;" onmouseover="this.className='alt2Active';" onmouseout="this.className='alt1Active';" onclick="window.location.href='forumdisplay.php?$session[sessionurl]f=$forum[forumid]';">

<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&amp;f=$forum[forumid]">$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]&nbsp;</div></td>
</if>
</tr>
$childforumbits

sabret00the
08 Mar 2005, 11:48
the only way i could think of is with hacking i.e. using the file_exists() function of php.

you could however use a conditonal to say <img src="$stylevars[imgdir_misc]/images/misc/forumhome/<if condition="in_array($forum['forumid'], array(XX, XX, XX, XX, XX, XX))">other_image.jpg<else />$forum[forumid].jpg</if>" class="picborder" alt="" />

thinkpixels
08 Mar 2005, 20:27
Thanks sabret00the. The only problem with an array is that I am constantly adding 2 or 3 new forums every month and I would really prefer this be maintanence free and not have to edit the template each time I create a new forum. So I would like the image to be the generic default, until I upload one onto the server.

Your mention of the file_exists() function sounds like a good one. I tried a few attempts at this and got a code explosion though... :eek: But I am no PHP guru. Any suggestions how to get the code below to function?

if ( file_exists('$stylevars[imgdir_misc]/images/misc/forumhome/$forum[forumid].jpg') ) {
<img src="$stylevars[imgdir_misc]/images/misc/forumhome/$forum[forumid].jpg" class="picborder"/>;
} else {
<img src="$stylevars[imgdir_misc]/images/misc/forumhome/soon.gif" />;
}
or should it be like this?
<img src="$stylevar[imgdir_misc]/images/misc/forumhome/<if (file_exists($forum[forumid].jpg'))>$forum[forumid].jpg<else />spacer.gif</if>" class="picborder" alt="" />Thanks again

sabret00the
08 Mar 2005, 20:43
before i provide the code changes you need, could you do me a favour and ask over at vb.com if enabling the file_exists() function in templates is a security risk.

thinkpixels
08 Mar 2005, 21:31
Waiting on a reply (http://www.vbulletin.com/forum/showthread.php?t=132424) at vb.com, but I did find this on a quick search.
http://www.vbulletin.com/forum/showthread.php?t=123034&highlight=file+exists%28%29+php

If it is a risk is there another way to do this? Maybe just place the file if it is there and if not use the placeholder image and I could have a backgound image placed by css? Thanks again.

sabret00the
08 Mar 2005, 21:53
if it's a problem i'll sort an alternative via a hack :)

thinkpixels
10 Mar 2005, 02:03
Here is there reply, sort of...
http://www.vbulletin.com/forum/showthread.php?t=132424

sabret00the
10 Mar 2005, 11:08
ok, i'll wait until another person replies before i give you the code to enable it.

thinkpixels
11 Mar 2005, 20:24
They responded a bit but I am not sure what to make of it. Take a look if you get a chance. Thanks.
http://www.vbulletin.com/forum/showthread.php?p=830757#post830757

AlexUK
29 Mar 2005, 15:41
Hi there I followed your instructions but my forums dont show any images at all, everything is actually correct....how strange??

My template:

<tr align="center">
<td class="alt1"><img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" /></td>
<td class="alt1Active" align="$stylevar[left]" id="f$forum[forumid]">
<div>
$forum[forumhomeicon]

<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="$forum[parentid]==2 OR $forum[parentid]==2"><img src="$stylevars[imgdir_misc]/[forumhome]/$forum[forumid]2.gif" alt="$forum[title]" border="0" vspace="2 px" hspace="2 px" align="left"/></if>




<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&amp;f=$forum[forumid]">$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]&nbsp;</div></td>
</if>
</tr>
$childforumbits

Renada
01 Apr 2005, 17:08
this is for the forumhome, open your "forumhome_forumbit_level2_post" template and find ;
<if condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div></if>

add above that
<if condition="$forum[parentid]==XX OR $forum[parentid]==XX"><img src="$stylevars[imgdir_misc]/[forumhome]/$forum[forumid].gif" alt="$forum[title]" border="0" vspace="2 px" hspace="2 px" align="left"/></if>

if you want it to appear for all forums, remove the conditional, you can also just change the conditional to suit your needs better, the XX's in the conditional are to be replaced by the parentid's of your desire [cyclops] the parentid is just the forumid of the catergory.

Hi,

I'm new to php and am a bit confused (nothing unusual in that) with what to change in this script.

I've edited the template - changed the first two XX's to 5 which is the id of the forum (should it be 05?) and left the 2nd 2XX's alone.

If that is correct, and please someone tell me if it's not, then where do I find the place to add the graphic?

Hope this makes sense.
Renada

hollyboy
18 Apr 2005, 09:59
I've added this code:

<if condition="$forum[parentid]==9 OR $forum[parentid]==9"><img src="$stylevars[imgdir_misc]/[forumhome]/$forum[forumid]9.jpg" alt="$forum[title]" border="0" vspace="2 px" hspace="2 px" align="left"/></if>

Why doesnt it work?

imported_y2ksa
21 May 2005, 11:52
Hi is it posible to add difrent images as statusicon to each forum?
like the one in this forum
http://www.montada.com

thanks

kall
23 May 2005, 01:09
I've added this code:

<if condition="$forum[parentid]==9 OR $forum[parentid]==9"><img src="$stylevars[imgdir_misc]/[forumhome]/$forum[forumid]9.jpg" alt="$forum[title]" border="0" vspace="2 px" hspace="2 px" align="left"/></if>

Why doesnt it work?

You don't need the 9 in the image name.

It comes from the $forum[forumid] variable.

Also, the statement is saying 'If the parent of this forum is Forum #9, display the icon that is named with this Forum's number' .. which obviously won't be 9.jpg ... as that is the Parent forum.

I think what you want is:


<if condition="$forum[forumid]==9"><img src="$stylevars[imgdir_misc]/[forumhome]/$forum[forumid].jpg" alt="$forum[title]" border="0" vspace="2 px" hspace="2 px" align="left"/></if>

A MUCH nicer way of doing it is as follows:


<if condition="in_array($forum['forumid'], array(3,4,7,9))"><a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><img src="images/forumhome/$forum[forumid].gif" alt="$forum[title]" border="0" vspace="2px" hspace="2px" align="left"/></a></if>

This will cause it to show for any forums whose ids you enter in the comma-separated list...and each image will be linked to that forum, as the title is.

a-la: http://www.nzboards.com/forums :)

sensimilla
25 May 2005, 16:18
hmmm... did it worked to someone with ARia template..

the forumhome_forumbit_level2_post looks like this.. thanks in advance for any tip..

<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>
<if condition="$forum[link] != ''"><a style="float:$stylevar[right]; padding-top: 9px;" href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><img src="$stylevar[imgdir_statusicon]/link_home.gif" alt="Jump to $forum[title]" border="0" /></a><else /><a style="float:$stylevar[right]; padding-top: 9px;" href="#top" onclick="return toggle_collapse('forumbit_$forumid')"><img id="collapseimg_forumbit_$forumid" src="$stylevar[imgdir_button]/collapse_lastpost.gif" alt="Last post information" border="0" /></a><a style="float:$stylevar[right]; padding-top: 9px;" href="showthread.php?$session[sessionurl]goto=lastpost&amp;t=$lastpostinfo[lastthreadid]"><img src="$stylevar[imgdir_statusicon]/lastpost_home.gif" alt="$vbphrase[go_to_last_post]" border="0" /></a></if><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&amp;f=$forum[forumid]">$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>
<if condition="$forum[link] != ''"><else /><div>$forum[lastpostinfo]</div></if>
</td>

<td class="alt2"><div style="color: #496690; font-weight: bold; padding-top: 6px; font-family: Tahoma;"><b>$forum[threadcount]</b></div></td>
<td class="alt1"><div style="color: #496690; font-weight: bold; padding-top: 6px; font-family: Tahoma;"><b>$forum[replycount]</b></div></td>

</tr>
$childforumbits

Mr. Brian
25 May 2005, 16:45
Since when postbit template also get involved?

sensimilla
26 May 2005, 21:43
Since when postbit template also get involved?

sorry its the forumhome_forumbit_level2_post of course :cool:

utw-Mephisto
07 Sep 2005, 00:50
Hi,
I have a link on my forum home and I would like to add a banner there instead above the forum :

http://img300.imageshack.us/img300/2932/untitled9br1.jpg

Is there a way to achieve that ? Or only with major modification ?

Mikecp421
09 Oct 2005, 08:22
How can I add this to show on the forumhome display threads and not in the second and third levels?

Reeve of shinra
31 Oct 2006, 08:57
I'd also like to use this however to set the images as backgrounds on my forumbits and not individual icons

mobyz
14 May 2007, 13:38
I have added this code correctly , but nothing comes out. www.bbqsheep.com/forum
plz help


<tr align="center">
<td class="alt2"><img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" id="forum_statusicon_$forum[forumid]" /></td>
<td class="alt1Active" align="$stylevar[left]" id="f$forum[forumid]">
<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="$forum[parentid]==XX OR $forum[parentid]==XX"><img src="$stylevars[imgdir_misc]/[forumhome]/$forum[forumid].gif" alt="$forum[title]" border="0" vspace="2 px" hspace="2 px" align="left"/></if>
<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&amp;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">$forum[threadcount]</td>
<td class="alt1" style="border-right: 1px #dcdcdc solid;">$forum[replycount]</td>
</tr>
$childforumbits

Marvin Hlavac
18 Jan 2009, 18:44
Installed! Just exactly what I needed! Thanks! :)