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

Add-on: Live refreshing discussion list

2

Comments

  • Options
    jimw, this js-solution looks like 1980.

    if vanilla would have a state of the art js library included by default like jquery or prototype, all the live checks and refreshes should be done within some hours of work...
  • Options
    mireille - Well, I am an old guy.
  • Options
    this would be a great add-on.... has anyone made anything that does this yet?
  • Options
    edited February 2008
    I could write it as part of the Mootools suite of javascript add-ons I've done so far. Shouldn't be too difficult. What's this about a rainbow effect and exclamation marks? Surely the discussions show you when there are new comments with a little red number?

    Edit: I could make this a two-part add-on. One part would deal with the main discussions page and just perform a normal update. There's enough indication of new comments in a discussion to simply simulate a page refresh.

    On the comments page I quite like the rainbow effect. If it's added by javascript then it will automatically disappear on a discussion refresh. As for pagination, new comments will be visually just added to the bottom if you're on the last page. If you refresh it will be paginated as normal. If you're not on the first page then if a new comment's added, the pagination links at the bottom would be somehow highlighted and a hint would appear with the amount of comments that have been added so far.

    I will try to send the minimum amount of data via Ajax to reduce server overhead. What do people think is an appropriate update time? 2 minutes? Anything less would make it into a chat rather than a forum.
  • Options
    would be very nice to see this addon working! 2minutes? why don't make this an admin-defined value, so everyone is able to find his own fav. and limit?
  • Options
    Should it be user or admin defined? If user defined it could be abused to crash the host's server. Perhaps allowing the admin to specify the minimum and default update time would be best.
  • Options
    Yay for the rainbow effect :)

    I would definitely use such an addon. Could the update time be configurable?
  • Options
    Yup, it will be user-configurable. The default value and the minimum value is only settable by a user with a role with the appropriate permission.
  • Options
    Would there be so many people wanting to sit with the discussion list open waiting for it to refresh?

    Surely, if you are expecting a reply, you would get on with your life then check back every so often.

    Then there's the danger of walking away and leaving it to eat up your monthly bandwidth allowance!

    Just wondering out loud as I do a lot.
  • Options
    edited February 2008
    I only asked for admin defined, but the way you've chosen is very good! What a luck, I'm working for a webhosting company, so there aren't any traffic issiues :P
  • Options
    Quote: DocValerianpic What a luck, I'm working for a webhosting company, so there aren't any traffic issiues :P pic
    OK for you then, what about the other poor sods?
  • Options
    Then they don't have to use it?
  • Options
    They do if it's active on a forum and they either don't understand it or forget it's there.
  • Options
    It's a must-have addon for any play-by-post forum. It would get along very well with the excellent DiceRoller.
  • Options
    Well then it's down to the Admin to make sure people are aware of it. Just like with any other extension.
  • Options
    edited February 2008
    Why not have the auto-refresh turned off by default, and only be activated by a button in the panel or whatever? You could use a non-persistent/session cookie to remember that the feature is turned on, but would turn the feature off if the user shuts down the browser (since the cookie would be deleted).

    That way, the feature would only get used by the users who want it, and only during the times when those users want it. Users don't need it running 24/7. They don't need it running if they're only doing a quickie 5-minute forum check on their work break. If it's on by default, lazy users won't bother to turn it off, and if it's persistent, neither would they turn it off after turning it on.

    I know it would be a little annoying to have to turn it on every time you log in, but considering the potentially heavy server strain this extension could cause, it sounds like a good compromise between users & admins.
  • Options
    Yeah, that sounds like a good idea. So we have: Admins set the minimum and default value for the update time while users can set their own value. Users also have a panel option to turn it on/off which is saved to a cookie. I'll build in some security features which check the last update time to prevent people modifying javascript variables to update more often than the minimum value.
  • Options
    This is actually taking a little longer than I had planned. Should be released soon though.
  • Options
    Looking forward to this!
  • Options
    Discussions are done. Working on comments now. I actually think the feature that will take the most time is that rainbow effect =P
This discussion has been closed.