New Zenner
- Join Date:
- Nov 2008
- Posts:
- 40
- Plugin Contributions:
- 0
Post #1 by robomike
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!!
New Zenner
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!!
Totally Zenned
if($current_page_base == 'page' && $_GET['id'] == 19){
// replace 19 with the specific id of the ezpage.
// banner code
}
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
New Zenner
yellow1912:
if($current_page_base == 'page' && $_GET['id'] == 19){
// replace 19 with the specific id of the ezpage.
// banner code
}
Where is that code located?
New Zenner
Doh... silly me. ;)
New Zenner
Ok the code for that box is
// 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_group= SHOW_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_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
}
}
?>
I'm a little lost... any ideas? :mellow:
New Zenner
Ok, My code is now
<?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_group= SHOW_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_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
}
}
}
?>
The problem is that when I change the number 2 in
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.
Totally Zenned
This one https://smartmow.com/index.php?main_page=product_info&cPath=1&products_id=1 ?
This is not an ezpage tho?
Or this one?
http://smartmow.com/index.php?main_page=page&id=2
Also, your site has some problem, zenid is attached to all links even after the 2nd page load.
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
New Zenner
yellow1912:
This one https://smartmow.com/index.php?main_page=product_info&cPath=1&products_id=1 ?
This is not an ezpage tho?
Or this one?
http://smartmow.com/index.php?main_page=page&id=2Also, your site has some problem, zenid is attached to all links even after the 2nd page load.
They're ezpages ... I made them with the EzPage tool, and they show up in my Ezpage listing. I even edit them through there....
What problem does my site have?? This is the first time I am hearing this and your help would be great!
New Zenner
Can't someone help me?
Oba-san
You have a typo that you are working with, where you have a single equal ( = ) vs a double equal ( == ) in the IF statement that will break things ... :eek:
So, let's make the code a bit easier ...
// test if box should display
$show_banner_box_all = true;
if (SHOW_BANNERS_GROUP_SET_ALL == '') {
$show_banner_box_all = false;
}
[B]if ($current_page_base == 'page' && $_GET['id'] == 2) {
// only show on one ez_page id 2
$show_banner_box_all = true;
} else {
// do not show
$show_banner_box_all = false;
}
[/B]
if ($show_banner_box_all == true) {
This method allows the original code to be there, then your new condition to happen in the middle and then the main IF test follows to see whether or not the code should even be run ...
You can do this code either way ... I just like to keep the code small and easy to spot on the changes ...
See if this helps you out ...
Linda McGrath
If you have to think ... you haven't been zenned ...
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!
New Zenner
yellow1912:
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 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??
~Rich | OEMplus.com | EuroHitches,com | Kufatec.com
Oba-san
$this_is_home_page will tell you if you are on the Home page of the site ...
if ($this_is_home_page == true) {
Linda McGrath
If you have to think ... you haven't been zenned ...
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!
Tell staff why this post should be reviewed.