Contributions

InfoBoxes (Category Index)
Search: 

infobox color changes easier

The curved and filled ends on the infoboxes makes it a pain to change the default colors scheme.

There are two scripts here:
generate_corners.php
corner.php

generate corners.php is a simple script to generate the corners. Put it in the images/infobox directory and make it writable by the web server then point at it. It will create the three infobox corner files in png (or gif if you have that compiled in) from the #rrbbgg color and show you the results. When pointed at it will guide you through.

corners.php is a dynamic replacement for the corner images. Unfortunately, it's just an example. The dynamics of it are mediocre, because the color is a simple php definition rather than pulling from a database. However, pulling from a database wouldn't make sense unless stylesheet.css did also.

Info for corner.php:

This is a simple replacement for those images. Takes arguments like so:
corner.php&l=l == corner_left.gif
corner.php&l=r == corner_right.gif
corner.php&l=rl == corner_right_left.gif

anything else is like rl

At the moment the color needs to be changed by hand, but I can only see two possible options (parsing the css in the corner.php would be difficult):

-php stylesheet with flat file defining colors
-php stylesheet with colors coming from sql
this could be rough on a database because css is called a lot

If the stylesheet were php then you could have the admin module change the colors pretty easily. You could also maintain themes for customers a bit easier.

Expand All / Collapse All

... and now even easier! rin67630 17 Apr 2006



Just four magic *.gif files to copy and you may change your stylesheet.css to your favourite colors and still enjoy the rounded corners of OSCommerce.

Only limitation: you should only use very light "body" background colors.

(I did not really use woodoo magic, just the transparency features of GIF!)

Enjoy!

michel@germanartbooks.com

Cleaned up left_right_image Morten Hansen 11 Apr 2004
working version Peter Bailey 21 Feb 2003
infobox color changes easier Peter Bailey 21 Feb 2003

Note: Contributions are used at own risk.