The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Comments |
#32
|
||||
|
||||
Hmm... this really doesn't seem to be working but my templtes are pretty modified So any help would be appreciated.
|
#33
|
||||
|
||||
you got your templates?
doubt i'll see this tonight as on my way out, but i'll see your reply tomorrow morning |
#34
|
||||
|
||||
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&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] </div></td> </if> </tr> </tbody> <if condition="$childforumbits"> <tbody> $childforumbits </tbody> </if> 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&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] </div></td> </if> </tr> $childforumbits Take it easy. mm |
#35
|
||||
|
||||
Quote:
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&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] </div></td> </if> </tr> $childforumbits |
#36
|
|||
|
|||
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.
|
#37
|
|||
|
|||
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&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] </div></td> </if> </tr> $childforumbits |
#38
|
||||
|
||||
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="" />
|
#39
|
|||
|
|||
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... 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" />; } 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="" />
|
#40
|
||||
|
||||
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.
|
#41
|
|||
|
|||
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. |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|