Showing Adsense in header but only on pages with content (vbulletin)

Discussion in 'Placement / Reviews / Examples' started by 993ti, Jun 5, 2006.

  1. #1
    I was wondering how i could show the ads in the header but not on pages without content (profiles, login and stuff like that).
    I managed it on my phpBB forums with putting the adsense code in page_header.php and then adding 1 line to the files where i want it to show (index.php, viewforum.php etc.).

    Is there a similar way to do this for VBulletin?
     
    993ti, Jun 5, 2006 IP
  2. EWD

    EWD Well-Known Member

    Messages:
    1,688
    Likes Received:
    85
    Best Answers:
    0
    Trophy Points:
    155
    #2
    Search google for the best kinds of integration or examples of how people have done them.
     
    EWD, Jun 5, 2006 IP
  3. equinoxprime

    equinoxprime Peon

    Messages:
    144
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #3
    You can achieve this by wrapping conditionals around your header Adsense code, causing it to only show on forumdisplay and showthread pages, for example. You should search the official board on how to do that.

    The alternative is, to add content to those non-content pages as well. For example, you can add syndicated news to the navbar, or a side column, excerpts from recents posts/threads, and so and so forth.
     
    equinoxprime, Jun 5, 2006 IP
    993ti likes this.
  4. 993ti

    993ti Well-Known Member

    Messages:
    314
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    108
    #4
    Thank you very much.
    I'm now using conditionals to show the ads only on pages with content.
    <if condition="THIS_SCRIPT == index OR THIS_SCRIPT == forumdisplay OR THIS_SCRIPT == showthread">
    ADSENSE CODE HERE
    </if>
    
    Code (markup):
     
    993ti, Jun 6, 2006 IP
  5. nandanamnidheesh

    nandanamnidheesh Active Member

    Messages:
    376
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    55
    #5
    i think itz ok to show on some pages without content like login or register pages, mainly i found Google show public ads on such pages .. am not sure .. :)
     
    nandanamnidheesh, Mar 24, 2011 IP