![]() |
Hmm... this really doesn't seem to be working but my templtes are pretty modified ;) So any help would be appreciated.
|
you got your templates?
doubt i'll see this tonight as on my way out, but i'll see your reply tomorrow morning |
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> Code:
<tr align="center"> Take it easy. :) mm |
Quote:
forumhome_forumbit_level2_post Code:
<tr align="center"> |
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.
|
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"> |
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="" /> |
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') ) { 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="" /> |
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.
|
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 03:55 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|