Smart Backgrounds

Description
This mod allows you to use different header backgrounds for each top category or page.

If an image file is found for a category or page, the image will be displayed as the header background;
if not, the default (home page) background image will be displayed.

The feature may also be applied to any other element on the page independently, by moving and modifying the code appropriately (examples given).
It may also be used to handle foreground images.
Compatible with Zen Cart v1.3.5 - 1.3.8.

Forum Support Thread

Zen Cart® Versions v1.3.5, v1.3.6, v1.3.7, v1.3.8
Original Author gjh42
Last Updated by gjh42 - 10 Feb 2010
Downloads 5,907

Version History

Smart Backgrounds   -   Version: 3.0.1
The current version of this mod allows you to use different backgrounds or other styling in any desired page element for each category, ez-page or pagename, simply by saving an image file with an appropriate name and adding a rule to your stylesheet.

The code has been moved to a function, so that it barely touches one existing file.
The feature may also be applied to any other element on the page independently, by calling the smart_backgrounds() function appropriately.
It may also be used to switch foreground images with one line of code added to a file.

Support thread at http://www.zen-cart.com/forum/showthread.php?t=83034
 
Zen Cart® Versions v1.3.5, v1.3.6, v1.3.7, v1.3.8
Date Added 10 Feb 2010
Author gjh42
File Size 20.3 KB
PHP 5.3 Safe? Unknown
Downloads 1,870
 
Smart Backgrounds   -   Version: 2.1.1
Fixed nesting bug in chained ternary operators: added ( ) in two statements.  
Zen Cart® Versions v1.3.8
Date Added 11 Jan 2009
Author gjh42
File Size 6.8 KB
PHP 5.3 Safe? Unknown
Downloads 1,528
 
Smart Backgrounds   -   Version: 2.1
Added automatic switching for individual categories or ez-pages which have bg images saved; next defaults to top cat, general ez-page or pagename if they have images saved, or if none of the above, the default (home page) background image will be displayed.

The switching is accomplished by automatically setting a class name for the page body, and manually writing a CSS rule in the stylesheet for each background desired (and, of course, saving an image file for each background).
 
Zen Cart® Versions v1.3.8
Date Added 28 Dec 2008
Author gjh42
File Size 6.8 KB
PHP 5.3 Safe? Unknown
Downloads 113
 
Smart Backgrounds   -   Version: 2.0.1
Fixed typo in unique ez-pages code.
If you have v2.0, change $unique_ezpages == true;
to $unique_ezpages = true;
This only matters if you want to use individual ez-page backgrounds.
 
Zen Cart® Versions v1.3.8
Date Added 6 Jun 2008
Author gjh42
File Size 6.6 KB
PHP 5.3 Safe? Unknown
Downloads 1,074
 
Smart Backgrounds   -   Version: 2.0
Changed file location of code; now useable on any page element without editing PHP files.
Added ability to change background for each individual ez-page.
This version built on Zen Cart v1.3.8a base file; transplant code to appropriate copy of file for earlier versions.
 
Zen Cart® Versions v1.3.8
Date Added 24 Apr 2008
Author gjh42
File Size 6.6 KB
PHP 5.3 Safe? Unknown
Downloads 363
 
Smart Backgrounds   -   Version: 1.0
 
Zen Cart® Versions v1.3.8
Date Added 15 Dec 2007
Author gjh42
File Size 5.1 KB
PHP 5.3 Safe? Unknown
Downloads 959
 


disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR