Results 1 to 6 of 6

Thread: Daily Quote (2)

  1. #1
    Join Date
    Aug 2008
    Location
    The Netherlands
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Question Daily Quote (2)

    I got a question about a script that was done by jscheuer1 in 2006.

    The internal link is: http://www.dynamicdrive.com/forums/a...hp/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

  2. #2
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    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)

  3. #3
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    Have you tried to change the value of method variable on the code?
    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.
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  4. #4
    Join Date
    Aug 2008
    Location
    The Netherlands
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    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

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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:

    Code:
    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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. The Following User Says Thank You to jscheuer1 For This Useful Post:

    Lodewijk (08-16-2008)

  7. #6
    Join Date
    Aug 2008
    Location
    The Netherlands
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    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

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •