Previous Thread
Next Thread
Print Thread
Rate Thread
[7.3] New user island >- No bans + Colorize names
#317017 05/19/2008 9:43 AM
Joined: Feb 2007
Posts: 329
Yarp™
OP Offline
Yarp™
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 5:40 AM.
Sponsored Links
Re: [7.3] Remove banned users from Latest User island
blaaskaak #317030 05/20/2008 10:06 PM
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
Offline
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Muchas gracias thumbsup


- Allen wavey
- What Drives You?
Re: [7.3] Remove banned users from Latest User island
AllenAyres #317032 05/21/2008 3:53 AM
Joined: Feb 2002
Posts: 2,286
Veteran
Offline
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....)
Re: [7.3] New user island >- No bans + Colorize na
Ian_W #317033 05/21/2008 5:37 AM
Joined: Feb 2007
Posts: 329
Yarp™
OP Offline
Yarp™
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.

Re: [7.3] New user island >- No bans + Colorize na
blaaskaak #317037 05/21/2008 9:36 AM
Joined: Feb 2002
Posts: 2,286
Veteran
Offline
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
Re: [7.3] New user island >- No bans + Colorize na
Ian_W #317040 05/21/2008 11:34 AM
Joined: Feb 2007
Posts: 329
Yarp™
OP Offline
Yarp™
Joined: Feb 2007
Posts: 329
Just had a check, and it definitely is 7.3 code. The 5 is hardcoded.

Re: [7.3] New user island >- No bans + Colorize na
blaaskaak #317041 05/21/2008 3:29 PM
Joined: Feb 2002
Posts: 2,286
Veteran
Offline
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
jgeoff
jgeoff
NJ
Posts: 96
Joined: April 2001
Forum Statistics
Forums63
Topics37,529
Posts293,721
Members13,834
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online 130
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 28
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,795
Greg Hard 4,625
Top Posters(30 Days)
isaac 3
Top Likes Received
isaac 33
Gizmo 8
Brett 7
Morgan 2
Top Likes Received (30 Days)
isaac 3
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2020 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Snapshot build 20200228.dev)
Responsive Width:

PHP: 5.4.45 Page Time: 0.033s Queries: 29 (0.011s) Memory: 3.2881 MB (Peak: 3.4571 MB) Data Comp: Zlib Server Time: 2020-02-29 07:45:32 UTC
Valid HTML 5 and Valid CSS