Announcement
Collapse
No announcement yet.
Wasn't there a thread her about conditionals?
Collapse
X
-
There shouldn't be any noticeable slowdown. But yes, it's going to be a lot of code. The only other option would be to create some sort of plugin rather than a bunch of template conditionals but that would be more difficult for most people then template conditionals.
Just put plenty of spacing in the templates so you it looks nice and is easy to follow- don't worry about blank lines you don't see them once the page is rendered anyway.
Leave a comment:
-
I want to segment my forum for advertisers into various channels based on forum topic - target each individual forum with its own DFP ad tag. At the same time I want our members to see one 728x90 ad and the nonmembers to see three 300x250 boxes in the ad_navbar_below slot. I am trying to get my head around this...
I will need 16 separate forums set up. I reckon the ad_navbar_below slot is going to be pretty full.
Do I just stack them up like this? I am testing it now with ad_sized images in a few forums and it seems to be working...
1. Health Forum
Members see one health targeted 728x90 ad, nonmembers see three Health targeted 300x250 ads
2. Jobs Forum
Members see one Jobs targeted 728x90 ad, nonmembers see three Jobs targeted 300x250 ads
3. Sports Forum
Members see one Sports targeted 728x90 ad, nonmembers see three Sports targeted 300x250 ads
etc
Are all these conditionals going to slow down my page loads?
Leave a comment:
-
Originally posted by Lynne View PostDisplay Information only on index page:
<if condition="THIS_SCRIPT == 'index'"> Your Code/Text Here </if>
If I wanted to test this out by displaying a 300x250 image file, do I need to put image tags around it in the Your Code/Text Here spotin order for it to display on vb, right?Last edited by tribedude; Thu 15 Aug '13, 9:04am.
Leave a comment:
-
Suggest you read up on this article - http://www.vbulletin.org/forum/showthread.php?t=215032
The if /else syntax is explained at the bottom.
Leave a comment:
-
I currently have usergroup conditionals that show larger size ads (3 x 300x250 above the navbar) to guests and non members, and smaller size ads(one 728x90 above the navbar) to registered full members. Is there a way I can keep this, yet also use conditionals to serve the separate Adsense tags into only 5 forums while serving DFP tags into the rest? Like this:
1. Everyone would get adsense tags in those 5 forums and adsense tags would also be on on the index page.
2. Everyone would get DFP tags (not enabled for adsense) in all other forums except the above 5
3. Registered members would see a 728x90 size ad above the navbar sitewide
4. Everyone else would see three 300x250 box size ads above the navbar.
Leave a comment:
-
There would be no benefit of combining due to increased complexity of the combined if... else... statements.
Leave a comment:
-
Originally posted by snakes1100 View PostYes, you can serve both at the same time.
Display Information in one specific forum:
<if condition="$forum[forumid] == X"> Your Code/Text Here </if>
Display Information in all forums while excluding one specific forum:
<if condition="$forum[forumid] != X"> Your Code/Text Here </if>
Display Information in multiple forums & exclude the rest of your forums:
<if condition="in_array($forum['forumid'], array(X,XX,XXX))"> Your Code/Text Here </if>
Can I combine a couple of these together to accomplish my purpose? Thanks for all the tips everyone!
Leave a comment:
-
Display Information only on index page:
<if condition="THIS_SCRIPT == 'index'"> Your Code/Text Here </if>
Leave a comment:
-
What about the main forum index page? Is there a conditional to run ads on it? Or do I have to manually pop Adsense code into that?
Leave a comment:
-
Yes, you can serve both at the same time.
Display Information in one specific forum:
<if condition="$forum[forumid] == X"> Your Code/Text Here </if>
Display Information in all forums while excluding one specific forum:
<if condition="$forum[forumid] != X"> Your Code/Text Here </if>
Display Information in multiple forums & exclude the rest of your forums:
<if condition="in_array($forum['forumid'], array(X,XX,XXX))"> Your Code/Text Here </if>
Leave a comment:
-
Wasn't there a thread her about conditionals?
Currently we are serving ads sitewide with DFP, but from now on I need to put Adsense tags in 5 specific forums on our site only, while using our standard DFP tags on the rest of the forums to serve other ad networks. What is the best way to do this?
Can I use conditionals to serve the Adsense into the 5 forums and also use them to serve DFP tags into the rest? Or do I have to hard code the Adsense tags into each of the 5 forums somehow, and then hard code the balance of the forums with the DFP tags...?
Can one of you masters give me some tips?Tags: None
Related Topics
Collapse
-
by mariobGood day all,
I am trying to implement responsive ads and having no success.
Running Latest version of VB5 with no plugins.
Steps followed :
1) I created...-
Channel: Support Issues & Questions
Sat 26 Mar '16, 2:56am -
Leave a comment: