Random Background Question

Turn your community with elegantly JomSocial integrated and superiorly designed website
GK User
Fri Feb 18, 2011 4:48 am
What would be a way to have the change backgrounds every time your on a new page. Any suggestions or scripts?
User avatar
Fresh Boarder

Konrad M
Fri Feb 18, 2011 8:57 am
Hm... every request go through the index file. I would try maybe to have some array with background pictures names and randome one every time when you got request. Then put value to the some css rule in head section. And of course you need to remember somewhere name last pictue wich you choose (I think in cookes). But there are only sugestions not recept ;)
User avatar

GK User
Tue Feb 22, 2011 6:32 pm
Thank you I will try that!
User avatar
Fresh Boarder

GK User
Tue Feb 22, 2011 6:48 pm
You can check this solution
http://www.gavickmagazine.com/home/item/116-sites-background-change-according-to-subpage.html

and modify this by adding random variable to choose background.
User avatar
Platinum Boarder

GK User
Tue Feb 22, 2011 6:59 pm
You guys are awesome!

I love Gavick! Wish you guys would do costume work!!! lol :)
User avatar
Fresh Boarder


cron
Remember me
Register New Account
If you are old Gavick user, click HERE for steps to retrieve your account.