Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 06-15-2009, 12:18 PM
zhiichiro zhiichiro is offline
Member
 
Join Date: Mar 2009
Posts: 106
Credits: 11,760
zhiichiro
Default question again

how to change the icons for different groups?

because i want to use the star icon for admins only, and i want to put new icon for the "club" members
Reply With Quote
  #2  
Old 06-15-2009, 01:06 PM
Seapyramid Seapyramid is offline
Premium Member
 
Join Date: Feb 2009
Posts: 373
Gender: Female
Credits: 15,540
Seapyramid
Default RE: question again

The search feature can be your friend! http://www.rusnakweb.com/forum/showthread.php?tid=827
Reply With Quote
  #3  
Old 06-16-2009, 01:28 AM
zhiichiro zhiichiro is offline
Member
 
Join Date: Mar 2009
Posts: 106
Credits: 11,760
zhiichiro
Default RE: question again

ok but i'm confused on brandon's second post..
Reply With Quote
  #4  
Old 06-16-2009, 03:48 AM
trollis76 trollis76 is offline
Member
 
Join Date: Feb 2009
Posts: 160
Credits: 13,462
trollis76
Default RE: question again

If you want it the simple way you start by replacing all the things from Brandons first post. Then you do what he said in the second one.
And after that you need to have your own icon uploaded to this FOLDER:
templates/icons
And the thing you name that icons you write here:

PHP Code:
// Show something else for usergroup 2

$star "<img src='templates/icons/NAME OF THE IMG' border=0'> ";

Hope that works![hr]
Oh, BTW on the first code you should remove the
PHP Code:
$status cancp($level); 
and where it used to be you put the rest of the code that Brandon put in his second post.

I hope it works, since I haven't tested it myself. :)
Reply With Quote
  #5  
Old 06-16-2009, 05:50 AM
zhiichiro zhiichiro is offline
Member
 
Join Date: Mar 2009
Posts: 106
Credits: 11,760
zhiichiro
Default RE: question again

tnx, but i'm kinda confused on this :

Quote:
Originally Posted by BMR777
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. :)
Reply With Quote
  #6  
Old 06-16-2009, 09:19 AM
trollis76 trollis76 is offline
Member
 
Join Date: Feb 2009
Posts: 160
Credits: 13,462
trollis76
Default RE: question again

First, you have replaced this:
PHP Code:
$ccstat cancp($usersgroup);
    if(
$ccstat == "yes"){
    
$userdisp "<img src='templates/icons/star.gif'> ".$usersname."";
    }
    else{
    
$userdisp $usersname;
    } 
With this:

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;


Am I right?

Now you find the last line inside this code:
(This is from the profile.php, and not from the thing that you have already edited. Just search for this part inside YOUR profile.php)

PHP Code:
// We did not specify a user, so show the memberlist

$article_title "Memberlist";
$article_content "Here are all of the members of this site, sorted by registration date.<br><br>";

$query "SELECT * FROM ".$prefix."users ORDER BY uid ASC";
$result mysql_query($query);
$num mysql_numrows($result);

$rowsperpage 15;
$totalpages ceil($num $rowsperpage);

if(
is_numeric($page) and $page != ""){
$currentpage $page;
}
else{
$currentpage 1;
}

if (
$currentpage $totalpages) {  
$currentpage $totalpages;  
}
if (
$currentpage 1) {   
$currentpage 1;  

$offset = ($currentpage 1) * $rowsperpage;  

$query "SELECT * FROM ".$prefix."users ORDER BY uid ASC LIMIT $offset$rowsperpage";
$result mysql_query($query);
$num2 mysql_numrows($result);

//Loop out code
$i=0;
while (
$i $num2) {

$id=@mysql_result($result,$i,"uid");
$username=@mysql_result($result,$i,"username");
$email=@mysql_result($result,$i,"email");
$level=@mysql_result($result,$i,"usergroup");

$star "";
$status cancp($level); 
And you delete that part, and if you already have made the first steps, you don't need to do something else. (I think) :)

Sorry that I messed it up in my first post. :)
Reply With Quote
  #7  
Old 06-16-2009, 11:20 AM
trollis76 trollis76 is offline
Member
 
Join Date: Feb 2009
Posts: 160
Credits: 13,462
trollis76
Default RE: question again

And then, of course; you change the IMG path so that it fits correctly. :)
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 09:01 AM.

Currently Active Users: 9787 (0 members and 9787 guests)
Threads: 4,080, Posts: 32,024, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636