![]() |
different ads in different subsections
Is there a possibility where I can place ads in some subsections of my forum and different ads in different subsections? Hypothetically speaking if I was running a gaming forum and I wanted xbox ads in the xbox section and PS3 ads in the PS3 section. No I am not running a gaming forum but this is just an example. Thank you in advance to anybody who can help.
By the way, I have this mod https://vborg.vbsupport.ru/showthrea...hreadid=203948 is it possible to do it using this mod? or even without it? Thank you. |
You can use template conditionals in your templates:
Code:
<if condition="$forum['forumid'] == X">AD CODE</if> |
where do you add it using the mod? any idea?
|
I am having a very similar issue, except I want to do it on all forums for a usergroup - if that is possible, that would be awesome - other thing is, where do we add the code you gave us?
|
The code would go into a few template depending on where you want the ads to show...
FORUMDISPLAY for a forum/ area SHOWTHREAD for the thread SHOWPOST for a single post view postbit or postbit_legacy for post contents --------------- Added [DATE]1234728769[/DATE] at [TIME]1234728769[/TIME] --------------- To change ads by usergroup you would use the code: Code:
<if condition="is_member_of($bbuserinfo, 5,10,20)> |
Sorry for my noobness with this stuff but where in the FORUMDISPLAY does the code go? Also, do you require the VB AD management mod for this to work?
|
It goes where you want it to go. If you want the ad at the top of the page it could under $navbar, if you want it at the end of the page it could go above $footer and on and on.
This is a conditional where you're manually placing code so no other addons or systems are needed. |
Quote:
If I just bypass it, nothing shows up. |
My ads aren't showing up either, im putting them above $footer and nothing shows up.
|
Have you changed the forum id to your forum IDs properly? Are you editing the same page you're looking at?
|
What page should I be editing? The FORUMDISPLAY in the template?
--------------- Added [DATE]1234746303[/DATE] at [TIME]1234746303[/TIME] --------------- Code:
<!-- / forum rules & forum jump --> |
Quote:
Is there something wrong with above user's post in the ad code? |
Yes there is something wrong with it: X is not a forum id.
Code:
<if condition="$forum['forumid'] == 24"> |
Quote:
|
Quote:
|
Quote:
|
Quote:
Try removing the condition and just adding the banner code to see if that appears at all so you know if the ad is the issue or the conditional. |
Quote:
When I just add it without the condition, on every threadsection it appears. So it is a problem with the condition somehow. |
Quote:
|
Whoops.
For the FORUMDISPLAY template you'll need to use the variable $foruminfo[forumid] instead of $forum[forumid] (different pages store it in a different variable). |
Quote:
It Works! Thank you for all of your help! You are THE MAN! |
Oh thank the lawd.
Many many thanks to you sir. |
Would this also be possible for specific threads? We have some long running betting threads and I would be interested in doing thread specific advertisement.
|
All times are GMT. The time now is 05:49 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:
|