Back to vBulletin 3 Articles

Update the "Who's Online" viewing location for new PHP files & Hacks
by !!! 25 Nov 2002

This is simple, and I apologize for it being a pathetic one...but it's useful.

Open up online.php (in your root folder), and search for this code:

PHP Code:
    case 'edit':
      
$userinfo[where] = "Editing Post";
      break; 
Place below it the following code:

PHP Code:
    case 'TITLEOFPAGE':
      
$userinfo[where] = "DESCRIPTION OF PAGE";
      break; 
MAKE SURE YOU REPLACE "TITLEOFPAGE" WITH THE NAME OF THE PAGE (JUST LETTERS; NO FANCY CHARACTERS OR SPACES) -- a good idea might be to end it with "funfun" or something so that you don't replicate an already existing title.

The "DESCRIPTION OF PAGE..." part will be what shows up in the location menu on the "Who's Online" page.

Now, to add the final altering to make the whole thing work, find:

PHP Code:
  case 'register.php':
    
$userinfo[activity] = 'register';
    break; 
After it, add:

PHP Code:
  case 'NAMEOFPHPFILE':
    
$userinfo[activity] = 'TITLEOFPAGE';
    break; 
Make sure you replace "TITLEOFPAGE" with the one you used above. Then, replace "NAMEOFPHPFILE" with the name of the file that the viewer is actually at.

I did it on my boards for "toplist.php" & "attach.php." Their codes were:

Code:
    case 'toplist':
      $userinfo[where] = "Forum Top Sites";
      break;
    case 'attach':
      $userinfo[where] = "Attachment Listings";
      break;
and

Code:
  case 'toplist.php':
    $userinfo[activity] = 'toplist';
    break;
  case 'attach.php':
    $userinfo[activity] = 'attach';
    break;
I'm going to do it for the shoutbox as well, but I think you get the idea. So, have fun.

vblts.ru supports vBulletin®, 2022-2024