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)
-   -   Who's Online Stealth (Micro?)-Hack (https://vborg.vbsupport.ru/showthread.php?t=34047)

Moonwolf 01-11-2002 10:00 PM

(AKA Nosey Bugger Blocker :) )

This is an expansion on Firefly's mod to online.php

It'll allow you to individually set Admins, Super Mods, and Mods, to not show their activity in online.php, and allow you to use a default message, or enter a custom one for each group via the control panel.

It might be going out under my name, but since the idea was firefly's, and he fixed my really stupid mistake, he should get most of the credit for it. All I did was kludge :p

To Install: Place the install_stealth.php file in your admin directory, and run it. It'll set up the necessary variables in your control panel, then give you a list of changes to make to your online.php file. Once you've got it all in place, go to Admin Control Panel -> vBulletin Options -> Who's Online and you can set the appropriate stuff up.

For the text strings that show when a usergroup is stealthed, you can use the following variables in the string:

$bbuserinfo[username] - Prints the name of the user viewing the online list

$userinfo[username] - Prints the name of the admin/super mod/mod being stealthed

You can change the default stealthed message by changing the line in the hack that reads "In The Shadows" in online.php to whatever suits you.

Demo: http://www.underlight.com/VBB/online.php (when there's an admin or Super Mod online)

Kathi

GeorgeofCS 01-12-2002 05:34 PM

Great little addition. Only one minor problem is the installer is missing a few line breaks cause some of the lines to add come out as

case 'admin': if($WOLadstr) { $userinfo[where] = $WOLadstr; } else { $userinfo[where] = "No peeking"; } break; case 'smod': if($WOLsmodstr) { $userinfo[where] = $WOLsmodstr; } else { $userinfo[where] = "No peeking"; } break; case 'mod': if($WOLmodstr) { $userinfo[where] = $WOLmodstr; } else { $userinfo[where] = "No Peeking"; } break;

where they should be:

case 'admin':
if($WOLadstr) { $userinfo[where] = $WOLadstr; } else { $userinfo[where] = "No peeking"; } break; case 'smod': if($WOLsmodstr) { $userinfo[where] = $WOLsmodstr; } else { $userinfo[where] = "No peeking"; } break; case 'mod': if($WOLmodstr) { $userinfo[where] = $WOLmodstr; } else { $userinfo[where] = "No Peeking"; } break;

DarkReaper 01-12-2002 05:38 PM

This is almost what I suggested...:)

Would you be able to make it so you can do it on a per-user basis?

Moonwolf 01-12-2002 06:27 PM

I always manage to forget -something- :)

Thanks, fixed the installer.

Kathi

Quote:

Originally posted by GeorgeofCS
Great little addition. Only one minor problem is the installer is missing a few line breaks cause some of the lines to add come out as

case 'admin': if($WOLadstr) { $userinfo[where] = $WOLadstr; } else { $userinfo[where] = "No peeking"; } break; case 'smod': if($WOLsmodstr) { $userinfo[where] = $WOLsmodstr; } else { $userinfo[where] = "No peeking"; } break; case 'mod': if($WOLmodstr) { $userinfo[where] = $WOLmodstr; } else { $userinfo[where] = "No Peeking"; } break;

where they should be:

case 'admin':
if($WOLadstr) { $userinfo[where] = $WOLadstr; } else { $userinfo[where] = "No peeking"; } break; case 'smod': if($WOLsmodstr) { $userinfo[where] = $WOLsmodstr; } else { $userinfo[where] = "No peeking"; } break; case 'mod': if($WOLmodstr) { $userinfo[where] = $WOLmodstr; } else { $userinfo[where] = "No Peeking"; } break;


Lionel 01-12-2002 06:52 PM

Looks like this hack has no effect when firefly's mini hack "ah ha peeking..." is installed, because this it what it is showing for admin...

Lionel 01-12-2002 07:09 PM

It works for every other admin and mods, but one: the one who is defined in firefly's mini hack (great hack btw but you'll never find it unless you are nice to him :D ).

Thanks for yours.

fonzerelli_79 01-14-2002 01:18 AM

top hack

i have a problem though (just a tiny one)

i made the relevant changes to my online.php but then the page didnt work. I think i had a space where i shouldnt. so i decided to start from scratch and make the changes again. to do this i had to install the hack again.

Obviously though this has added the hack twice and i now have two of everything in my options menu.

on top of this, you cant niew where a guest is now

how would i fix this?? :confused:

Moonwolf 01-14-2002 02:07 PM

Paste this code into a file in your admin directory, then run it, it should clear the extra fields for you. Then run step 1 of the install_stealth.php file to re-add the extra fields.
PHP Code:

<?php
require("./global.php");
cpheader();
$DB_site->query("DELETE FROM setting WHERE varname='WOLsadmin'");
$DB_site->query("DELETE FROM setting WHERE varname='WOLadstr'");
$DB_site->query("DELETE FROM setting WHERE varname='WOLsmods'");
$DB_site->query("DELETE FROM setting WHERE varname='WOLsmodstr'");
$DB_site->query("DELETE FROM setting WHERE varname='WOLsmod'");
$DB_site->query("DELETE FROM setting WHERE varname='WOLmodstr'");
echo 
"Records erased!";
cpfooter();
?>

As for guests being stealthed, I'm not sure. Guests don't have usergroupid's, so they shouldn't get stealthed. Are your guests getting usergroupid 5, 6, or 7? Go to Admin Control Panel -> User Groups -> Modify, put your mouse over the "edit" link of your admins, super mods, and mods groups, and look at the URL that link goes to, the last part of the URL should contain the usergroupid.

Kathi

fonzerelli_79 01-14-2002 02:18 PM

hey moonwolf
thanks for helping me out

when i run the file i get this error

PHP Code:

Invalid SQLDELETE FROM setting WHERE varname='WOLsadmin'
mysql errorYou have an error in your SQL syntax near '* FROM setting WHERE varname='WOLsadmin'' at line 1 

what could this be?

Moonwolf 01-14-2002 02:35 PM

Fixed, my mistake with the syntax, re-do the snippet I posted above, I've edited it to fix my mistake.

On this one I plead too many meds after a long night of ER hopping :p

Kathi

Quote:

Originally posted by fonzerelli_79
hey moonwolf
thanks for helping me out

when i run the file i get this error

PHP Code:

Invalid SQLDELETE FROM setting WHERE varname='WOLsadmin'
mysql errorYou have an error in your SQL syntax near '* FROM setting WHERE varname='WOLsadmin'' at line 1 

what could this be?


Lesane 01-14-2002 02:42 PM

Great hack, thanks.

S0uL 01-14-2002 09:25 PM

ok i have 2 admins on my board. me and another guy. is there a way i can set it so we can each have diffrent messages?

fonzerelli_79 01-14-2002 10:16 PM

thanks moonwolf

youve bailed me out again :D

Moonwolf 01-15-2002 03:31 AM

You'd probably be better off using FireFly's version, which works on userid's instead of usergroupid's.

Kathi

Quote:

Originally posted by S0uL
ok i have 2 admins on my board. me and another guy. is there a way i can set it so we can each have diffrent messages?

cyrus 01-15-2002 12:25 PM

@ moonwolf

where can fireflys hack for whos online be found ? :confused:

Moonwolf 01-15-2002 12:46 PM

<a href="https://vborg.vbsupport.ru/showthread.php?postid=197196#post197196" target="_blank">https://vborg.vbsupport.ru/showt...196#post197196</a>

The two hacks, Firefly's original for specific users, and this one for usergroups, should be able to run side by side on the same board.

Kathi

igowoofwoof 01-17-2002 03:35 PM

what happen if you want to uninstall this hack and try it again...can sombody please tell me how to do this....thank you

Moonwolf 01-18-2002 02:08 PM

Go to Post #8. Follow the instructions about creating a file with the included code, run the file with that code. Remove the lines in online.php that the original installer tells you to add, and you're back to where you started. You should only need to remove the lines in online.php since nothing was replaced in the hack.

Kathi

