Welcome to Geeklog, Anonymous Monday, December 09 2024 @ 08:24 am EST
Geeklog Forums
Whose Online
nctek
Anonymous
For those of you who want to show the full name of the person under the 'whose online' block, here are some changes that I made. If the user does not have a full name, then their userID will show up. Feel free to use it. If you want to see it in action, go to nctek.net
I'm not too sure how many people will be on there, but hey, take your chances.function phpblock_whosonline()
{
global $_CONF,$_TABLES,$LANG01;
$expire_time = time() - $_CONF['whosonline_threshold'];
$result = DB_query( "SELECT DISTINCT {$_TABLES['sessions']}.uid, fullname,username, photo FROM {$_TABLES['sessions']},{$_TABLES['users']} WHERE {$_TABLES['users']}.uid = {$_TABLES['sessions']}.uid AND start_time >= $expire_time AND {$_TABLES['sessions']}.uid 1 ORDER BY fullname" );
$nrows = DB_numRows( $result );
for( $i = 1; $i
{
$A = DB_fetchArray( $result );
if (!empty ( $A['fullname'] ))
{
$retval .= '<a href="' . &#36;_CONF['site_url'] . '/users.php?mode=profile&amp;uid=' . &#36;A['uid'] . '">' . $A['fullname'] . '</a>';
}
else
{
$retval .= '<a href="' . &#36;_CONF['site_url'] . '/users.php?mode=profile&amp;uid=' . &#36;A['uid'] . '">' . $A['username'] . '</a>';
}
if( !empty( $A['photo'] ) AND $_CONF['allow_user_photo'] == 1)
{
$retval .= ' <a href="' . &#36;_CONF['site_url'] . '/users.php?mode=profile&amp;uid=' . &#36;A['uid'] . '">
</a>';
}
$retval .= '<br>';
}
$num_anon = DB_query( "SELECT DISTINCT uid,remote_ip FROM {$_TABLES['sessions']} WHERE uid = 1" );
$num_anon = DB_numRows( $num_anon );
if( $num_anon > 0 )
{
$retval .= 'Guests: ' . $num_anon . '<br>';
}
return $retval;
}
I'm not too sure how many people will be on there, but hey, take your chances.function phpblock_whosonline()
{
global $_CONF,$_TABLES,$LANG01;
$expire_time = time() - $_CONF['whosonline_threshold'];
$result = DB_query( "SELECT DISTINCT {$_TABLES['sessions']}.uid, fullname,username, photo FROM {$_TABLES['sessions']},{$_TABLES['users']} WHERE {$_TABLES['users']}.uid = {$_TABLES['sessions']}.uid AND start_time >= $expire_time AND {$_TABLES['sessions']}.uid 1 ORDER BY fullname" );
$nrows = DB_numRows( $result );
for( $i = 1; $i
{
$A = DB_fetchArray( $result );
if (!empty ( $A['fullname'] ))
{
$retval .= '<a href="' . &#36;_CONF['site_url'] . '/users.php?mode=profile&amp;uid=' . &#36;A['uid'] . '">' . $A['fullname'] . '</a>';
}
else
{
$retval .= '<a href="' . &#36;_CONF['site_url'] . '/users.php?mode=profile&amp;uid=' . &#36;A['uid'] . '">' . $A['username'] . '</a>';
}
if( !empty( $A['photo'] ) AND $_CONF['allow_user_photo'] == 1)
{
$retval .= ' <a href="' . &#36;_CONF['site_url'] . '/users.php?mode=profile&amp;uid=' . &#36;A['uid'] . '">
</a>';
}
$retval .= '<br>';
}
$num_anon = DB_query( "SELECT DISTINCT uid,remote_ip FROM {$_TABLES['sessions']} WHERE uid = 1" );
$num_anon = DB_numRows( $num_anon );
if( $num_anon > 0 )
{
$retval .= 'Guests: ' . $num_anon . '<br>';
}
return $retval;
}
17
18
Quote
Status: offline
bcbrock
Forum User
Chatty
Registered: 02/04/03
Posts: 64
Your timing on this couldn't have been any better for me. Just yesterday
morning, one of my users made the comment that he was having a hard
time telling who was who because of all the different usernames people
had chosen. Now, he can tell at a glance who is really online. Any
change you might be willing to come up with a way that a users full
name appear on articles they submit instead of their username??? :-)
Thanks!
~Brian
~Brian
~Brian
14
9
Quote
Anonymous
Anonymous
Don't you think if people wanted to be known by their real names they would use this as their username? You may end up pissing off a lot of people if you just switch to posting their names without asking for feedback.
16
15
Quote
Nick
Anonymous
is there a way to show the users photo in the whosonline block next to their username?
12
16
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
That shouldn't be too hard to do. The code for the block already pulls the name of the user's photo from the database (so that it knows whether to display the little camera icon or not). You would only need to replace that with the proper URL to the real photo - and possibly rearrange things a bit ...
The function is phpblock_whosonline in lib-common.php
bye, Dirk
The function is phpblock_whosonline in lib-common.php
bye, Dirk
14
11
Quote
Nick
Anonymous
ok. I see that section of the block in lib-common.php. but i'm not sure how to edit it. Any suggestions?
IF you could paste the code that would be helpful.
IF you could paste the code that would be helpful.
14
14
Quote
John Billings aka desierto
Anonymous
In one sense all you have to do is click on the username to find out more details about the author of the post, or whose online, right?
But I also thought it would be nice to see the authors full name under posts.
I believe yabb allows the user, upon registration or in edit profile, to select whether or not to display username or full name.
But I also thought it would be nice to see the authors full name under posts.
I believe yabb allows the user, upon registration or in edit profile, to select whether or not to display username or full name.
18
8
Quote
All times are EST. The time is now 08:24 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content