Community Add-Ons

Maintainers: ExactlyHow
Add file to this package
Top » InfoBoxes

CSS for InfoBoxText
for osCommerce Online Merchant v2.2

This little bit of code substituted for the php in information.php allows CSS application to the link text. The items in the Information boxes are hard-linked to their names, so you can call the url to the file name and use what's returned to use inline CSS to change the link text characteristics using a span html element.Basically, from the first line, you use 'substr' to extract the just the filename from the url. Then you convert the defined constants into a string to use a conditional statement set to check the extracted filename against the converted definitiion string. Finally, down where the anchors are, you just put a classed span before the anchor. Neat thing is, you can do anything to the text using this method you can do with any CSS classed object (color, borders. backgrounds, including images). This file replaces the includes/boxes/information.php file.

Legend:  Download   Report
Expand All / Collapse All
CSS for InfoBoxText ExactlyHow 13 Dec 2007  

This little bit of code substituted for the php in information.php allows CSS application to the link text. The items in the Information boxes are hard-linked to their names, so you can call the url to the file name and use what's returned to use inline CSS to change the link text characteristics using a span html element.Basically, from the first line, you use 'substr' to extract the just the filename from the url. Then you convert the defined constants into a string to use a conditional statement set to check the extracted filename against the converted definitiion string. Finally, down where the anchors are, you just put a classed span before the anchor. Neat thing is, you can do anything to the text using this method you can do with any CSS classed object (color, borders. backgrounds, including images). This file replaces the includes/boxes/information.php file.