View Full Version : Show Who's Profile User is Viewing in Who's Online
apfeifer
11-04-2001, 10:00 PM
Hack: Show Who's Profile User is Viewing in Who's Online
Version of vB: 2.2.0, although may work on earlier versions but not tested
Current Version: 1.0.0
Description: This hack shows you which user's profile an online user is viewing in Who's Online.
Enjoy!
afterlab
11-05-2001, 12:08 AM
Great job on the hack, it's a nice small hack that really gives attention to detail. I like that. + it worked on my 2.0.3 :)
2 thumbs up! https://vborg.vbsupport.ru/external/2011/01/19.gif https://vborg.vbsupport.ru/external/2011/01/19.gif
hehe
|DarkManX|
11-05-2001, 12:16 AM
didn't work for me for some reason.....
just says viewing forum profile of
then nothing........
apfeifer
11-05-2001, 12:22 AM
Working on it now...
apfeifer
11-05-2001, 12:26 AM
Try replacing the $userinfo[where] = ""; line with this:
if (!$username[username]) {
$userinfo[where] = "$bbtitle <a href='index.php?s=$session[sessionhash]'>Main Index</a>";
} else {
$userinfo[where] = "Viewing Profile of <a href='member.php?s=$session[sessionhash]&action=getinfo&userid=$userid[3]'>$username[username]</a>";
}
Not sure about this seeing I have no where to test it, but give it a shot.
:cool:
|DarkManX|
11-05-2001, 12:29 AM
Originally posted by apfeifer
Try replacing the $userinfo[where] = ""; line with this:
if (!$username[username]) {
$userinfo[where] = "$bbtitle <a href='index.php?s=$session[sessionhash]'>Main Index</a>";
} else {
$userinfo[where] = "Viewing Profile of <a href='member.php?s=$session[sessionhash]&action=getinfo&userid=$userid[3]'>$username[username]</a>";
}
Not sure about this seeing I have no where to test it, but give it a shot.
:cool:
i'm a lil confused on what you mean....what text to i replace exactly??
apfeifer
11-05-2001, 12:31 AM
Replace:
$userinfo[where] = "Viewing Profile of <a href='member.php?s=$session[sessionhash]&action=getinfo&userid=$userid[3]'>$username[username]</a>";
With:
if (!$username[username]) {
$userinfo[where] = "$bbtitle <a href='index.php?s=$session[sessionhash]'>Main Index</a>";
} else {
$userinfo[where] = "Viewing Profile of <a href='member.php?s=$session[sessionhash]&action=getinfo&userid=$userid[3]'>$username[username]</a>";
}
apfeifer
11-05-2001, 12:32 AM
Updated the instructions.
:cool:
|DarkManX|
11-05-2001, 12:32 AM
giving it a go right now.....
|DarkManX|
11-05-2001, 12:35 AM
it work'd, thanks so much for the hard work and quick response, you rock apfeifer :)
apfeifer
11-05-2001, 12:37 AM
Thanks! Glad you got it working now.:)
:cool:
bokhalifa
11-05-2001, 04:22 AM
good working:D
apfeifer
11-05-2001, 11:09 AM
:)
JTMON
11-06-2001, 12:03 AM
Running 2.2.0, worked like a charm!:D Thanks!
SWFans.net
11-06-2001, 03:58 PM
It works in version 2.0.3 as well. Thanks for the hack. :)
Alien
11-06-2001, 05:17 PM
Installed and working, just a note to say thanks! :D
webhost
11-06-2001, 05:38 PM
Looked at this morning, it works if someone goes to the memberlist and selects a member profile it shows up in who's online page with that members name correctly. Something I noticed that would help is on the forum main page where it has the last poster name when u click that and look at profile who's online says main index. Any ideas how to fix this like the other?
Stasik
11-06-2001, 06:38 PM
Hi, here is it :D
open online.php
find:
case 'getinfo':
$userid = explode("=", $userinfo[location]);
$username=$DB_site->query("SELECT username FROM user WHERE userid='$userid[3]'");
$username=$DB_site->fetch_array($username);
if (!$username[username]) {
$userinfo[where] = "$bbtitle <a href='index.php?s=$session[sessionhash]'>Main Index</a>";
} else {
$userinfo[where] = "Viewing Profile of <a href='member.php?s=$session[sessionhash]&action=getinfo&userid=$userid[3]'>$username[username]</a>";
}
break;
ADD after:
case 'lastposter':
$userid = explode("=", $userinfo[location]);
$useridx=$DB_site->query("SELECT lastposter FROM forum WHERE forumid='$userid[4]'");
$useridx=$DB_site->fetch_array($useridx);
$username=$DB_site->query("SELECT userid FROM user WHERE username='$useridx[lastposter]'");
$username=$DB_site->fetch_array($username);
if (!$username[userid]) {
$userinfo[where] = "$bbtitle <a href='index.php?s=$session[sessionhash]'>Main Index</a>";
} else {
$userinfo[where] = "Viewing Profile of <a href='member.php?s=$session[sessionhash]&action=getinfo&userid=$userid[4]'>$useridx[lastposter]</a>";
}
break;
Find:
} else if ($token1 == 'action=editavatar') {
$userinfo[activity] = 'editavatar';
ADD after it:
} else if ($token1 == 'action=getinfo' && $token2 == 'find=lastposter') {
$userinfo[activity] = 'lastposter';
ENJOY!
toLTcaboLT
11-07-2001, 12:29 PM
Hmzz can we somehow see how that is showen on forum ?
I'd like to see it .. tnx
Stasik
11-07-2001, 12:32 PM
If you are looking "forums last poster". It will be shown "Watching Profile for *membername*" in online.php.
toLTcaboLT
11-07-2001, 12:46 PM
Thank you m8 !
Stasik
11-07-2001, 12:49 PM
no problem :D
DarkReaper
11-07-2001, 10:54 PM
Has the main attachment been updated to include the fixes?
apfeifer
11-07-2001, 11:12 PM
Yes, unless you are talking about the stuff Stasik posted.
Stasik
11-08-2001, 03:14 PM
Hehe :) i can move it to a new topic to :D:D:D:D
DarkReaper
11-13-2001, 02:52 AM
What do the additions of stastik do?
Stasik
11-13-2001, 06:13 AM
it shows "viewing profile of user xxx" in online.php when viewing forums last poster
Sweet Evil
11-13-2001, 07:52 AM
Thanks, Nice little hack edit.. :D
Scott MacVicar
11-13-2001, 04:34 PM
i adjusted it slightly one less line of code and shows a different message if username not found instead of viewing main index.
case 'getinfo':
$userid = explode("=", $userinfo[location]);
$username=$DB_site->query_first("SELECT username FROM user WHERE userid='$userid[3]'");
if (!$username[username]) {
$userinfo[where] = "Viewing Profile of a Forum Member";
} else {
$userinfo[where] = "Viewing Profile of <a href='member.php?s=$session[sessionhash]&action=getinfo&userid=$userid[3]'>$username[username]</a>";
}
break;
No real difference just one less line of code.
this one works like a dream on 2.2.1
thanx
Lionel
01-10-2002, 03:58 PM
is it me or what? Right after I installed this hack my pages started to slow down a lot. Is this placing strain on the server? I have not uninstalled yet. Is anyone else experiencing this?
apfeifer
01-10-2002, 05:42 PM
This should not slow your boards down at all, it only effects the Who's Online, and should not even slow that down.
I have the hack installed allowing admins and mods to view invisible members.
Would that hack affect this hack? I have installed it like you said, no avail. It's coming up with a parse error on line 387 (which is below). I also tried using PPN's coding, and it's still having a problem with the following line.
if ($bbuserinfo[usergroupid] == 6 or $bbuserinfo[usergroupid] == 5 or $bbuserinfo[usergroupid] == 7) or $bbuserinfo[usergroupid] == 13 {
$userinfo[invisible] = 0;
Any suggestions?
DelusionalMind
01-19-2002, 06:15 PM
nice :)
Is this needed for 222? I have no members so I can't check it myself.. :(
-=dm=-
02-14-2002, 06:58 PM
Im getting erorrs, if there is more then 3 users on whos online:(
have someone this problem?
Destee
03-29-2002, 04:51 PM
Thank You Apfeifer and Stasik. I'm running 2.2.4 and the Apfeifer portion of this hack works fine, but Stasik, the addition you provded only shows "Viewing Profile of a Forum Member" and not the Member's name.
Any ideas why it might be doing this?
Thanks,
Destee
KuraFire
05-06-2002, 02:27 PM
Seems to work like a charm for me. :):up:
ZiRu$
05-06-2002, 08:07 PM
thanks soooo much! I will install on 2.2.4
Keith
06-27-2002, 02:15 PM
anyone installed apfeifers piece on 2.2.5 yet?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.