Display Google adsense on forumhome and banner ad on all other pages

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • amc
    Member
    • Jun 2004
    • 61
    • 3.6.x

    Display Google adsense on forumhome and banner ad on all other pages

    How do I display Google adsense on forumhome and banner ad on all other pages?

    Thanks.
  • Jake Bunce
    Senior Member
    • Dec 2000
    • 46598
    • 3.6.x

    #2
    Where on the pages do you want them to show up?

    Comment

    • amc
      Member
      • Jun 2004
      • 61
      • 3.6.x

      #3
      I want google adsense to show up under the navbar in Index, forumdisplay and showthread pages. On the other pages I want to show another banner.

      I guess one has to use the if ... else statement to achieve this, but I don't know how?

      Comment

      • Jake Bunce
        Senior Member
        • Dec 2000
        • 46598
        • 3.6.x

        #4
        Admin CP -> Styles & Templates -> Style Manager -> « » -> Navigation / Breadcrumb Templates -> navbar

        Find this code and add the red code:

        Code:
        		</if>
        	</tr>
        	</table>
        </div>
        <!-- / nav buttons bar -->
        
        <br />
        <br />
        
        [color=red]<if condition="THIS_SCRIPT == 'index' OR THIS_SCRIPT == 'forumdisplay' OR THIS_SCRIPT == 'showthread'">
        	[color=blue]ADSENSE CODE HERE[/color]
        <else />
        	[color=blue]BANNER CODE HERE[/color]
        </if>
        
        <br />[/color]
        
        <if condition="$show['popups']">
        <!-- NAVBAR POPUP MENUS -->
        	
        	<if condition="$show['searchbuttons']">
        	<!-- header quick search form -->
        	<div class="vbmenu_popup" id="navbar_search_menu" style="display:none">
        Replace the blue code appropriately.

        Comment

        • amc
          Member
          • Jun 2004
          • 61
          • 3.6.x

          #5
          Thanks Jake.

          Worked like a dream.

          Comment

          • clearchanel
            Senior Member
            • May 2001
            • 265
            • 3.8.x

            #6
            I would like to add this code but have it viewable by only guests. Could someone please tell me how to accomplish that.

            Thanks in advance

            Comment

            • Jake Bunce
              Senior Member
              • Dec 2000
              • 46598
              • 3.6.x

              #7
              Code:
              		</if>
              	</tr>
              	</table>
              </div>
              <!-- / nav buttons bar -->
              
              <br />
              <br />
              
              [color=red][color=green]<if condition="!$bbuserinfo[userid]">[/color]
              <if condition="THIS_SCRIPT == 'index' OR THIS_SCRIPT == 'forumdisplay' OR THIS_SCRIPT == 'showthread'">
              	[color=blue]ADSENSE CODE HERE[/color]
              <else />
              	[color=blue]BANNER CODE HERE[/color]
              </if>
              
              <br />[/color]
              [color=green]</if>[/color]
              
              <if condition="$show['popups']">
              <!-- NAVBAR POPUP MENUS -->
              	
              	<if condition="$show['searchbuttons']">
              	<!-- header quick search form -->
              	<div class="vbmenu_popup" id="navbar_search_menu" style="display:none">

              Comment

              • clearchanel
                Senior Member
                • May 2001
                • 265
                • 3.8.x

                #8
                Thank you. That worked quite well.

                Comment

                widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                Working...