| View previous topic :: View next topic |
| Author |
Message |
kozataxakep Member

Joined: 27 Jul 2007 Posts: 102 Location: http://halfbloodmania.forumup.com
|
Posted: Sun Sep 30, 2007 9:29 am Post subject: Random background |
|
|
Hello again
I want to ask you if can tell me is it able to make my background to change in every reload of the page ?
Do I have to add a script modification in my css file ??
| Code: | body {
background-image: url('http://img181.imageshack.us/img181/2315/harrypotter7vy3.jpg');
background-attachment:fixed;
scrollbar-face-color: #DEE3E7;
scrollbar-highlight-color: #FFFFFF;
scrollbar-shadow-color: #DEE3E7;
scrollbar-3dlight-color: #D1D7DC;
scrollbar-arrow-color: #006699;
scrollbar-track-color: #EFEFEF;
scrollbar-darkshadow-color: #98AAB1
} |
_________________ I'm faster than you.I'm stronger than you.Certainly i'll last much longer than you.You may thing I'm the future,but you're wrong.You are.I can achive immortality by not wearing out.You can achive immortality simply by doing one great thing... |
|
| Back to top |
|
 |
FoxLeonard Member
Joined: 25 Feb 2007 Posts: 1258 Location: Hyperborea
|
Posted: Sun Sep 30, 2007 1:27 pm Post subject: |
|
|
Hi kozataxakep
I guess it is possible, but only Sabrina would know if it works on ForumUp, and exactly how.
But have you really thought about what it means, for you and your members, when surfing the forum; reading; posting etc...?
Every time you click on something on the forum, a new background image will have to load, and the forum will become slow(er), as a result of it. It's a bit slow compared to ordinary forums already as it is, because everything is redirected.
With different background images for every click, it may even seem so slow that your members start to double post and such, because "nothing happens", when they click Submit...
Also, it will be fun the first time around, but once your members have seen all the images, it will be no different from having the same background all the time -- except that it's slower.
All that said, if it can be done, you may as well try it and see what happens. So I have asked Sabrina to take a look here, as usual...
Your forum looks really good now, and I'm glad to see that there is a lot of activity...
FoxLeonard _________________
Only registered users can see links on this forum! Register or Login on forum! |
Svensk Support
Only registered users can see links on this forum! Register or Login on forum! |
Dansk Support
Only registered users can see links on this forum! Register or Login on forum! |
Lithuanian Support
Only registered users can see links on this forum! Register or Login on forum! |
Vietnamese Support
Only registered users can see links on this forum! Register or Login on forum! |
|
|
| Back to top |
|
 |
kozataxakep Member

Joined: 27 Jul 2007 Posts: 102 Location: http://halfbloodmania.forumup.com
|
Posted: Sun Sep 30, 2007 2:05 pm Post subject: |
|
|
| FoxLeonard wrote: |
Your forum looks really good now, and I'm glad to see that there is a lot of activity...
FoxLeonard |
Thank you Fox,im trying to keep it at higher stance
Okay if that really gonna slow the forum,can it be done only for the index page.And when you click on a page to stay the same as the index.Only the idex to change.
For example i go my forum it's one page.Im clicking into a forum and posting(staying with same background)and when i get back to the index i got freshly new background  _________________ I'm faster than you.I'm stronger than you.Certainly i'll last much longer than you.You may thing I'm the future,but you're wrong.You are.I can achive immortality by not wearing out.You can achive immortality simply by doing one great thing... |
|
| Back to top |
|
 |
Sabrina Member
Joined: 02 Feb 2006 Posts: 73 Location: Viareggio, Italy (IT staff)
|
Posted: Sun Oct 07, 2007 2:36 pm Post subject: |
|
|
Hi kozataxakep,
here is the script you need, you only have to put inside this code the URL of the images you like for your background.
This is for 3 different backgrounds.
Obviously, you need to upload the background images on the web, then write the right path instead of: http://LINK OF YOUR BACKGROUND.jpg:
| Code: | <html>
<head>
<script>
var once_per_session=0
function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) { // if cookie exists
offset += search.length
// set index of beginning of value
end = document.cookie.indexOf(";", offset);
// set index of end of cookie value
if (end == -1)
end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}
function loadornot(){
if (get_cookie('popunder')==''){
loadpopunder()
document.cookie="popunder=yes"
}
}
function loadpopunder(){
win2=window.open(popunder)
win2.blur()
window.focus()
}
if (once_per_session==0)
loadpopunder()
else
loadornot()
</script>
</head>
<body>
<script>
var backgr1="http://LINK OF YOUR BACKGROUND.jpg"
var backgr2="http://LINK OF YOUR BACKGROUND.jpg"
var backgr3="http://LINK OF YOUR BACKGROUND.jpg"
var cur=Math.round(6*Math.random())
if (cur<=1)
backgr=backgr1
else if (cur<=4)
backgr=backgr2
else
backgr=backgr3
document.write('<body background="'+backgr+'" bgcolor="#FFFFFF">')
</script>
</body>
</html> |
You have to refresh your browser to see changements. _________________
Only registered users can see links on this forum! Register or Login on forum! |
|
|
| Back to top |
|
 |
kozataxakep Member

