Results 1 to 10 of 12

Hybrid View

  1. #1
    Join Date
    Nov 2008
    Posts
    37
    Plugin Contributions
    0

    Default Banner_Box_All on specific page?

    Hi Zenners,

    I was just wondering if it was possible to put the Banner_Box_all on a specific eZpage, and not all of the pages?

    If so, please let me know.

    Thanks!!

  2. #2
    Join Date
    Oct 2006
    Posts
    5,477
    Plugin Contributions
    11

    Default Re: Banner_Box_All on specific page?

    if($current_page_base == 'page' && $_GET['id'] == 19){
    // replace 19 with the specific id of the ezpage.
    // banner code
    }
    Last edited by Ajeh; 18 Apr 2009 at 02:42 PM. Reason: fix typo on IF missing ==
    I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

  3. #3
    Join Date
    Nov 2008
    Posts
    37
    Plugin Contributions
    0

    Default Re: Banner_Box_All on specific page?

    Quote Originally Posted by yellow1912 View Post
    if($current_page_base == 'page' && $_GET['id'] == 19){
    // replace 19 with the specific id of the ezpage.
    // banner code
    }
    Where is that code located?
    Last edited by Ajeh; 18 Apr 2009 at 02:42 PM. Reason: Fix typo on IF missing ==

  4. #4
    Join Date
    Nov 2008
    Posts
    37
    Plugin Contributions
    0

    Default Re: Banner_Box_All on specific page?

    Doh... silly me. ;)

  5. #5
    Join Date
    Nov 2008
    Posts
    37
    Plugin Contributions
    0

    Default Re: Banner_Box_All on specific page?

    Ok the code for that box is

    PHP Code:
    // INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) VALUES ('Banner Display Group - Side Box banner_box_all', 'SHOW_BANNERS_GROUP_SET_ALL', 'BannersAll', 'The Banner Display Group may only be from one (1) Banner Group for the Banner All sidebox<br /><br />Default Group is BannersAll<br /><br />What Banner Group do you want to use in the Side Box - banner_box_all?<br />Leave blank for none', '19', '72', '', '', now());
    // ALTER TABLE `banners` ADD `banners_sort_order` INT( 11 ) DEFAULT '0' NOT NULL;

    // test if box should display
      
    $show_banner_box_all true;
      if (
    SHOW_BANNERS_GROUP_SET_ALL == '') {
        
    $show_banner_box_all false;
      }

      if (
    $show_banner_box_all == true) {
        
    $banner_box[] = TEXT_BANNER_BOX_ALL;
        
    $banner_box_groupSHOW_BANNERS_GROUP_SET_ALL;

        require(
    $template->get_template_dir('tpl_banner_box_all.php',DIR_WS_TEMPLATE$current_page_base,'sideboxes'). '/tpl_banner_box_all.php');

    // if no active banner in the specified banner group then the box will not show
    // uses banners in the defined group $banner_box_group
        
    if ($banners_all->RecordCount() > 0) {

          
    $title =  BOX_HEADING_BANNER_BOX_ALL;
          
    $title_link false;
          require(
    $template->get_template_dir($column_box_defaultDIR_WS_TEMPLATE$current_page_base,'common') . '/' $column_box_default);
        }
      }
    ?> 
    I'm a little lost... any ideas?

  6. #6
    Join Date
    Nov 2008
    Posts
    37
    Plugin Contributions
    0

    Default Re: Banner_Box_All on specific page?

    Ok, My code is now

    PHP Code:
    <?php
    /**
     * banner_box_all sidebox - used to display "square" banners in sideboxes
     *
     * @package templateSystem
     * @copyright Copyright 2003-2005 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: banner_box_all.php 3133 2006-03-07 23:39:02Z ajeh $
     */

    // INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) VALUES ('Banner Display Group - Side Box banner_box_all', 'SHOW_BANNERS_GROUP_SET_ALL', 'BannersAll', 'The Banner Display Group may only be from one (1) Banner Group for the Banner All sidebox<br /><br />Default Group is BannersAll<br /><br />What Banner Group do you want to use in the Side Box - banner_box_all?<br />Leave blank for none', '19', '72', '', '', now());
    // ALTER TABLE `banners` ADD `banners_sort_order` INT( 11 ) DEFAULT '0' NOT NULL;
    if($current_page_base == 'page' && $_GET['id'] = 2){
        
    // replace 19 with the specific id of the ezpage.
        // banner code

    // test if box should display
      
    $show_banner_box_all true;
      if (
    SHOW_BANNERS_GROUP_SET_ALL == '') {
        
    $show_banner_box_all false;
      }

      if (
    $show_banner_box_all == true) {
        
    $banner_box[] = TEXT_BANNER_BOX_ALL;
        
    $banner_box_groupSHOW_BANNERS_GROUP_SET_ALL;

        require(
    $template->get_template_dir('tpl_banner_box_all.php',DIR_WS_TEMPLATE$current_page_base,'sideboxes'). '/tpl_banner_box_all.php');

    // if no active banner in the specified banner group then the box will not show
    // uses banners in the defined group $banner_box_group
        
    if ($banners_all->RecordCount() > 0) {

          
    $title =  BOX_HEADING_BANNER_BOX_ALL;
          
    $title_link false;
          require(
    $template->get_template_dir($column_box_defaultDIR_WS_TEMPLATE$current_page_base,'common') . '/' $column_box_default);
        }
      }
     }
    ?>
    The problem is that when I change the number 2 in
    PHP Code:
    if($current_page_base == 'page' && $_GET['id'] = 2){ 
    The banners don't move to another page.

    so when my EzPages tell me that the Ezpage is number 2, how can I verify that?

    In case you want to look at, my site , i am looking for my Order ..... , to have the sidebox banners all....

    The Order page is the link to the right of Home.

    I look forward to your help.

  7. #7
    Join Date
    Apr 2007
    Location
    Orange County, CA
    Posts
    88
    Plugin Contributions
    5

    Default Re: Banner_Box_All on specific page?

    Quote Originally Posted by yellow1912 View Post
    if($current_page_base == 'page' && $_GET['id'] == 19){
    // replace 19 with the specific id of the ezpage.
    // banner code
    }
    I am trying to do something similar to this, where I control content based on whether I'm on the home page or not.

    Is there some similar code that will do this:

    PHP Code:
    <?php if($current_page_base == 'index'){
    //Do one thing
    } else {
    //Do another thing
    ?>
    I know the above isn't accurate, but can someone help with the call I should use??

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

    Default Re: Banner_Box_All on specific page?

    $this_is_home_page will tell you if you are on the Home page of the site ...

    Code:
    if ($this_is_home_page == true) {
    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!

 

 

Similar Threads

  1. Specific sideboxe to show on specific page only
    By nicksab in forum General Questions
    Replies: 18
    Last Post: 17 Jul 2012, 07:22 AM
  2. banner_box_all for all banner groups
    By frobie in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 30 Sep 2010, 12:56 AM
  3. 1 banner at a time in banner_box_all
    By get bucked in forum Basic Configuration
    Replies: 2
    Last Post: 18 Nov 2008, 11:52 PM
  4. banner_box_all add problem
    By dvenzo in forum Basic Configuration
    Replies: 21
    Last Post: 25 Mar 2007, 02:36 PM
  5. Banner_Box_All Problems
    By speXedy in forum Basic Configuration
    Replies: 3
    Last Post: 10 Jun 2006, 02:51 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