vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Improved Who's Online Display (https://vborg.vbsupport.ru/showthread.php?t=38576)

FleaBag 05-19-2002 10:28 PM

I just realised I was having exactly the same problem as Boofo. Though I couldn't find the line of code to fix mentioned... mine was the same but with " $onlineloc; " at the end? So I just added your fix and left $onlineloc; at the end.

Boofo 05-20-2002 12:08 AM

Mine had that on the end, too, probably from another hack. I also left it in. :)

FWC 05-20-2002 07:06 AM

Quote:

Originally posted by TWTCommish
It is *HIGHLY* recommended that you use vBHacker to install this hack, as it involves 14 code edits in one file (online.php)...automating that can save you a lot of time.
I went the manual route. I already have so many hacks on WOL I wanted to see what I was changing. As a side benefit I didn't need to do the mod to the global list because it was already there. :cool:

Boofo 05-20-2002 07:13 AM

TWTCommish,

Did you get a chance to check out the board yet? It still seems to be saying the reading private message thing I wrote about a few posts up. And it did the error on not loading the page again on a refresh, but I didn't catch where it happened at this time, sorry. I'll keep an eye on it and see if I can catch it again. Let me know when you have checked it out. Thanks!

Jeremy W. 05-23-2002 05:25 PM

Well done Chris, I love it :D

Kars10 06-06-2002 01:57 PM

hello Guys!!
Ive installed the hack, and all seems to be perfect.
But If someone views the User cp of some other user, and i will klick on the user link in whos online, í get the message "sorry but this user is not registered.
All other links are allright. What can the problem be??
I hope that you understand my bad english. :nervous:

TWTCommish 06-06-2002 02:01 PM

I'm afraid I don't understand. The link titled "User CP" should lead to YOUR User CP...which means you need to be logged in to access it. :)

Kars10 06-06-2002 02:07 PM

Hello Chris, can i send you my code??
Than you can take a look ....
Please

TWTCommish 06-06-2002 02:16 PM

Surely. :) PM or email it over.

Kars10 06-06-2002 02:23 PM

hello Chris, you got Post.
I´ll send it to privacy@...

Thank you very much.

TWTCommish 06-06-2002 02:35 PM

I'm looking at the code now...what did you say the problem was? Which link is giving you trouble?

Kars10 06-06-2002 02:40 PM

...$userinfo[where] = "Schaut sich das Profil an von <a href=\"member.php?s=$session[sessionhash]&action=getinfo&userid=$user[userid]\">$user[username]</a>";


and here is the problem. It looks like: schaut sich das profil an von >>mr.x<<. If i click on mr.x ill get a message that this user are not registered.

TWTCommish 06-06-2002 03:01 PM

I'm not sure what's wrong, but to make sure the link works, replace this:

PHP Code:

