adsense in navbar

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • esck
    Member
    • Feb 2007
    • 52
    • 4.1.x

    adsense in navbar

    Hello

    I'm trying to include my adsense code below the navbar.

    But they appear everywhere, and i would like that this "second navbar row" won't show on the search, usercp, and register.

    I've been looking for a code that will help me with this, but couldn't find anything.

    you can check my test forum at foro.esk.com.mx
  • Jose Amaral Rego
    Senior Member
    • Feb 2005
    • 11058
    • 1.1.x

    #2
    You can start with ones list below here.
    • Forum Home
    • Forum Display
    • Show Thread
    • New Reply
    • New Thread
    • Members List
    • Today's Post
    • Calendar
    • Advance Search


    Not in these
    • User CP
    • Register
    • Contact Us
    • Breadcrumbs NarBar
    • Sub-forum links


    Read how to implement ads to show only in certain templates.

    Comment

    • esck
      Member
      • Feb 2007
      • 52
      • 4.1.x

      #3
      Thanks for your reply

      I indeed check that thread.

      But what I like about how my ads are showing is that it's somehow "included" in the navbar, not below it

      And I did not understand a word about this

      Originally posted by Floris
      Each vBulletin .php file has a DEFINE for THIS_SCRIPT, so you can use an if conditional to check against this.

      <if condition="THIS_SCRIPT" == 'search'">This is the search.php page</if>

      To not show the code on search.php for example ...

      THIS_SCRIPT != 'search'

      (if this script is not the search page .. show adsense)
      I wish I did though, 'cause it seems what I'm trying to do

      Comment

      • Jose Amaral Rego
        Senior Member
        • Feb 2005
        • 11058
        • 1.1.x

        #4
        Post picture or url of your site. I am thinking you added code within table of navbar instead of placing it out side of it.

        Comment

        • esck
          Member
          • Feb 2007
          • 52
          • 4.1.x

          #5
          Originally posted by José M. Amaral Rego
          Post picture or url of your site. I am thinking you added code within table of navbar instead of placing it out side of it.
          Originally posted by esck
          you can check my test forum at foro.esk.com.mx
          I forgot to include the http

          test forum

          Indeed the code is in the navbar template, and I like how it shows there, I just need that it doesn't show that second row on the sections that are against google TOS

          Sorry it's in spanish

          Comment

          • Jose Amaral Rego
            Senior Member
            • Feb 2005
            • 11058
            • 1.1.x

            #6
            Add Banner / Adsence Code Under NavBar

            Admin CP => Styles & Templates => Style Manager => «Expand Templates» => Navigation / Breadcrumb Templates => Controls => Expand/Collapse => Navbar
            Find:
            Code:
            		<if condition="$show['member']">
            			<td class="vbmenu_control"><a href="login.php?$session[sessionurl]do=logout&amp;logouthash=$bbuserinfo[logouthash]" onclick="return log_out()">$vbphrase[log_out]</a></td>
            		</if>
            	</tr>
            	</table>
            </div>
            <!-- / nav buttons bar -->
            
            <br />
            Add code and breakline in next empty space here:
            Code:
            		<if condition="$show['member']">
            			<td class="vbmenu_control"><a href="login.php?$session[sessionurl]do=logout&amp;logouthash=$bbuserinfo[logouthash]" onclick="return log_out()">$vbphrase[log_out]</a></td>
            		</if>
            	</tr>
            	</table>
            </div>
            <!-- / nav buttons bar -->
            
            <br />
            [COLOR="Red"]
                            [B]< Add Code Here >[/B]
            <br />
            <br />[/COLOR]
            You still can not use table as-is, it will still go against AdSence TOS. You need to use another table style method or just remove it completely to display or just do not use it.
            Last edited by Jose Amaral Rego; Tue 10 Apr '07, 2:28pm. Reason: Word to the wise!

            Comment

            • esck
              Member
              • Feb 2007
              • 52
              • 4.1.x

              #7
              I could not find the "controls" section

              under "Navigation / Breadcrumb Template" there's only:

              navbar [Edit] [Revert] [View Original]
              navbar_link [Customize]

              Comment

              • Jose Amaral Rego
                Senior Member
                • Feb 2005
                • 11058
                • 1.1.x

                #8
                Just move one of your eyes just slightly up and you will see it was meant as the title of box..

                Comment

                • esck
                  Member
                  • Feb 2007
                  • 52
                  • 4.1.x

                  #9
                  I can just say

                  btw which admincp theme are you using? mine is not like yours

                  Comment

                  • Jose Amaral Rego
                    Senior Member
                    • Feb 2005
                    • 11058
                    • 1.1.x

                    #10
                    A bit off topic...
                    Admin CP => vBulletin Options => vBulletin Options => Admin Control Panel Options => Control Panel Style Folder: vBulletin 3 Default

                    You can get custom ones at www.vbulletin.com or www.vbulletin.org and just add them to cpstyles folder

                    Comment

                    • esck
                      Member
                      • Feb 2007
                      • 52
                      • 4.1.x

                      #11
                      I was using this code just below the code you mentioned

                      Code:
                      <!-- second nav button row -->
                      
                      <if condition="$show['search']">			
                      				<p>¡Gracias por usar el buscador!</p>				
                      <else />
                      
                      <div align="center">
                      	<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center" style="border-top-width:0px">
                      	<tr align="center">
                      		<td class="vbmenu_control">
                      
                      [COLOR="Red"]ADSENSE CODE[/COLOR]
                      
                      </td>
                      	</tr>
                      	</table>
                      </div> 
                      
                      </if>
                      
                      <!-- / second nav button row -->
                      So it worked just as you kindly show me

                      But my conditional sucked big time, I was trying to prevent that second nav bar to show on the search page

                      Comment

                      • Jose Amaral Rego
                        Senior Member
                        • Feb 2005
                        • 11058
                        • 1.1.x

                        #12
                        I will warn you once more... Do not make it look like navbar links...

                        You now notice those 'if conditionals' THIS_SCRIPT, using this will prvent it from showing in
                        • search
                        • newreply
                        • newthread
                        • editpost
                        • and so on.

                        Code:
                        <!-- adsence block start -->
                        
                        [B][COLOR="Red"]<if condition="!in_array(THIS_SCRIPT, array('usercp','payments','register','search','usercp','newreply','usercp','newthread','editpost','private','subscriptions','subscription','member','memberlist','faq','online','login','announcement','calendar','report'))">[/COLOR][/B]
                        <div style="padding: 0px 0px $stylevar[cellpadding]px 0px">
                        <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
                                      <tr>
                                                    <td class="thead" align="left">Adsence</td>
                                      </tr>
                                      <tr>
                                                    <td class="alt1" align="center">
                                                    <center>
                                                                 <!-- Adsence Code Here -->
                         
                        
                        
                                                                 <!-- / Adsence Code Here -->
                                                    </center>
                        
                                                    </td>
                                      </tr>
                        </table>
                        </div>
                        </if>
                        
                        <!-- / adsence block stop -->
                        Last edited by Jose Amaral Rego; Thu 21 Jun '07, 12:26am.

                        Comment

                        • esck
                          Member
                          • Feb 2007
                          • 52
                          • 4.1.x

                          #13
                          I won't, as you can see in my test, they are not blending with the navbar buttons.

                          In fact I just got the idea from



                          My god, you are my hero, that's what I needed

                          Check it out it's great
                          Last edited by esck; Mon 16 Apr '07, 8:43am.

                          Comment

                          • Jose Amaral Rego
                            Senior Member
                            • Feb 2005
                            • 11058
                            • 1.1.x

                            #14
                            Yes, I see it working and display properly now. It will not show in those areas.. I think I am forgetting other places, but it will come to me later.

                            Your done.

                            Comment

                            • esck
                              Member
                              • Feb 2007
                              • 52
                              • 4.1.x

                              #15
                              hey José it's not working anymore, don't know what happened.

                              ads are showing on the scripts you excluded

                              please help

                              Comment

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