View Full Version : Forum Sponsor
mikez006
10-19-2010, 08:34 PM
I want to add a text ad either at the bottom (preferably) or top of a specific forum. I can't seem to find any mod that can do this. Does anyone know of one that can do this.
BirdOPrey5
10-20-2010, 12:21 AM
I don't know of a mod but you can edit the forumdisplay template and add a conditional to display text or any HTML code in just a specific forum...
<vb:if condition="$forum[forumid] == X">
HTML Code Here
</vb:if>
Where X is the forum id of a specific forum.
For other conditionals see this article:
https://vborg.vbsupport.ru/showthread.php?t=231525
mikez006
10-20-2010, 01:32 PM
great, I'll give that a try.
mikez006
10-21-2010, 07:34 PM
I tried adding that, but nothing is showing up :(
BirdOPrey5
10-21-2010, 07:45 PM
What template did you put the code in? Can you paste in the exact code you used?
mikez006
10-21-2010, 08:56 PM
I put it in the FORUMDISPLAY template at the bottom.
{vb:raw footer}
<vb:if condition="$forum[forumid] == 40">
HTML Code Here
</vb:if>
</body>
</html>
BirdOPrey5
10-21-2010, 09:07 PM
I put it in the FORUMDISPLAY template at the bottom.
{vb:raw footer}
<vb:if condition="$forum[forumid] == 40">
HTML Code Here
</vb:if>
</body>
</html>
Well that is definitely the right code- can you give a link to a forum page this should be working on?
mikez006
10-22-2010, 05:13 PM
<a href="http://vbforums.mmobay.net/aion-buy-sell-trade/" target="_blank">http://vbforums.mmobay.net/aion-buy-sell-trade/</a>
I got the forum ID number from the Manage Forum page in admin.
BirdOPrey5
10-22-2010, 05:46 PM
I'm stumped... I confirmed 40 is your correct forumid... That should be working, I imagine your other conditionals must be working b/c your site looks like it is working. Maybe try moving the code to another part of the page just to see what happens.
mikez006
10-22-2010, 08:38 PM
i tried putting it in other spots, above the footer, at the top of the template, but nothing. I don't even see the code in the source code when I view the page. Can this be a cacheing issue of some sorts?
BirdOPrey5
10-22-2010, 11:15 PM
Out of curiosity change == to != (does not equal) and see what happens...
I've never heard of a cache issue doing this, You may want to ask about this in the VB4 general discussion forum here, likely to have more people browsing than this forum.
mikez006
10-25-2010, 09:01 PM
just wanted to update with a solution.
It should be $foruminfo not $forum:
<vb:if condition="$foruminfo[forumid] == 40">
HTML Code Here
</vb:if>
BirdOPrey5
10-25-2010, 10:55 PM
Great :up:
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.