Can an advertisement be on the home page only?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kgroneman
    Senior Member
    • Aug 2007
    • 179

    [Forum] Can an advertisement be on the home page only?

    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?
    Our forums: http://forums.opensuse.org, http://forums.microfocus.com, http://forums.netiq.com, and http://forums.suse.com
  • Wayne Luke
    vBulletin Technical Support Lead
    • Aug 2000
    • 74123

    #2
    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

    Comment

    • kgroneman
      Senior Member
      • Aug 2007
      • 179

      #3
      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.
      Our forums: http://forums.opensuse.org, http://forums.microfocus.com, http://forums.netiq.com, and http://forums.suse.com

      Comment

      • Wayne Luke
        vBulletin Technical Support Lead
        • Aug 2000
        • 74123

        #4
        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 API

        Comment

        • kgroneman
          Senior Member
          • Aug 2007
          • 179

          #5
          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>
          And I get this error when trying to save it:

          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.
          Our forums: http://forums.opensuse.org, http://forums.microfocus.com, http://forums.netiq.com, and http://forums.suse.com

          Comment

          • Wayne Luke
            vBulletin Technical Support Lead
            • Aug 2000
            • 74123

            #6
            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>
            I don't know if that will work as you want because the second conditional is based on the index script being true. However a forum will be using forumdisplay.php with a different THIS_SCRIPT
            Translations provided by Google.

            Wayne Luke
            The Rabid Badger - a vBulletin Cloud demonstration site.
            vBulletin 5 API

            Comment

            • kgroneman
              Senior Member
              • Aug 2007
              • 179

              #7
              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.
              Our forums: http://forums.opensuse.org, http://forums.microfocus.com, http://forums.netiq.com, and http://forums.suse.com

              Comment

              Related Topics

              Collapse

              Working...