Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Auto-Refresh

edited November 2006 in Vanilla 1.0 Help
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<=0){ milisec=9 seconds-=1 } if (seconds<=-1){ milisec=0 seconds+=1 } else milisec-=1 document.counter.d2.value=seconds+"."+milisec setTimeout("display()",100) } display() --> </script> </html>

Comments

  • Options
    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)
  • Options
    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
  • Options
    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.
This discussion has been closed.