Quote:
Originally Posted by amanpartaps
Gr8 Hack !! Aman Clicks Install !!
I see warning options on each post but when a member clicks on these links he gets no permission message. What is use of showing it when they can not view it. Is there any option which makes it possible only for admin to view those links on each post or can an admin give permissions for users to view their warnings. i am a newbie, so kindly bear with me, please guide me.
Best Regards
Regards
|
It all depends on your postbit conditionals. If you use the conditionals below, the admins and mods can see the "Warn XYZ" and "View XYZ Warnings", but a normal member can only see the "View my warnings" link.
PHP Code:
<if condition="$post[usergroupid]!=6 AND $post[usergroupid]!=7 AND can_moderate($forum[forumid], '', $bbuserinfo[userid])"><a href='Warn.php?do=WarnUser&id=$post[userid]&post=$post[postid]'>Warn $post[username]</a> ?
</if>
<if condition="$post[usergroupid]!=6 AND $post[usergroupid]!=7 AND ($bbuserinfo[usergroupid]==7 OR $bbuserinfo[usergroupid]==6)">
<a href='Warn.php?do=ViewWarnings&id=$post[userid]'>View $post[username]'s Warnings</a> ?</if>
<if condition="$post[userid]==$bbuserinfo[userid] AND $post[usergroupid]==2 AND $post[warning_level]>0">
<a href='Warn.php?do=ViewMyWarnings'>View your Warnings</a> ?</if>
Oh yes, the moderators can see the "Warn XYZ" link, only in the forums they are assigned as moderators. Please make sure that your admin and mod usergroups are 6 and 7, otherwise change these accordingly.
I hope this helps.
------------
John