This is such a small hack that it barely warrants a full modx package (also, some parts need to be adjusted as per preference).
Some parts of the php file are borrowed from Michaelo's sgp_get_rand_logo() function from SGP (in includes/sgp_functions.php).
So far, I have only written this mod for prosilver.
Here goes...
Create a new folder called 'banners' in styles/your_prosilver_based_style/theme/images and place any banner images you want in here.
Bear in mind that images will not be resized and so may stretch your site sideways if they are too large. What I have done for my banner images is make them all 750x170 pixels. Then at the right edge of each image, I have faded them out to black. Then I made the background colour of the header black too. The images now merge into the background colour seamlessly and as you stretch your browser out there is no distortion. If you reduce your browser window below 750 pixels wide, you will just get a scroll bar.
Copy this file into styles/your_prosilver_based_style/theme/images
(yes - we are putting a php file in the images directory
Open styles/your_prosilver_based_style/theme/colours.css
Find:
- Code: Select all
.headerbar {
background-color: #12A3EB;
background-image: url("{T_THEME_PATH}/images/bg_header.gif");
color: #FFFFFF;
}
Replace with:
- Code: Select all
.headerbar {
background: url("{T_THEME_PATH}/images/random_banner.php") no-repeat;
color: #FFFFFF;
background-color: #000000;
}
You can now use your artistic preference to alter the colours in this edit. Change 'color' to alter the colour of your site description text. Change background-color to alter the... erm... background colour.
Open styles/your_prosilver_based_style/theme/common.css
Find:
- Code: Select all
/* Site description and logo */
#site-description {
float: left;
width: 70%;
}
Replace with:
- Code: Select all
/* Site description and logo */
#site-description {
float: left;
width: 70%;
height: 160px;
}
#site-description a {
display: block;
width: 100%;
height: 100%;
cursor: pointer;
}
Now change the height so that it is 10 pixels less than the height of your banner images (the 10 pixels is to account for the rounded corners at the top and bottom of panel).
Refresh all your caches and you are done
Enjoy.
This mod works nicely in conjunction with my 'Header tidy up' mod, details of which will be posted soon (although you can see the effects of it on this site)
Cheers,
Stu







