Version: 1.00, by Gary King
Developer Last Online: Jun 2020
Version: 3.0.0
Rating:
Released: 01-09-2004
Last Update: Never
Installs: 64
No support by the author.
PLEASE CLICK ON THE INSTALL BUTTON IF YOU INSTALLED THIS! THANKS!
What does this hack do?
Using this hack, you can show who is currently on your forums from anywhere else on your website! The page, though, must be a PHP page.
If you want to display this information on another webpage by integrating it (which you'll probably want to ), just put
PHP Code:
<?php require_once("online.php"); ?>
or
PHP Code:
<?php
require_once("online_external.php");
?>
depending on the location of the online.php file
THE BELOW IS ONLY IF YOU ARE USING ONLINE.PHP
If you are using online.php, then this line of code MUST be at the top of the page!
If you don't want to show the total users online at the top of the page, though, then remove
PHP Code:
print $show;
and copy that to wherever you want to show the info instead (remember to surround this with PHP tags, such as:
PHP Code:
<?php
print $show;
?>
THE ABOVE IS ONLY IF YOU ARE USING ONLINE.PHP
Features
supports phrases!
option to display either usernames or a total number of registered members instead
only administrators can see users who choose to be invisible
Instructions
Download the attached online.php if you want to show invisible users to administrators, etc., or download online_external.php if you don't want to worry as much about things , and follow these instructions:
Find
PHP Code:
$path = "./vb3/"; // path to your forums folder, normally /forum/
, change the ./vb3/ to whatever the path is to your forums directory
Find
PHP Code:
$showusernames = 0; // 1 to show usernames online, 0 to only show the number of users online
and change $showusernames to 1 if you want to display usernames, instead of the total number of registered members browsing
That's it!
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
This is exactly the kind of thing I'm looking for however, I've had a few problems:
When using "online.php" everything is fine and working (formatting of the output text isn't great but that's easy enough to change). However, that's only the case while I'm logged into the boards, if I'm not logged in I get the "Unable to add cookies, header already sent." message. online.php works fine on it's own regardless of log in status, only the including seems to screw it up.
Using "online_external.php" outputs results regardless of login status however the results displayed on my page are similar to "Members online: 00, 0, 0, 0, 0, 0, 0, 0, 0. Guests online: 26." This is the case on the standalone page too.
I'm still don't fully understand the use of the
PHP Code:
"print $show;"
instructions, I'm probably a fool but they don't seem to be explained that clearly i.e. exactly which page we're adding this code to and whereabouts on the page it should be added to.
One other small request, any chance that when usernames are displayed by choice the names are links to the corresponding users profile (new window)?