Contributions
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
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
Hi, I have cleaned ut the left_right.gif image to get rid of the vertical styling stripes. This is for anyone that would like excactly the same style as the plain OSC install.
The first version had transparency backward--what was I thinking?
Anyway, this one works. I added the option for transparency rather than automatic since transparency sort of eliminates the need to pick the color.
Still works the same way, though.
Have the dynamic script in place and it looks just fine.
Be aware that this was a crude script and the passed arguments are mostly not parsed. This means that they could break the thing pretty easily.
The dynamic loader pretty much only takes $l as an argument and everything else it uses is defined in the file.
I didn't really care about the generator, since you should probably chmod 600 it when you're not using it, anyway.
Also, I added the option to change the size of the image and all the colors and things are much nicer, now. In case you've changed the size of the infobar or want it to slope off wider.
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.
Note: Contributions are used at own risk.