View Full Version : Mini Mods - [AJAX] Who's Online
mad@Max
02-12-2009, 10:00 PM
Continue of this mod https://vborg.vbsupport.ru/showthread.php?t=105233
Modification allows to you refresh list of active users without reload main page.
Features:
button "refresh" for manual refresh (optional)
autorefresh (set in second), disable if set by "0"
permission user groups (excluding now) to use
compatible with legends and splitters of user groups
refresh string "Currently Active Users: ..."
Video on it (because it's ajax): http://www.youtube.com/watch?v=A3rsK8Th1ms
Spanish translate: https://vborg.vbsupport.ru/attachment.php?attachmentid=94902&d=1234675167
French translate (v1.3): https://vborg.vbsupport.ru/attachment.php?attachmentid=96069&d=1236427472
vbboarder
02-13-2009, 08:32 PM
Does this work only on forumhome? If so, can you make it work also for forumdisplay (show users viewing a forum via ajax) and showthread (show users viewing a thread via ajax)?
Also, can you limit the ajax refresh time and usergroups able to use the ajax feature?
Lynne
02-13-2009, 08:41 PM
If you look at the video, you'll see it doesn't rely on a refresh time. The user clicks a button to refresh the list.
mad@Max
02-13-2009, 08:51 PM
Yes, this only forumhome.
Refresh occurs after you click on button "Refresh", permission of groups you can set in options.
Soon, I plan to add the autorefresh.
Hornstar
02-13-2009, 10:32 PM
I think the button is enough because if you add autorefresh then it would be too heavy for many sites.
mad@Max
02-13-2009, 11:07 PM
You will have a choice ;)
Daniel_HBK
02-14-2009, 12:08 AM
very good Mod , Installed :)
Huy Ho?ng
02-14-2009, 12:14 AM
Very good. Install :D
Loki12
02-14-2009, 12:19 AM
It doesn't work. I just tested on my forum.
Gunshot
02-14-2009, 12:23 AM
not compatible with this Hack
https://vborg.vbsupport.ru/showthread.php?t=194823&highlight=usergroup
refresh results in the Legend disappearing
dothanhtrung
02-14-2009, 01:13 AM
Hey mad@Max,
I think you can use Yahoo's java package will better
<script type="text/javascript">
<!-- // Hack by Sinister -->
vBulletin.events.systemInit.subscribe(function()
{
online.req();
});
online = {
req:function()
{
YAHOO.util.Connect.asyncRequest("POST", "index.php?do=whoisonl", {
success: this.show,
failure: vBulletin_AJAX_Error_Handler,
timeout: vB_Default_Timeout
});
},
show:function(a)
{
fetch_object("whoisonl").innerHTML = a.responseText;
setTimeout("online.req()", 180000);
}
};
//Hack by Sinister -->
</script>
mad@Max
02-14-2009, 01:24 AM
dothanhtrung, why do you think that this is better?
WildFire.ca
02-14-2009, 01:52 AM
Nice Thx
Alfa1
02-14-2009, 02:24 AM
Awesome! Please add auto-refresh with user group permission. This way busy boards can use it.
Arcade Fire
02-14-2009, 04:29 AM
Set to 0 the counter of most users ever online :(
dothanhtrung
02-14-2009, 05:54 AM
dothanhtrung, why do you think that this is better?
I tried to put it into product! But it can still not work on that package! So, i made necessary changes on other packages and it works very well with Autofresh! If you need,PM me and i will send this prodcut to you in order to you can reference it! :)
redlabour
02-14-2009, 07:43 AM
not compatible with this Hack
https://vborg.vbsupport.ru/showthread.php?t=194823&highlight=usergroup
refresh results in the Legend disappearing
Same problem for me. :(
Mark.B
02-14-2009, 08:12 AM
Same problem for me. :(
Yes, you'll find things like that because the modified code isn't included in the AJAX. I've got the spiders hack for Who's Online, and they disappear on refresh too, that's the only reason I cannot use this.
Unfortunately there are so many hacks for Who's Online that I don't think the author could possibly support all of them in this. But for an unaltered who's online, it works great.
mad@Max
02-14-2009, 08:22 AM
Yes, many hacks using variable $activeusers from index.php...
Rottimom
02-14-2009, 10:08 AM
Set to 0 the counter of most users ever online :(
Yes, and "Most members were have this one written contributions on a day" and "Most guests online within 24 hours were" and "Most members online within 24 hour were", all started to 0 :(
After Refresh don?t show spider to "Currently Active Users" :(
Therefore uninstalled.
Paul M
02-14-2009, 01:36 PM
Warning:
This will break the standard "Most Ever ..." count (and a few modification ME counts) as calls to ajax.php do not load the appropriate values from the datastore.
Gunshot
02-14-2009, 03:34 PM
good idea.....just has some issues
mad@Max
02-14-2009, 04:14 PM
dothanhtrung, you was right, this script is batter, thanks;)
Soon i'll update mod.
cykelmyggen
02-14-2009, 04:19 PM
Damn, broke my Most Users online legend....:( Uninstalled
Lynne
02-14-2009, 04:36 PM
mad@Max, you might want to put Paul's warning in your first post so users know it will reset those numbers.
Alfa1
02-14-2009, 04:53 PM
Damn, broke my Most Users online legend....:( Uninstalled
Same here. Back from 22.000 to 2.000.:(
Please fix this.
mad@Max
02-14-2009, 04:56 PM
Hack is updated to 1.1 version.
Added autorefresh option, rewritten code.
Now mod work with legends and splitters:)
redlabour
02-14-2009, 05:11 PM
Does this Mod make any sense?
It only brings a Refresh-Button - that?s it? :confused:
Alfa1
02-14-2009, 05:21 PM
It makes sense to get an actual or live overview of members online, instead of the cached version. Your members will be able to see other members come online in real time.
However, this does mean IMHO that it should not display members that are no longer online. Otherwise it still is old information.
The new version, posted right before you posted has an autorefresh, so probably no refresh button anymore. I haven't checked yet, because I am waiting for a version that does not break 'most users online'.
mad@Max
02-14-2009, 05:33 PM
Alfa1, version 1.1 does not this. (i hope:))
mad@Max
02-14-2009, 06:02 PM
Version 1.1.1
Little fix for those who use vbadvanced (like me:)), who change name of index script.
DjEddie
02-15-2009, 12:26 AM
Hi,
Ive added the updated one, but the Refresh Button isn't in English now...
The split works with it too ... nice one... just the member count now :) .. will keep checkin .. cheers mad@max :)
Alfa1
02-15-2009, 01:56 AM
Alfa1, version 1.1 does not this. (i hope:))
Haha. OK I will try.
Alfa1
02-15-2009, 02:03 AM
EDIT: It seems to leave most users online intact. However; the refresh button is no longer in English.
Please add a vbulletin options section where we can fill in
- the usergroups that can see this.
- the number of seconds/minutes for autorefresh
- the number of minutes that a member is visible on WOL, after his last activity.
- turn off the refresh button. (I dont want it)
relaxiha
02-15-2009, 03:15 AM
hello
plz repair button to english!
this is RUS!!!i don't read label
dvbusuario
02-15-2009, 03:19 AM
Version 1.1.1
Translate in Spanish!
Thank you!
Install.:)
mad@Max
02-15-2009, 07:24 AM
dvbusuario, add link in first post.
Alfa1, thanks, will do.
medusa1
02-15-2009, 09:55 AM
I get strange special chars on the refresh button can you help me with this ?
See attachement
mad@Max
02-15-2009, 10:32 AM
I forgot translate this part:) Reuploaded.
medusa1
02-15-2009, 10:39 AM
is working now thanks for the quick help
Playa82
02-15-2009, 10:53 AM
nice hack, but now i see my whole site reflected in the users online list... See attachments...
mad@Max
02-15-2009, 11:25 AM
Version 1.2
See on features in first post.
Playa82, update hack to v1.2
Alfa1
02-15-2009, 02:31 PM
I installed it, but nothing happens with WOL.
I see that you have added a section in adminCP -> vbulletin option -> Who's online
Though not in the default section called Who's online, but you added a 2nd section with the same name. Not a big deal tough.
Most important thing is that nothing happens, no matter what options i turn on or off.
mad@Max
02-15-2009, 02:56 PM
I forgot change the phrase in setting on: Type ID groups that are denied to use this mod (separated by comma)
Alfa1
02-15-2009, 04:05 PM
Why not you do it the other way around? If you deny member groups, then you exclude the use of additional member groups.
In any case, there is still nothing happening.
mad@Max
02-15-2009, 04:19 PM
Opposite of this phrase Type ID groups that are denied to use this mod (separated by comma), enter excluding groups, like 1,2,8 (by default). Because that's easily :)
Playa82
02-15-2009, 04:35 PM
Version 1.2
See on features in first post.
Playa82, update hack to v1.2
thanks, but still the same problem...
Alfa1
02-15-2009, 04:46 PM
Opposite of this phrase Type ID groups that are denied to use this mod (separated by comma), enter excluding groups, like 1,2,8 (by default). Because that's easily :)
But then it doesn't work for additional groups.
For example:
If I want usergroup 21 to use this and all other groups are denied. And a member is in usergroup 14 and 21, then he can not use it, because group 14 is denied.
mad@Max
02-15-2009, 04:53 PM
Alfa1, aaa, now i understand what about you are talking :)
DjEddie
02-15-2009, 08:18 PM
Hi,
Upgraded to latest one...
How do you turn the auto refresh off... simply using 0 doesnt work on my site.. it still auto refreshes.. I only want to be able to do it manually...
Thank you :) ...
mad@Max
02-16-2009, 02:04 PM
Version 1.2.1
Autorefresh fix.
DjEddie
02-16-2009, 02:37 PM
Version 1.2.1
Autorefresh fix.
Thanks, all seems to be working.
I think in the text tho you need to state, set to 0 to disable auto refresh feature...
Just a thought, thanks for fixing quickly too :)
mad@Max
02-16-2009, 03:49 PM
Hm, i don't understand, in version 1.2.1 if you set 0, autorefresh will be disabled.
DjEddie
02-16-2009, 04:57 PM
Hm, i don't understand, in version 1.2.1 if you set 0, autorefresh will be disabled.
Yeah I know it does, what im saying is in this part of the text in the admincp Whos Online options for other people so they know...change it from:
Set the time (in seconds) after which the mod will automatically refresh block with active users.
To:
Set the time (in seconds) after which the mod will automatically refresh block with active users (If you set this value to 0 then auto refresh is disabled)
^^ Just for info thats all for people who wont know. :)
No Biggie :)
mad@Max
02-16-2009, 05:41 PM
aaa, ok, will do:)
mad@Max
02-16-2009, 05:48 PM
Product is reuploaded - updated one phrase:)
DjEddie
02-16-2009, 06:06 PM
Product is reuploaded - updated one phrase:)
Nice one and thanks for quick turn around... all good from me now .. no probs :)
WildFire.ca
02-16-2009, 08:13 PM
Hey Max, thanks for the update.
mad@Max
02-16-2009, 09:23 PM
It's explainable. Hack keeps your presence at the forum until the browser is open. This is actually only when autorefresh enabled.
On this basis, the hack doesn't break your stats.
Loki12
02-17-2009, 06:31 PM
It's explainable. Hack keeps your presence at the forum until the browser is open. This is actually only when autorefresh enabled.
On this basis, the hack doesn't break your stats.
And what about if autorefresh is disabled? Does it break your stats then? I want to reinstall but still cautious. It ruined my old stats. :(
mad@Max
02-17-2009, 07:07 PM
Only if all will not be constantly clicking on the Refresh button :D
Loki12
02-17-2009, 09:58 PM
Ahh I see ... it works by refreshing the names. However, the amount of users shown (i.e. Currently Active Users: 32 (13 members and 16 guests) does not change. This is a pity. Is there any possibility that this could also be refreshed with the mod???
mad@Max
02-17-2009, 10:04 PM
I think about it.
Alfa1
02-17-2009, 11:23 PM
Great!
rapidphim
02-18-2009, 05:46 AM
awesome hack. just what I am needed. thanks much!
Playa82
02-18-2009, 07:45 AM
still shows me the reflection of my whole forum...
mad@Max
02-18-2009, 09:49 AM
You are edited the template of hack? You are using vbadvanced?
Playa82
02-18-2009, 11:56 AM
You are edited the template of hack? You are using vbadvanced?
i use vbadvanced (on my forumroot)
i edited nothing
rapidphim
02-18-2009, 02:17 PM
<span style="text-decoration: line-through">Max... do you happened to know how to move the Who's online section on top of forum/below navbar?</span>
Edit: I found out how to do this.
mad@Max
02-18-2009, 07:24 PM
Playa82, Please show me your template awio_js. If you use vbadvanced and it placed in root folder then you was changed index.php on some like forum.php.
Playa82
02-19-2009, 04:29 AM
Playa82, Please show me your template awio_js. If you use vbadvanced and it placed in root folder then you was changed index.php on some like forum.php.
yes, it's forum.php now. my index.php is from vbadvanced
Playa82
02-19-2009, 04:32 AM
Playa82, Please show me your template awio_js
here it is:
<script type="text/javascript">
<!--
vBulletin.events.systemInit.subscribe(function()
{
online.req();
});
online = {
req:function()
{
fetch_object('whoisonline').innerHTML = '<img src="images/misc/progress.gif" />';
YAHOO.util.Connect.asyncRequest("POST", "$vboptions[forumhome].php?do=rqawio", {
success: this.show,
failure: vBulletin_AJAX_Error_Handler,
timeout: vB_Default_Timeout
});
},
show:function(a)
{
fetch_object("whoisonline").innerHTML = a.responseText;
}
};
<if condition="$vboptions[awio_timeout] > 0">
cautoref=setInterval("online.req()", 1000*$vboptions[awio_timeout]);
</if>
// -->
</script>
Maybe you should add a fix for that. because some more people like me did this kind of installation of vbadvanced...
mad@Max
02-19-2009, 06:32 AM
I wanted to look at this line $vboptions[forumhome].php?do=rqawio, but it is normal.
Playa82
02-19-2009, 12:56 PM
I wanted to look at this line $vboptions[forumhome].php?do=rqawio, but it is normal.
i got the error.
in awio_js find this:
$vboptions[forumhome].php?do=rqawio
and change it to:
forum.php?do=rqawio
now it works.
This only works if vbadvanced is installed on Forumhome !!!
mad@Max
02-19-2009, 01:27 PM
So, $vboptions[forumhome] it's variable name of your forum index file. For you it $vboptions[forumhome] = forum. I do not know why for you it not working.
Playa82
02-19-2009, 01:54 PM
So, $vboptions[forumhome] it's variable name of your forum index file. For you it $vboptions[forumhome] = forum. I do not know why for you it not working.
my template looks like this now:
<script type="text/javascript">
<!--
vBulletin.events.systemInit.subscribe(function()
{
online.req();
});
online = {
req:function()
{
fetch_object('whoisonline').innerHTML = '<img src="images/misc/progress.gif" />';
YAHOO.util.Connect.asyncRequest("POST", "forum.php?do=rqawio", {
success: this.show,
failure: vBulletin_AJAX_Error_Handler,
timeout: vB_Default_Timeout
});
},
show:function(a)
{
fetch_object("whoisonline").innerHTML = a.responseText;
}
};
<if condition="$vboptions[awio_timeout] > 0">
cautoref=setInterval("online.req()", 1000*$vboptions[awio_timeout]);
</if>
// -->
</script>
and it works fine...
inciarco
02-22-2009, 12:29 AM
Works Fine on vB373. :up:
Thank You Very Much For Sharing It. :up:
My Best Regards. ;)
:)
-=Leb=-
03-05-2009, 11:52 AM
Hi mad@max, is it possible for you to add the refresh button inside Currently Active Users too ? Its also very useful to track our members what they are viewing/doing without need to refresh our website
Anyway Its Great Hack and i wanna thank you for it.
mad@Max
03-05-2009, 12:55 PM
I don't no, probably:)
inciarco
03-05-2009, 01:57 PM
Great Mod mad@Max. :up:
Idea For Future Update: It'd be Nice that when Clicking the Button to Ajax Refresh the Members it'd also Refresh the Number of Members/Guests/Bots Browsing the Board, so they Both Get Refreshed Simultaneously. ;)
My Best Regards.
:)
mad@Max
03-05-2009, 02:06 PM
Then need to update all block, is difficult because of the different styles...
mad@Max
03-05-2009, 05:37 PM
Version 1.3
Added refresh string "Currently Active Users: ..."
inciarco
03-05-2009, 06:36 PM
Thank You Very Much mad@Max For This Update. :up:
Is Working Very Well On vB373. :up:
My Best Regards. ;)
:)
mad@Max
03-05-2009, 06:49 PM
Glad for you;) Thanks.
Playa82
03-06-2009, 05:20 AM
Same problem again (vbulletin + vbadvanced @ forumroot).
Fixed it with that:
<script type="text/javascript">
<!--
vBulletin.events.systemInit.subscribe(function(){o nline.req();online.req2()});online={req:function() {fetch_object("whoisonline").innerHTML='<img src="images/misc/progress.gif" />';YAHOO.util.Connect.asyncRequest("POST","forum.php?do=rqawio",{success:this.show,failure:vBulletin_AJAX_Error_H andler,timeout:vB_Default_Timeout})},show:function (b){fetch_object("whoisonline").innerHTML=b.responseText},req2:function(){fetch_ object("whoisonline2").innerHTML='<img src="images/misc/progress.gif" />';YAHOO.util.Connect.asyncRequest("POST","forum.php?do=rqawio2",{success:this.show2,failure:vBulletin_AJAX_Error_ Handler,timeout:vB_Default_Timeout})},show2:functi on(b){fetch_object("whoisonline2").innerHTML=b.responseText}};<if condition="$vboptions[awio_timeout] > 0">cautoref=setInterval("online.req(), online.req2()",1000*$vboptions[awio_timeout]);</if>
// -->
</script>
Now it works perfectly
mad@Max
03-06-2009, 07:21 AM
It your problem, this variable is working.
star88
03-07-2009, 10:04 AM
Installed thank you :)
I translated your mod in French:
-=Leb=-
03-07-2009, 12:49 PM
Excellent work on the update <3 lol and thx for the request :p
mad@Max
03-07-2009, 01:07 PM
star88, tnx, added in first post.
starplatinum
03-16-2009, 01:11 PM
great feature mate !
downloading right now :)
Alfa1
03-27-2009, 06:28 PM
Hi Max,
Are user group permissions already implemented?
Thanks.
mad@Max
03-27-2009, 07:01 PM
Yes it is, via option:)
Markos
03-27-2009, 07:25 PM
hi max some times it not showing users r on line but they r online :S
mad@Max
03-27-2009, 09:00 PM
Did not notice this:)
Markos
03-28-2009, 10:42 PM
cool u going to try sort it for the next update :)
mad@Max
03-29-2009, 12:33 AM
What sort? If you about sort by staff or groups i use another hack.
Alfa1
03-29-2009, 12:57 AM
Have you implemented this?
Opposite of this phrase Type ID groups that are denied to use this mod (separated by comma), enter excluding groups, like 1,2,8 (by default). Because that's easily :)
But then it doesn't work for additional groups.
For example:
If I want usergroup 21 to use this and all other groups are denied. And a member is in usergroup 14 and 21, then he can not use it, because group 14 is denied.
Alfa1, aaa, now i understand what about you are talking :)
mad@Max
03-29-2009, 01:05 AM
Ok, i'll look on it:)
Markos
07-05-2009, 01:47 PM
hi max did u get anywhere with it not showing some ppl online ??
goxy63
08-03-2009, 12:38 AM
Yes, this only forumhome.
Refresh occurs after you click on button "Refresh", permission of groups you can set in options.
Soon, I plan to add the autorefresh.
well not so big difference between refreshing whole page and just who is online window
:(
would love to see mentioned option, autorefresh
mad@Max
08-30-2009, 08:04 PM
Version 1.4
Rewritten to xml getting. More stability:)
Kosmic1
11-19-2009, 11:23 AM
Very nice mod!! Installed :)
M Shaker
03-20-2010, 04:07 AM
Thanks .. Nice One :up:
===================
Arabic Version attached :)
mgurain
11-11-2010, 03:07 AM
looking for 4.0.x version of this useful hack ?
New Joe
11-11-2010, 06:13 AM
looking for 4.0.x version of this useful hack ?
Always best to try this one first, install it and see if it works, if it does report back to this thread.
s.sami
03-27-2011, 09:25 AM
do you have without refresh button, i need without refresh button because when i deactive button it doesn't auto refresh ?
Malcolm-X
12-04-2011, 12:30 AM
not workin in 4.1.7
Cybnext
04-05-2012, 02:10 PM
In the product-awio Eng.xml file, move this line:
$awiojs = '\n'.fetch_template('awio_js');
Above:
if ($vbulletin->options[awio_btn])
This will fix the problem of turning off the button and then everything stops working.
karkey
04-06-2012, 12:52 PM
+1 for Cybnext it corrected the problem
LouiseWilson
06-05-2012, 01:49 PM
tried for VB4 is a no go
vBMerkezi
06-06-2012, 05:50 PM
thank you
EliasAlucard
08-02-2012, 07:30 PM
Any plans on updating this plugin for vB4?
Draffi
08-31-2012, 12:05 PM
Any plans on updating this plugin for vB4?
Yes, good idea!
Beler
09-20-2013, 05:43 PM
Plz need a compatibility for 4.2.1 vb version !
This version is not compatible with vb 4.2.1 !
Plz need the good version !
Beler
09-24-2013, 04:04 PM
Do not the 4.x.x version ?
Need plz !
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.