View Full Version : I need a Script - Please !
Vanquish+
11-05-2002, 03:46 PM
hmm, i am not sure how to do this one, can some one please give me a script that takes an image and switches that image every 2 minuites, or so, and a different image every time they logon to the website so they odnt get the same one? i need it for advertising - Thanks
Vanquish+
------------------------
Downloads247.com
Strike
11-05-2002, 04:08 PM
http://coderforums.net/cfinfo.php?s=
Please remember that the http://www.coderforums.net/images/icons/important_alert.gif alert image is for admin and mod use only.
...
If you have come to the site asking to have programming done for you, understand THIS IS NOT A REQUEST SITE. If you are having some sort of contest, that is fine. However if you are just coming to ask to have programming done for you, go somewhere else.
Vanquish+
11-06-2002, 03:41 PM
sorry for using the ! thingy, i did not know, secondly i said -
i am not sure how to do this one, can some one please give me a script that takes an image and switches that image every 2 minuites
so i didn't really ask for the script i asked for help
and lastly, my site www.downloads247.com offers hosting for peoples downloads under the service section so if you want i can host ure bot to download
#########################
## downloads247.com - soon ##
#########################
Strike
11-06-2002, 04:08 PM
Well, yeah you did, you just bolded the wrong part:
i am not sure how to do this one, can some one please give me a script that takes an image and switches that image every 2 minuites
Not "how do I do this", but "give me".
imported_Gryphon
11-06-2002, 04:09 PM
so i didn't really ask for the script
please give me a script
madMoney
11-06-2002, 05:42 PM
heh, stop berating him :p
Vanq, people will probably help you get pointed in the right direction, but no one will write a script for you from scratch. Just remember that next time you ask for help on here :)
now, to help
do you know how to switch images with javascript at all? If not, there are hundreds of sites out there with descriptions of how to do this. Try searching for 'image rollovers' to get the image changing code (even though what you're doing isnt a roll over).
Once you have to code to switch images out, call the function that does it in the following way:
<body onLoad = "imageSwitchingFunction()">
then, at the end of the function, use the onTimeout method to make it wait 2 minutes before calling itself again. its usage is: onTimeout("javascript code here", time in milliseconds to wait);
so, in your case, you'd use:
onTimeout("imageSwitchingFunction()",120000);
because there are (60*2)*1000 = 120000 milliseconds in two minutes
To ensure that the user never sees the same picture twice, you should use a cookie to store a list of images already seen. I don't know much about javascript cookies, so you'll have to research this yourself ;)
Nafae
11-06-2002, 10:21 PM
I've fixed the /!\ image for you, but please note that before every button on every page which allows you to post says "By posting I agree I have read the forum rules" There is also a link at the top of every page, and in my signiture. They aren't very obscure so all it takes is 4 minutes of your time in order to make everyone's time here more productive. Please read.the.forum.rules...
Thanks!
Uranium-235
11-06-2002, 10:25 PM
Why don't you code it so only admins can use it. OH yeah, I forgot. you're laaaaazy
Nafae
11-06-2002, 10:43 PM
Originally posted by Uranium-235
Why don't you code it so only admins can use it. OH yeah, I forgot. you're laaaaazy
It's actually alot of trouble to do that, I checked into it. And, after giving everyone many chances to read the forum rules, why should I go out of my way to enforce something that people should be doing in the first place. I'm actually glad that our users are helping to tell the newer members about the rules and alert them to when they are breaking them, it's another way to get people to actually read the rules. But the more they are broken, the more strictly I will enforce them, and the more everyone will hate me. So just follow the fucking rules, because it isn't very hard.
</rant>
Strike
11-07-2002, 12:45 AM
Originally posted by Nafae
I'm actually glad that our users are helping to tell the newer members about the rules and alert them to when they are breaking them, it's another way to get people to actually read the rules.
Meh, I can't help it. I'm pedantic, and I was a moderator at LNO for over 2 years (technically still am even). :)
PS w00p w00p points for me!
vBulletin® v3.7.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.