PDA

View Full Version : vBulletin Forum Sideblocks - Block - Users Online


Lynne
01-22-2010, 10:00 PM
This is a block for your forum sideblocks to show the Current Users Online.

https://vborg.vbsupport.ru/attachment.php?attachmentid=118381&stc=1&d=1276355488

You will need to Create a new Template (block_users_online), Cache the template, Create a new Block (Users Online), and then, optionally, remove the Currently Active Users list from the bottom of the page.

1.1 2010-06-12: Added in Most users ever online. Updated for 4.0.3.
1.2 2010-06-23: Updated to work for 4.0.4.
1.3 2011-11-17: Fixed template and block code for use in 4.1.8.
1.4 2012-06-05: Fixed template for use in 4.2.0.

Installation instructions for 4.2.0, 4.1.8 and pre-4.1.8 are included in the 1.4 download. Please make sure you use the correct Installation Instructions as both the block code and the template code are different depending on the version you are running. Read them carefully!!!

tini_lam
01-23-2010, 03:53 PM
detention

Robru
01-23-2010, 05:48 PM
Is this the same mod as the 4.0RC4 (https://vborg.vbsupport.ru/showthread.php?t=230428) mod ? :)

wayne.richards@
01-23-2010, 06:41 PM
Installed! I Like It!

Hornstar
01-23-2010, 07:45 PM
Thanks, I might finally change some things around with my skin with this.

Tagged for when I upgrade.

Lynne
01-23-2010, 08:13 PM
Is this the same mod as the 4.0RC4 (https://vborg.vbsupport.ru/showthread.php?t=230428) mod ? :)
This is a block, not a widget. I wrote the other one also and just used most of my same code (different template though).

fourat
01-23-2010, 09:36 PM
Thank you

DjEddie
01-23-2010, 10:47 PM
Hi, Lynne

Ive installed this as per your instructions and double checked and i get the Users Online block .. but no text inside ..

any suggestions ?

Thanks :)

mandingo
01-23-2010, 11:31 PM
Quick one Lynne, I tried to add the "most ever users" into it and it didn't seem to work.
I put:
<p>{vb:rawphrase most_users_ever_online_was_x_y_at_z, {vb:raw recordusers}, {vb:raw recorddate}, {vb:raw recordtime}}</p>
under:
<p>{vb:rawphrase there_are_x_online, {vb:raw totalonline}}
<br /><span class="shade">{vb:rawphrase x_members_and_y_guests, {vb:raw numberregistered}, {vb:raw numberguest}}</span></p>
<ol class="commalist" id="wgo_onlineusers_list">

I'm assuming I need to put something under:
$totalonline = $numberregistered + $numberguest;
$numberinvisible = $numberregistered - $numbervisible;

But i don't know where to look.
$recordusers somehwhere?

JAFRI
01-24-2010, 04:21 AM
nice, working it >

Coroner
01-24-2010, 06:52 AM
Hi, Lynne

Ive installed this as per your instructions and double checked and i get the Users Online block .. but no text inside ..

any suggestions ?

Thanks :)

Template to Use - block_users_online

This works pretty good. Thx @Lynne

DjEddie
01-24-2010, 12:14 PM
Template to Use - block_users_online

This works pretty good. Thx @Lynne
Thanks .. stupidly missed that lol cheers coroner :)

Lynne
01-24-2010, 02:47 PM
Quick one Lynne, I tried to add the "most ever users" into it and it didn't seem to work.

Yes, you would need to add the code from the forum.php page to get that info. Problem is, it is from the datamanager and I know I couldn't grab the datamanager info when I had this code in the widget and I didn't even bother to try for this block. Someone asked me for the code to put the widget in the block and so that's exactly what I did.

marcomrc
01-25-2010, 11:47 AM
gives me this error:

Fatal error: Class 'vB' not found in /web/htdocs/www.xxxxxxx.it/home/forum/includes/block/html.php(89) : eval()'d code on line 2

DjEddie
01-25-2010, 01:25 PM
Hi, noticed an error that I get from this mod (found it was this by disabling and enabling the different mods i have).

When I log out (with this mod enabled) this is the error I get:

Fatal error: Call to undefined function fetch_online_status() in /home/*****/public_html/radio1/includes/block/html.php(89) : eval()'d code on line 93

line 93 of the includes/block/html.php code is:

$content = nl2br(htmlspecialchars_uni($this->config['html_content']));


when the mod is disabled .. this error doesn't happen .. any suggestions?

Lynne
01-25-2010, 02:36 PM
gives me this error:


Fatal error: Class 'vB' not found in /web/htdocs/www.xxxxxxx.it/home/forum/includes/block/html.php(89) : eval()'d code on line 2

Hi, noticed an error that I get from this mod (found it was this by disabling and enabling the different mods i have).

When I log out (with this mod enabled) this is the error I get:

Fatal error: Call to undefined function fetch_online_status() in /home/*****/public_html/radio1/includes/block/html.php(89) : eval()'d code on line 93

line 93 of the includes/block/html.php code is:

$content = nl2br(htmlspecialchars_uni($this->config['html_content']));
when the mod is disabled .. this error doesn't happen .. any suggestions?

What version of vB are you guys running? And what browser? I can't reproduce either of these errors on my 4.0.1 test site (either suite or forums only) using either firefox or safari.

DjEddie
01-26-2010, 09:02 PM
What version of vB are you guys running? And what browser? I can't reproduce either of these errors on my 4.0.1 test site (either suite or forums only) using either firefox or safari.
Hi Lynne,

I'm running 4.0.1 and i'm using firefox 3.57 and also Internet explorer 7.06 and have tried uninstalling and reinstalling and still have same error .. not sure why

Lynne
01-26-2010, 09:46 PM
Hi Lynne,

I'm running 4.0.1 and i'm using firefox 3.57 and also Internet explorer 7.06 and have tried uninstalling and reinstalling and still have same error .. not sure why
This is on the forum.php page, right? If you are using some mod to make it show on other pages, then you need to include the function, and maybe other functions that are in the functions_bigthree.php file.

DjEddie
01-26-2010, 10:29 PM
ahh, yes sorry its the "EveryWhere Sidebar" mod that gives it the error when both mods are on ...

im not sure what functions would be needed to be added .. could u explain or should i be asking the developer of that mod?

thanks :)

Lynne
01-26-2010, 10:44 PM
ahh, yes sorry its the "EveryWhere Sidebar" mod that gives it the error when both mods are on ...

im not sure what functions would be needed to be added .. could u explain or should i be asking the developer of that mod?

thanks :)
Try this.... at the top of the block code, add this line and see if it fixes the issue:

if (THIS_SCRIPT != 'index') {
require_once(DIR . '/includes/functions_bigthree.php');
}

DjEddie
01-27-2010, 09:40 AM
Works perfectly now Lynne.

Thanks for your help :)

cassis2k
01-28-2010, 09:13 AM
Thx Lynne :) It works perfectly

buddyheiko
01-28-2010, 05:24 PM
Hi,

it works perfect ...
and nothing to translate. Great !

Heiko

starman?
01-29-2010, 02:36 PM
Most excellent. Thank you Lynne!

RedTrinity
01-30-2010, 12:24 PM
Works great, thank you Lynne :)

captkirk
01-31-2010, 12:14 AM
Installed correctly but notice it shows only me online when the bottom one shows members as well who are online. I'm pretty sure its a caching issue will further investigate.

Lynne
01-31-2010, 01:22 AM
Installed correctly but notice it shows only me online when the bottom one shows members as well who are online. I'm pretty sure its a caching issue will further investigate.
Did you change the cache time for the block like I suggested in the post?

benjaminlwells
02-21-2010, 09:51 AM
Works great for me. I too would like to have the "most ever" feature available, but that won't keep me up at night ;)

