php forum
php mysql forum
php mysql smarty
 
Topic Options
#317017 - 05/19/08 10:43 AM [7.3] New user island >- No bans + Colorize names
blaaskaak Offline
Enthusiast

Registered: 02/25/07
Posts: 303
Loc: The Netherlands
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.


Edited by blaaskaak (05/21/08 06:40 AM)
_________________________

Top
#317030 - 05/20/08 11:06 PM Re: [7.3] Remove banned users from Latest User island [Re: blaaskaak]
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25452
Loc: Texas
Muchas gracias thumbsup
_________________________
- Allen wavey
- What Drives You?

Top
#317032 - 05/21/08 04:53 AM Re: [7.3] Remove banned users from Latest User island [Re: AllenAyres]
Ian_W Global Moderator Offline
Veteran

Registered: 02/22/02
Posts: 2575
Loc: England
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....)

Top
#317033 - 05/21/08 06:37 AM Re: [7.3] New user island >- No bans + Colorize na [Re: Ian_W]
blaaskaak Offline
Enthusiast

Registered: 02/25/07
Posts: 303
Loc: The Netherlands
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.
_________________________

Top
#317037 - 05/21/08 10:36 AM Re: [7.3] New user island >- No bans + Colorize na [Re: blaaskaak]
Ian_W Global Moderator Offline
Veteran

Registered: 02/22/02
Posts: 2575
Loc: England
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....)

Top
#317040 - 05/21/08 12:34 PM Re: [7.3] New user island >- No bans + Colorize na [Re: Ian_W]
blaaskaak Offline
Enthusiast

Registered: 02/25/07
Posts: 303
Loc: The Netherlands
Just had a check, and it definitely is 7.3 code. The 5 is hardcoded.
_________________________

Top
#317041 - 05/21/08 04:29 PM Re: [7.3] New user island >- No bans + Colorize na [Re: blaaskaak]
Ian_W Global Moderator Offline
Veteran

Registered: 02/22/02
Posts: 2575
Loc: England
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....)

Top


Who's Online
0 registered (), 27 Guests and 11 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
How to hide sub forums from summary page
by Ruben Rocha
Today at 02:58 PM
Spell Check [beta]
by Bill B
Yesterday at 09:16 PM
PhotoPost BB Code Popup
by AllenAyres
Yesterday at 09:41 AM
Problems reading a lot of old posts here
by AllenAyres
Yesterday at 09:35 AM
Forum 'Trader Ratings'.
by AllenAyres
Yesterday at 09:33 AM
Customization needed
by Gizmo
11/12/08 12:28 PM
Team UBBDev Rides Again!
by AllenAyres
11/11/08 02:16 PM
New Mods
User Authentication Class
by
01/19/07 02:59 PM
Multiple Identity Detector
by
12/30/06 06:39 PM
PhotoPost BB Code Popup
by
11/06/06 05:43 PM
Spell Check [beta]
by
10/17/06 09:24 PM
Newest Members
David DelMonte, nick1, Begbie, cenk, MATTO
13363 Registered Users
Top Posters
AllenAyres 25452
JoshPet 11330
Rick 8372
LK 7396
Lord Dexter 6503
Greg Hard 5533
Charles Capps 5438

 

 

 
fusionbb message board php hacks