Jump to content
Sign in to follow this  
olimits7

Banner Manager v1.4??

Recommended Posts

Hello,

 

I installed the banner manager contribution and everything works fine. I just have a question regarding a section of the readme.txt file that says I can "specify banners by page".

 

I don't understand what exactly I have to do to "specify banners by page". I will paste what it says in the readme.txt file below, so you can see what I mean.

 

It uses a case statement to specify which pages to display on, but I can't figure it out. Can someone please explain how I can do this??

 

Specify Banners by Page:

 

/includes/boxes/column_banner.php now includes a case statement to specify which banner group to use for the banner display.

 

This allows you to define specific banners for specific pages. If you want to include the same banner on several pages, just include the banner in additional banner groups.

 

EXAMPLE: I want the Gold Free Call for Price Banner on the index page and everywhere else. If I am using the defined per page option in /includes/boxes/column_banner.php I would setup two banners where one is for the index.php page and the other is used on all other pages. To show the difference, the Alt Tag on the banner changes in the Column Banner box. The other banners are HTML banners and pull their images and alt tags from another site.

 

This is the URL of the contribution: http://www.oscommerce.com/community/contributions,1816

 

Thank you for your help,

 

olimits7

Share this post


Link to post
Share on other sites

This is the code that's in the /includes/boxes/column_banner.php/, just so you can take a look at it.

 

// define banner group per page
// add new case statement for additional pages
 switch (true) {
 case ( (strstr($_SERVER['PHP_SELF'],'default') or strstr($PHP_SELF,'default')) ):
$use_banner_group = '125x125';
break;
 case ( (strstr($_SERVER['PHP_SELF'],'product_info') or strstr($PHP_SELF,'product_info')) ):
$use_banner_group = 'product_info 125x125';
break;
 default:
$use_banner_group = '125x125';
break;
 }

 

Thank you,

 

olimits7

Share this post


Link to post
Share on other sites

I think I figured out how the code works. But can someone tell me how I can define a cPath for this part of the code.

 

case ( (strstr($_SERVER['PHP_SELF'],'product_info') or strstr($PHP_SELF,'product_info')) ):

 

I know the above code will show the banner on the "product_info.php" page, but I'm trying to figure out how to change the code so the banner will only display on the index.php?cPath=10 category page.

 

Does anybody know what code I have to write to make this happen??

 

Thank you,

 

olimits7

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×