Stars by names on Members list

Forum
Last Post
Threads / Messages

Seapyramid

Premium Member
Premium Member
Joined
Feb 1, 2009
Messages
373
Points
0
Mysidian Dollar
10,535
On the listing of all members there are stars by the names of those who have access to the CP... Is there a way of changing that from CP to group number & then assigning different icons to select special groups based on their group number?

Sea
 
Yeah, but you'll have to do a little code editing.

In profile.php find:

PHP:
$ccstat = cancp($usersgroup);
	if($ccstat == "yes"){
	$userdisp = "<img src='templates/icons/star.gif'> ".$usersname."";
	}
	else{
	$userdisp = $usersname;
	}

Replace with:

PHP:
if($usersgroup == 1){

// Group 1, Root Admins

$userdisp = "<img src='templates/icons/star.gif'> ".$usersname."";
}
else if($usersgroup == 2){

// Group 2, Admins

$userdisp = "<img src='templates/icons/icon.gif'> ".$usersname."";
}
else if($usersgroup == 3){

// Registered Members, no icon
$userdisp = $usersname;

}
else if($usersgroup == 4){

// Another user group, and so on...

}
else{

// Usergroup is something else, show default style
$userdisp = $usersname;

}

Hopefully you get the idea from that. :)

Brandon
 
Understood & have that coded :) However it's not showing the icons.. I beleive the reason is with this section

Code:
$star = "";
$status = cancp($level);

if($status == "yes"){
$star = "<img src='templates/icons/star.gif' border=0'> ";

Sea
 
You're right. The code I posted changes it for the actual profile, not for the member list. :)

Anyway, remove the $status = cancp($level); line. Then add this:

PHP:
if($level == 1){

// Show a star for the admin

$star = "<img src='templates/icons/star.gif' border=0'> ";
}
else if($level == 2){

// Show something else for usergroup 2

$star = "<img src='templates/icons/icon.gif' border=0'> ";
}

And so on. :)
 
can you post the exact code to be removed or replaced, and the exact code to put?


because i'm confused.. on brandon's second post
 
zhiichiro said:
can you post the exact code to be removed or replaced, and the exact code to put?


because i'm confused.. on brandon's second post

Do a bit of research. Actually look into the code & this post a precise question with any errors showing and post what you have done. Then maybe we can help.
 

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,280
Messages
33,132
Members
1,603
Latest member
Monako
BETA

Latest Threads

Top