Page 1 of 1

Random image in header

Posted: Tue Jun 06, 2006 12:43 pm
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.

Re: Random image in header

Posted: Tue Jun 06, 2006 12:50 pm
by Dr.CSS
random image module in Forge...
or a search page... http://dev.cmsmadesimple.org/search/?ty ... rch=Search

Re: Random image in header

Posted: Tue Jun 06, 2006 11:54 pm
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;

   
        }

Re: Random image in header

Posted: Wed Jun 07, 2006 12:30 am
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....

Re: Random image in header

Posted: Wed Jun 07, 2006 12:44 am
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!

Re: Random image in header

Posted: Wed Jun 07, 2006 1:18 am
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

Re: Random image in header

Posted: Wed Jun 07, 2006 1:41 am
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...