Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Banner Manager v1.4??


olimits7

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

Link to comment
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

Link to comment
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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...