Announcement

Collapse
No announcement yet.

adsense in navbar

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #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.
    http://www.vbulletin.com/forum/showthread.php?t=158635

    Comment


    • #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 View Post
      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


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


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


          • #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 />
            
                            < Add Code Here >
            <br />
            <br />
            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 10th Apr '07, 3:28pm. Reason: Word to the wise!

            Comment


            • #7
              I could not find the "controls" section

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

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

              Comment


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

                Comment


                • #9
                  I can just say

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

                  Comment


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


                    • #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">
                      
                      ADSENSE CODE
                      
                      </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


                      • #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 -->
                        
                        <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'))">
                        <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 21st Jun '07, 1:26am.

                        Comment


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

                          www.vbmodders.com

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

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

                          Comment


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


                            • #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...
                              X