Joined: 27 Jul 2007 Posts: 102 Location: http://halfbloodmania.forumup.com
|
Posted: Mon Oct 08, 2007 5:48 am Post subject: |
|
|
First, I'm happy to see you arond
Second,After uploading images where do i have to put that html file?In the forumup menu(Admin Panel>ForumUp) after all topics or upload to a server then with link in the forum description? _________________ I'm faster than you.I'm stronger than you.Certainly i'll last much longer than you.You may thing I'm the future,but you're wrong.You are.I can achive immortality by not wearing out.You can achive immortality simply by doing one great thing... |
|
| Back to top |
|
 |
kozataxakep Member

Joined: 27 Jul 2007 Posts: 102 Location: http://halfbloodmania.forumup.com
|
Posted: Mon Oct 08, 2007 9:18 am Post subject: |
|
|
What does that script do?
Is it making on every refresh to change the background or as i wanted(opening the page-one pic-browsing the forum-same pic-returning to index-new pic)? _________________ I'm faster than you.I'm stronger than you.Certainly i'll last much longer than you.You may thing I'm the future,but you're wrong.You are.I can achive immortality by not wearing out.You can achive immortality simply by doing one great thing... |
|
| Back to top |
|
 |
Sabrina Member
Joined: 02 Feb 2006 Posts: 73 Location: Viareggio, Italy (IT staff)
|
Posted: Fri Oct 12, 2007 5:29 pm Post subject: |
|
|
| kozataxakep wrote: | | After uploading images where do i have to put that html file?In the forumup menu(Admin Panel>ForumUp) after all topics or upload to a server then with link in the forum description? |
You can chose one of this two, the one you prefer.
| kozataxakep wrote: | What does that script do?
Is it making on every refresh to change the background or as i wanted(opening the page-one pic-browsing the forum-same pic-returning to index-new pic)? |
Everytime you change page this script change background. _________________
Only registered users can see links on this forum! Register or Login on forum! |
|
|
| Back to top |
|
 |
kozataxakep Member

Joined: 27 Jul 2007 Posts: 102 Location: http://halfbloodmania.forumup.com
|
Posted: Sat Oct 13, 2007 8:37 am Post subject: |
|
|
Okay,I've tryed and of course nothing happed on both ways  .
May it not working because of the css file wich modify the subsilver template?Inside there's a line wich says "this is the background".Does the script for random backgound should have a descriptions wich says "change the default background" then use next backs? _________________ I'm faster than you.I'm stronger than you.Certainly i'll last much longer than you.You may thing I'm the future,but you're wrong.You are.I can achive immortality by not wearing out.You can achive immortality simply by doing one great thing... |
|
| Back to top |
|
 |
Sabrina Member
Joined: 02 Feb 2006 Posts: 73 Location: Viareggio, Italy (IT staff)
|
Posted: Sun Oct 14, 2007 10:12 am Post subject: |
|
|
| kozataxakep wrote: | Okay,I've tryed and of course nothing happed on both ways .
May it not working because of the css file wich modify the subsilver template? Inside there's a line wich says "this is the background". Does the script for random backgound should have a descriptions wich says "change the default background" then use next backs? |
I don't think it must have a description but of course I think css could be the cause.
In my opinion, you simply have to delete the part relative to the background in your css (or leave it empty), then take your code and copy it on the footer. _________________
Only registered users can see links on this forum! Register or Login on forum! |
|
|
| Back to top |
|
 |
kozataxakep Member

Joined: 27 Jul 2007 Posts: 102 Location: http://halfbloodmania.forumup.com
|
Posted: Sun Oct 14, 2007 1:57 pm Post subject: |
|
|
| Sabrina wrote: | | kozataxakep wrote: | Okay,I've tryed and of course nothing happed on both ways .
May it not working because of the css file wich modify the subsilver template? Inside there's a line wich says "this is the background". Does the script for random backgound should have a descriptions wich says "change the default background" then use next backs? |
I don't think it must have a description but of course I think css could be the cause.
In my opinion, you simply have to delete the part relative to the background in your css (or leave it empty), then take your code and copy it on the footer. |
Great Sabrina !
It works when I've left the css line empty.
Can the script be modifyed for more than 3 backgrounds?
Will that options for random will slow the forum loading ? _________________ I'm faster than you.I'm stronger than you.Certainly i'll last much longer than you.You may thing I'm the future,but you're wrong.You are.I can achive immortality by not wearing out.You can achive immortality simply by doing one great thing... |
|
| Back to top |
|
 |
gg'ssimon ForumUp World-Wide Admin

Joined: 13 Nov 2005 Posts: 7842 Location: USA (ForumUp World-wide Admin )
|
Posted: Sun Oct 14, 2007 7:01 pm Post subject: |
|
|
| Quote: | Can the script be modifyed for more than 3 backgrounds?
Will that options for random will slow the forum loading ? |
Try it yourself to see what happens. Look at the page loading times to find out if it seems to slow the forum loading. Those are not questions you need to ask us about. We would not now unless we experimented. _________________ Margaret /gg'ssimon~ForumUp World-Wide Administrator
Only registered users can see links on this forum! Register or Login on forum! |
|
|
| Back to top |
|
 |
|