The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Can you use if/then forumhome conditionals in the category descriptions?
I'm trying to make a banner show in each forum category on the forumhome homepage, but not on the thread view pages or showthread pages.
I tried using HTML Code:
<if condition="THIS_SCRIPT = index">
Is there a type of conditional that can work within the category descriptions that for sure accept HTML? That's where I'm putting my banner code. |
#3
|
||||
|
||||
To show it everywhere BUT showthread
HTML Code:
<if condition="THIS_SCRIPT != 'showthread'">
|
#4
|
|||
|
|||
Thanks @kh99 and @simon lloyd
I think the problem may be that conditionals aren't parsed in the "description" area of forums. It seems like you can put HTML there, but the conditionals don't seem to be doing anything. Are conditionals supposed to work in that area? |
#5
|
||||
|
||||
You would then need to edit the forumbit templates, search for "Description" and you'll see something like
HTML Code:
<if condition="$show['forumdescription']"> <div class="smallfont">$forum[description]</div> </if> HTML Code:
<if condition="THIS_SCRIPT != 'showthread' AND $show['forumdescription']"> <div class="smallfont">$forum[description] <img src="/images/misc/MYADBANNER.gif" /></div> </if> <else /> <if condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div> </if> </if> |
#6
|
|||
|
|||
Thank you!
That seems like it could work for one image, but what I'm trying to do is show a category sponsor banner on the homepage category listing, but not show that banner on the showthread or forumdisplay pages. I *do* want to show the forum description on the forum display, showthread and forumhome, but *only* show the sponsor banner on forumhome. The code above looks like it would add the same banner to all the forum categories. When I'm looking at the forumbit templates, they don't seem to have a forumid in them. I probably should've put all this info in my original post, but I didn't want to overload it with words |
#7
|
||||
|
||||
You need to look harder in forumhome_forumbit_level1_nopost i found
HTML Code:
<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">$forum[title]</a> |
Благодарность от: | ||
rrr |
#8
|
|||
|
|||
Thanks again. I think I've almost wrapped my head around it.
So I edit the forumbit template where the $description variable is and add the banner code after that. I just need to figure out how to write the conditional to show a different image for each forumid. I tried: Code:
<if condition="$forum[forumid] = '17'"> --------------- Added [DATE]1331687984[/DATE] at [TIME]1331687984[/TIME] --------------- Hmmm, from the looks of this post from Lynne https://vborg.vbsupport.ru/showpost....1&postcount=15 It doesn't look like a forumid conditional won't work on forumhome? --------------- Added [DATE]1331689441[/DATE] at [TIME]1331689441[/TIME] --------------- My bad, I found my error. I thought != meant "does not equal" and = meant "equal". Turns out it should have been == which actually means "equal" Code:
<if condition="$forum[forumid] == '17'"> Thanks again @Simon |
#9
|
||||
|
||||
Glad your sorted
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|