vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=134)
-   -   Image on Forumbit (forumhome) (https://vborg.vbsupport.ru/showthread.php?t=89121)

sabret00the 05-09-2004 10:00 PM

Image on Forumbit (forumhome)
 
this is for the forumhome, open your "forumhome_forumbit_level2_post" template and find ;
HTML Code:

                <if condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div></if>
add above that
HTML Code:

<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 05-10-2004 11:00 AM

Mind posting a screen shot? :)

sabret00the 05-10-2004 11:04 AM

added to first post :)

Tony G 05-10-2004 12:17 PM

Always a useful modification. Good work. ^_^

imported_Synicide 05-10-2004 09:16 PM

I like this mod, I might use it in the future.

imported_chuanse 06-09-2004 06:34 PM

Hmm, this can be cool with small images :D

kall 06-10-2004 10:50 AM

And if you want to make the images into links to that forum,

find:
PHP Code:

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

add before:
PHP Code:

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

find
Code:

hspace="2 px" align="left"/>
add:
Code:

</a>
:)

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

Watson 06-10-2004 02:14 PM

so do I just add this so many times for each image I wanna put in?

imported_Caiman 06-11-2004 12:29 AM

Is there anyway to apply this to 'forum_old.gif' etc ... instead of adding an extra image in the forum description...

imported_Caiman 06-11-2004 12:30 AM

Quote:

Originally Posted by Watson
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 06-13-2004 02:26 PM

I don't understand how to use this.
What are the part I have to edit?

sabret00the 06-13-2004 09:35 PM

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 06-14-2004 07:00 AM

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 06-14-2004 07:04 AM

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 06-14-2004 07:20 AM

<a href="http://www.interfans.org/forum/" target="_blank">http://www.interfans.org/forum/</a>

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

sabret00the 06-14-2004 11:51 AM

this is the code you'll need to add to that to the template:

HTML Code:

<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 06-14-2004 12:30 PM

and this will add the images I want to all the forums of that category?
The images are different in every forum

sabret00the 06-14-2004 12:36 PM

yup

hollyboy 06-14-2004 12:44 PM

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

sabret00the 06-14-2004 12:50 PM

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 06-14-2004 12:55 PM

since I have more forum I have to copy the cose for as many forums as I have?

sabret00the 06-14-2004 01:26 PM

nope it's all automatic

hollyboy 06-14-2004 06:36 PM

I don't understand :(

Mechanical Mind 01-19-2005 09:00 PM

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

Code:

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

...forumhome_forumbit_level2_post...

Code:

<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 01-19-2005 09:10 PM

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

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

HTML Code:

<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 01-19-2005 09:51 PM

Quote:

Originally Posted by sabret00the
you are trying to vertically align it at the top right?

No. Actually I want it centered vertically.

Dan 01-21-2005 08:11 PM

Does this add one to each forum or is there a way where we can make it only apply to certain forums?

sabret00the 01-22-2005 10:33 AM

Quote:

Originally Posted by .Dan
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 01-22-2005 11:41 AM

just change all instances of
HTML Code:

valign="top"
to
HTML Code:

valign="middle"

Mechanical Mind 01-22-2005 04:16 PM

Thanks sabret00the. But this one was just too difficult for me.

Quote:

Originally Posted by sabret00the
just change all instances of
HTML Code:

valign="top"
to
HTML Code:

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 01-22-2005 07:47 PM

Hmm... this really doesn't seem to be working but my templtes are pretty modified ;) So any help would be appreciated.

sabret00the 01-22-2005 07:51 PM

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 01-22-2005 09:48 PM

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

Code:

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

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

forumhome_forumbit_level2_post

Code:

<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 01-23-2005 12:38 AM

Quote:

Originally Posted by sabret00the
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

Code:

<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! 02-21-2005 10:50 PM

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 03-08-2005 02:45 AM

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

<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 03-08-2005 09:48 AM

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

<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 03-08-2005 06:27 PM

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?

HTML Code:

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

<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 03-08-2005 06:43 PM

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 03-08-2005 07:31 PM

Waiting on a reply at vb.com, but I did find this on a quick search.
http://www.vbulletin.com/forum/showt...ists%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.


All times are GMT. The time now is 11:57 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01657 seconds
  • Memory Usage 1,950KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (7)bbcode_code_printable
  • (13)bbcode_html_printable
  • (2)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete