1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

[ajaxboy] AutoUpdater

Discussion in 'Add-on Releases [Archive]' started by Ajaxboy, Feb 20, 2011.

  1. Ajaxboy

    Ajaxboy Active Member

    Aren't you sick of refreshing the page every one or two minutes?.
    Doesn't it get old?.
    Shouldn't you just have the page open, and see everything that goes on?
    Do you like the facebook feeling that it keeps you updated while you are on the page?.
    You spend alot of time on the forums, and need to keep refreshing the page?

    Here is where AutoUpdater comes in..

    If you answered yes to any of the questions above, this is a must have addon.​

    This is an early release of the AutoUpdater Addon v1.0.​

    This addon updates inbox and alerts messages with ajax without reloading the page.​

    This addon is FREE.​


    • Check for new Inbox Messages (pops the red icon).
    • Check for new Alerts (pops the red icon).
    • Ability to set time inverval how often to check for new items. (1 second?, 5 seconds, 1 minute?.. 5 minutes?... etc)
    • 2 internal timer engines - (PHP timer - which puts the a script to sleep, and Javascript timer which sets events for future time to occur.) You maybe use whichever you see fit (facebook uses the php option)
    • Ability to work with group permission. (in case you just want specific folks to have awesome features)
    • Play Sound when new messages arrive or alerts ( click sound ) - this allows you to leave the forums and do other stuff, and if you hear the sound you can go back.. a time saver if you work on the forums..
    This addon is free to use. This is my first xenforo addon ( actual is my second one ) but my first one to public.

    Popup bubbles​


    Admin Options​


    Current Limitations:

    Currently the pop-up control that shows the new messages menu once you hover over it, it caches the menu. AutoUpdater does not update that menu currently like wise with the alerts menu.​

    As mentioned above, this is an early version of this addon, so you can expect more to come.. at least that is the idea at the moment.​

    Additionally it currently only works while on main forums and while browsing threads.​

    That said.. let me know if you run into any problems and I'll try to get you on the right direction.​

    timer engine...​

    If you are concerned about getting things really accurate I recommend the php timer engine option. The JavaScript option sets and caches events for the future, you could experience echo from events that were set in the past from time to time, after a while. For example if you have set the option to play sound, it might repeat it again, though it does not currently means any it would cause problems or other than small rare side effects.​

    System Resources:

    This addon relays on small fast tiny ajax engine called cjax. Cjax is fast reliable ajax engine, that been around since 2007. If any resources​
    are taken at all, it will be by the request itself to the server. Cjax also uses a small javascript library which makes use of mainly two functions. If you are very concerned about system resources make the time interval higher so less requests are made.​

    There are many other places where these kind of operations are needed, for example while during private conversations (check for new messages and if there a new ones, add it to the conversation). While posting, and all these places where it could be given more like "real time" feeling. Also there are immediate updates that could be used to update things like the popups, and the like. Also, updates with the latest threads, without refreshing the page. And facebook like friendly messages to keep you updated of site happenings.. and so on.. all that might fit.​


    There is a template change on this addon. You are going to need to edit template "navigation_visitor_tab", and consequenty add the following:​

    On line 98:​

    <strong class="itemCount" id="ConversationsMenu_Counter" style="display:none">
    On line 132:​

    <xen:else />
    <strong class="itemCount" id="AlertsMenu_Counter" style="display:none">
    The zip includes "navigation_visitor_tab.tpl" which is the same template, with the changes applied. You may replace the orginal template by this one (In case you read this in the future, the current version of xenforo is 1.0 RC2 so there are not confusions).

    If you run into any problems, post it here, so that we can work it out.

    Make sure to assign the "AutoUpdater" permission to desired group or users.​
    Set the addon's options to suit you better. Set the time interval to a appropriate time.. depending on what you consider appropriate for your site..​

    How do you know it is working?..​

    Send a message to yourself through other browser (and other user) or have someone send you a message.. wait at least the time for which the interval is set for and... it should pop up ..​

    Also when you load the page it displays a small loader indicator. Also, you can use firebug to see the ins and outs. In addition if you would like to see more info you can set it on debug mode.. in file AutoUpdater/Model/Cjax.php line 23, is a commented option to set it on debug mode, this allows for some more details in firebug.​

    Additionally, it has a switch to turn it on and off, it comes as off by default, make sure to turn it on.​

    I don't want to ask for branding feed as this is an early version of this addon, but if you love the idea feel free and donate.

    Attached Files:

    Trekkan, ankurs, Weiyan and 12 others like this.
  2. Sador

    Sador Well-Known Member

    Sounds very nice.
  3. Veer

    Veer Well-Known Member

    Excellent idea Treasurer, awesome!!
    I would like to enable it on all xenForo pages.
    A quick question: How much server resources will this use?
  4. Floris

    Floris Guest

    I was kinda hoping that idling on what's new would do this .. so any new content would show up there automatically, alongside alerts and inbox.
  5. Ajaxboy

    Ajaxboy Active Member

    Not very much, but seeing if you enable it for a forum of large population and interval time very low sound as it might be a bit draining. But there are options to set the time higher and you could adjust it to where it takes next to nothing in resources. You could use a combination of time interval and usage. You could also try different settings, and then give us feedback here after a while.

    Also, currently it only works for the main forums and thread listings, adding more things and more features pushes things to take more time, so in that given case there would not be early release..
  6. Ajaxboy

    Ajaxboy Active Member

    I was looking into that Idea, but as stated above this is an early version of this addon. So in a future release there might be such feature ;). Look the section "Updates" above, there are actually quite a few ideas.
    Floris likes this.
  7. dieketzer

    dieketzer Well-Known Member

    just a note that linux systems are cAsE sEnSiTiVe. 'Library' is not the same as 'library'.
  8. Ajaxboy

    Ajaxboy Active Member

    Thanks I had that same problem as well [​IMG]. For now feel free to fix the case I'll try to push another early release to fix that.
  9. yavuz

    yavuz Well-Known Member

    Love the idea, how is it affecting server load & performance ?
  10. dieketzer

    dieketzer Well-Known Member

    i think the updater notification thingo isnt a great idea.
    im not sure why that needs to be shown every page load.
  11. Ajaxboy

    Ajaxboy Active Member

    Just had answered that question

    It very much depends on the how many people you enable for, and how long the interval is set, the more registered members that get online ( that have it enabled it) and the, and the shorter the time interval is, the more resources it will take, also depends on how good your server is.

    So the more (enabled users) the higher the interval should be. Facebook has an interval of 1 minute to do similar task(s).

    The addon itself does not take any resources, but the constant requests to the server might if it is too much, so make sure you use the appropriate settings that adjust to your site.
    yavuz likes this.
  12. Ajaxboy

    Ajaxboy Active Member

    Add an edit in file AutoUpdater/Model/Cjax.php line 30:

    $ajax->text 'Loading AutoUpdater..';
    Change it to :

    $ajax->text false;
    That should skip the loader indicator.
    dieketzer and yavuz like this.
  13. rEd86

    rEd86 Active Member

    Excellent plugin! One place that could use this feature would be the /community/recent-activity/ page. To query and indicate that "x new activities" have occurred above the list would be great. (similar to new tweets in twitter or posts in facebook) Then allow the user to click and load the new activity via ajax...

    ArnyVee, high1976, Veer and 2 others like this.
  14. M@rc

    M@rc Well-Known Member

    Great plug-in. I'm going to install it once my forum gets back on its feet. ( when everything is back in order )

  15. Ajaxboy

    Ajaxboy Active Member

    Thanks Ed, good thinking
  16. Andy.N

    Andy.N Well-Known Member

    Other places where I will use them are /community/online/ and community/usermap/ (using digitalpoint's geoIP mod)
  17. dieketzer

    dieketzer Well-Known Member

    i have wanted a xenforo 'ispy' since day one.
    imagine if instead of a notice, it just loaded the content!
    Andy.N likes this.
  18. rEd86

    rEd86 Active Member

    While technically possible, it's usually not a good idea to change things that will disrupt the user experience without doing so based on some user action. If you were reading the content, it would be a real pain if suddenly things shifted significantly, which would happen on an active site.

    At least that's how I see it...

    a legacy reborn likes this.
  19. dieketzer

    dieketzer Well-Known Member

    which doesnt account for the popularity of ispy.
    no matter what the case, i hope at some time an option becomes available to ajaxify recent activity a la ispy. its perhaps the most popular vb addon on the various vb sites i have run over the years.
  20. Meekel

    Meekel Member

    Tried to get this working but I'm struggling at the minute. Can you tell me what I'm looking for in Firebug to see what the issue is?

Share This Page