Advanced Search

Results 1 to 8 of 8

Thread: to the time of rotation of the slider 24 hour ( 1 day )

  1. #1
    Join Date
    Mar 2013
    Posts
    5
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default to the time of rotation of the slider 24 hour ( 1 day )

    Hello,

    I need help to change the rotation time of a slide. I'd put it on 24 hours.

    I modify the following without success


    // JavaScript Document


    featuredcontentslider.init({
    id: "slider1", //id of main slider DIV
    contentsource: ["inline", ""], //Valid values: ["inline", ""] or ["ajax", "path_to_file"]
    toc: "#increment", //Valid values: "#increment", "markup", ["label1", "label2", etc]
    nextprev: [" ", " "], //labels for "prev" and "next" links. Set to "" to hide.
    revealtype: "click", //Behavior of pagination links to reveal the slides: "click" or "mouseover"
    enablefade: [false, 0.2], //[true/false, fadedegree]
    autorotate: [true, 86400000], //[true/false, pausetime]
    onChange: function(previndex, curindex){ //event handler fired whenever script changes slide
    //previndex holds index of last slide viewed b4 current (1=1st slide, 2nd=2nd etc)
    //curindex holds index of currently shown slide (1=1st slide, 2nd=2nd etc)
    }
    })

  2. #2
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    1,881
    Thanks
    16
    Thanked 288 Times in 287 Posts
    Blog Entries
    4

    Default

    The Featured Content Slider is more suited to a shorter slide interval - 10 seconds or so, so a visitor can see content changing while they view the page.

    For daily content you'd probably be looking for a script like this;
    PHP Code:
    <?php

    $wkday 
    date('D');

    if (
    $wkday == 'Mon') {
    echo 
    'Content for Monday';

    else if (
    $wkday == 'Tue') {
    echo 
    'Content for Tuesday';

    else if (
    $wkday == 'Wed') {
    echo 
    'Content for Wednesday';

    else if (
    $wkday == 'Thu') {
    echo 
    'Content for Thursday';

    else if (
    $wkday == 'Fri') {
    echo 
    'Content for Friday';

    else if (
    $wkday == 'Sat') {
    echo 
    'Content for Saturday';

    else if (
    $wkday == 'Sun') {
    echo 
    'Content for Sunday';
    }

    ?>
    I'm not sure of a javascript equivalent though - I imagine that a javascript version would be unreliable as it would be based on the client-side clock.
    Focus on Function Web Design | Latest News RSS | Facebook | Twitter |
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps |
    The only limit to creativity is imagination: JemCon.org

  3. The Following User Says Thank You to Beverleyh For This Useful Post:

    Chester_pro (04-13-2013)

  4. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,681
    Thanks
    43
    Thanked 3,127 Times in 3,093 Posts
    Blog Entries
    12

    Default

    Less reliable, yes. But there are two here on DD - By the day of the week:

    http://www.dynamicdrive.com/dynamici.../dowiframe.htm

    By the date of the month:

    http://www.dynamicdrive.com/dynamici...dowiframe2.htm
    - John
    ________________________

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

  5. #4
    Join Date
    Mar 2013
    Posts
    5
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Thank you to me have been answered as quickly,

    I forgot to mention that I'm using wordpress for my site . It seems to me that another file involved in the management of the slide.

    How is it that I must proceed

    Thank you very much for helping me

  6. #5
    Join Date
    Mar 2013
    Posts
    5
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Thank Beverley !

    thank you for the code, it works very well. But I wonder if it can be adapted for a whole month! thank you in advance .

  7. #6
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    1,881
    Thanks
    16
    Thanked 288 Times in 287 Posts
    Blog Entries
    4

    Default

    It certainly can;
    PHP Code:
    <?php 

    $month 
    date('m'); 

    if (
    $month == '01') { 
    echo 
    'Content for Jan'
    }  
    else if (
    $month == '02') { 
    echo 
    'Content for Feb'
    }  
    else if (
    $month == '03') { 
    echo 
    'Content for Mar'
    }  
    else if (
    $month == '04') { 
    echo 
    'Content for Apr'
    }  
    else if (
    $month == '05') { 
    echo 
    'Content for May'
    }  
    else if (
    $month == '06') { 
    echo 
    'Content for Jun'
    }  
    else if (
    $month == '07') { 
    echo 
    'Content for Jul'

    else if (
    $month == '08') { 
    echo 
    'Content for Aug'
    }  
    else if (
    $month == '09') { 
    echo 
    'Content for Sep'
    }  
    else if (
    $month == '10') { 
    echo 
    'Content for Oct'
    }  
    else if (
    $month == '11') { 
    echo 
    'Content for Nov'
    }  
    else if (
    $month == '12') { 
    echo 
    'Content for Dec'
    }  

    ?>
    Focus on Function Web Design | Latest News RSS | Facebook | Twitter |
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps |
    The only limit to creativity is imagination: JemCon.org

  8. #7
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    1,881
    Thanks
    16
    Thanked 288 Times in 287 Posts
    Blog Entries
    4

    Default

    Or if you mean the days of the month rather than actual whole months;
    PHP Code:
    <?php 

    $day 
    date('d'); 

    if (
    $day == '01') { 
    echo 
    'Content for first day of month'
    }  
    else if (
    $day == '02') { 
    echo 
    'Content for second day of month'
    }  
    else if (
    $day == '03') { 
    echo 
    'Content for third day of month'
    }  
    else if (
    $day == '04') { 
    echo 
    'Content for forth day of month'
    }

    // continue with else if statements...

    else if ($day == '31') { 
    echo 
    'Content for thirty-first day of month'
    }  

    ?>
    Focus on Function Web Design | Latest News RSS | Facebook | Twitter |
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps |
    The only limit to creativity is imagination: JemCon.org

  9. The Following User Says Thank You to Beverleyh For This Useful Post:

    Chester_pro (04-14-2013)

  10. #8
    Join Date
    Mar 2013
    Posts
    5
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Thank Beverley !

    big thank you again for your help.

Similar Threads

  1. Display different image each hour of the day (based on server time)
    By yrrot in forum Looking for such a script or service
    Replies: 26
    Last Post: 08-06-2013, 02:38 PM
  2. rotation of content based on time and day
    By samballado in forum JavaScript
    Replies: 1
    Last Post: 01-20-2011, 02:33 PM
  3. update contents of featured content slider 2.4 on each rotation
    By pixelrow in forum Dynamic Drive scripts help
    Replies: 5
    Last Post: 02-25-2010, 11:05 AM
  4. Replies: 6
    Last Post: 07-21-2008, 09:55 AM
  5. Help on editing the Local Time script, I want 0's displayed before the hour.
    By MartinD2K5 in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 11-01-2007, 11:44 PM

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
  •