Is there a way to put an advertisement on the forum home page only? I want different advertisements in different forums and I don't want the one on the home page to display in all the forums. Is there a way to do this?
Can an advertisement be on the home page only?
Collapse
X
-
Tags: None -
I believe you can use the THIS_SCRIPT conditional in vB4. Edit the advertising template and surround it with:
Code:<if condition="THIS_SCRIPT == 'index'">....</if>
Translations provided by Google.
Wayne Luke
The Rabid Badger - a vBulletin Cloud demonstration site.
vBulletin 5 API -
Thanks Wayne. Wouldn't that make it so all advertisements were home page only? I do want to be able to put advertisements on other forum pages.Comment
-
You can have multiple IF conditions in a single template.
<if homepage></if>
<if condition1></if>
etc...Translations provided by Google.
Wayne Luke
The Rabid Badger - a vBulletin Cloud demonstration site.
vBulletin 5 APIComment
-
I'm not very good at html so don't laugh if I did something dumb. Here is my advert template:
Code:<if condition="THIS_SCRIPT == 'index'"> <div id="ad_global_below_navbar"><center> <a href="https://www.susecon.com " target="_blank"><img src="/images/banners/SUSE_GradientBanner_4.gif" alt="SUSECON" title="SUSECON"></a> </center><vb:if condition="$adsshown[] = 34"></vb:if></div> </if>
The following error occurred when attempting to evaluate this template:
%1$s
This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.Comment
-
Try:
Code:<vb:if condition="THIS_SCRIPT == 'index'"> <div id="ad_global_below_navbar"><center> <a href="https://www.susecon.com " target="_blank"><img src="/images/banners/SUSE_GradientBanner_4.gif" alt="SUSECON" title="SUSECON"></a> </center><vb:if condition="$adsshown[] = 34"></vb:if></div> </vb:if>
Translations provided by Google.
Wayne Luke
The Rabid Badger - a vBulletin Cloud demonstration site.
vBulletin 5 APIComment
-
Thanks Wayne. The good news is that it didn't throw an error when trying to save it. The bad news is that it didn't make any difference. The advertisement still shows on all forum pages. That's OK. I was just hoping. It's not critical. I appreciate you trying to help me figure it out.Comment
Related Topics
Collapse
-
by GRAYTechI was able to create a custom home page or 'landing Page'. How do I make it my default home page instead of the forums? Like when I click on the vBulletin logo it takes me to Forums instead of the...
-
Channel: Support Issues & Questions
-
-
by StephenKayThe Home Page is not really a Channel, but an Activity Module displaying the forums and other modules on that page, or so I've been told.
I wanted to target the "default_guest_message"...-
Channel: Support Issues & Questions
-
Comment