[Cards Hack] Show red card only to...


  -----  
Author Message

Divvy
Member

Wed May 16, 2007 6:59 pm   Post subject: [Cards Hack] Show red card only to...
Hi guys!

About this MOD:
http://www.phpbbhacks.com/download/220

Is possible to show the RED CARD only to admins and a specific group? How? Smile
I have tryed to edit group permissions, but without sucess... the red card appears always to the forum moderators!
 

Thoul
Administrator

Thu May 17, 2007 4:13 pm   Post subject: Re: [Cards Hack] Show red card only to...
In viewtopic.php, find:

Code:

           $r_card_img = ' <input type="image" name="ban" value="ban"  onClick="return confirm(\''.sprintf($lang['Red_card_warning'],$current_user).'\')" src="'. $images['icon_r_card'] . '" alt="' . $lang['Give_R_card'] . '" >';


This is the area that needs to be edited to show/hide the red card. Showing it to only admins is easy:

Code:

if ( $userdata['user_level'] == ADMIN )
{
   $r_card_img = ' <input type="image" name="ban" value="ban"  onClick="return confirm(\''.sprintf($lang['Red_card_warning'],$current_user).'\')" src="'. $images['icon_r_card'] . '" alt="' . $lang['Give_R_card'] . '" >';
}


Showing it to a usergroup is harder... you would need some code to select the current person's usergroups and check them. I don't have anything like that handy at the moment.
 

Divvy
Member

Fri May 18, 2007 4:48 am   Post subject: Re: [Cards Hack] Show red card only to...
Thank you Thoul!
Please let me know If you find any code that could help me! Smile
 

Page 1 of 1
Display posts from previous: