The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
My forum-structure looks like that:
Code:
MAINFORUM
--- SUBFORUM1
--- SUB1
--- SUB2
--- SUB3
--- ...
--- SUBFORUM2
--- SUB1
--- SUB2
--- SUB3
--- ...
I want in subforum1 to show up banners instead of links. Exactly... it is a squad-forum for our gaming-clan. Now we want to show up the squad-banners instead of the subforum-names - but only on this subforum. All other subforums should have the normal links... Anyone know how to realize that? |
|
#2
|
||||
|
||||
|
Where the link is output in the templates, put in a conditional. Here's the pseudocode. Something along these lines. I didn't check what variables you would actually use. You'll have to take a look at these templates:
forumhome_forumbit_level1_nopost forumhome_forumbit_level1_post forumhome_forumbit_level2_nopost forumhome_forumbit_level2_post forumhome_subforumbit_nopost forumhome_subforumbit_post Code:
<a href="forumdisplay.php?f=$foruminfo[forumid]">
<if condition="$foruminfo[forumid] == FORUMID">
<!-- show banner -->
<img src="path/to/image.jpg" alt="" />
<else />
<!-- show regular link text -->
$foruminfo[title_clean]
</if>
</a>
|
|
#3
|
|||
|
|||
|
Thanks so far...
I just want the banners to show up in the forumindex/home, so i edited these templates... forumhome_subforumbit_nopost forumhome_subforumbit_post Changed the forumid to the id of one of the subforums, saved the template and reloaded the forumindex...but there is still the text link - no banner. For me it looks like somehow the if/else condition doesnt work. Added this after the code from forumhome_subforumbit_post to test it out: Code:
<if condition="$foruminfo[forumid] == 17">
<b>lol</b>
<else />
<b>blah</b>
</if>
So i guess, the <if condition="$foruminfo[forumid] == 17"> somehow isn't working right... Any idea? |
|
#4
|
||||
|
||||
|
Use $forum[forumid]
Here's your forumhome_subforumbit_post template Code:
<img class="inlineimg" src="$stylevar[imgdir_statusicon]/subforum_$forum[statusicon].gif" alt="" border="0" id="forum_statusicon_$forum[forumid]" /> <a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><if condition="in_array($forum[forumid], array(17, 22, 45))"><img src="IMAGE_HERE" alt="" /><else />$forum[title]</if></a> |
|
#5
|
|||
|
|||
|
Works like a charm...
Thx mate <3
|
|
#6
|
||||
|
||||
|
You're very welcome
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|