Version: , by Admin (Coder)
Developer Last Online: Nov 2024
Version: 2.2.x
Rating:
Released: 11-30-2001
Last Update: Never
Installs: 109
No support by the author.
This hack was requested on vBulletin.com.
It lets you add possible locations to Who's Online, directly from the Admin CP.
This is good if you are using external hacks, that use vBulletin's system. You probably know that users browsing these external files have Unknown Location (or Main Index for non-admin viewers) next to them.
With this hack, you can easily add a new custom location with ease!
It's also designed in a way that won't let you overwrite existing locations. ('dummy protection' as I like to call it )
The locations you add are not stored in their own table, because I really felt that would be waste of space and resource.
Instead, I store the locations in the template table, in one special template dedicated to this data.
It was a lot harder to do it this way, btw.
Please let me know if you find any bugs, or if this script doesn't work with files in child folders (this is my main concern).
This can be easily remove (just undo changes to online.php), so please don't fear to try it out!
A nice screen shot is in my next post.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
When I goto view who's online after adding about 6 locations.
I get this error
Fatal error: Call to a member function on a non-object in /home/snarfpro/public_html/forums/online.php on line 128
Any Ideas ?
Actually I have found out exactly when it does this.
If a member is viewing a profile anyone else trying to see "who's Online" gets that error any idea what could be wrong here is
lines 126-134 of online.php
case 'getinfo':
$userid = explode('userid=', $userinfo[location]);
$user = $DB_site->query_first("SELECT username FROM user WHERE userid = ".intval($userid[1]));
if ($user[username]) {
$userinfo[where] = "Viewing Profile of <a href=\"member.php?s=$session[sessionhash]&action=getinfo&userid=$user[userid]\">$user[username]</a>";
} else {
$userinfo[where] = "Viewing Profile of a Forum Member";
}
break;
Anyone who can help,
If I have a file called: index.php that is not in my forums directory, what would I use for the filename ?
the file uses global.php, but how will it work correctly with files in different folders with the same name?
Any files called index.php are given the same location on the WOL, as with all the other pages. To get around this I've created a redirect page which is index.php and the real page that is the "index" if you see what I mean.
Alternativly you could add this line into a .htaccess file:
It will only check for the file name, eg abc.php, if you have abc.php?a=bc they will count for the same, whereas if you edit online.php you can give them different locations.
Posible Limitation of vB, as it stands you can only have one file with the same name recogised, with hacking you should be able to get it to recognise paths as well.