Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Questions and Supports (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=18)
-   -   Stars by names on Members list (http://www.mysidiaadoptables.com/forum/showthread.php?t=689)

Seapyramid 04-18-2009 06:44 PM

Stars by names on Members list
 
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

BMR777 04-18-2009 06:50 PM

RE: Stars by names on Members list
 
Yeah, but you'll have to do a little code editing.

In profile.php find:

PHP Code:

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

Replace with:

PHP Code:

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

Seapyramid 04-18-2009 08:08 PM

RE: Stars by names on Members list
 
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

BMR777 04-18-2009 08:25 PM

RE: Stars by names on Members list
 
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 Code:

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. :)

Seapyramid 04-18-2009 11:11 PM

RE: Stars by names on Members list
 
Worked like a charm!! Thanks,

Sea

zhiichiro 06-16-2009 01:26 AM

RE: Stars by names on Members list
 
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

Seapyramid 06-16-2009 09:19 AM

RE: Stars by names on Members list
 
Quote:

Originally Posted by zhiichiro
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.


All times are GMT -5. The time now is 05:09 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.