Results 1 to 9 of 9
  1. #1
    Join Date
    Apr 2007
    Location
    Vancouver, Canada
    Posts
    1,564
    Plugin Contributions
    71

    Default Display Banner on EZ Pages

    I'd like to display the google adsense banner on ezpages only. Using the ezpages editor always messes up the Google Analytics coding.

    Instead, what I'd like to do is create an if statement that if the page is an ezpage, display banner.

    Where or how would I do this? Specifically, how do I identify that the page is an ezpage?
    Last edited by numinix; 14 Jun 2007 at 10:18 PM.

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Display Banner on EZ Pages

    $_GET['main_page'] would = page ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Apr 2007
    Location
    Vancouver, Canada
    Posts
    1,564
    Plugin Contributions
    71

    Default Re: Display Banner on EZ Pages

    Hi Ajeh,

    Glad someone finally replied!

    But, how do I identify the page as an ezpage? And I want it to display on all ezpages.

    PHP Code:
    if ($_GET['main_page']==FILENAME_EZPAGES) { 
    If it was on reviews or some page with a name, I could do this simply, but ez_pages use page_id.

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Display Banner on EZ Pages

    PHP Code:
    define('FILENAME_EZPAGES''page'); 
    Basically we are saying the same thing ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  5. #5
    Join Date
    Apr 2007
    Location
    Vancouver, Canada
    Posts
    1,564
    Plugin Contributions
    71

    Default Re: Display Banner on EZ Pages

    Nevermind, it's just page as you put lol.

    Here is the code for anyone else trying to replicate:

    PHP Code:
    <?php
      $show_ezpages 
    false;
      if (
    $_GET['main_page'] == page) {
        
    $show_ezpages true;
      }
      if (
    $show_ezpages == true) {
        
    // put in the code of the banner display
      
    }
    ?>
    or

    PHP Code:
    <?php
      
    if ($_GET['main_page'] == page) {
        
    // put in the code of the banner display
      
    }
    ?>
    Last edited by numinix; 15 Jun 2007 at 06:33 AM.

  6. #6
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Display Banner on EZ Pages

    Note: page should have quotes around it as in:
    PHP Code:
    if ($_GET['main_page'] == 'page') { 
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  7. #7
    Join Date
    Apr 2007
    Location
    Vancouver, Canada
    Posts
    1,564
    Plugin Contributions
    71

    Default Re: Display Banner on EZ Pages

    should, but it works without them...

  8. #8
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Display Banner on EZ Pages

    That is a coincidence in that the word happens to be page ...

    Good coding technique says ... that's a no no ... do it the right way or you may be doomed ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  9. #9
    Join Date
    Oct 2004
    Location
    Houston, TX
    Posts
    782
    Plugin Contributions
    4

    Default Re: Display Banner on EZ Pages

    Quote Originally Posted by numinix View Post
    I'd like to display the google adsense banner on ezpages only. Using the ezpages editor always messes up the Google Analytics coding.
    For future reference, just before you select the page your going to edit - on the pages that the HTML editor messes up your custom coding, select "Plain Text." Might have to know a bit of html that's all.

    ...love the smiley Ajeh just learned a new one.
    Last edited by testuser; 16 Jun 2007 at 06:00 AM.

 

 

Similar Threads

  1. Display different banner messages in duplicated banner boxes
    By dw08gm in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 29 Aug 2014, 11:44 AM
  2. Display a different header banner on certain pages
    By George Susini in forum Basic Configuration
    Replies: 4
    Last Post: 14 Apr 2009, 07:06 PM
  3. to display all banner in banner set 3
    By weber in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 28 Mar 2009, 08:36 PM
  4. Stop sidebar banner display on product info pages
    By matt123 in forum Basic Configuration
    Replies: 1
    Last Post: 4 Jan 2008, 08:57 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg