how to put adsense in navbar or footer but not in register page?

Discussion in 'Programming' started by Seleno, Jul 30, 2007.

  1. #1
    hello every one
    i want to add adsense banner in navbar or footer but i don't want it to be displayed in registration page
    so how to do this?
     
    Seleno, Jul 30, 2007 IP
  2. sarahk

    sarahk iTamer Staff

    Messages:
    28,914
    Likes Received:
    4,557
    Best Answers:
    124
    Trophy Points:
    665
    #2
    I use MVC style programs so I have one part getting the information and another part displaying it. It's a standard premise used by most systems these days.

    So, in the scripts that get the information I define a variable called internal and give it a value of 0 or 1. If I'm generating a registration page I'll set internal = 1.

    Then in the display section I look to see what that variable is - if it's 0 then I display the ads.
     
    sarahk, Jul 30, 2007 IP
  3. Seleno

    Seleno Peon

    Messages:
    671
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thanx sarahk
    i think there's another way
    hope to get help
     
    Seleno, Jul 30, 2007 IP
  4. sarahk

    sarahk iTamer Staff

    Messages:
    28,914
    Likes Received:
    4,557
    Best Answers:
    124
    Trophy Points:
    665
    #4
    Have you got a preferred approach? There's always more than one way to skin a cat. What framework, forum or CMS are you using?
     
    sarahk, Jul 30, 2007 IP
  5. Seleno

    Seleno Peon

    Messages:
    671
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #5
    vbulletin forum
     
    Seleno, Jul 30, 2007 IP
  6. sarahk

    sarahk iTamer Staff

    Messages:
    28,914
    Likes Received:
    4,557
    Best Answers:
    124
    Trophy Points:
    665
    #6
    even easier...

    just add this code

    if (in_array( THIS_SCRIPT, array( 'calendar', 'member', 'memberlist', 'private', 'profile', 'search', 'subscription', 'usercp')))
    {
    // show the ad/ hide the ad...
    }
    Code (markup):
    and extend the array to include / exclude as required
     
    sarahk, Jul 30, 2007 IP
  7. Seleno

    Seleno Peon

    Messages:
    671
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #7
    thanx but i don't know where to add this and add adsense in!
     
    Seleno, Jul 30, 2007 IP
  8. Seleno

    Seleno Peon

    Messages:
    671
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #8
    any more help?
     
    Seleno, Jul 30, 2007 IP
  9. sarahk

    sarahk iTamer Staff

    Messages:
    28,914
    Likes Received:
    4,557
    Best Answers:
    124
    Trophy Points:
    665
    #9
    Just put it in the template at the same place you would put the ad normally.

    We actually had it for a totally different purpose in a plugin ... let me know if you'd like me to do it for you.
     
    sarahk, Jul 30, 2007 IP