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
Member

Registered: 02/25/07
Posts: 299
Loc: The Netherlands

   [7.3] New user island >- No bans + Colorize names to Del.icio.us Add to del.icio.us
  Digg [7.3] New user island >- No bans + Colorize names Digg it
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: 25432
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: 2574
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
Member

Registered: 02/25/07
Posts: 299
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: 2574
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
Member

Registered: 02/25/07
Posts: 299
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: 2574
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 (), 41 Guests and 9 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Blogs, love em or hate em?
by AllenAyres
10/07/08 02:05 PM
What do you use to edit the files
by Ian_W
10/05/08 03:33 PM
BeyondCompare v3.00
by Ian_W
10/05/08 03:32 PM
Glossy Black Theme with Image Reflection
by Gizmo
10/05/08 02:17 PM
ShareThis
by Gizmo
09/28/08 05:06 AM
[7.3] Viewing MySQL logfiles made easier
by AllenAyres
09/27/08 09:57 PM
Looking for a simple upload script
by Murphdog
09/26/08 08:45 PM
New Mods
[7.3] Viewing MySQL logfiles made easier
by blaaskaak
09/24/08 05:39 PM
[7.3] Language file checker
by blaaskaak
09/09/08 12:56 AM
[7.3.1] add search to showmembers page
by blaaskaak
09/07/08 04:50 AM
Multiple Identity Detector
by
12/30/06 06:39 PM
Newest Members
pisa666, ghengis317, NitroX, Dogan, EliYah-
13345 Registered Users
Top Posters Last 30 Days
AllenAyres 13
blaaskaak 9
tackaberry 7
FREAK1 6
Gizmo 4
Mike L_dup1 4
Chris Bale 4

 

 

 
fusionbb message board php hacks