Nukemods Forum  
» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Online Users: 92
9 members and 83 guests
bearmchdressesr, coo5ewkin4sjcpg, cycwcwlinlt2gti, ess3grdexmusica, napry4goleobg9t, pesbxbtcontr3jk, rem3noqoval4fiw, ronaldtianyiti2, vacex9ga
Most users ever online was 611, 03-21-2008 at 11:10 PM.
» .::.
tattoo fonts
http://www.checkoutmyink.com/category/tattoo-fonts-tattoo

Go Back   Nukemods Forum > PHP-Nuke 6.5 to 6.9 > Nuke 6.5 to 6.9 - Blocks

Reply
 
LinkBack Thread Tools Display Modes
Site Visitors Block and Hide online status
Old
  (#1 (permalink))
Moderator
 
Status: Offline
Posts: 737
Join Date: Nov 2002
Site Visitors Block and Hide online status - 05-20-2003, 08:52 PM

I noticed this before in 6.0, I'm not actually sure if it is a block issue or not. Users that have hide online status set to yes still show up in the site visitors block with av. I'm using the one from this site, and I'm just wondering if anyone has noticed this, and is there a way to fix it. I've been questioned about it a couple times since I upgraded from 6. Apparently no one minded before but they do now.

Thanks for your help
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#2 (permalink))
Senior Member
 
Status: Offline
Posts: 2,905
Join Date: Sep 2002
05-20-2003, 09:33 PM

The hide online status is a Forum setting and it doesn't carry over to Nuke. If I get a chance to look at the code, I may be able to figure out how to implement it into the block for the Nuke side...

mikem
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#3 (permalink))
Moderator
 
Status: Offline
Posts: 737
Join Date: Nov 2002
05-20-2003, 10:38 PM

Thanks Mikem

I was thinking that it could maybe go through the registration??? Don't really know I haven't taken a close look at it either.
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#4 (permalink))
Senior Member
 
Status: Offline
Posts: 2,905
Join Date: Sep 2002
05-20-2003, 10:51 PM

Ok here is the general idea. I'll really have to work on this one to make it work.

The info we need to grab from the database is in the users table
user_allow_viewonline
If a user sets himself to be NOT VISIBLE, then the value of that variable is 0, if he is Viewable, then the value is 1.
What we need to do is tell the script to first grab that little bit of info with an sql query. Then if the value =0, skip display that user, otherwise, show the user.

sounds simple?..uh yeah...

mikem
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#5 (permalink))
Senior Member
 
Status: Offline
Posts: 2,905
Join Date: Sep 2002
05-20-2003, 11:06 PM

I thought something liek this would work..but not working...bah

Code:
      $result5 = sql_query( "SELECT user_allow_viewonline FROM ".$prefix."_users WHERE username='$session[uname]'", $dbi );
      list( $user_allow_viewonline ) = sql_fetch_row( $result5, $dbi );
      if( ( $user_allow_viewonline != 0 ) ) { $skip_display = 1; }
mikem
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#6 (permalink))
Moderator
 
Status: Offline
Posts: 737
Join Date: Nov 2002
05-21-2003, 12:13 AM

What about if you replaced this
Code:
// Determine last registered user
$result = sql_query( "select username from $prefix"._users." order by user_id DESC limit 0,1", $dbi );
list( $lastuser ) = sql_fetch_row( $result, $dbi );
// Amount of registered users
$numrows = sql_num_rows( sql_query( "select user_id from $prefix"._users." where username != 'Anonymous'", $dbi ) );
// Amount of registered users online
$result2 = sql_query( "SELECT uname, guest FROM $prefix"._session." where guest=0", $dbi );
$member_online_num = sql_num_rows( $result2 );
// Assemble the online registered users
$who_online_now = "";
$i = 1;
while ( $session = sql_fetch_array( $result2, $dbi ) )
{
    if (isset($session["guest"]) and $session["guest"] == 0) {
        if ($i < 10) {
            $who_online_now .= "0$i:&<A HREF=\"modules.php?name=Your_Account&op=userinfo&username=$session[uname]\">$session[uname]</a>
\n";
        } else {
            $who_online_now .= "$i:&<A HREF=\"modules.php?name=Your_Account&op=userinfo&username=$session[uname]\">$session[uname]</a>
\n";
        }
        $who_online_now .= ($i != $member_online_num ? "  " : "");
        $i++;
    }
}
With this
Code:
$AllowViewonline = 0;

// Determine last registered user
$result = sql_query( "select username from $prefix"._users." order by user_id DESC limit 0,1", $dbi );
list( $lastuser ) = sql_fetch_row( $result, $dbi );
// Amount of registered users
$numrows = sql_num_rows( sql_query( "select user_id from $prefix"._users." where username != 'Anonymous'", $dbi ) );
// Amount of registered users online
$result2 = sql_query( "SELECT uname, guest FROM $prefix"._session." where guest=0", $dbi );
$member_online_num = sql_num_rows( $result2 );
//Hide view online
$result3 = sql_query( "SELECT username from $prefix"._users."  order by user_allow_viewonline DESC limit 0,1", $dbi );

   $skip_display = 1;
   if( $AllowViewonline == 0 )
   {

// Assemble the online registered users
$who_online_now = "";
$i = 1;
while ( $session = sql_fetch_array( $result2, $dbi ) )
{
    if (isset($session["guest"]) and $session["guest"] == 0) {
        if ($i < 10) {
            $who_online_now .= "0$i:&<A HREF=\"modules.php?name=Your_Account&op=userinfo&username=$session[uname]\">$session[uname]</a>
\n";
        } else {
            $who_online_now .= "$i:&<A HREF=\"modules.php?name=Your_Account&op=userinfo&username=$session[uname]\">$session[uname]</a>
\n";
        }
        $who_online_now .= ($i != $member_online_num ? "  " : "");
        $i++;
    }
}
I haven't tested it just kinda popped into my head. 8O
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Site Visitors Block Online Now Link? jsterling Nuke 6.5 to 6.9 - Blocks 0 08-04-2003 12:43 AM
Site Visitors block MurphDog nukemods.com 2 07-20-2003 05:12 PM
Site Visitors block for 6.5 richiewinn Nuke 6.5 to 6.9 - Blocks 2 07-01-2003 03:18 AM
Site Visitors Online Link jsterling Nuke 6.5 to 6.9 - Blocks 0 05-21-2003 12:28 AM
Site Visitors block v1.1 OiSole Purged Topics 1 03-18-2003 09:24 AM




vBulletin Skin developed by: vBStyles.com


LinkBacks Enabled by vBSEO 3.3.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31