Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Display Banner on EZ Pages

Display Banner on EZ Pages

Locked

Views: 2,007

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
14 Jun 2007, 9:13 PM
#1
numinix avatar

numinix

Totally Zenned

Join Date:
Apr 2007
Location:
Vancouver, Canada
Posts:
1,566
Plugin Contributions:
58

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?

15 Jun 2007, 5:19 AM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Display Banner on EZ Pages

$_GET['main_page'] would = page ...

15 Jun 2007, 5:24 AM
#3
numinix avatar

numinix

Totally Zenned

Join Date:
Apr 2007
Location:
Vancouver, Canada
Posts:
1,566
Plugin Contributions:
58

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.

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.

15 Jun 2007, 5:26 AM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Display Banner on EZ Pages

define('FILENAME_EZPAGES', 'page');

Basically we are saying the same thing ...

15 Jun 2007, 5:30 AM
#5
numinix avatar

numinix

Totally Zenned

Join Date:
Apr 2007
Location:
Vancouver, Canada
Posts:
1,566
Plugin Contributions:
58

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
  $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
  if ($_GET['main_page'] == page) {
    // put in the code of the banner display
  }
?>
15 Jun 2007, 2:37 PM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Display Banner on EZ Pages

Note: page should have quotes around it as in:

if ($_GET['main_page'] == 'page') {
15 Jun 2007, 6:54 PM
#7
numinix avatar

numinix

Totally Zenned

Join Date:
Apr 2007
Location:
Vancouver, Canada
Posts:
1,566
Plugin Contributions:
58

Re: Display Banner on EZ Pages

should, but it works without them...

16 Jun 2007, 1:19 AM
#8
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

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 ... :eek:

16 Jun 2007, 4:56 AM
#9
testuser avatar

testuser

Inactive

Join Date:
Oct 2004
Location:
Houston, TX
Posts:
792
Plugin Contributions:
0

Re: Display Banner on EZ Pages

numinix:

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.

:eek: ...love the smiley Ajeh just learned a new one.