View Full Version : Daily Quote (2)
Lodewijk
08-15-2008, 04:16 PM
I got a question about a script that was done by jscheuer1 in 2006.
The internal link is: http://www.dynamicdrive.com/forums/archive/index.php/t-8680.html
I got the script up and working, but I am lost with one thing.
What must I change, omit or add to the script to get it to work on a daily base and not random (eg. from 1 to 600). I have read the comments on the thread and tried several changes, but can't get it to work.
Your help will be appreciated.
Lodewijk
boogyman
08-15-2008, 06:11 PM
can you rephrase your question?
What must I change, omit or add to the script to get it to work on a daily base and not random (eg. from 1 to 600)
rangana
08-16-2008, 01:38 AM
Have you tried to change the value of method variable on the code?
var method=0 //Set to 1 for rotating daily, 0 for random each page load
It's pretty verbose. Set to 1 if you wish to rotate daily, or 0 for random rotation.
Hope that makse sense.
Lodewijk
08-16-2008, 07:11 AM
Thanks for the quick responses.
I did put "var method=0 //Set to 1 for rotating daily, 0 for random each page load" the method on 1, but that still takes the quotes on a random base at a daily interval.
What I actualy want to achieve is that the script gives me a daily quote (method=1), but not random but in order. If I added say 500 quotes that it takes a new one every day from 1 to 500 (1,2,3,4 etc.) and not random.
Your help will be appreciated.
Lodewijk
jscheuer1
08-16-2008, 08:16 AM
I revised this script I think, from what was put forth in that thread. Here's a demo:
http://home.comcast.net/~jscheuer1/side/quotes.htm
Use your browser's 'view source' to get the code.
However, to answer your question, I think you are over complicating this. It is extremely simple, just use 1 instead of 0:
var method=1 //Set to 1 for rotating daily, 0 for random each page load
In fact, the live demo is already set that way.
Lodewijk
08-16-2008, 03:54 PM
Got it working with that source code!!
Must have messed up before. As you said John, sometimes one makes it more complicated than it actualy is.
Thanks for the assistance.
Lodewijk
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.