if ($user[username]) { 

with this:

PHP Code:

if (intval($user[userid])) { 


Kars10 06-06-2002 03:08 PM

Thank you Chris. I will try it. :D

FleaBag 06-19-2002 10:27 PM

Running well on 2.2.6 apart from 1 issue with the profile userid, it doesn't put the number of the member in the hyperlink.

TWTCommish 06-20-2002 12:21 AM

Replace this...
Code:

$user  = $DB_site->query_first("SELECT username FROM user WHERE userid = ".intval($userid[1]));
...with this...
Code:

$user  = $DB_site->query_first("SELECT userid, username FROM user WHERE userid = ".intval($userid[1]));

FleaBag 06-20-2002 05:31 AM

Thanks Chris. Nobody viewing profiles for me to check at the moment, but I'm sure it works! :)

FleaBag 06-20-2002 09:53 AM

It doesn't say the name of the person who's profile they are viewing at all now... I'm gonna check my online.php just to be sure everything is as it should be.

FleaBag 06-20-2002 09:59 AM

Right everything is as it should be, all the file edits are done. Did you deliberately remove that feature Chris? If so wouldn't it be better to have the member name without the link, if it isn't easy to do? I have no idea what I'm talking about by the way. :)

TWTCommish 06-20-2002 12:44 PM

The whole block of code should look like this:

Code:

    case 'getinfo':
      $userid = explode('userid=', $userinfo[location]);
      $user  = $DB_site->query_first("SELECT username FROM user WHERE userid = ".intval($userid[1]));
     
        if ($user[username] && $user[userid]) {
          $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;

Anyway, you can always test it without anyone else: just view a profile, and make the next page you go to be the Who's Online page. That's how I tested it. :)

FleaBag 06-20-2002 12:46 PM

That test usually works for me, but it doesn't seem to work with profiles. Anyway, it seems to suddenly have started working properly now. So thanks yet again! :)

xug 06-20-2002 08:24 PM

TWTCommish, could you look to this thread :

https://vborg.vbsupport.ru/showthrea...760#post263760

I have installed that hack and it screws up online.php a little!

Could you look into this and create a solution so other and I know where the user is instead of showing the sig.php info!!

Thank you for your time!

Mystislav 07-20-2002 10:54 AM

Yo guys I'm getting some gay ass error:

Parse error: parse error, unexpected T_CASE in /home/sjmadho/public_html/board/online.php on line 188

veedee 07-20-2002 09:30 PM

Does this work for every user or can you set this new online.php page to show the extra info *only* for admins?

Cheers,

Mystislav 08-04-2002 08:40 PM

Can anyone help???????

Boofo 08-04-2002 08:42 PM

Can you post just the error line with the 5 lines above it and the 5 below it so we can see what the problem might be?

Quote:

Originally posted by Mystislav
Can anyone help???????

TWTCommish 08-04-2002 08:43 PM

PM me your online.php file as an attachment and I'll have a look.

GunsNetwork 08-07-2002 01:51 AM

I have a very large online crowd and all I get is a blank screen

I am trying to use this great hack. I have a who is online for all the members to see, but I am trying to get this one to work just for my Admin's so we can see the guests and where they are mostly.

I would appreciate some help, please. I have the files needed for someone to look at.

I am confused with this one, I thought it would be an easy one.

Confused???

BowHunt

TWTCommish 08-07-2002 01:53 AM

I'm sorry, could you describe your problem a little more? What seems to be wrong?

GunsNetwork 08-07-2002 02:33 AM

This is my site is http://www.gunsnet.net

When you go there you will see the who is online on the main index and on each forum.

Here is what I am trying to do, I want a separte WOL for Admin's and Mod's to track the guest's and members so you know what forum they are in without having to go to each forum to find them.

here is my online.php as you will see a blank screen.
http://www.gunsnet.net/forums/online.php


I would appreciate some help on this.

Tigga 09-06-2002 10:25 PM

I've got it working on 2.2.7 for the most part. The only problem is whenever it shows "Viewing Profile of xxx", it doesn't properly link to the user's profile. It just links to /forum/member.php?s=&action=getinfo&userid=. Anyone else having this problem or know how to fix it?

Bison 09-20-2002 06:36 AM

Works OK now ... (Click Install) :D

Change the $user variable to this dude....
Code:

$user  = $DB_site->query_first("SELECT userid, username FROM user WHERE userid = ".intval($userid[1]));
That was my problem too, but it works now! ;)

Learner29 09-24-2002 03:51 AM

looks interesting.....

Kohhal 10-17-2002 01:12 PM

Great hack Chris, exactly what I was looking for :D

I have one related problem maybe you can help me with, as detailed in this thread.

Thanks,

G!

FleaBag 10-29-2002 07:21 PM

Installed on 2.2.8 in about 4 seconds! :D

GunsNetwork 10-29-2002 08:17 PM

Chris I get this message after redoing my online.php file.

Parse error: parse error, unexpected T_CASE in C:\Web\WebSites\GunsNet\Forums\online.php on line 135

I will send you my online php file

BowHunt

Natch 01-14-2003 04:01 PM

Has anyone else noticed that upgrading to 2.2.9 breaks the Who's Online for Viewing (this members) Profile ?

EDIT: // as in it was working fine afaik before the upgrade but now I seem to have the following error whenever I try to view a Profile and then look @ Who's Online ...

Code:

Fatal error: Call to a member function on a non-object in /my/home/directory/forums/online.php on line 122
Line 122 is from this hack and comprises
PHP Code:

    case 'getinfo':
      
$userid explode('userid='$userinfo[location]);
/*122 */      $user   $DB_site->query_first("SELECT userid, username FROM user WHERE userid = ".intval($userid[1]));
      
        if (
$user[username] && $user[userid]) {
          
$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; 

Any ideas what's wrong ?

//EDIT: Apart from me not reading thru the thread properly LOL :( Sorry!

Great hack and thanks :D :D

Slynderdale 01-17-2003 02:53 PM

Some bug fixes:

find:
PHP Code:

function show($userinfo) {
  global 
$thread$post$forum$event$gotforum$hideprivateforums$bbuserinfo$timeformat$displayemails$enablepms$bbtitle$usergroupdef$numberguests

If it doesnt have $DB_site in global then add it such as:
PHP Code:

function show($userinfo) {
  global 
$thread$post$forum$event$gotforum$hideprivateforums$bbuserinfo$timeformat$displayemails$enablepms$bbtitle$usergroupdef$numberguests,$DB_site

then find:
PHP Code:

    case 'mail':
      
$user explode('userid='$userinfo[location]);      
        if (
intval($user[1])) {
          
$user $DB_site->query_first("SELECT username FROM user WHERE userid = ".intval($user[1])); 

and change it to:
PHP Code:

    case 'mail':
      
$user explode('userid='$userinfo[location]);      
        if (
intval($user[1])) {
          
$user $DB_site->query_first("SELECT username,userid FROM user WHERE userid = ".intval($user[1])); 

now find:
PHP Code:

    case 'getinfo':
      
$userid explode('userid='$userinfo[location]);     
        
$user $DB_site->query_first("SELECT username FROM user WHERE userid = ".intval($userid[1])); 

and change it to:
PHP Code:

    case 'getinfo':
      
$userid explode('userid='$userinfo[location]);     
        
$user $DB_site->query_first("SELECT username,userid FROM user WHERE userid = ".intval($userid[1])); 


Now every thing should work correctly.
Im also using vbulletin 2.2.9

Boofo 01-17-2003 03:17 PM

Does it make a difference what order the username and userid is on on the query statement? I have the following query in my online.php:

PHP Code:

$user $DB_site->query_first("SELECT userid, username FROM user WHERE userid = ".intval($userid[1])); 


Slynderdale 01-17-2003 04:59 PM

Quote:

Originally posted by Boofo
Does it make a difference what order the username and userid is on on the query statement? I have the following query in my online.php:

PHP Code:

$user $DB_site->query_first("SELECT userid, username FROM user WHERE userid = ".intval($userid[1])); 


no it doesnt make a difference, i installed this hack on a vbulletin 2.2.9 and when i went to whos online i got quite a bit of errors that as i read through the thread, many others had encountered so i posted the changes i made to fix the errors i was getting.


All times are GMT. The time now is 08:04 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01304 seconds
  • Memory Usage 1,855KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_code_printable
  • (11)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete