Flexible Content Management System


PostNuke: Changing the Color for Hotlinks

Contributed by on Jul 22, 2003 - 06:18 PM

Being new to PostNuke, the first thing I did was to download the site to my PC so I could play with IT. consists of 28 subsites or separate PostNuke installs linked together. We're using the Pixel-Rave-02 theme from PixelMayem (<a href=""target='_blank'> I began to explore all of the directories and files. I found that in each of the subsites the Pixel-Rave02/ folder contained a theme/ folder. In the theme/ folder there was a file named style.css. This was the file that held the properties of the link colors.

I opened up the program "The GIMP" - a free image manipulation program that comes with most major Linux distributions and used it to find a new color. I looked up the hex value for the new dark blue color in the format #XXXXXX where the X's are hexadecimal numbers and substituted it.

I had a hunch that all of the css files in each of the subsites would be identical to the one that was used for the home page, but just to make sure I used the unix 'diff' command to check to see if they were all of the same. They were, which made my life easier since I could write a simple shell script to do the propagation of the files. I ssh'ed back into the server and created my new script in the home directory, like this:


This brings up a new file named '' in the vi editor. I pressed 'i' to enter insert mode, and typed:

cp /var/www/html/themes/Pixel-Rave-02/style/style.css /var/www/html/subsite1/themes/Pixel-Rave-02/style/style.css

cp /var/www/html/themes/Pixel-Rave-02/style/style.css /var/www/html/subsite2/themes/Pixel-Rave-02/style/style.css

and so on for all of the subsites (using copy and paste). I closed vi by pressing Escape, and then typing ":wq" to write out the file to the disk and quit. I made the script executable with the command:

chmod 700

Then I opened up the style.css file that governed the home page with:

vi /var/www/html/themes/Pixel-Rave-02/style/style.css

I put in the new text color value (#xxxxxx format) in the 'A:link' line after the COLOR: parameter. I also made alterations to the 'A:active' 'A:visited' and 'A:hover' lines. I changed the 'TEXT-DECORATION: none;' parameter to 'TEXT-DECORATION: underline;' on the 'A:hover' line to make the links underlined when the cursor moves over it. Originally it was:

A:hover { FONT-FAMILY: Arial, Helvetica, sans-serif; COLOR: #1E90FF; FONT-SIZE : 11px; TEXT_DECORATION: none; BACKGROUND: none; font-variant: normal; font-weight: bold;}

and I changed it to:

A:hover { FONT-FAMILY: Arial, Helvetica, sans-serif; COLOR: #1E90FF; FONT-SIZE : 11px; TEXT_DECORATION: underline; BACKGROUND: none; font-variant: normal; font-weight: bold;}

You can see what change I made in bold. To change the color you change the value (in this example #1E90FF - a light blue) after the "COLOR:" parameter, use "font-weight:" to make the text bold, and so forth. Next, I made sure that I was in the correct directory and typed:

sh ./

to run my script. It propagated all of the changes to all of the subsites. I manually checked to make sure that it worked as desired, and it had. The link color changes were complete.