Quote:
Originally Posted by PKRWUD
Well, it took a little trial and error, but I got it to work. If you're interested, the code I used follows...
Again, Admin is 6 & 13, Super Mods are 5 & 21, and Mods are 7 & 20:
HTML Code:
<if condition="$hierarchical=='Yes'">
<if condition="($post[usergroupid]!=6 AND $post[usergroupid]!=5 AND $post[usergroupid]!=7 AND can_moderate($forum[forumid], '', $bbuserinfo[userid])) OR ($post[usergroupid]==7 AND can_moderate($forum[forumid], '', $bbuserinfo[userid]) AND $bbuserinfo[usergroupid]==5) OR
($bbuserinfo[usergroupid]==6 AND $post[usergroupid]!=6) OR ($post[usergroupid]!=13 AND $post[usergroupid]!=21 AND $post[usergroupid]!=20 AND can_moderate($forum[forumid], '', $bbuserinfo[userid])) OR ($post[usergroupid]==20 AND can_moderate($forum[forumid], '', $bbuserinfo[userid]) AND $bbuserinfo[usergroupid]==21) OR
($bbuserinfo[usergroupid]==13 AND $post[usergroupid]!=13)
">
<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]!=5 AND $post[usergroupid]!=7 AND ($bbuserinfo[usergroupid]==7 OR $bbuserinfo[usergroupid]==5)) OR ($post[usergroupid]==7 AND $bbuserinfo[usergroupid]==5) OR ($bbuserinfo[usergroupid]==6 AND $post[usergroupid]!=6) OR ($post[usergroupid]!=13 AND $post[usergroupid]!=21 AND $post[usergroupid]!=20 AND ($bbuserinfo[usergroupid]==20 OR $bbuserinfo[usergroupid]==21)) OR ($post[usergroupid]==20 AND $bbuserinfo[usergroupid]==21) OR ($bbuserinfo[usergroupid]==13 AND $post[usergroupid]!=13)">
<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]!=6 AND $post[warning_level]>0) OR ($post[userid]==$bbuserinfo[userid] AND $post[usergroupid]!=13 AND $post[warning_level]>0)">
<a href='Warn.php?do=ViewMyWarnings'>View your Warnings</a> ?
</if>
</if>
</if>
<!-- end of warning system -->
|
Just wish that this is the only place that you have to change the code for your situation. I just can't check where you need to make this change to make the hack safe for your condition.
One thing I would suggest, is to avoid using the Hierarchical Schema, and declare those additional user groups, as protected user groups, so that they can't be warned. I know that not using the hierarchical schema reduces the functionality, in the sense that a super mod cannot warn a moderator, but it also simplifies things, which in your case is something you would like.
Correction: This solves your Warn sign issue. But it does not solve the hack's operation issues. There are more places where you have to do the same changes, like for example, when the "Warn XYZ" and "View XYZ's Warnings". The code there also uses the group information to decide if the links should be visible or not. Also, in the place where the warning points and the number of bans is shown.
It's none of my business of course, but why are you using two groups for each role?
Rgds
Rgds