|
» Online Users: 46 |
| 0 members and 46 guests |
| No Members online |
| Most users ever online was 611, 03-21-2008 at 11:10 PM. |
|
» .::. |
Web Hosting - web hosting, dedicated servers and web design services
|
Online Degree - search for 1000+ online degrees, online colleges & online universities.
|
Tattoo - we are a group of tattoo enthusiasts
|
Gexa Energy - your absolute best choice in electric service
|
|
|
|
|
|
|
|
|
|
|
About this Page This is a discussion on Site Visitors Block and Hide online status within the Nuke 6.5 to 6.9 - Blocks forums, part of the PHP-Nuke 6.5 to 6.9 category; I noticed this before in 6.0, I'm not actually sure if it is a block issue or not. ... |
|
 |
 |
|
 |

05-20-2003, 08:52 PM
|
|
Moderator
|
|
Join Date: Nov 2002
Posts: 737
|
|
|
Site Visitors Block and Hide online status
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
|

05-20-2003, 09:33 PM
|
|
Senior Member
|
|
Join Date: Sep 2002
Posts: 2,905
|
|
|
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
|

05-20-2003, 10:38 PM
|
|
Moderator
|
|
Join Date: Nov 2002
Posts: 737
|
|
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.
|

05-20-2003, 10:51 PM
|
|
Senior Member
|
|
Join Date: Sep 2002
Posts: 2,905
|
|
|
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
|

05-20-2003, 11:06 PM
|
|
Senior Member
|
|
Join Date: Sep 2002
Posts: 2,905
|
|
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
|

05-21-2003, 12:13 AM
|
|
Moderator
|
|
Join Date: Nov 2002
Posts: 737
|
|
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
|
 |
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|