|
|
Joined: Feb 2007
Posts: 329
Yarp™
|
Yarp™
Joined: Feb 2007
Posts: 329 |
open /cache_builders/new_users.php replace query: $query = " select USER_DISPLAY_NAME,USER_ID from {$config['TABLE_PREFIX']}USERS where USER_IS_APPROVED='yes' and USER_ID <> '1' order by USER_ID desc limit 5 ";
with $query = " select USER_DISPLAY_NAME,USER_ID from {$config['TABLE_PREFIX']}USERS where USER_IS_APPROVED = 'yes' and USER_IS_BANNED = 0 and USER_ID <> '1' order by USER_ID desc limit 5 "; No sense in giving somebody a topspot on the screen if they are banned anyway.
Last edited by blaaskaak; 05/21/2008 6:40 AM.
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
Muchas gracias
|
|
|
|
Joined: Feb 2002
Posts: 2,286
Veteran
|
Veteran
Joined: Feb 2002
Posts: 2,286 |
Thanks blaaskaak This section also needs colouring at some stage
Fans Focus - Focusing on Fans of Sport (Okay - mainly football (the British variety at the moment - but expanding all the time....)
|
|
|
|
Joined: Feb 2007
Posts: 329
Yarp™
|
Yarp™
Joined: Feb 2007
Posts: 329 |
This section also needs colouring at some stage That shouldn't be so difficult.That wasn't so difficult: Just after list($total) = $dbh->fetch_array($sth);
until $users[$i]['name'] = $uname;
in /cache_builders/new_users.php Keep both lines of code above, and replace everything inbetween with the following code: $query = " select t1.USER_DISPLAY_NAME,t1.USER_ID,t2.USER_NAME_COLOR,t1.USER_MEMBERSHIP_LEVEL from {$config['TABLE_PREFIX']}USERS as t1, {$config['TABLE_PREFIX']}USER_PROFILE as t2 where t1.USER_IS_APPROVED = 'yes' and t1.USER_IS_BANNED = 0 and t1.USER_ID <> '1' and t1.USER_ID = t2.USER_ID order by USER_ID desc limit 5 "; $sth = $dbh->do_query($query); $users = array(); $i=0; while(list($uname,$uid,$Color,$PostStatus) = $dbh->fetch_array($sth)) { $uname = $html->user_color($uname, $Color, $PostStatus);
Just a matter of getting the usercolor and their membership status, and feeding those through the colorize function.
|
|
|
|
Joined: Feb 2002
Posts: 2,286
Veteran
|
Veteran
Joined: Feb 2002
Posts: 2,286 |
Thanks Is this for 7.3 as I thought order by USER_ID desc limit 5 was no longer in there, as the limit of users displayed was controlled from the CP? (I haven't looked at that bit of code for a while, so might be mistaken)
Fans Focus - Focusing on Fans of Sport (Okay - mainly football (the British variety at the moment - but expanding all the time....)
|
|
|
|
Joined: Feb 2007
Posts: 329
Yarp™
|
Yarp™
Joined: Feb 2007
Posts: 329 |
Just had a check, and it definitely is 7.3 code. The 5 is hardcoded.
|
|
|
|
Joined: Feb 2002
Posts: 2,286
Veteran
|
Veteran
Joined: Feb 2002
Posts: 2,286 |
I'm sorry - got confused over the online list.
Fans Focus - Focusing on Fans of Sport (Okay - mainly football (the British variety at the moment - but expanding all the time....)
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 5,833
Joined: January 2000
|
|
Forums63
Topics37,573
Posts293,925
Members13,849
|
Most Online5,166 Sep 15th, 2019
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|
|