Rose 01-18-2002 02:54 PM

I have added your changes, and uploaded. I had a couple errors, but fixed those (my own fault - I added another usergroup).

But, while I no longer receive errors, nothing seems to have changed on the 'who's online'. It still shows everyone like normal.

I created a test user since guests can't view the who's online at my forum. The test user was just a regular member. I had a moderator log onto the board, and I logged in as the test user. But I could still see where the mod was and what they were doing. :(

Moonwolf 01-18-2002 08:25 PM

Only two things can think of if you're getting this.
  1. You're not uxing the "default" usergroups
  2. Some times you have to submit the admin CP options form twice. (i.e. load it, changer it, submit it, load it again, submit it)
No idea why that second one works :-/

Kathi


Quote:

Originally posted by Rose
I have added your changes, and uploaded. I had a couple errors, but fixed those (my own fault - I added another usergroup).

But, while I no longer receive errors, nothing seems to have changed on the 'who's online'. It still shows everyone like normal.

I created a test user since guests can't view the who's online at my forum. The test user was just a regular member. I had a moderator log onto the board, and I logged in as the test user. But I could still see where the mod was and what they were doing. :(


Rose 02-26-2002 05:59 PM

Erm, if one was to accidently install this hack twice, how would you go about uninstalling a part of it? ((I have double the 'fun' (options) in my admin cp - but I dont' know how to go backwards to undo it since I used the installer))

Any suggestions?

Lionel 03-01-2002 12:37 PM

Can this be made so the admin can see where the mods are?

cditty 03-04-2002 06:41 AM

Quote:

Originally posted by Lionel
Can this be made so the admin can see where the mods are?
This is a good idea. I would really like to see this added if possible. Otherwise, good hack.

Chris

mersey 03-06-2002 08:00 PM

thank you for the hack Moonwolf :)
it would be nice if admins could see the location like the above 2 posts say. but its a nice hack anyway :)

Tungsten 06-18-2002 01:09 PM

I changed around the code a bit to have some fun with my users... :devious:

Code:

$userinfo[where] = "Reading thread <a href='online.php?s=$session[sessionhash]'>Naughty Pics of $bbuserinfo[username]</a>";

Chris M 06-18-2002 06:14 PM

Lmao...

Good hack...

Satan

Xelation 06-18-2002 06:47 PM

hmm... $bbuserinfo[username] doesn't seem to work for me... any ideas?

Xelation 06-22-2002 10:42 PM

how can I uninstall this? I accidently added it to the database twice... any help?

edit: nm, I just went into the database and deleted the extras manually.

Night Owl 07-06-2002 11:27 PM

I would like to hide the locations of a usergroup that is not a moderator, supermod or admin. How can I do this?

The usergroupid is 9 and the name of the group is sybermom.

ForKmaN 08-12-2002 11:18 AM

Nice hack! :)

I love it and my users hate it :D

Rose 08-13-2002 04:24 PM

Quote:

Originally posted by cditty


This is a good idea. I would really like to see this added if possible. Otherwise, good hack.

Chris


I'd be interested, also. As admin, I'd like to see what the mods are up to. *hehe*

Rose 09-21-2002 07:14 PM

Bumpity bump bump? Anyone? Please?

*sits with a book*

Talisman 12-31-2002 10:18 PM

Quote:

Originally posted by Moonwolf
The two hacks, Firefly's original for specific users, and this one for usergroups, should be able to run side by side on the same board.
Love this hack and Firefly's original change. This is great stuff. (Still need some help with it, though.) I've set up.....

1. Firefly's hack to hardcode a WOL location for specific user (specifically, me). That little goodie can be found in the Lounge here.

2. Next to that, I'm also using this hack (thanks, Moonwolf!).

3. And I took Tungsten's suggestion for the location I'm using.

The problem we're having is regular members and unregistered guests are also be shown with the custom locations. Previously, Firefly gave us code that was supposed to fix that. And I see, Moonwolf included that portion in this hack.

But that didn't fix it.

To make this as easy as possible for you guys to help, I'll show here what the code is. Hope someone can solve this for us.

In online.php ....... before this:

PHP Code:

      // Let's show the admin the location but put something false up for everyone else.. 

I have this:

PHP Code:

    case 'admin':
        if(
$WOLadstr) {
             
$userinfo[where] = $WOLadstr;
        } else {
            
$userinfo[where] = "Performing site maintenance";
         }
    break;
    
    case 
'smod':
        if(
$WOLsmodstr) {
             
$userinfo[where] = $WOLsmodstr;
            } else {
              
$userinfo[where] = "Performing site maintenance";
            }
    break;
    
    case 
'mod':
        if(
$WOLmodstr) {
             
$userinfo[where] = $WOLmodstr;
            } else {
             
$userinfo[where] = "Performing site maintenance";
            }
    break;
    
    case 
'Talisman':
        
$userinfo[where] = "Viewing Thread <a href='online.php?s=$session[sessionhash]'>Naughty Photos of $bbuserinfo[username]</a>";
    break; 

The cases for admin, smod, and mod came from this hack and case Talisman came from Firefly/Tungsten.

Then, before this:

PHP Code:

  if ($onlineloc!='' and $userinfo[activity]=='unknown') {
    
$onlinelocbits=explode("|||",$onlineloc);
    while (list(
$key,$ourfilename)=each($onlinelocbits)) {
      list(
$key,$text)=each($onlinelocbits);
      if (
$filename==$ourfilename)
        
$userinfo[activity] = $ourfilename;
    }
  }

  return 
$userinfo;


I have this:

PHP Code:

    if ($WOLsadmin && $userinfo[usergroupid]==6) {
      
$userinfo[activity] = 'admin';
    }
    if (
$WOLsmods && $userinfo[usergroupid]==5) {
      
$userinfo[activity] = 'smod';
    }
    if (
$WOLsmod && $userinfo[usergroupid]==7) {
      
$userinfo[activity] = 'mod';
    }      
    if (
$userinfo[userid]==2) {
      
$userinfo[activity] = 'Talisman';
    } 

(Note: As I wasn't the person who set up our board, my admin userid is 2 instead of 1)

So..... can anyone figure out how our guests and members are showing up on the WOL with these custom locations, too?

Thanks everyone..... please feel free to PM me for more information if you need to.

Cheers!

Talisman 01-04-2003 04:07 PM

*bump*

Someone, please help with this request? The custom locations set for admins/mods only are showing up for regular members and unregistered guests, as well. I've been through all the related threads and still don't know why.

The fix Firefly offered in his thread (which is included in Moonwolf's hack as well) doesn't prevent this from happening.

Thanks.

Talisman 01-06-2003 06:56 AM

Don't seem to have much choice .......... uninstalled.

glas 03-05-2003 12:00 AM

So, I've installed this, however, the option to turn WOL is gone, and somehow they got disabled. I'm figuring the field got erased during the addition.

Also, I ran the code you posted, Kathi, but I got an error. I'm assuming I'm being dumb and that wasn't a query to run, but your directions were a little fuzzy as to what file to paste and run it in. At least to me. :\

Any help would be greatly appreciated.

glas 03-05-2003 06:54 PM

*cough* Bump.

With every post here, I lose faith in the vb.org team and their ability to help users. Someone mind proving me wrong?

Airs 08-12-2003 08:21 PM

this is pretty old and all but have a tough problem my forum lost the switch that says Whos online turned on or off..and now its automaticlly turned off..help!.

bexie 12-14-2003 01:50 AM

Quote:

Originally Posted by Airs
this is pretty old and all but have a tough problem my forum lost the switch that says Whos online turned on or off..and now its automaticlly turned off..help!.

Same problem here. I'm running on 2.3.2. Anyone have any suggestions?! Thanks!

simie 02-05-2004 09:18 AM

running 2.3.2 myself and I also have the prob that Airs and bexie are having. Help!


All times are GMT. The time now is 02:45 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.03071 seconds
  • Memory Usage 1,865KB
  • 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
  • (1)bbcode_code_printable
  • (7)bbcode_php_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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