• 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

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.​

Features:

  • 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​

alerts.webp

Admin Options​

autoUpdaterWsound.webp

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.​

Updates:
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.​

Installation:

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:​

HTML:
<xen:else>

<strong class="itemCount" id="ConversationsMenu_Counter" style="display:none">

</strong>

</xen:if>

On line 132:​

HTML:
<xen:else />

<strong class="itemCount" id="AlertsMenu_Counter" style="display:none">

</strong>

</xen:if>

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.

Usage:
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.
 

Attachments

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

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..
 
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.
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.
 
just a note that linux systems are cAsE sEnSiTiVe. 'Library' is not the same as 'library'.
Thanks I had that same problem as well
biggrin.png
. For now feel free to fix the case I'll try to push another early release to fix that.
 
i think the updater notification thingo isnt a great idea.
im not sure why that needs to be shown every page load.
 
Love the idea, how is it affecting server load & performance ?
Just had answered that question

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.

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.
 
Great plug-in. I'm going to install it once my forum gets back on its feet. ( when everything is back in order )

Thanks!
 
Other places where I will use them are /community/online/ and community/usermap/ (using digitalpoint's geoIP mod)
 
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...

--Ed
i have wanted a xenforo 'ispy' since day one.
imagine if instead of a notice, it just loaded the content!
 
i have wanted a xenforo 'ispy' since day one.
imagine if instead of a notice, it just loaded the content!
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...

--Ed
 
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...

--Ed
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.
 
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?
 
Top Bottom