Live Update

Live Update 4.0.1

No permission to download
About 99 to be fair:

upload_2013-10-19_19-2-32.webp

(That's a crude test by modifying the alerts_unread count in the database).

I'm not overly thrilled with Tinycon as a solution. I'll be investigating other solutions as soon as I have time to think :)

But hey, it works, and it's actually extremely unlikely you'll see alert counts that high or higher. Alerts are pruned automatically.
 
I noticed on my site I do see a red mark, but no number. Which for now I can live without since the number was small to begin with. Most people just see the red mark and that's good enough for them.
 
It's not likely to be clear unless you explain to people what it is.

Gmail has had a similar feature for some time. Or at least they used to.
 
The file already contains a minified version of the Tinycon script. By minifiying the rest of it you're only saving another 600 bytes (around 0.6KB). Every little bit helps, I guess, but I wouldn't say it's particularly worth worrying about too much. Just be aware that if you're certain you want the whole thing minifying, then you'll have to do it again if I ever update the files.
 
  • Like
Reactions: rdn
This addon still destroys early version of IE with a 'long running script error'.

This isn't anything to do with the addon's coding, rather just an example of the crappy javascript engine in old versions of IE.

I changed the template modification to be something like this:

HTML:
<link rel="shortcut icon" href="{xen:if $xenOptions.liveUpdateFavicon, $xenOptions.liveUpdateFavicon, favicon.ico}" />
    <xen:if is="!{$visitor.getBrowser.isIE} OR {$visitor.getBrowser.IEis} > 9">
        <xen:require js="js/liveupdate/update.js" />
        <script>$('html').data('pollinterval', {$xenOptions.liveUpdateInterval})</script>
    </xen:if>
        $0

Which crudely prevents the liveupdates from running on version of IE earlier than IE10.
This depends on you having BrowserDetect by Cédric Claerhout installed: http://xenforo.com/community/resources/browser-detection-mobile-msie.1098/

Whilst this only affected a very small percentage of our users, it was enough to drive them totally insane and made the site impossible to use.


Secondly, for anyone considering installing this on a busy forum, make sure your servers are prepared for the load increase ;)

guvr.png

Despite this, I'd still recommend this addon to be installed. It has a direct effect on the number of replies to a thread and the speed at which people reply to a thread.
 
I installed this, it doesn't seem to be working on Chrome on OS X (v 31.), I checked the Java console and saw something related to it. Is there something I can do to fix this? Thanks.

  1. ross-origin image load denied by Cross-Origin Resource Sharing policy. update.js?_v=6612d272:11
    1. supdate.js?_v=6612d272:11
    2. a.setBubbleupdate.js?_v=6612d272:11
    3. LiveUpdate.AjaxSuccessupdate.js?_v=6612d272:68
    4. LiveUpdate.SetupAutoPollingupdate.js?_v=6612d272:29
    5. cjquery.js:3048
    6. p.fireWithjquery.js:3160
    7. x.extend.readyjquery.js:433
    8. q
 
This is a web server configuration issue.

You may want to move your favicon.ico file into a path relative to your XenForo installation, and then define that in the Admin CP.
 
It's both in the root and in the xenforo directory. The error is gone now but still no updates on the icon in browser tab. What else can we try? Thanks!

EDIT: It's working now! Just took a little while to get going. It was wild to watch the server load spike up for a bit then it settled down.
 
Last edited:
Hey

Having an issue with this during install.

Uploaded all the updated files, no problem, overwriting the ones on the server.

When I attempt to run through the install, I get;

"Error
The specified add-on does not match the add-on you chose to upgrade."

Any ideas what I can do about this.

Running 1.2XF
 
It is recommended to uninstall the existing version of the add-on prior to installing this version
 
I have a question for the developer.

Lets say I have some javascript I'd like to add to this addon. I want it to execute only once each time there's a new update. Where in update.js do I put that javascript?

I tried adding it below

Code:
$(document).bind('ajaxStart', ajaxStart);

but that causes the javascript to be fired every time the browser polls the server when there's a new alert even if that update has already been polled once.

Is this possible or would it require modifying existing code instead of just adding my own?
 
I wasn't the original developer of this, so I can't recall the code exactly (I don't have it installed locally at the moment to check) but I don't think it would be possible by adding or modifying the existing code.

I don't think the code distinguishes between: "Hey there's some new alerts" and "Hey, that alert I told you about is still here" so the best you'll ever get it is running your code pretty much every time the server is polled or every time the alerts / conversations counts are greater than 0.
 
After turning on automatic serialization and restarting apache
PHP:
$config['cache']['frontendOptions']['automatic_serialization'] = true;

You may need to restart your caching system if you have other stuff utilizing the cache. Honestly, I'm not really sure why XF doesn't default it to "true" (or make it true without even an option to change it). There's no downside to enabling it.
I disabled this addon after getting these errors

ErrorException: unserialize(): Error at offset 0 of 10 bytes - library/XenForo/Model/DataRegistry.php:117 Generated By: Unknown Account, 19 minutes ago Stack Trace #0 [internal function]: XenForo_Application::handlePhpError(8, 'unserialize(): ...', '/home/blah/publi...', 117, Array) #1 /home/blah/public_html/library/XenForo/Model/DataRegistry.php(117): unserialize('1389444008') #2 /home/blah/public_html/library/XenForo/Dependencies/Abstract.php(144): XenForo_Model_DataRegistry->getMulti(Array) #3 /home/blah/public_html/library/XenForo/FrontController.php(127): XenForo_Dependencies_Abstract->preLoadData() #4 /home/blah/public_html/index.php(13): XenForo_FrontController->run() #5 {main} Request State array(3) { ["url"] => string(35) "https://8th.us/index.php?liveupdate" ["_GET"] => array(1) { ["liveupdate"] => string(0) "" } ["_POST"] => array(4) { ["_xfRequestUri"] => string(1) "/" ["_xfNoRedirect"] => string(1) "1" ["_xfToken"] => string(8) "********" ["_xfResponseType"] => string(4) "json" } }




ErrorException: unserialize() expects parameter 1 to be string, array given - library/XenForo/Model/DataRegistry.php:117 Generated By: Unknown Account, 25 minutes ago Stack Trace #0 [internal function]: XenForo_Application::handlePhpError(2, 'unserialize() e...', '/home/blah/publi...', 117, Array) #1 /home/blah/public_html/library/XenForo/Model/DataRegistry.php(117): unserialize(Array) #2 /home/blah/public_html/library/XenForo/Dependencies/Abstract.php(144): XenForo_Model_DataRegistry->getMulti(Array) #3 /home/blah/public_html/library/XenForo/FrontController.php(127): XenForo_Dependencies_Abstract->preLoadData() #4 /home/blah/public_html/index.php(13): XenForo_FrontController->run() #5 {main} Request State array(3) { ["url"] => string(35) "https://8th.us/index.php?liveupdate" ["_GET"] => array(1) { ["liveupdate"] => string(0) "" } ["_POST"] => array(4) { ["_xfRequestUri"] => string(1) "/" ["_xfNoRedirect"] => string(1) "1" ["_xfToken"] => string(8) "********" ["_xfResponseType"] => string(4) "json" } }
 
Top Bottom