Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Feb 2007
Posts: 329
Yarp™
Yarp™
Offline
Joined: Feb 2007
Posts: 329
open /cache_builders/new_users.php

replace query:
Code

$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

Code
$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.
Sponsored Links
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 thumbsup


- Allen wavey
- What Drives You?
Joined: Feb 2002
Posts: 2,286
Veteran
Veteran
Joined: Feb 2002
Posts: 2,286
Thanks blaaskaak smile

This section also needs colouring at some stage wink


Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Joined: Feb 2007
Posts: 329
Yarp™
Yarp™
Offline
Joined: Feb 2007
Posts: 329
Originally Posted by Ian_W
This section also needs colouring at some stage wink


That shouldn't be so difficult.

That wasn't so difficult:

Just after
Code
list($total) = $dbh->fetch_array($sth);

until

Code
	$users[$i]['name'] = $uname;

in /cache_builders/new_users.php

Keep both lines of code above, and replace everything inbetween with the following code:

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 smile

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 wink at the moment - but expanding all the time....)
Sponsored Links
Joined: Feb 2007
Posts: 329
Yarp™
Yarp™
Offline
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 wink at the moment - but expanding all the time....)

Link Copied to Clipboard
Donate Today!
Donate via PayPal

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.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Posts: 70
Joined: January 2007
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)