Live Update

Live Update 4.0.1

No permission to download

Joe Link

Well-known member
Is there a way to get this to work without having the default Alerts and Conversations nav tabs within the mainContainer?

I still load the default code for both, but they're within a slide-out menu. If I put them in a sidebar widget the add-on works fine.
 

Chris D

XenForo developer
Staff member
There is no such requirement.

The only requirement is the HTML for the tabs should look similar to:
HTML:
<strong class="itemCount" id="ConversationsMenu_Counter" data-text="You have %d new unread conversation(s).">
    <span class="Total">5</span>
    <span class="arrow"></span>
</strong>

Specifically, the JS refers to this to read the counts:
Code:
$('#ConversationsMenu_Counter span.Total').text()
 

Joe Link

Well-known member
Thanks @Chris D

So I should be able to take the conversation/alert code out of nagivation_visitor_tab, put it in another template/elsewhere, and this should work?

I just tried adding the default XF code to another template (ad_above_content) and it didn't work, but displaying navigation_visitor_tab in a widget did.
 
Hey, I have been using the plugin for a while and I have had some interesting error occur.

A friend of mine left the site open overnight and whatever happened...his browser or LiveUpdater kept pinging the server filling up the log file and causing the server to fill up on disk space and the website started to throw errors. It would ping 3 times every second.

I had to block the IP address on my server to stop it and when it turned it out it was my friend, he explained to me that he kept his browser open onto my site.

I thought unloading the plugin from the Admin panel would fix it...but it was still being used on the client side. Here is a sample of the logs that I was receiving:
Code:
<IP ADDRESS> - - [02/Aug/2015:09:23:35 +0000] "POST /index.php?liveupdate HTTP/1.1" 404 455 "https://website.com/index.php?account/alerts" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.125 Safari/537.36"
<IP ADDRESS> - - [02/Aug/2015:09:23:35 +0000] "POST /index.php?liveupdate HTTP/1.1" 404 455 "https://website.com/index.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.15 Safari/537.36"
<IP ADDRESS> - - [02/Aug/2015:09:23:36 +0000] "POST /index.php?liveupdate HTTP/1.1" 404 455 "https://website.com/index.php?account/alerts" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.125 Safari/537.36"
<IP ADDRESS> - - [02/Aug/2015:09:23:36 +0000] "POST /index.php?liveupdate HTTP/1.1" 404 455 "https://website.com/index.php" "Mozilla/5.0 (Windows NT 10.0; W

It 404'd because I had deactivated the plugin but the clients or LU kept pinging it.

Is there any way around this?
Running nginx on Debian 7.

Regards.
 

HWS

Well-known member
Hey, I have been using the plugin for a while and I have had some interesting error occur.

This is not an error, but expected behavior. If you want to have your clients to "live" update their counts you need to allow "pinging" your server very often.

Also, since the clients will not simply stop pinging just because you deactivated the add-on you'll get 404 errors in your log. This is also expected and no error. They'll stop pinging only after each of them has visited your site again and reloaded the page without using of any local cache. This may take some time...

If you want to get rid of the 404s, you need to activate the add-on again.
If you don't want to provide live updates any more, you have to live with the 404s for some time, until all your visitors have updated their caches.
 
I understand. It would be defeating the purpose of the add-on.

I have adjusted the logging on the nginx side so this shouldn't happen again. Thank you for replying.
 

Floyd R Turbo

Well-known member
has anyone noticed their favicon being distorted/blurry using FF. because when i disable this mod, the favicon becomes nice and clear again. very strange.

EDIT: the favicon only becomes distorted when Tab Icon is chosen with no notifications. using Tab Title, the favicon is good again.

I've noticed this as well. If I have ACP open, favicon is normal. On forum page with or without an alerts bubble, the favicon is degraded/fuzzy

There is a small bug in counter update. If there is more than 1 counter on page (such as duplicate navigation added by another add-on), this add-on doubles number of alerts.

For example, if number of new conversations is "1", but there are 2 new conversation indicators, this add-on shows it as "11".

Fix: open js/liveupdate/update.js, find
Code:
    var count = parseInt($('#ConversationsMenu_Counter span.Total').text()) + parseInt($('#AlertsMenu_Counter span.Total').text());
replace with
Code:
    var count = parseInt($('#ConversationsMenu_Counter span.Total:first').text()) + parseInt($('#AlertsMenu_Counter span.Total:first').text());

I am seeing this as well. Thanks for the fix, I'll try it

EDIT that fix didn't work, if I have one message in my convos the icon shows up "11"
 
Last edited:

dehness

Well-known member
Hey @Chris D

Did you ever get a chance to look at the distortion issue?

This is how mine looks and should look (it doesn't distort in admincp)...

 

Floyd R Turbo

Well-known member
I am also seeing this, as well as the doubled-up alert number

distortion.JPG

Here is what it looks like after I clear the alert ("1" remains)

distortion 2.JPG

and then after I reload that page (you can see the left one is blurry, right is ACP login tab)

distortion 3.JPG
 

dehness

Well-known member
This add-on suddenly stopped displaying alerts on the /forums/ page (but still displays them on other pages).

Seems there are some major bugs that need to be ironed out, perhaps another developer could take over maintaining it if @Chris D is too busy with Xenforo?
 

Chris D

XenForo developer
Staff member
Not yet, I've yet to be able to reproduce either issue. I will sign up to your site at some point and give it a bit of a test to see if I can see anything that way.
 

HWS

Well-known member
@Chris D do you have any idea what might be causing the issue I am seeing, shown on posts #434 above?

This is caused by a double appearance of the visitorTabs div in your page. Some styles do it (and hide one of it in certain conditions). It would require custom development to solve it. Or your style designer is able to remove one of the 2 divs.
 
Top