Random image in header

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
binh25

Random image in header

Post by binh25 »

Hi
Is it possible to modify the template to have a random image display on the header?
something similar to http://www.cmsmadesimple.org coconut tree picture.
I got a dozen or some images I want to randomly rotate to make it more interesting.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Random image in header

Post by Dr.CSS »

random image module in Forge...
or a search page... http://dev.cmsmadesimple.org/search/?ty ... rch=Search
binh25

Re: Random image in header

Post by binh25 »

Can I do something like this? I tried and it doesnt work

/* HEADER */
        div#header {
          background:  url({random_image dir="uploads/images"}) no-repeat 198px 15px;
            display: block;
            height: 80px;
            text-indent: -700em;         
            margin: 0%;
            padding: 0;
            text-decoration:none;

   
        }
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Random image in header

Post by Dr.CSS »

is this for one page only?
i think you would want to put it in the header.. url is looking for an img. that's why it doesn't work....
{random_image dir="uploads/images"}

if you look in the Help for the tag you will see the paramaters it takes, size etc....
climberusa
Forum Members
Forum Members
Posts: 126
Joined: Sun Feb 26, 2006 7:10 pm

Re: Random image in header

Post by climberusa »

I did something like this for a recent site where it was the background image that neaded to be different for each page. I was able to find a great php script that does just that.
http://automaticlabs.com/products/rotator

Just create a folder and place the images you want to rotate into it. Then your css fil would look like this:

Code: Select all

/* HEADER */
        div#header {
          background:  url(uploads/path/to/folder/rotator.php) no-repeat 198px 15px;
            display: block;
            height: 80px;
            text-indent: -700em;           
            margin: 0%;
            padding: 0;
            text-decoration:none;
}
Just make sure your path is correct.

Hope this helps!
binh25

Re: Random image in header

Post by binh25 »

rotator works wonder thanks for the script.

I also like to acknowledge how great CMSMS is and thanks all the supporter
and the developer to make such a pleasure to use this peice of software.

I like to thanks Mark for his quick response to most post and very much appreciate his help.


Regards
Binh
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Random image in header

Post by Dr.CSS »

your welcome...
i happen to love this system and i like to help and i love Web Design, if i can help someone out i'm more than happy to...
Locked

Return to “CMSMS Core”