Version: 1.4, by Lynne
Developer Last Online: Oct 2022
Category: vBulletin Forum Sideblocks -
Version: 4.2.0
Rating:
Released: 01-22-2010
Last Update: 06-04-2012
Installs: 161
Uses Plugins Template Edits
Re-useable Code
No support by the author.
This is a block for your forum sideblocks to show the Current Users Online.
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!!!
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?
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.
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
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.
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:
Quote:
3) Configure the Block
Now go to forums & Moderators > Forum Block Manager > Add Block
Select Block Type - Custom HTML/PHP
CONTINUE
Title - UsersOnline
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....
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
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
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.
You could rewrite the query that gets the usersonline 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.)