RedTrinity
04-13-2010, 02:47 AM
I just upgraded to 4.0.3 and this block stopped working. Completely disappeared :( But all the plugin/template data for it is still present....

Lynne
04-13-2010, 04:41 AM
I just upgraded to 4.0.3 and this block stopped working. Completely disappeared :( But all the plugin/template data for it is still present....
sigh..... no more vB::, back to $vbulletin....

Use this for the code in the block:
global $vbulletin;
$activeusers = '';
if (($vbulletin->options['displayloggedin'] == 1 OR $vbulletin->options['displayloggedin'] == 2 OR ($vbulletin->options['displayloggedin'] > 2 AND $vbulletin->userinfo['userid'])) AND !$show['search_engine'])
{
$datecut = TIMENOW - $vbulletin->options['cookietimeout'];
$numbervisible = 0;
$numberregistered = 0;
$numberguest = 0;

$hook_query_fields = $hook_query_joins = $hook_query_where = '';
($hook = vBulletinHook::fetch_hook('forumhome_loggedinuser_ query')) ? eval($hook) : false;

$forumusers = $vbulletin->db->query_read_slave("
SELECT
user.username, (user.options & " . $vbulletin->bf_misc_useroptions['invisible'] . ") AS invisible, user.usergroupid, user.lastvisit,
session.userid, session.inforum, session.lastactivity, session.badlocation,
IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid, infractiongroupid
$hook_query_fields
FROM " . TABLE_PREFIX . "session AS session
LEFT JOIN " . TABLE_PREFIX . "user AS user ON(user.userid = session.userid)
$hook_query_joins
WHERE session.lastactivity > $datecut
$hook_query_where
" . iif($vbulletin->options['displayloggedin'] == 1 OR $vbulletin->options['displayloggedin'] == 3, "ORDER BY username ASC") . "
");

if ($vbulletin->userinfo['userid'])
{
// fakes the user being online for an initial page view of index.php
$vbulletin->userinfo['joingroupid'] = iif($vbulletin->userinfo['displaygroupid'], $vbulletin->userinfo['displaygroupid'], $vbulletin->userinfo['usergroupid']);
$userinfos = array
(
$vbulletin->userinfo['userid'] => array
(
'userid' =>& $vbulletin->userinfo['userid'],
'username' =>& $vbulletin->userinfo['username'],
'invisible' =>& $vbulletin->userinfo['invisible'],
'inforum' => 0,
'lastactivity' => TIMENOW,
'lastvisit' =>& $vbulletin->userinfo['lastvisit'],
'usergroupid' =>& $vbulletin->userinfo['usergroupid'],
'displaygroupid' =>& $vbulletin->userinfo['displaygroupid'],
'infractiongroupid' =>& $vbulletin->userinfo['infractiongroupid'],
)
);
}
else
{
$userinfos = array();
}
$inforum = array();

while ($loggedin = $vbulletin->db->fetch_array($forumusers))
{
$userid = $loggedin['userid'];
if (!$userid)
{ // Guest
$numberguest++;
if (!isset($inforum["$loggedin[inforum]"]))
{
$inforum["$loggedin[inforum]"] = 0;
}
if (!$loggedin['badlocation'])
{
$inforum["$loggedin[inforum]"]++;
}
}
else if (empty($userinfos["$userid"]) OR ($userinfos["$userid"]['lastactivity'] < $loggedin['lastactivity']))
{
$userinfos["$userid"] = $loggedin;
}
}

if (!$vbulletin->userinfo['userid'] AND $numberguest == 0)
{
$numberguest++;
}

foreach ($userinfos AS $userid => $loggedin)
{
$numberregistered++;
if ($userid != $vbulletin->userinfo['userid'] AND !$loggedin['badlocation'])
{
if (!isset($inforum["$loggedin[inforum]"]))
{
$inforum["$loggedin[inforum]"] = 0;
}
$inforum["$loggedin[inforum]"]++;
}
fetch_musername($loggedin);

($hook = vBulletinHook::fetch_hook('forumhome_loggedinuser' )) ? eval($hook) : false;

if (fetch_online_status($loggedin))
{
$numbervisible++;
$show['comma_leader'] = ($activeusers != '');
$templater = vB_Template::create('forumhome_loggedinuser');
$templater->register('loggedin', $loggedin);
$activeusers .= $templater->render();
vB_Template::preRegister('block_users_online', array('activeusers' => $activeusers));
}
}

// memory saving
unset($userinfos, $loggedin);

$vbulletin->db->free_result($forumusers);

$totalonline = $numberregistered + $numberguest;
$numberinvisible = $numberregistered - $numbervisible;

$show['loggedinusers'] = true;

$statsarray = array('onlinestats' => $onlinestats,
'totalonline' => $totalonline,
'numberregistered' => $numberregistered,
'numberguest' => $numberguest,
'show' => $show,
);

vB_Template::preRegister('block_users_online', $statsarray);
return true;
}

(Thanks go to Paul M. who doesn't know I cheated and just looked to see what he changed..... :) )

starman?
04-13-2010, 05:25 AM
Much appreciated Paul & Lynne. Thank you.

RedTrinity
04-14-2010, 12:45 AM
Thank you, works again now :)

SmartMania
04-14-2010, 12:07 PM
Indeed works again, but doesn't work the pm's system :confused:

Lynne
04-14-2010, 02:21 PM
Indeed works again, but doesn't work the pm's system :confused:
Huh? This doesn't have anything to do with PMs. :/


Also, just a note about this.... in 4.0.3, they changed the online users list to not show users in usergroups 3 or 4. I didn't update this query to include that. However, if you want it to be the same, you may just open the forum.php file, find the query and you'll see the line to add under the WHERE part of the query. Just add it to the query in the block configuration, like this:

WHERE session.lastactivity > $datecut
AND (user.usergroupid NOT IN (3,4) OR user.usergroupid IS NULL)
$hook_query_where

vexxy
04-15-2010, 07:28 PM
works great for 4.0.3...thanks..my only problem is, when I have the block active, the memberlist link (www.site.com/members/list/) gives me an error:

Fatal error: Call to undefined function fetch_online_status() in /home/bytesin/public_html/includes/block/html.php(95) : eval()'d code on line 94

is there any way I can resolve that? If i disable the sidebar block, it's all good...wierd

COL NIL SATIS
04-18-2010, 01:55 PM
spot on Lynne...works brilliantly ,thank you ..installed!!!

COL NIL SATIS
04-30-2010, 06:24 PM
what code in 4.0.3 do i remove to take the users online out of the wgo box???? my FORUMHOME template doesnt have

<vb:if condition="$show['loggedinusers']">
<!-- logged-in users -->
{{{code in FORUMHOME template for active users}}}
<!-- end logged-in users -->
</vb:if>

any ideas????

Lynne
04-30-2010, 06:54 PM
Well, it doesn't says exactly:
{{{code in FORUMHOME template for active users}}}

I put that in instead of all the code. But it does have the two lines above and below that. If you don't have those lines, you will have to ask the designer of your style where that section is.

COL NIL SATIS
05-01-2010, 05:30 PM
Well, it doesn't says exactly:
{{{code in FORUMHOME template for active users}}}

I put that in instead of all the code. But it does have the two lines above and below that. If you don't have those lines, you will have to ask the designer of your style where that section is.

Okey dokes Lynne ...thanks for the reply :up:

elmstr
05-12-2010, 04:54 PM
Sadly, I had to remove the block. Once the block is activated none of the community links on the navbar are working anymore.

They give the same error as describen in post #36.

Any fix for this? Thanks in advance!

Lynne
05-12-2010, 10:34 PM
Post #36:
works great for 4.0.3...thanks..my only problem is, when I have the block active, the memberlist link (www.site.com/members/list/ (http://www.site.com/members/list/)) gives me an error:

Fatal error: Call to undefined function fetch_online_status() in /home/bytesin/public_html/includes/block/html.php(95) : eval()'d code on line 94is there any way I can resolve that? If i disable the sidebar block, it's all good...wierd
Sadly, I had to remove the block. Once the block is activated none of the community links on the navbar are working anymore.

They give the same error as describen in post #36.

Any fix for this? Thanks in advance!
i do not have a link to www.site.com/members/list/ (http://www.site.com/members/list/) on my site so I am unable to reproduce this error nor fix it. The function fetch_online_status is in includes/functions_bigthree.php. So, if you have done anything to remove the inclusion of that file in your forum.php page, then it won't be found and you will get an error like this.

elmstr
05-13-2010, 01:43 PM
Thanks for looking into this, Lynne! :)

Fatal error: Call to undefined function fetch_online_status()
in /xxx/xxx/xxx/xxx/forum/includes/block/html.php(95) : eval()'d code on line 94

http://www.cross-stitch-academy.com/forum/memberlist.php
http://www.cross-stitch-academy.com/forum/profile.php?do=buddylist
http://www.cross-stitch-academy.com/forum/profile.php?do=editoptions

All the standard links in the dropdowns give the error.

I'm running this on a test board only, so I'll leave the 'Users Online' block active for some time.

Hope you can help.

Lynne
05-13-2010, 01:52 PM
Thanks for looking into this, Lynne! :)

Fatal error: Call to undefined function fetch_online_status()
in /xxx/xxx/xxx/xxx/forum/includes/block/html.php(95) : eval()'d code on line 94http://www.cross-stitch-academy.com/forum/memberlist.php
http://www.cross-stitch-academy.com/forum/profile.php?do=buddylist
http://www.cross-stitch-academy.com/forum/profile.php?do=editoptions

All the standard links in the dropdowns give the error.

I'm running this on a test board only, so I'll leave the 'Users Online' block active for some time.

Hope you can help.
There must be something else going on because I am not getting this error on any of my three test sites. Do you have other mods? If you disable them, do you still get this error?

elmstr
05-13-2010, 07:09 PM
Thanks, Lynne.

I'll disable the plugins and check if there's a conflict with another hack.
Let you know if I find out.

elmstr
05-13-2010, 07:58 PM
Good news: I found the problem.

In my case it was the 'Everywhere Sidebar ESB' hack. After I disabled some options of where to show the sidebar, all links from the navbar are working correctly.

Thanks again!

THE__DRIFTER
06-11-2010, 02:07 AM
Per the instructions this mod is unclear and inoperative on 4.0.3 I followed the .03 link and made the edit but not sure why it won't show.

Martin K.
06-23-2010, 08:01 AM
nice hack!

but if i refresh forumhome within < 1 minute the block is empty :( .

version: 4.0.4

best regards from berlin
martin

Lynne
06-23-2010, 03:04 PM
nice hack!

but if i refresh forumhome within < 1 minute the block is empty :( .

version: 4.0.4

best regards from berlin
martin
Boy is this getting old. Why, oh why, do mods have to be broken with every update?

I should have this fixed later today when I have a moment.

Filgga
06-24-2010, 05:10 PM
Boy is this getting old. Why, oh why, do mods have to be broken with every update?

I should have this fixed later today when I have a moment.
Anxiously waiting for your input buddy

Lynne
06-24-2010, 07:11 PM
Anxiously waiting for your input buddy
If you look at the first post you'll see the last update was yesterday to version 1.2 of this mod for 4.0.4.

SemperFideles
07-06-2010, 09:29 PM
Installed 4.0.4 a couple of weeks ago and was working and now it's not displaying again.

SemperFideles
07-08-2010, 10:59 AM
Lynne,

I figured out that the User's Online Block does, in fact, work. What troubled me is that I have the Everwhere Sidebars Mod installed. All my custom forum blocks display on other pages than FORUMHOME but the User's Online Block does not.

The Mod writer for Everywhere Sidebars noted this:
That is a nice mod from Lynne.

It will not work because Lynne is restricting the mod for forumhome only in second step


if (THIS_SCRIPT == 'forum')
{
$cache[] = 'block_users_online';
}

I think if you disable the if condition it will work. Better to ask Lynne
Regards, Khalid
I tried removing the conditional but it did not work. Do you have any idea why the User's Online Block won't work on other areas of the board other than FORUMHOME?

Lynne
07-08-2010, 02:39 PM
That is just for caching the template, it won't stop it from being displayed (it will just give you an uncached template). You can try removing the other conditions I have around the code, but it could just be that you don't have other necessary information available to you on the other pages and you need to include other php scripts. You'll have to look in your error_logs probably if it isn't one of the conditions.

Igel1
07-23-2010, 12:14 PM
vbulletin 4.0.5
There is a problem with the block "users online" and the Mod Everywhere Sidebar 4 VB4 https://vborg.vbsupport.ru/showthread.php?t=233871&page=30 . If both are active there is an error message when you eg goes into the profile or FAQ, Who is Online
Fatal error: Call to undefined function fetch_online_status() in ...\includes\block\html.php(95): eval()'d code on line 93

Lynne
07-23-2010, 02:11 PM
vbulletin 4.0.5
There is a problem with the block "users online" and the Mod Everywhere Sidebar 4 VB4 https://vborg.vbsupport.ru/showthread.php?t=233871&page=30 . If both are active there is an error message when you eg goes into the profile or FAQ, Who is Online
Fatal error: Call to undefined function fetch_online_status() in ...\includes\block\html.php(95): eval()'d code on line 93
It just needs you to require the file with that function since it isn't already included on those pages. Add this at the top of the code:

require_once(DIR . '/includes/functions_bigthree.php');

Igel1
07-23-2010, 11:04 PM
Thanks Lynne

I have entered above in the block code and now it works on all pages without error. Even if the Sidebar is disabled or uninstalled everything works without problems.

neopets
08-23-2010, 02:03 AM
@lynne

Any reason stats and usernames would not be showing up in 4.0.6?

https://vborg.vbsupport.ru/

Lynne
08-23-2010, 02:17 AM
@lynne

Any reason stats and usernames would not be showing up in 4.0.6?

http://s3.amazonaws.com/awesome_screenshot/26798?AWSAccessKeyId=0R7FMW7AXRVCYMAPTPR2&Expires=1282532806&Signature=kXG6qh3vFHGqr5FEq9VGUWDZT%2BQ%3D
This works fine on my 4.0.6 test forum, so you might want to double-check that you installated it correctly.

neopets
08-23-2010, 02:41 PM
Managed to fix that issue

But when using sidebar everywhere, it'll display on a page once. then if I reload the page the block disappears.

Edit: Displays on forum home all the time. but on other pages displays once.. then is gone. Odd

Marv
08-25-2010, 04:56 PM
Managed to fix that issue

But when using sidebar everywhere, it'll display on a page once. then if I reload the page the block disappears.

Edit: Displays on forum home all the time. but on other pages displays once.. then is gone. Odd

Almost same here, Lynne. Updated to 4.06 and the display on forum.php is like a lottery. I cannot tell what triggers the display cause there is no pattern which I could identify. Sometimes it works but most of the time it doesn?t. Could you afford some time to have a look into that 4.06 issue ? Would be really appreciated.

Lynne
08-25-2010, 09:00 PM
Almost same here, Lynne. Updated to 4.06 and the display on forum.php is like a lottery. I cannot tell what triggers the display cause there is no pattern which I could identify. Sometimes it works but most of the time it doesn?t. Could you afford some time to have a look into that 4.06 issue ? Would be really appreciated.
Are you talking about issues on forum.php or with the modification Everywhere Sidebar? This shows just fine on my test site. I don't have a live site running 4.0, so I can't comment on it then. I can't fix an issue that isn't happening for me.

Marv
08-26-2010, 06:50 AM
Are you talking about issues on forum.php or with the modification Everywhere Sidebar? This shows just fine on my test site. I don't have a live site running 4.0, so I can't comment on it then. I can't fix an issue that isn't happening for me.

Thx for your reply, Lynne. It?s about the forum.php and I don?t have the mod Everywhere Sidebar installed. May be you wanna have a look into it on my site ?

Lynne
08-26-2010, 02:12 PM
Sure, post a link to your site so I can see this happening. Also, look in your error_logs and see if anything is in there. And, try disabling your other modifications to see if this is a problem between two modifications.

(I just spent a few minutes clicking on my test site between two users and could never get that block to disappear.)

thunder28
08-31-2010, 04:56 AM
hi

Nice mod.

Can i delete the notice: most users ever online...

I need only the users currently online.

greetz
thunder28

Lynne
08-31-2010, 01:48 PM
Of course. Feel free to modify it however you like.

vexxy
09-09-2010, 05:30 PM
i have the same "lottery" problem with 4.0.6...when I first enter on forumhome, it all displays ok..if I refresh the page, no more user numbers, only the plain text....and ya, I have the everywhere sidebar installed :(

edit: and i found a temporary fix...if you put cache time to 0 in forum blocks manager, for this block...everything works ok

neopets
09-09-2010, 07:14 PM
i have the same "lottery" problem with 4.0.6...when I first enter on forumhome, it all displays ok..if I refresh the page, no more user numbers, only the plain text....and ya, I have the everywhere sidebar installed :(

edit: and i found a temporary fix...if you put cache time to 0 in forum blocks manager, for this block...everything works ok

can you post what code you're using? When I do this it works on other pages but not the forumhome.

COL NIL SATIS
09-22-2010, 09:49 AM
tagged

AliceHoward
10-10-2010, 11:17 AM
Wonderful, thank you Lynne. :)

m55629
10-13-2010, 12:07 PM
Hi,

Can you explain about this:

WHERE session.lastactivity > $datecut
AND (user.usergroupid NOT IN (3,4) OR user.usergroupid IS NULL)
$hook_query_where

in my forum dont show any user online.

Lynne
10-13-2010, 01:49 PM
What do you mean "explain about" it? It's from the standard query from your forum.php file. (Actually, it was from the 4.0.4 version as they have since changed it again.) It just grabs all users except those in usergroups 3 or 4 (and anything additionally added by the hook).

m55629
10-13-2010, 06:46 PM
What do you mean "explain about" it? It's from the standard query from your forum.php file. (Actually, it was from the 4.0.4 version as they have since changed it again.) It just grabs all users except those in usergroups 3 or 4 (and anything additionally added by the hook).

thanks,

But in my forum not appear any user?

Can you help me?

COL NIL SATIS
10-13-2010, 06:54 PM
thanks,

But in my forum not appear any user?

Can you help me?

Are you using vbull 4.0.6??

m55629
10-13-2010, 07:33 PM
Are you using vbull 4.0.6??
my version is 4.0.7

Lynne
10-13-2010, 08:25 PM
thanks,

But in my forum not appear any user?

Can you help me?
All I see are spiders on your site users list. This doesn't show spiders - that is a separate mod that you would need to incorporate into this one.

Marv
10-25-2010, 04:05 PM
Been a while and my last problem vanished with the time. Still have no idea why and how..

But nuw I just updated to 4.0.8 and your mod is complety gone, Lynne. Anyy idea why ? CanĀ“t see any code changges to 4.0.6. Weired..or am I just blind ?
Anyone else experiencing this problem ?

COL NIL SATIS
10-25-2010, 06:00 PM
Been a while and my last problem vanished with the time. Still have no idea why and how..

But nuw I just updated to 4.0.8 and your mod is complety gone, Lynne. Anyy idea why ? Can?t see any code changges to 4.0.6. Weired..or am I just blind ?
Anyone else experiencing this problem ?

Yup...on 4.0.6....cant seem to get it to show in the blocks Gahh...was fine on 4.0.4 though

Lynne
10-25-2010, 07:43 PM
Been a while and my last problem vanished with the time. Still have no idea why and how..

But nuw I just updated to 4.0.8 and your mod is complety gone, Lynne. Anyy idea why ? Can?t see any code changges to 4.0.6. Weired..or am I just blind ?
Anyone else experiencing this problem ?

Yup...on 4.0.6....cant seem to get it to show in the blocks Gahh...was fine on 4.0.4 though
Make sure the template didn't get removed during an upgrade.

COL NIL SATIS
10-26-2010, 02:25 PM
Ok Lynne..i will check that out,thanks

COL NIL SATIS
10-26-2010, 03:14 PM
Select Block Type - ~~vbblock.blocktype_html~~

i dont seem to have that option Lynne? any ideas? ive checked the template and thats still there (block users online..also the plugin is active etc ...still wont show ..Gah

Lynne
10-26-2010, 06:26 PM
Select Block Type - ~~vbblock.blocktype_html~~

i dont seem to have that option Lynne? any ideas? ive checked the template and thats still there (block users online..also the plugin is active etc ...still wont show ..Gah
That problem (the phrases) is fixed. It is just called Custom HTML/PHP .

Marv
10-27-2010, 12:55 PM
That problem (the phrases) is fixed. It is just called Custom HTML/PHP .

Thx for your reply, Lynne :up:

At least my problem is solved. Had installed your mod in the master style in 4.0.(?). With 4.0.8 I had to recognize that the master style is gone and there are now 2 different styles: named "default" and the "original". Your mod wasn?t implemented in the original which I am using and the master style hasn?t updated that one while upgrading too. So your advice to check the templates for existance wasn?t wrong - only not to the point. It has to be: check the template and do that in_all_styles != ;)

m55629
10-30-2010, 09:17 PM
this error was appear in 4.0.8:

Fatal error: Class 'vB' not found in /home/emperor/public_html/forum/includes/block/html.php(95) : eval()'d code on line 2

peugeot405
10-31-2010, 08:10 PM
Not working for me.
Getting following error.

Fatal error: Class 'vB' not found in /home/peugeot405/domains/fsrclan.com/public_html/fsr-test/includes/block/html.php(95) : eval()'d code on line 9

i have vb 4.0.8.

anyone know how to fix this

Lynne
10-31-2010, 08:33 PM
this error was appear in 4.0.8:

Fatal error: Class 'vB' not found in /home/emperor/public_html/forum/includes/block/html.php(95) : eval()'d code on line 2

Not working for me.
Getting following error.

Fatal error: Class 'vB' not found in /home/peugeot405/domains/fsrclan.com/public_html/fsr-test/includes/block/html.php(95) : eval()'d code on line 9i have vb 4.0.8.

anyone know how to fix this
Disable all your other plugins and see if you still have this issue. It is working just fine on my 4.0.8 test board without any modifications. (And even with several other mods I have turned on, it is working fine.) Both of you are getting the error on a different line also, which makes me think this is a compatibility issue between a couple of blocks. So, you may want to try turning some blocks on and off and see if you can find which two have issues with each other.

peugeot405
10-31-2010, 08:48 PM
still getting the same error.
but i have vb 4.0.8 suite.
do i have to create a cms widget first or is this block independent?

Lynne
10-31-2010, 09:51 PM
still getting the same error.
but i have vb 4.0.8 suite.
do i have to create a cms widget first or is this block independent?
This is not a Widget - it is a Forum Block so I don't understand the relevance of you question here.

m55629
11-01-2010, 07:58 AM
Disable all your other plugins and see if you still have this issue. It is working just fine on my 4.0.8 test board without any modifications. (And even with several other mods I have turned on, it is working fine.) Both of you are getting the error on a different line also, which makes me think this is a compatibility issue between a couple of blocks. So, you may want to try turning some blocks on and off and see if you can find which two have issues with each other.

Dear Lynne

when i put User online block under "tag Cloud" block that error was not appear and work good, but when put it anywhere above "tag cloud" that is appear.

can it help you?

Lynne
11-01-2010, 02:38 PM
You are talking about the default Tag Cloud block? I have that on my forum and I have the User Online block above it and I don't have that error. I tried moving it the other way and still no error. And I tried changing the tag cloud block from "usage" to "search' and still don't have any problem.

peugeot405
11-01-2010, 06:46 PM
i went back to vb 4.0.7 and now its working perfectly. :)

m55629
11-02-2010, 07:46 PM
You are talking about the default Tag Cloud block? I have that on my forum and I have the User Online block above it and I don't have that error. I tried moving it the other way and still no error. And I tried changing the tag cloud block from "usage" to "search' and still don't have any problem.

ok,

Now I use it Under tag cloud.

thanks.

OurCouponHome
12-25-2010, 11:50 PM
For some reason, mine says this:

There are currently users online.
members and guests

Most users ever online was , at .

It's not showing any numbers...what did I do wrong?

Lynne
12-26-2010, 02:45 AM
For some reason, mine says this:

There are currently users online.
members and guests

Most users ever online was , at .


It's not showing any numbers...what did I do wrong?
Go though the install instructions again. It doesn't sound like you created the block correctly.

OurCouponHome
12-26-2010, 02:41 PM
Another newbie question, what do the different color codes in your code mean? I copied and pasted whatyou had. Was I supposed to change some?

Lynne
12-26-2010, 04:10 PM
Another newbie question, what do the different color codes in your code mean? I copied and pasted whatyou had. Was I supposed to change some?
It's just the coloring that an html or php block gives to the code.

OurCouponHome
12-26-2010, 10:39 PM
I don't know why it's not working then because I copied and pasted your code.

Lynne
12-26-2010, 11:44 PM
I don't know why it's not working then because I copied and pasted your code.
I just went and followed the instructions from this thread to install it on my 4.1.0 test site and it works just fine. I suppose you can try disabling all other plugins and see if maybe another is conflicting with this one.

zaone
12-28-2010, 03:33 PM
Works fine on 4.1.0.

demonfatal
01-15-2011, 03:47 PM
Lynne, the sidebar block is not available for me with vB4.1.1, please can you confirm?

Lynne
01-15-2011, 04:03 PM
Lynne, the sidebar block is not available for me with vB4.1.1, please can you confirm?
Nope, can't confirm as I'm looking at it right now on my default 4.1.1 test site.

demonfatal
01-15-2011, 05:20 PM
Nope, can't confirm as I'm looking at it right now on my default 4.1.1 test site.

Well right, the problem is the product "everywhere_sidebar 1.4.1" update "pl1"
Can you check with the coder "almannai" why please?

Lynne
01-15-2011, 05:23 PM
Well right, the problem is the product "everywhere_sidebar 1.4.1" update "pl1"
Can you check with the coder "almannai" why please?
This has already been covered in this thread and probably also over in his thread too.

Kraxell
02-11-2011, 09:45 AM
Hello :)

rly n1 hack :)

One question:
How i delete the info about total-online-users?

GONUMBER6
02-11-2011, 12:52 PM
Thank you works perfectly.

COL NIL SATIS
02-13-2011, 04:26 PM
require_once(DIR . '/includes/functions_bigthree.php');

Lynne where would i put this code ...??

Lynne
02-13-2011, 05:09 PM
require_once(DIR . '/includes/functions_bigthree.php'); Lynne where would i put this code ...??
I answered that here - https://vborg.vbsupport.ru/showpost.php?p=1967510&postcount=20

COL NIL SATIS
02-13-2011, 05:18 PM
I answered that here - https://vborg.vbsupport.ru/showpost.php?p=1967510&postcount=20

Gahh,never saw that..thanks for the quick reply Lynne,appreciate it :D

COL NIL SATIS
02-13-2011, 06:12 PM
Thx for your reply, Lynne :up:

At least my problem is solved. Had installed your mod in the master style in 4.0.(?). With 4.0.8 I had to recognize that the master style is gone and there are now 2 different styles: named "default" and the "original". Your mod wasn?t implemented in the original which I am using and the master style hasn?t updated that one while upgrading too. So your advice to check the templates for existance wasn?t wrong - only not to the point. It has to be: check the template and do that in_all_styles != ;)

think i have to do that,i have checked my master templates and i don't have the block_users_online ...i will try that

Bacon Butty
02-13-2011, 06:57 PM
Thanks Lynne - you're a star.

COL NIL SATIS
02-16-2011, 07:36 PM
Tried everything ,re added block_users_online to default(master style)

Hmmmmmm....

Lynne i have checked the plugin

Execution Order Use this field to enter the order in which code at the same hook will be executed.

this is set at 5 is this correct??

COL NIL SATIS
02-16-2011, 07:36 PM
Dont even have users online on my homepage at the min and i readded the code,absolutely baffled

Lynne
02-16-2011, 07:58 PM
Go over the install instructions again and make sure you have all the code and that the template shows up in your style and you changed the template name in the widget. Also, make sure you have the option on to show users online. And check that you even have that widget on the layout you are using on that section.

COL NIL SATIS
02-17-2011, 04:31 PM
Do i need to [Purge Cache] the blocks??

Lynne
02-17-2011, 04:59 PM
I don't think you should need to if you set the cache time to 1 minute.

COL NIL SATIS
02-17-2011, 07:27 PM
Tried that Lynne..still can't get it to show,nevermind,thanks for the help anyway i appreciate it

OldSchoolDSL
02-17-2011, 07:46 PM
Installed and working

4.1.1 :)

Now if only I could get this on my CMS also

Lynne
02-17-2011, 08:50 PM
Tried that Lynne..still can't get it to show,nevermind,thanks for the help anyway i appreciate it
If you want to PM me an admin username/password and site url, then I can take a look for you.

Installed and working

4.1.1 :)

Now if only I could get this on my CMS also
Widget - Users Online (https://vborg.vbsupport.ru/showthread.php?t=230428)

OldSchoolDSL
02-17-2011, 09:29 PM
If you want to PM me an admin username/password and site url, then I can take a look for you.


Widget - Users Online (https://vborg.vbsupport.ru/showthread.php?t=230428)

As always, a valuable resource of information.

Thanks :)

COL NIL SATIS
02-17-2011, 11:32 PM
If you want to PM me an admin username/password and site url, then I can take a look for you.


Widget - Users Online (https://vborg.vbsupport.ru/showthread.php?t=230428)

thanks Lynne will get that sorted for you ,really appreciate it :up:

GONUMBER6
02-18-2011, 03:33 AM
Hi Lynne,
Just installed vb 4.1 and used your block who's online, works perfect. However, when I tried the Everywhere sidebar it disappears. Disable the EVSB and it is there. I tried adding the code you had for that, but it did not work. Any suggestions? Much thanks! Lisa

http://www.tastetestedrecipes.com/forums/forum.php

Lynne
02-18-2011, 04:07 PM
Hi Lynne,
Just installed vb 4.1 and used your block who's online, works perfect. However, when I tried the Everywhere sidebar it disappears. Disable the EVSB and it is there. I tried adding the code you had for that, but it did not work. Any suggestions? Much thanks! Lisa

http://www.tastetestedrecipes.com/forums/forum.php
Please see the very first post in this thread. That is covered there.

GONUMBER6
02-18-2011, 05:16 PM
Please see the very first post in this thread. That is covered there.

I did try this below, but it did not work. :(

NOTE: To get this to work with the Everywhere Sidebar modification, add this to the top of the block code posted in Step 3 above:

PHP Code:
if (THIS_SCRIPT != 'index') {
require_once(DIR . '/includes/functions_bigthree.php');
}

Lynne
02-18-2011, 05:32 PM
The link to your site doesn't work, so I can't see what the problem is. Perhaps you have a problem with another modification. That code has worked with others and works on my default test site.

edit: I just found your forums here - http://tastetestedrecipes.com/forum.php (no /forums in the path). You don't even have the block on the page. I see you have the widget in your cms, but no block. Are you sure you are looking at the correct code? Widgets and Blocks are not the same thing.

GONUMBER6
02-21-2011, 04:58 PM
The link to your site doesn't work, so I can't see what the problem is. Perhaps you have a problem with another modification. That code has worked with others and works on my default test site.

edit: I just found your forums here - http://tastetestedrecipes.com/forum.php (no /forums in the path). You don't even have the block on the page. I see you have the widget in your cms, but no block. Are you sure you are looking at the correct code? Widgets and Blocks are not the same thing.

Sorry about that Lynne- I am so used to typing 'forums' but I installed my new forum under root.

Yes I have the block created, but it does not show. If I disable the ESB it shows up. I will go disable it now so you can see the block works without ESB.

Maybe it is the version of ESB I installed? I also have very few mods installed on this forum, have not gotten too many installed yet.

Lynne
02-21-2011, 05:34 PM
I cannot get any of my blocks that use a custom template to show up using the new version of the Everywhere Sidebar mod.

GONUMBER6
02-21-2011, 05:39 PM
I disabled all mods and it still did not show up.

So maybe I should try downloading the previous version?

Lynne
02-21-2011, 06:41 PM
I disabled all mods and it still did not show up.

So maybe I should try downloading the previous version?
Perhaps you didn't follow the instructions and create the new template and then assign this template to the block? It definitely works on my totally default 4.1.2 forum.

GONUMBER6
02-21-2011, 06:53 PM
Perhaps you didn't follow the instructions and create the new template and then assign this template to the block? It definitely works on my totally default 4.1.2 forum.

Just double checked and I did create the Block users online.

I don't know what it is. Maybe I will try to add the ESB to my other forum and see if the same thing happens. I will let you know.

GONUMBER6
02-21-2011, 07:28 PM
I have too many mods on my other forum- it was making blank pages. It's okay, I would rather have who's online on forum home than ESB installed.

Mysterious Ride
02-22-2011, 05:21 AM
Nevermind...

OldSchoolDSL
03-04-2011, 01:31 PM
So my system tells me this modification is not cached

block_users_online

Any way to cache this?

Lynne
03-04-2011, 03:44 PM
So my system tells me this modification is not cached

block_users_onlineAny way to cache this?
Did you do step 2? (I think somewhere along the line the script was changed to index, not forum, so try putting 'index' in the condition there.)

OldSchoolDSL
03-05-2011, 01:52 AM
Did you do step 2? (I think somewhere along the line the script was changed to index, not forum, so try putting 'index' in the condition there.)

I checked it. I did follow step 2. Saving it again & re-loading, seems to have corrected it.

PJSkiboy
03-06-2011, 06:32 AM
Is there a mod or template edit that does this except across the top of your forum home?

Lynne
03-06-2011, 04:20 PM
Is there a mod or template edit that does this except across the top of your forum home?
I have no idea. You'd have to do a search for it.

DirtRider
03-08-2011, 05:49 AM
I cannot seem to get this working. I have a number of custom themes so I started off using the VB default theme for this one. However I get the following error

Parse error: syntax error, unexpected '=' in /home/vbulletin/public_html/includes/block/html.php(95) : eval()'d code on line 1

Parse error: syntax error, unexpected '=' in /home/vbulletin/public_html/includes/block/html.php(95) : eval()'d code on line 1

Lynne
03-08-2011, 04:04 PM
Go through the instructions a second time very, very carefully and make sure you followed them exactly.

DirtRider
03-09-2011, 07:38 AM
Go through the instructions a second time very, very carefully and make sure you followed them exactly.

Ok I have no idea where I have gone wrong with your instructions and have gone over it a few times so I suppose it is just better that I just drop this mod then :( I have only been using VB for around two weeks now and am not familiar with how every thing comes together and how you guys phrase stuff

OldSchoolDSL
03-21-2011, 11:53 PM
un-installed

Optimizing my community and removing things which show users online

Krusty1231
05-01-2011, 07:11 AM
Most Awesome. Works Great for me in 4.1.3

Thanks, installed!

Hummie
05-06-2011, 04:29 PM
I've followed the instructions in detail and reviewed them all several times, but nothing at all shows up in my Everywhere Sidebar. I did note the extra code for the Everywhere Sidebar and included it.

All this does absolutely nothing to my forum. I was so hopeful too!

The only thing I can see is that the template was put under the "block templates" category -- not sure how to move that.

I'm in 4.1.3 version.

Any ideas what I did wrong?

****
Edit -- been reading every detail and trying for hours! Still no success and I'm going to pull my hair out!

Lynne
05-07-2011, 03:56 AM
I've followed the instructions in detail and reviewed them all several times, but nothing at all shows up in my Everywhere Sidebar. I did note the extra code for the Everywhere Sidebar and included it.

All this does absolutely nothing to my forum. I was so hopeful too!

The only thing I can see is that the template was put under the "block templates" category -- not sure how to move that.

I'm in 4.1.3 version.

Any ideas what I did wrong?

****
Edit -- been reading every detail and trying for hours! Still no success and I'm going to pull my hair out!
The issue with that mod is covering in the first post and also several other places in this thread.

MarsNIIT
06-12-2011, 03:11 AM
waiting for solution for 4.1.3

Lynne
06-12-2011, 03:16 AM
waiting for solution for 4.1.3
And you will wait a long time since it works just fine on a default 4.1.3 test site. I will not troubleshoot your modifications for you.

Jeff Ledger
06-23-2011, 07:47 AM
For anyone who's asking about a solution for this mod to work with everywhere sidebar, upload a older version of ES4 like 1.3.4 (You can download it from the coder's site). It should works well.

I have tested with the latest version of ES4, it doesnt work with any of my block using custom block template.

~Jeff

Keysailor
06-27-2011, 09:19 PM
Thanks! it works fine in my sidebar, your directions worked great, thanks!

EDIT: But just added Everywhere Sidebar, and now it doesn't show, even with your extra step done. So I'm just going to not use Everywhere Sidebar till I find an easy answer, I'd rather show your block.

grey_goose
07-08-2011, 01:57 PM
Yeah, ditto. The older ESB 'fix' doesn't work.

Seems like a cool mod, and it's surprising this isn't a default block (or that ESB isn't default), and it's a real shame it's become an either-or situation.

Easy5s.net
07-26-2011, 02:41 PM
you can write Block Forum Statistics ? thank

Lynne
07-26-2011, 03:54 PM
you can write Block Forum Statistics ? thank
I have no shared my Block Forum Stats block because I believe someone else posted one up.

apn3a
08-22-2011, 07:24 PM
I have no shared my Block Forum Stats block because I believe someone else posted one up.
I think is time to share with us :p


I have a question.... That crap named IE8 messed up the block. The IE9 not. Is there a quick fix for this?

Thank you sir

Lynne
08-23-2011, 12:53 AM
I have a question.... That crap named IE8 messed up the block. The IE9 not. Is there a quick fix for this?

Thank you sir
I don't have IE or have access to it, so I really can't answer the question.

demonfatal
10-24-2011, 12:46 PM
Not working with vb4.1.7, please Lynne we need an update...

Lynne
10-24-2011, 03:13 PM
Not working with vb4.1.7, please Lynne we need an update...
This is working just fine on my default 4.1.7 site.

Zweeper
11-17-2011, 06:22 PM
not working on my 4.1.8 anymore neither

Lynne
11-17-2011, 08:33 PM
I just updated the mod with new install instructions for 4.1.8.

Zweeper
11-18-2011, 03:10 PM
uphraded, but now i receive the following message on the top of my board:


Parse error: syntax error, unexpected $end in /var/www/XXX/html/james.de/forum/includes/block/html.php(95) : eval()'d code on line 147

Parse error: syntax error, unexpected $end in /var/www/XXX/html/james.de/forum/includes/block/html.php(95) : eval()'d code on line 147

Lynne
11-18-2011, 05:03 PM
Try reinstalling. I just looked and the {}'s all add up correctly, so you shouldn't get that error.

Zweeper
11-18-2011, 09:26 PM
cheers, works fine... my mistake!

uninvited13th
11-25-2011, 08:35 AM
total online count fix..

{vb:rawphrase there_are_x_y_online_link, {vb:raw content.totalonline}}

haincha
11-25-2011, 11:10 AM
total online count fix..

{vb:rawphrase there_are_x_y_online_link, {vb:raw content.totalonline}}

Thanks! This fixed the issue I was having.

Lynne, is there any chance you could throw something together for the Statistics block right under where the Online was. I really want to move that over and then use the side bar. I think that looks a lot nicer.

Lynne
11-25-2011, 04:52 PM
What is a statistics block?

haincha
11-25-2011, 08:37 PM
A block below the Users Online that would have Threads, Posts, Users, Newest Member, etc. What is originally right under Users Online under the forums.

Lynne
11-25-2011, 09:29 PM
Isn't there already a block to do that? Just combine the two into one. I wouldn't want to change this one anyway since not everyone would want all that additional stuff.

haincha
11-26-2011, 12:14 AM
Fair enough. I will look for another solution. Well, thank you greatly for this tutorial!

uninvited13th
11-27-2011, 07:44 AM
Isn't there already a block to do that? Just combine the two into one. I wouldn't want to change this one anyway since not everyone would want all that additional stuff.

but what's the script for the block?? I want new block of forum statistics like what haincha said.. thanks.. :D

Lynne
11-27-2011, 04:12 PM
I don't know the link to the block. The code, however, is just in the forum.php page. I don't think it would be too hard to throw the block together.

uninvited13th
11-28-2011, 12:37 AM
I don't know the link to the block. The code, however, is just in the forum.php page. I don't think it would be too hard to throw the block together.

thanks.. I'll just look at it.. :D

Malcolm-X
12-04-2011, 12:06 AM
Hi Lynne;
I followed all the instruction mentioned here and in your documents several times... But nothing is shown in my sidebar... I have ESB 1.4.4.4 and VB 4.1.7... if i can sent you my site admin login info can you look it... Please help... isn't ther anyone to help me?

Thanks...

JMEWLS`
12-06-2011, 03:09 AM
Hello, updated the with the new instructions. Any reason why there's double commas next to everyones name?

http://nbadimensions.net/forums/

JMEWLS`
12-06-2011, 03:25 AM
EDIT: Just noticed CSS has upgraded.

JMEWLS`
12-07-2011, 06:30 AM
Any idea as to why the online users block is outside the div....

This only occurs in Internet Explorer.

JMEWLS`
12-07-2011, 06:30 AM
My website is http://www.nbadimensions.net/forums

Lynne
12-07-2011, 06:08 PM
I do not know. I don't have IE and you have modified the block code there, so I really can't tell why that would happen.

JMEWLS`
12-07-2011, 11:30 PM
This also happens with the code that you supplied, only happened since the update. Weird.

Marv
12-29-2011, 07:20 AM
Edit: problem solved. I don?t really dare to tell you what went wrong... (edited the wrong style ^^ ...). Embarrassing..:o

Mark.B
12-29-2011, 09:14 PM
Thanks for this Lynne;

With a few tweaks I have made it do this... :)

phpdesk
01-01-2012, 04:28 PM
Not working for me.
Getting following error.

Fatal error: Class 'vB' not found in /home/peugeot405/domains/fsrclan.com/public_html/fsr-test/includes/block/html.php(95) : eval()'d code on line 9

i have vb 4.0.8.

anyone know how to fix this

Setting the block cache time to 0 causes an error message similar to this one, so you (or anyone else facing the same issue) may wish to play with that setting and see if that works.

Happy New Year!

Winter Sonata
01-13-2012, 12:44 AM
Thanks for this Lynne;

With a few tweaks I have made it do this... :)


Can you please let me know how did you do that , I would be very gratefull If you answer my question!

hotrod122
04-03-2012, 12:41 AM
not working after upgrade to 4.1.11....

please advise?

Thanks

nevermind..im an idiot and cant read :)

haincha
04-07-2012, 11:30 PM
Any help with 4.1.11? I have gotten this far.

http://img1.UploadScreenshot.com/images/main/4/9711224944.png (http://www.UploadScreenshot.com/image/890404/5101578)

Fixed it. Had to splice code from a few different places. I know how to debug code, I am not the greatest at writing it. If you replace the contents of block_users_online Template with

<vb:if condition="$show['loggedinusers']">
<li>
<div class="block smaller">
<div class="blocksubhead">
<a class="collapse" id="collapse_block_html" href="{vb:raw relpath}#top"><img alt="" src="{vb:stylevar imgdir_button}/collapse_40b.png" id="collapseimg_html"/></a>
<span class="blocktitle"><img src="{vb:stylevar imgdir_misc}/users_online.png" alt="{vb:rawphrase currently_active_users}" />{vb:rawphrase currently_active_users}</span>
</div>
<div id="block_html" class="blockbody floatcontainer">
<div class="blockrow">
<p>{vb:rawphrase there_are_x_y_online_link, {vb:raw content.totalonline}, {vb:raw session.sessionurl_q}}
<br /><span class="shade">{vb:rawphrase x_members_and_y_guests, {vb:raw content.numberregistered}, {vb:raw content.numberguest}}</span></p>
<p>{vb:rawphrase most_users_ever_online_was_x_y_at_z, {vb:raw content.recordusers}, {vb:raw content.recorddate}, {vb:raw content.recordtime}}</p>
<ol class="commalist" id="wgo_onlineusers_list">
<vb:each from="content['activeusers']" value="loggedin">
<li>{vb:stylevar dirmark}<a class="username" href="{vb:link member, {vb:raw loggedin}}">{vb:raw loggedin.musername}</a>{vb:raw loggedin.invisiblemark}{vb:raw loggedin.buddymark}{vb:raw loggedin.comma}</li>
</vb:each>
</ol>
</div>
</div>
</div>
<div class="underblock"></div>
</li>
</vb:if>

Everything should work.

farazfaraz
04-09-2012, 05:41 PM
how install this mod?!

Patriots1049
04-22-2012, 08:15 PM
Is there any way to just display specific usergroups?

Lynne
04-23-2012, 01:50 AM
Is there any way to just display specific usergroups?
You would need to modify the query to do this.

Patriots1049
04-23-2012, 02:14 AM
I'm trying to find a staff online (ie admins / moderator) sideblock. I am not 100% familiar with modifying the query. Is it difficult?

Lynne
04-23-2012, 02:25 AM
It's not that difficult to modify the query, iirc. However, I could have sworn I've seen a Staff Online widget (or was it a forum block?), so you may want to try a search.

DM BoNeZ
04-23-2012, 03:50 AM
i would like the staff only online block...

and i just searched for it no results

Patriots1049
04-23-2012, 10:30 AM
I have searched and have came up with no results. I used to run IPB and know they have one, but vBulletin does not.

I would like the forum block, not the widget. Since this is your mod a) would you mind if I modified query and b) could you give any insight or a starting point as I am not an expert.

Thanks

Lynne
04-23-2012, 05:21 PM
I don't care if you modify the query - do whatever you want with this mod. You'll probably want to change the template. And then in the query, you'll want to add to the WHERE part something like:
AND user.usergroupid IN ('5', '6')

(NOT TESTED!!!!)

DM BoNeZ
04-23-2012, 07:27 PM
Lynne toy should code your own on your own time. Ill be the first to install .but im going to try what you said

Patriots1049
04-24-2012, 04:47 PM
I tried to add that code and had no success. I hope someone makes this mod one day!

Lynne
04-24-2012, 05:14 PM
I tried to add that code and had no success. I hope someone makes this mod one day!
When something doesn't work, it helps if you post *exactly* what you tried so we can see where you went wrong.

Patriots1049
04-25-2012, 05:46 PM
I actually got it to work by putting WHERE... your code then AND the rest. The template is a bit messy but it will do. I might look into doing

Username (Admin 1)
Usertitle (Admin 1)

Username (Admin 2)
Usertitle (Admin 2)

.......

But right now the code is vb: raw activeusers in a comma list. So a) I'm not sure how to add usertitle b/c it is displaying ALL active users and b) change from comma list to display like I showed up there ^^

For

qpurser
04-28-2012, 11:02 AM
Works also in 4.1.12

I followed Lynne's instructions but used the code from post #181 for the template.

AshenTemper
06-16-2012, 02:33 AM
For the life of me, I cannot figure out why I cannot get this to work.

I am using vB 4.1.12 and you can view it here: http://stoicstudio.com/forum/forum.php

I created a new Template (under Blocks) labeled "block_users_online" that uses the code from above:
<vb:if condition="$show['loggedinusers']">
<li>
<div class="block smaller">
<div class="blocksubhead">
<a class="collapse" id="collapse_block_html" href="{vb:raw relpath}#top"><img alt="" src="{vb:stylevar imgdir_button}/collapse_40b.png" id="collapseimg_html"/></a>
<span class="blocktitle"><img src="{vb:stylevar imgdir_misc}/users_online.png" alt="{vb:rawphrase currently_active_users}" />{vb:rawphrase currently_active_users}</span>
</div>
<div id="block_html" class="blockbody floatcontainer">
<div class="blockrow">
<p>{vb:rawphrase there_are_x_y_online_link, {vb:raw content.totalonline}, {vb:raw session.sessionurl_q}}
<br /><span class="shade">{vb:rawphrase x_members_and_y_guests, {vb:raw content.numberregistered}, {vb:raw content.numberguest}}</span></p>
<p>{vb:rawphrase most_users_ever_online_was_x_y_at_z, {vb:raw content.recordusers}, {vb:raw content.recorddate}, {vb:raw content.recordtime}}</p>
<ol class="commalist" id="wgo_onlineusers_list">
<vb:each from="content['activeusers']" value="loggedin">
<li>{vb:stylevar dirmark}<a class="username" href="{vb:link member, {vb:raw loggedin}}">{vb:raw loggedin.musername}</a>{vb:raw loggedin.invisiblemark}{vb:raw loggedin.buddymark}{vb:raw loggedin.comma}</li>
</vb:each>
</ol>
</div>
</div>
</div>
<div class="underblock"></div>
</li>
</vb:if>

I created a new Plugin and it is active called "Cache template for Users Online Block" that used cache_templates with an execution order of 5:

if (THIS_SCRIPT == 'forum')
{
$cache[] = 'block_users_online';
}

And I created a Forum Block called "Users Online" with Cache=1, Display Order 5, set to active, using PHP, and with the following code that uses template "block_users_online":

if (THIS_SCRIPT != 'forum') {
require_once(DIR . '/includes/functions_bigthree.php');
}
$activeusers = '';
if ((vB::$vbulletin->options['displayloggedin'] == 1 OR vB::$vbulletin->options['displayloggedin'] == 2 OR (vB::$vbulletin->options['displayloggedin'] > 2 AND vB::$vbulletin->userinfo['userid'])) AND !$show['search_engine'])
{
$datecut = TIMENOW - vB::$vbulletin->options['cookietimeout'];
$numbervisible = 0;
$numberregistered = 0;
$numberguest = 0;

$hook_query_fields = $hook_query_joins = $hook_query_where = '';
($hook = vBulletinHook::fetch_hook('forumhome_loggedinuser_ query')) ? eval($hook) : false;

$forumusers = vB::$db->query_read_slave("
SELECT
user.username, (user.options & " . vB::$vbulletin->bf_misc_useroptions['invisible'] . ") AS invisible, user.usergroupid, user.lastvisit,
session.userid, session.inforum, session.lastactivity, session.badlocation,
IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid, infractiongroupid
$hook_query_fields
FROM " . TABLE_PREFIX . "session AS session
LEFT JOIN " . TABLE_PREFIX . "user AS user ON(user.userid = session.userid)
$hook_query_joins
WHERE session.lastactivity > $datecut
$hook_query_where
" . iif(vB::$vbulletin->options['displayloggedin'] == 1 OR vB::$vbulletin->options['displayloggedin'] == 3, "ORDER BY username ASC") . "
");

if (vB::$vbulletin->userinfo['userid'])
{
// fakes the user being online for an initial page view of index.php
vB::$vbulletin->userinfo['joingroupid'] = iif(vB::$vbulletin->userinfo['displaygroupid'], vB::$vbulletin->userinfo['displaygroupid'], vB::$vbulletin->userinfo['usergroupid']);
$userinfos = array
(
vB::$vbulletin->userinfo['userid'] => array
(
'userid' =>& vB::$vbulletin->userinfo['userid'],
'username' =>& vB::$vbulletin->userinfo['username'],
'invisible' =>& vB::$vbulletin->userinfo['invisible'],
'inforum' => 0,
'lastactivity' => TIMENOW,
'lastvisit' =>& vB::$vbulletin->userinfo['lastvisit'],
'usergroupid' =>& vB::$vbulletin->userinfo['usergroupid'],
'displaygroupid' =>& vB::$vbulletin->userinfo['displaygroupid'],
'infractiongroupid' =>& vB::$vbulletin->userinfo['infractiongroupid'],
)
);
}
else
{
$userinfos = array();
}
$inforum = array();

while ($loggedin = vB::$db->fetch_array($forumusers))
{
$userid = $loggedin['userid'];
if (!$userid)
{ // Guest
$numberguest++;
if (!isset($inforum["$loggedin[inforum]"]))
{
$inforum["$loggedin[inforum]"] = 0;
}
if (!$loggedin['badlocation'])
{
$inforum["$loggedin[inforum]"]++;
}
}
else if (empty($userinfos["$userid"]) OR ($userinfos["$userid"]['lastactivity'] < $loggedin['lastactivity']))
{
$userinfos["$userid"] = $loggedin;
}
}

if (!vB::$vbulletin->userinfo['userid'] AND $numberguest == 0)
{
$numberguest++;
}

$activeusers = array();
foreach ($userinfos AS $userid => $loggedin)
{
$numberregistered++;
if ($userid != vB::$vbulletin->userinfo['userid'] AND !$loggedin['badlocation'])
{
if (!isset($inforum["$loggedin[inforum]"]))
{
$inforum["$loggedin[inforum]"] = 0;
}
$inforum["$loggedin[inforum]"]++;
}

fetch_musername($loggedin);
$loggedin['comma'] = ',';

if (fetch_online_status($loggedin))
{
$numbervisible++;
$activeusers[$numbervisible] = $loggedin;
}
}

// Last element
if ($numbervisible)
{
$activeusers[$numbervisible]['comma'] = '';
}

// memory saving
unset($userinfos, $loggedin);

vB::$db->free_result($forumusers);

$totalonline = $numberregistered + $numberguest;
$numberinvisible = $numberregistered - $numbervisible;

vB::$vbulletin->datastore->fetch(array('maxloggedin'));
if (vB::$vbulletin->maxloggedin === NULL)
{
vB::$vbulletin->maxloggedin = array();
}
if (intval(vB::$vbulletin->maxloggedin['maxonline']) <= $totalonline)
{
vB::$vbulletin->maxloggedin['maxonline'] = $totalonline;
vB::$vbulletin->maxloggedin['maxonlinedate'] = TIMENOW;
build_datastore('maxloggedin', serialize(vB::$vbulletin->maxloggedin), 1);
}

$recordusers = vb_number_format(vB::$vbulletin->maxloggedin['maxonline']);
$recorddate = vbdate(vB::$vbulletin->options['dateformat'], vB::$vbulletin->maxloggedin['maxonlinedate'], true);
$recordtime = vbdate(vB::$vbulletin->options['timeformat'], vB::$vbulletin->maxloggedin['maxonlinedate']);

$show['loggedinusers'] = true;

$statsarray = array('onlinestats' => $onlinestats,
'totalonline' => $totalonline,
'numberregistered' => $numberregistered,
'numberguest' => $numberguest,
'show' => $show,
'recordusers' => $recordusers,
'recorddate' => $recorddate,
'recordtime' => $recordtime,
'activeusers' => $activeusers,
);

return $statsarray;
}

Any idea where I'm screwing this up?

alhidaya
06-21-2012, 06:02 PM
Hello,

Could you do me a small patch to have it in cms widget instead of a block forum? Thank you for your help

cuco88
06-22-2012, 01:45 AM
Use Google or the board-search or see other things this author did an you would find this:
https://vborg.vbsupport.ru/showthread.php?t=230428

Pure Dope
08-01-2012, 06:45 PM
i would use this if there was a better way.

why cant this just be a sql script?

Lynne
08-01-2012, 11:16 PM
why cant this just be a sql script?
When you code your forum blocks to offer to the masses, you are welcome to write them as products, but I just wrote this because of someone's request and I didn't feel like putting a bunch of effort into it. (I don't know how much coding you have done, but it's not as simple to make it into a product as you are making it sound.)

oldz442
09-06-2012, 07:50 AM
Can I add a fetch_avatar_url($userid) to the block code somewhere? I want to display a clickable mini avatar, 4 per row similar to below. I am using file based avatars. thx

BUDIMAN
09-30-2012, 07:37 AM
did not work with 4.1.12 Patch Level 2..nothing appear at sidebar..

Big-K
10-19-2012, 11:37 AM
Lynne,

I'm on 4.2.0, I've followed every instruction twice, disabled all hooks and still can't get this to show. All I see is "Array". Any more ideas? Can I PM you my site details?

Lynne
10-19-2012, 04:18 PM
Lynne,

I'm on 4.2.0, I've followed every instruction twice, disabled all hooks and still can't get this to show. All I see is "Array". Any more ideas? Can I PM you my site details?
Did you follow the instructions for 4.2.0? I just reinstalled it on my 4.2.0 install using the instructions in the text file and it shows up just fine.

Big-K
10-20-2012, 07:12 AM
Did you follow the instructions for 4.2.0? I just reinstalled it on my 4.2.0 install using the instructions in the text file and it shows up just fine.I just took all the steps again, no progress. I'll PM you my details please

Big-K
10-20-2012, 03:34 PM
Update:

Thank you, Lynne The Great

In case anyone has issues, make sure to put in the name of the custom template in the block configuration page (Template To Use). That's the part I missed - Think that should be added to the instructions.

Does anyone know how to make this into Avatars?

Lynne
10-20-2012, 04:32 PM
Update:

Thank you, Lynne The Great

In case anyone has issues, make sure to put in the name of the custom template in the block configuration page (Template To Use). That's the part I missed - Think that should be added to the instructions.
It is in the instructions:

3) Configure the Block
Now go to forums & Moderators > Forum Block Manager > Add Block
Select Block Type - Custom HTML/PHP
CONTINUE
Title - Users Online
Cache Time (in minutes) - 1 (default is 60 minutes)
Active - Yes
Content Type - PHP
Template to Use - block_users_online
Content -

if (THIS_SCRIPT != 'index') {
require_once(DIR . '/includes/functions_bigthree.php');
rest of code removed....

oldz442
10-20-2012, 07:57 PM
Can I add a fetch_avatar_url($userid) to the block code somewhere? I want to display a clickable mini avatar, 4 per row similar to below. I am using file based avatars. thx

bump

Mark.B
10-20-2012, 08:06 PM
Can I add a fetch_avatar_url($userid) to the block code somewhere? I want to display a clickable mini avatar, 4 per row similar to below. I am using file based avatars. thx

In the block code you would add this:

// AVATAR

require_once(DIR . '/includes/functions_user.php');
$loggedin['avatarurl'] = fetch_avatar_url($loggedin['userid']);
if (!$loggedin['avatarurl']) {
$loggedin['avatarurl'] = 'images/misc/unknown.png';
} else {
$loggedin['avatarurl'] = $loggedin['avatarurl'][0];
}


// AVATAR

Then you can call it with {vb:raw loggedin.avatarurl}.

However you'll need to account for the fact as it stands you'll just get a long line of avatars; you need something in the template code to make them wrap after 4 avatars.

Also bear in mind this adds 1 query per avatar.

Big-K
10-20-2012, 09:42 PM
In the block code you would add this:

// AVATAR

require_once(DIR . '/includes/functions_user.php');
$loggedin['avatarurl'] = fetch_avatar_url($loggedin['userid']);
if (!$loggedin['avatarurl']) {
$loggedin['avatarurl'] = 'images/misc/unknown.png';
} else {
$loggedin['avatarurl'] = $loggedin['avatarurl'][0];
}


// AVATAR

Then you can call it with {vb:raw loggedin.avatarurl}.



Mark, Where exactly do you add this in the block code and how do you call it?

Lynne
10-20-2012, 11:38 PM
You could rewrite the query that gets the users online and JOIN with the avatar table and get the avatar that way and then you don't get an extra query per user for the avatar. (Check the query for the post user since that query grabs and avatar for the user.)

Big-K
10-23-2012, 11:31 AM
Lynne - Is it possible for you to help create a code for those who want Avatars like Mark.B's?

Lynne
10-23-2012, 04:02 PM
I don't have time to look into do a rewrite here.

Big-K
10-24-2012, 03:57 PM
Thanks. Here's What I did to show Avatars. The only snag is that nothing is shown for users with no avatars. Hope someone can clean it up.

I changed<a class="username" href="{vb:link member, {vb:raw loggedin}}">{vb:raw loggedin.musername}</a>

to <a class="username" href="{vb:link member, {vb:raw loggedin}}">
<vb:if condition=$loggedin['avatarurl']>
<img src="image.php?u={vb:raw loggedin.userid}" alt="{vb:raw loggedin.musername}" />
<vb:else />
<img class="avback" src="{vb:stylevar imgdir_misc}/unknown.gif" alt="{vb:raw loggedin.musername}" />
</vb:if></a>

Mark.B
10-24-2012, 05:13 PM
Your second <img> tag (after the <else> tag) needs to point to wherever your "unknown.png" or "unknown.gif" avatar is - whatever image you want showing up for people with no avatars basically.

Big-K
10-25-2012, 08:11 AM
Your second <img> tag (after the <else> tag) needs to point to wherever your "unknown.png" or "unknown.gif" avatar is - whatever image you want showing up for people with no avatars basically.You're right and I've edited accordingly. The issue though is that the "<vb:if condition=$loggedin['avatarurl']>" syntax doesn't work due to incorrect placement of the block code. Could you please respond to my post #209?

patracy
12-15-2012, 05:33 PM
Can't seem to get this to display on my forum at all. I'm using 4.2.0 and used the instructions in the files step by step. Simply nothing displayed at all in my sidebar.

Lynne
12-15-2012, 05:50 PM
Did you make sure to change the template name and also create the custom template? And did you add the widget to the layout?

Amaury
02-05-2013, 06:14 AM
How I can get "X members and Y guests" on the same line as "There are currently X members online"? I was increasing forum_sidebar_width for something else and noticed nothing changed in that.

I'm assuming you have line breaks somewhere by default?

Lynne
02-05-2013, 03:58 PM
How I can get "X members and Y guests" on the same line as "There are currently X members online"? I was increasing forum_sidebar_width for something else and noticed nothing changed in that.

I'm assuming you have line breaks somewhere by default?
Remove the <br /> in here:
<p>{vb:rawphrase there_are_x_online, {vb:raw content.totalonline}}
<br /><span class="shade">{vb:rawphrase x_members_and_y_guests, {vb:raw content.numberregistered}, {vb:raw content.numberguest}}</span></p>

Amaury
02-05-2013, 04:15 PM
Remove the <br /> in here:
<p>{vb:rawphrase there_are_x_online, {vb:raw content.totalonline}}
<br /><span class="shade">{vb:rawphrase x_members_and_y_guests, {vb:raw content.numberregistered}, {vb:raw content.numberguest}}</span></p>

Thanks, Lynne. Removed it. :)

By the way, you made a slight mistake in that code above at the beginning.

Should be: {vb:rawphrase there_are_x_online_link,

Amaury
02-13-2013, 05:18 PM
I actually reverted that change because it was causing problems with our thread titles not staying on one line, and I didn't want to trim titles lower than 20 (default is 30).

However, now I also want to line break the most visitors to reduce the sidebar width even more to hopefully restore the title trimming to the default 30.

I tried adding a <br />, but it made this:
Most users ever online was 118, 9/11/2012 at 4:16 AM.

...look like this:

Most users ever online was 118,
at 9/11/2012.

I also want to add spacing in-between.

Instead of this:

There are currently X users online.
X members and X guests
Most users ever online was 118
9/11/2012 at 4:16 AM.
User 1, User 2, User 3

...it would look like this:

There are currently X users online.
X members and X guests

Most users ever online was 118
9/11/2012 at 4:16 AM.

User 1, User 2, User 3

Thanks in advance.

Lynne
02-13-2013, 05:27 PM
You would just add an extra <br /> where you want an extra line.
<br /><span class="shade">{vb:rawphrase x_members_and_y_guests, {vb:raw content.numberregistered}, {vb:raw content.numberguest}}</span><br /></p>
<p>{vb:rawphrase most_users_ever_online_was_x_y_at_z, {vb:raw content.recordusers}, {vb:raw content.recorddate}, {vb:raw content.recordtime}}<br /></p>

Amaury
02-13-2013, 09:55 PM
You would just add an extra <br /> where you want an extra line.
<br /><span class="shade">{vb:rawphrase x_members_and_y_guests, {vb:raw content.numberregistered}, {vb:raw content.numberguest}}</span><br /></p>
<p>{vb:rawphrase most_users_ever_online_was_x_y_at_z, {vb:raw content.recordusers}, {vb:raw content.recorddate}, {vb:raw content.recordtime}}<br /></p>


Hm. I tried that, and it didn't work.

Lynne
02-14-2013, 12:30 AM
Then add two of them instead of one.

Amaury
02-14-2013, 02:13 AM
Then add two of them instead of one.

Like so? :)

<br /><span class="shade">{vb:rawphrase x_members_and_y_guests, {vb:raw content.numberregistered}, {vb:raw content.numberguest}}</span><br /></p>
<br /><p>{vb:rawphrase most_users_ever_online_was_x_y_at_z, {vb:raw content.recordusers}, {vb:raw content.recorddate}, {vb:raw content.recordtime}}<br /></p>

Lynne
02-14-2013, 04:45 PM
I would put it with the others I had added:
<br /><span class="shade">{vb:rawphrase x_members_and_y_guests, {vb:raw content.numberregistered}, {vb:raw content.numberguest}}</span><br /><br /></p>
<p>{vb:rawphrase most_users_ever_online_was_x_y_at_z, {vb:raw content.recordusers}, {vb:raw content.recorddate}, {vb:raw content.recordtime}}<br /><br /></p>

Amaury
02-14-2013, 05:25 PM
I would put it with the others I had added:
<br /><span class="shade">{vb:rawphrase x_members_and_y_guests, {vb:raw content.numberregistered}, {vb:raw content.numberguest}}</span><br /><br /></p>
<p>{vb:rawphrase most_users_ever_online_was_x_y_at_z, {vb:raw content.recordusers}, {vb:raw content.recorddate}, {vb:raw content.recordtime}}<br /><br /></p>

Not sure if I did exactly that, but I ended up doing this:
<br /><span class="shade">{vb:rawphrase x_members_and_y_guests, {vb:raw content.numberregistered}, {vb:raw content.numberguest}}</span></p>
<p><br />{vb:rawphrase most_users_ever_online_was_x_y_at_z, {vb:raw content.recordusers}, {vb:raw content.recorddate}, {vb:raw content.recordtime}}</p>
<br /><ol class="commalist">
<vb:each from="content.activeusers" value="loggedin">

As for the most users, I just edited the phrase most_users_ever_online_was_x_y_at_z and made it this:Most users ever online was {1}. <br />{2} at <span class="time">{3}</span>.

Lee Roberts
03-10-2013, 12:20 PM
Thanks for this Lynne!

Anyone using the Sidebar Anywhere by BOP5 (https://vborg.vbsupport.ru/showthread.php?t=283307) if you want this block to work on other pages follow the steps below:

REPLACE TEMPLATE CODE:

<vb:if condition="$show['loggedinusers']">
<li>
<div class="block smaller">
<div class="blocksubhead">
<a class="collapse" id="collapse_block_html" href="{vb:raw relpath}#top"><img alt="" src="{vb:stylevar imgdir_button}/collapse_40b.png" id="collapseimg_html"/></a>
<span class="blocktitle"><img src="{vb:stylevar imgdir_misc}/users_online.png" alt="{vb:rawphrase currently_active_users}" />{vb:rawphrase currently_active_users}</span>
</div>
<div id="block_html" class="blockbody floatcontainer">
<div class="blockrow">
<p>{vb:rawphrase there_are_x_y_online_link, {vb:raw content.totalonline}, {vb:raw session.sessionurl_q}}
<br /><span class="shade">{vb:rawphrase x_members_and_y_guests, {vb:raw content.numberregistered}, {vb:raw content.numberguest}}</span></p>
<p>{vb:rawphrase most_users_ever_online_was_x_y_at_z, {vb:raw content.recordusers}, {vb:raw content.recorddate}, {vb:raw content.recordtime}}</p>
<ol class="commalist">
<vb:each from="content.activeusers" value="loggedin">
<li>{vb:stylevar dirmark}<a class="username" href="{vb:link member, {vb:raw loggedin}}">{vb:raw loggedin.musername}</a>{vb:raw loggedin.invisiblemark}{vb:raw loggedin.buddymark}{vb:raw loggedin.comma}</li>
</vb:each>
</ol>
</div>
</div>
</div>
<div class="underblock"></div>
</li>
</vb:if>

WITH:


<li>
<div class="block smaller">
<div class="blocksubhead">
<a class="collapse" id="collapse_block_html" href="{vb:raw relpath}#top"><img alt="" src="{vb:stylevar imgdir_button}/collapse_40b.png" id="collapseimg_html"/></a>
<span class="blocktitle"><img src="{vb:stylevar imgdir_misc}/users_online.png" alt="{vb:rawphrase currently_active_users}" />{vb:rawphrase currently_active_users}</span>
</div>
<div id="block_html" class="blockbody floatcontainer">
<div class="blockrow">
<p>{vb:rawphrase there_are_x_y_online_link, {vb:raw content.totalonline}, {vb:raw session.sessionurl_q}}
<br /><span class="shade">{vb:rawphrase x_members_and_y_guests, {vb:raw content.numberregistered}, {vb:raw content.numberguest}}</span></p>
<p>{vb:rawphrase most_users_ever_online_was_x_y_at_z, {vb:raw content.recordusers}, {vb:raw content.recorddate}, {vb:raw content.recordtime}}</p>
<ol class="commalist">
<vb:each from="content.activeusers" value="loggedin">
<li>{vb:stylevar dirmark}<a class="username" href="{vb:link member, {vb:raw loggedin}}">{vb:raw loggedin.musername}</a>{vb:raw loggedin.invisiblemark}{vb:raw loggedin.buddymark}{vb:raw loggedin.comma}</li>
</vb:each>
</ol>
</div>
</div>
</div>
<div class="underblock"></div>
</li>
.Me

Lynne
03-10-2013, 05:14 PM
Thanks for posting that Lee Roberts.

justicechick
11-26-2013, 03:11 AM
Hi Lynn, I have attempted this twice. I correctly followed all the steps to the best of my knowledge and the block shows up on my page. It was minus the actual numbers of online users ect. However my bigger issue is that as soon as I enable the plugin I get this errror code at the top of my header. BTW I am running 4.2.2

Parse error: syntax error, unexpected 'is' (T_STRING) in /home/cafeflir/public_html/includes/class_bootstrap.php(1419) : eval()'d code on line 145

Warning: Cannot modify header information - headers already sent by (output started at ..../includes/class_bootstrap.php(1419) : eval()'d code:145) in ..../includes

Lynne
11-26-2013, 05:32 PM
Parse error: syntax error, unexpected 'is' (T_STRING) in /home/cafeflir/public_html/includes/class_bootstrap.php(1419) : eval()'d code on line 145

That is an error with the caching of the template. But, there is no "is" in the block_users_online template. Could you have accidentally added a line break in the middle of a word? Did you remember to enter that template under "Template to Use" in the Block configuration page?

justicechick
11-27-2013, 04:52 AM
That is an error with the caching of the template. But, there is no "is" in the block_users_online template. Could you have accidentally added a line break in the middle of a word? Did you remember to enter that template under "Template to Use" in the Block configuration page?

Thanks Lynn, I tried it again but unfortunately its still a no go. My blocks have started appearing under my forumhome for some reason so Im checking on that and wondering if it might be the course of the problem. I will post back here once I get that figured out and have tried creating the block again .

https://vborg.vbsupport.ru/external/2013/11/1.png?1

justicechick
12-07-2013, 04:17 PM
I finally got this to appear but purely accidental. I tried reinstalling it again and still got the prior error so I was gonna uninstall it. I removed the plugin I had created and got side tracked removing the rest . When I looked at my forum home page I saw it there. So it ended up working without that plugin mentioned in the install. Could it be using another plugin that was already installed?

Lynne
12-07-2013, 07:16 PM
The plugin for this is only to cache the template. You really don't need the plugin in order for this to work at all, it is just good to cache your templates.

Frosti
01-31-2015, 10:28 PM
Lynne, Wouldn't it just be a simple code change if you wanted this to show only certain usergroups... thus turning it into say a STAFF ONLINE.

I know about the 'staff online' block but that doesn't work for me, I would love to give this one a try and just add a code change to show only specific usergroups 'online'

Lynne
02-01-2015, 07:12 PM
Lynne, Wouldn't it just be a simple code change if you wanted this to show only certain usergroups... thus turning it into say a STAFF ONLINE.

I know about the 'staff online' block but that doesn't work for me, I would love to give this one a try and just add a code change to show only specific usergroups 'online'

Sure. You could add a JOIN to the query to grab the users usergroup and then only output online users in a certain usergroup.