Not signed in (Sign In)

Categories

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.

Help keep Vanilla free:
Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
  1.  # 1
    I would like an extension that does a refresh of the discussions page after like 5 min and displays a countdown timer somewhere on the page to tell you how long until the next refresh, the point would be to make sure that ppl are looking at recent or at least 5 min ago recent. It should only refresh the discussions/index so that it doesnt mess with ppl trying to write a comment or read comments. It would be nice if it could appear in the panel or in the menu tab area like top left.

    This is what I am using right now, and it isnt very accurate or professional looking...

    <html>

    <meta http-equiv="refresh" content="300">

    <form name="counter"><input type="text" size="8" name="d2"> seconds until refresh</form>

    <script>
    <!--
    //
    var milisec=0
    var seconds=300
    document.counter.d2.value='30'

    function display(){
    if (milisec&lt;=0){
    milisec=9
    seconds-=1
    }
    if (seconds&lt;=-1){
    milisec=0
    seconds+=1
    }
    else
    milisec-=1
    document.counter.d2.value=seconds+&quot;.&quot;+milisec
    setTimeout(&quot;display()&quot;,100)
    }
    display()
    -->
    </script>
    </html>
    •  
      CommentAuthorTomTester
    • CommentTimeNov 15th 2006
     # 2
    Hmmm... You may be able to put it in the side panel using
    http://lussumo.com/addons/?PostBackAction=AddOn&AddOnID=115 (sidepanel 1.0 add-on)
  2.  # 3
    I already have it in the side panel but like i said its just not the best for what i want it to do... it would be better if it was php and the countdown was actually related to the refresh. right now in html the countdown is its own thing and the refresh is its own thing
    •  
      CommentAuthorTomTester
    • CommentTimeNov 16th 2006
     # 4
    PHP is not 'running' while you visit the page (unless you start using timed AJAX call-backs etc. which is overkill)

    To link the two just force a form.submit() when the timer runs out. If you specify the form.action as a
    GET and the URL as the current URL this would cause a refresh.
Add your comments
    Username Password
  • Format comments as