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

Discussion List Refresher

jonezyjonezy New
edited August 2006 in Vanilla 1.0 Help
here you go.

just edit the $RefreshRate variable to a number (10 = 10 seconds) and you are good to go

edit / - changed the extension to .txt

Comments

  • Options
    edited July 2005
    Notice: Undefined variable: Context in \\NAS1\Home\Y\YWQ462\www\jonezy\yh\DiscussionListRefresher.php on line 23 Notice: Trying to get property of non-object in \\NAS1\Home\Y\YWQ462\www\jonezy\yh\DiscussionListRefresher.php on line 23 :( you might want to serve it as txt :P
  • Options
    wtf do you host with paconline? maybe i should zip it? works fine here
  • Options
    thats the output i get when i follow the link you provided :D
  • Options
    yayayayaya i noticed i changed it to .txt
  • Options
    works great thanks
  • Options
    perfect, i was just about to make my own so you saved me the trouble!
  • Options
    @jonezy: Can you adapt this extension, so not only the discussion list gets refreshed - but also the discussion itself (when you are in the thread)? Thanks!
  • Options
    sure man... it'll have to wait till next week as i am off for the weekend!!!
  • Options
    Oke - have a nice time then ... ;-) Thanks for the quick reply!
  • Options
    edited August 2005
    Just change it to :
    
    $RefreshRate = "10";  // refresh rate in seconds, edit this to your liking.
    
    if (in_array($Context->SelfUrl, array("index.php", "comments.php")) && $Context->Session->UserID > 0) {
      
       if (@$Head) {
          $Head->Addstring("<meta http-equiv=\"refresh\" content=".$RefreshRate.">");
          
       }
    
    }
    
    M.
  • Options
    @sweeney: Wow! Cool! Is this now for the discussion list and inside the discussions?!
  • Options
    MarkMark Vanilla Staff
    yes
  • Options
    Thanks again!
  • Options
    edited August 2005

    Works still great in the discussion lists - but not inside of threads.

    Hmmm. Any ideas?

    (Shut down old plugin, deleted on server, copied edited version via ftp on server, reactivated the plugin via admin)

    Just checked the code via FF:

    Discussion list has a refresh command.
    Discussion threas has no refresh command.

    solved

    Restarted server - now it works.

    But it refreshes the whole page - so if anyone is currently writing a comment their comments entry box is 'cleaned' refreshed to blank as well.

    Would be nice if only the content of the thread is refreshed - not the whole page.

    ;-)

  • Options
    Ah well, you can't really do what you want. You'd have to rig up some clever Asynchronous JavaScript to refresh the post only. M.
  • Options
    Does this works on the new version?
This discussion has been closed.