Results 1 to 10 of 10
  1. #1
    Join Date
    Apr 2008
    Posts
    48
    Plugin Contributions
    0

    Default Sponsor banner box help

    I ve put 2 links in this banner box but they dont show up together only in a rotation depending on refresh. How can i change it so they are in there together using the banner manager???

    Regards

    Luke

  2. #2
    Join Date
    Feb 2008
    Posts
    155
    Plugin Contributions
    0

    Default Re: Sponsor banner box help

    Thats a good question Luke I was comeing on to ask the same question. Not about sponsor banner but in general . I'm trying to add a military,fire,and police discount banner to my site but have found no way to keep the banner from going on rotation?

  3. #3
    Join Date
    Dec 2005
    Posts
    1,059
    Plugin Contributions
    2

    Default Re: Sponsor banner box help

    Use the Banners-All banners group to put more than one banner in a box.
    Give each one a sort order for your display preference.

    Banner tutorial here:
    https://www.zen-cart.com/tutorials/index.php?article=80
    [FONT=Arial]Country Kitty Crafts[/FONT][FONT=Arial]
    [/FONT] [FONT=Garamond]
    [/FONT]

  4. #4
    Join Date
    Mar 2008
    Posts
    34
    Plugin Contributions
    0

    Default Re: Sponsor banner box help

    I'm using Banners-All but I need to have an other bloc with multiple banners on it for another purpose. How can I do that?

  5. #5
    Join Date
    Apr 2008
    Posts
    48
    Plugin Contributions
    0

    Default Re: Sponsor banner box help

    nope no dice i did what the tutorial said changed all my banners to bannersall then chagned the layout settings and the sponsors box didnt even show up so i chagned it back and it just did the one link rotation thoughts besides the fact im mental.

  6. #6
    Join Date
    Apr 2008
    Posts
    48
    Plugin Contributions
    0

    Default Re: Sponsor banner box help

    Also would it be easier to just use ez pages my understanding is u can just put all ur links on them not that i know how to do that even tho ive been readin and trailin to do it

  7. #7
    Join Date
    Mar 2008
    Posts
    34
    Plugin Contributions
    0

    Default Re: Sponsor banner box help

    Maybe, but I would like to manage it from the banner manager.

    I partially found the solution... but I do not recommend to try it since you know what your doing, because sincerely, I'm not! I'm just trying some things I found logical but I don't know much about PHP and how it works. But for you information, of if you think you can help me, here's what I did.

    I duplicated the banner_box_all.php located in includes/modules/sideboxs and renamed the copy banner_box_all2.php. I did the same with tpl_banner_box_all.php located in includes/templates/MYTEMPLATE. I also worked in these files to change the names by adding "2" at the end of each related words. (sorry, I don't know how to explain that in english).

    Anyway, here are the the files:

    banner_box_all2.php
    PHP Code:
    <?php
    /**
     * banner_box_all2 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_all2', 'SHOW_BANNERS_GROUP_SET_ALL2', 'BannersAll2', 'The Banner Display Group may only be from one (1) Banner Group for the Banner All 2 sidebox<br /><br />Default Group is BannersAll2<br /><br />What Banner Group do you want to use in the Side Box - banner_box_all2?<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_all2 true;
      if (
    SHOW_BANNERS_GROUP_SET_ALL2 == '') {
        
    $show_banner_box_all2 false;
      }

      if (
    $show_banner_box_all2 == true) {
        
    $banner_box[] = TEXT_BANNER_BOX_ALL2;
        
    $banner_box_groupSHOW_BANNERS_GROUP_SET_ALL2;

        require(
    $template->get_template_dir('tpl_banner_box_all2.php',DIR_WS_TEMPLATE$current_page_base,'sideboxes'). '/tpl_banner_box_all2.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_ALL2;
          
    $title_link false;
          require(
    $template->get_template_dir($column_box_defaultDIR_WS_TEMPLATE$current_page_base,'common') . '/' $column_box_default);
        }
      }
    ?>

    tpl_banner_box_all2.php
    PHP Code:
    <?php
    /**
     * Side Box Template
     *
     * @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: tpl_banner_box_all2.php 2982 2006-02-07 07:56:41Z birdbrain $
     */
        
    $content '';
        
    $content .= '<div id="' str_replace('_''-'$box_id 'Content') . '" class="sideBoxContent centeredContent">';
    // select banners_group to be used
      
    $new_banner_search zen_build_banners_group(SHOW_BANNERS_GROUP_SET_ALL2);

      
    // secure pages
      
    switch ($request_type) {
        case (
    'SSL'):
          
    $my_banner_filter=" and banners_on_ssl= " "1 ";
          break;
        case (
    'NONSSL'):
          
    $my_banner_filter='';
          break;
      }

      
    $sql "select banners_id from " TABLE_BANNERS " where status = 1 " $new_banner_search $my_banner_filter " order by banners_sort_order";
      
    $banners_all $db->Execute($sql);



    // if no active banner in the specified banner group then the box will not show
      
    $banner_cnt 0;
      while (!
    $banners_all2->EOF) {
        
    $banner_cnt++;
        
    $banner zen_banner_exists('dynamic'SHOW_BANNERS_GROUP_SET_ALL2);
        
    $content .= zen_display_banner('static'$banners_all2->fields['banners_id']);
    // add spacing between banners
        
    if ($banner_cnt $banners_all2->RecordCount()) {
          
    $content .= '<br /><br />';
        }
        
    $banners_all2->MoveNext();
      }
      
    $content .= '</div>';
    ?>
    I then looked in the Layout Box Controller and banner_box_all2,php was now there! Cool! But it wasn't in the configuration/layer setting, so I run the following statement as an SQL patch:

    PHP Code:
    INSERT INTO configuration (configuration_titleconfiguration_keyconfiguration_valueconfiguration_descriptionconfiguration_group_idsort_orderuse_functionset_functiondate_addedVALUES ('Banner Display Group - Side Box banner_box_all2''SHOW_BANNERS_GROUP_SET_ALL2''BannersAll2''The Banner Display Group may only be from one (1) Banner Group for the Banner All 2 sidebox<br /><br />Default Group is BannersAll2<br /><br />What Banner Group do you want to use in the Side Box - banner_box_all2?<br />Leave blank for none''19''72'''''now()); 
    It then appeared in the Layout Setting. Now I have a bug... When I make banner_box_all2.php active in the Controller it makes some other side boxes dissapear. So it needs a little more to work properly. And since I'm just playing with that, I'm not really sure to know what to do. I'm also note really sure of what I did... lol

  8. #8
    Join Date
    Mar 2008
    Posts
    34
    Plugin Contributions
    0

    Default Re: Sponsor banner box help

    Ok, I make it worked! So ignore the previous post, it has made a little mistakes in each files I modified. So here's how to do it. It worked for me, you can try it on your own risk if you want. Only 2 files to add and a patch to run. Do not forget to backup your database before if you want to do it. I'm not responsible for any problem you can have.

    1- Create this file is and name it "banner_box_all2.php" :

    PHP Code:
    <?php
    /**
     * banner_box_all2 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_all2.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_all2', 'SHOW_BANNERS_GROUP_SET_ALL2', 'BannersAll2', 'The Banner Display Group may only be from one (1) Banner Group for the Banner All 2 sidebox<br /><br />Default Group is BannersAll2<br /><br />What Banner Group do you want to use in the Side Box - banner_box_all2?<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_all2 true;
      if (
    SHOW_BANNERS_GROUP_SET_ALL2 == '') {
        
    $show_banner_box_all2 false;
      }

      if (
    $show_banner_box_all2 == true) {
        
    $banner_box[] = TEXT_BANNER_BOX_ALL2;
        
    $banner_box_groupSHOW_BANNERS_GROUP_SET_ALL2;

        require(
    $template->get_template_dir('tpl_banner_box_all2.php',DIR_WS_TEMPLATE$current_page_base,'sideboxes'). '/tpl_banner_box_all2.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_all2->RecordCount() > 0) {

          
    $title =  'Title of your sidebox';
          
    $title_link false;
          require(
    $template->get_template_dir($column_box_defaultDIR_WS_TEMPLATE$current_page_base,'common') . '/' $column_box_default);
        }
      }
    ?>
    2- Change the line
    PHP Code:
    $title =  'Title of your sidebox'
    by replacing 'Title of your sidebox' by, guess what, the name of your sidebox.

    3- Upload it in : includes/modules/sideboxes/

    4- Create this file is and name it "tpl_banner_box_all2.php" :

    PHP Code:
    <?php
    /**
     * Side Box Template
     *
     * @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: tpl_banner_box_all2.php 2982 2006-02-07 07:56:41Z birdbrain $
     */
        
    $content '';
        
    $content .= '<div id="' str_replace('_''-'$box_id 'Content') . '" class="sideBoxContent centeredContent">';
    // select banners_group to be used
      
    $new_banner_search zen_build_banners_group(SHOW_BANNERS_GROUP_SET_ALL2);

      
    // secure pages
      
    switch ($request_type) {
        case (
    'SSL'):
          
    $my_banner_filter=" and banners_on_ssl= " "1 ";
          break;
        case (
    'NONSSL'):
          
    $my_banner_filter='';
          break;
      }

      
    $sql "select banners_id from " TABLE_BANNERS " where status = 1 " $new_banner_search $my_banner_filter " order by banners_sort_order";
      
    $banners_all2 $db->Execute($sql);



    // if no active banner in the specified banner group then the box will not show
      
    $banner_cnt 0;
      while (!
    $banners_all2->EOF) {
        
    $banner_cnt++;
        
    $banner zen_banner_exists('dynamic'SHOW_BANNERS_GROUP_SET_ALL2);
        
    $content .= zen_display_banner('static'$banners_all2->fields['banners_id']);
    // add spacing between banners
        
    if ($banner_cnt $banners_all2->RecordCount()) {
          
    $content .= '<br /><br />';
        }
        
    $banners_all2->MoveNext();
      }
      
    $content .= '</div>';
    ?>
    5- Upload it in : includes/templates/sideboxes/YOUR_TEMPLATES/sideboxes/

    6 - Run the following SQL patch in the your admin/tools/install SQL Patches :
    PHP Code:
    INSERT INTO configuration (configuration_titleconfiguration_keyconfiguration_valueconfiguration_descriptionconfiguration_group_idsort_orderuse_functionset_functiondate_addedVALUES ('Banner Display Group - Side Box banner_box_all2''SHOW_BANNERS_GROUP_SET_ALL2''BannersAll2''The Banner Display Group may only be from one (1) Banner Group for the Banner All 2 sidebox<br /><br />Default Group is BannersAll2<br /><br />What Banner Group do you want to use in the Side Box - banner_box_all2?<br />Leave blank for none''19''72'''''now()); 
    That's it. It worked for me. Feel free to make any correction if you think it is necessary!

  9. #9
    Join Date
    Apr 2008
    Posts
    48
    Plugin Contributions
    0

    Default Re: Sponsor banner box help

    nah to be honest im turd at php and even if i could find tht stuff i wouldn fool with it but ur help is much obliged.

  10. #10
    Join Date
    Nov 2009
    Location
    North Bendigo, VIC, Australia
    Posts
    158
    Plugin Contributions
    0

    Default Re: Sponsor banner box help

    Quote Originally Posted by YesNoMaybe View Post
    Ok, I make it worked! So ignore the previous post, it has made a little mistakes in each files I modified. So here's how to do it. It worked for me, you can try it on your own risk if you want. Only 2 files to add and a patch to run. Do not forget to backup your database before if you want to do it. I'm not responsible for any problem you can have.

    1- Create this file is and name it "banner_box_all2.php" :

    PHP Code:
    <?php
    /**
     * banner_box_all2 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_all2.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_all2', 'SHOW_BANNERS_GROUP_SET_ALL2', 'BannersAll2', 'The Banner Display Group may only be from one (1) Banner Group for the Banner All 2 sidebox<br /><br />Default Group is BannersAll2<br /><br />What Banner Group do you want to use in the Side Box - banner_box_all2?<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_all2 true;
      if (
    SHOW_BANNERS_GROUP_SET_ALL2 == '') {
        
    $show_banner_box_all2 false;
      }

      if (
    $show_banner_box_all2 == true) {
        
    $banner_box[] = TEXT_BANNER_BOX_ALL2;
        
    $banner_box_groupSHOW_BANNERS_GROUP_SET_ALL2;

        require(
    $template->get_template_dir('tpl_banner_box_all2.php',DIR_WS_TEMPLATE$current_page_base,'sideboxes'). '/tpl_banner_box_all2.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_all2->RecordCount() > 0) {

          
    $title =  'Title of your sidebox';
          
    $title_link false;
          require(
    $template->get_template_dir($column_box_defaultDIR_WS_TEMPLATE$current_page_base,'common') . '/' $column_box_default);
        }
      }
    ?>
    2- Change the line
    PHP Code:
    $title =  'Title of your sidebox'
    by replacing 'Title of your sidebox' by, guess what, the name of your sidebox.

    3- Upload it in : includes/modules/sideboxes/

    4- Create this file is and name it "tpl_banner_box_all2.php" :

    PHP Code:
    <?php
    /**
     * Side Box Template
     *
     * @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: tpl_banner_box_all2.php 2982 2006-02-07 07:56:41Z birdbrain $
     */
        
    $content '';
        
    $content .= '<div id="' str_replace('_''-'$box_id 'Content') . '" class="sideBoxContent centeredContent">';
    // select banners_group to be used
      
    $new_banner_search zen_build_banners_group(SHOW_BANNERS_GROUP_SET_ALL2);

      
    // secure pages
      
    switch ($request_type) {
        case (
    'SSL'):
          
    $my_banner_filter=" and banners_on_ssl= " "1 ";
          break;
        case (
    'NONSSL'):
          
    $my_banner_filter='';
          break;
      }

      
    $sql "select banners_id from " TABLE_BANNERS " where status = 1 " $new_banner_search $my_banner_filter " order by banners_sort_order";
      
    $banners_all2 $db->Execute($sql);



    // if no active banner in the specified banner group then the box will not show
      
    $banner_cnt 0;
      while (!
    $banners_all2->EOF) {
        
    $banner_cnt++;
        
    $banner zen_banner_exists('dynamic'SHOW_BANNERS_GROUP_SET_ALL2);
        
    $content .= zen_display_banner('static'$banners_all2->fields['banners_id']);
    // add spacing between banners
        
    if ($banner_cnt $banners_all2->RecordCount()) {
          
    $content .= '<br /><br />';
        }
        
    $banners_all2->MoveNext();
      }
      
    $content .= '</div>';
    ?>
    5- Upload it in : includes/templates/sideboxes/YOUR_TEMPLATES/sideboxes/

    6 - Run the following SQL patch in the your admin/tools/install SQL Patches :
    PHP Code:
    INSERT INTO configuration (configuration_titleconfiguration_keyconfiguration_valueconfiguration_descriptionconfiguration_group_idsort_orderuse_functionset_functiondate_addedVALUES ('Banner Display Group - Side Box banner_box_all2''SHOW_BANNERS_GROUP_SET_ALL2''BannersAll2''The Banner Display Group may only be from one (1) Banner Group for the Banner All 2 sidebox<br /><br />Default Group is BannersAll2<br /><br />What Banner Group do you want to use in the Side Box - banner_box_all2?<br />Leave blank for none''19''72'''''now()); 
    That's it. It worked for me. Feel free to make any correction if you think it is necessary!



    This worked a treat.... thanks heaps!
    Kind Regards Casey

 

 

Similar Threads

  1. v151 Changing 'sponsor' box/other box titles...
    By Sellerz in forum Customization from the Admin
    Replies: 1
    Last Post: 16 Nov 2012, 05:41 AM
  2. how to seperate sponsor and have you seen box?
    By plugy in forum Basic Configuration
    Replies: 1
    Last Post: 20 Aug 2010, 02:52 AM
  3. Replies: 3
    Last Post: 30 Dec 2009, 05:15 PM
  4. Remove "Sponsor" title in Banner Box
    By DamienDLSkinSolution in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 14 Feb 2009, 02:36 PM

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