Some Cool CSS and PHP Tricks

To clear the values of a text input box


Add this to your input fields to clear the text box:

Example: (click inside the input box and the text should automatically disappear. Much nicer than making your visitors delete any existing values inside the box themselves.)

Change cell background color onmouseover


To use onmouseover command to change the background color of <td> table cells when visitors place their cursor over the cell (hover):


Example:
Hold your mouse over this cell





Change text of links in status bar


To modify the text shown in the status bar when a visitor places their cursor over links (hovers) using onmouseover (useful for hiding really long, ugly affiliate links):

Link Example (watch status bar below)


Replace the standard form submit button with an image


Replace the standard form submit button with an image

PHP

To replace text throughout your site


For example, if you want to change all "&" symbols to the word "and" in titles ($title) on your site:


If you need to change a lot of words or symbols, you can create an array function. This is really useful if you have an affiliate site and need to change a merchant's description to avoid search engine penalties.


Then somewhere on the page where you would like the text replaced:


or
if the text is being pulled from a database or defined elsewhere:



To automatically display monthly announcements on your site


Great if you want to display scheduled promotions or announcements on a monthly basis.

At the top of your page (with the php tags) or in a separate file such as functions.php:

Then add this on your page where you want the announcements to appear:


To display today's day


Today's Date is Friday Jun 18th 2021


Then add this on your page where you want the date to appear:

Sticky Side Column

If you're using our PHP Website Template, this is the optional side bar column you can add to some or all of your pages. It can be useful for adding advertisements such as Adsense ads to be displayed on multiple pages.
When you include the side column, your main content will automatically adjust its width to accommodate it.
The side bar is 'sticky'; it will scroll down and remain in view.
You can turn on/off the side bar column per page by defining the $showSide option located at the top of each file.