PHP Code:
if (!($group_info['leaderid'] == $vbulletin->userinfo['userid'] AND $vbulletin->bf_ugp['grpspermissions']['groupspostedit']) AND !($vbulletin->bf_ugp['grpspermissions']['groupsmoderator']))
{
$mod_options = "
<form action=\"postings.php\" method=\"post\">
<strong>Moderation</strong>:
<select name=\"do\">
<option value=\"\" selected=\"selected\">----------</option>
<option value=\"cls\">Close Thread</option>
<option value=\"del\">Delete Thread</option>
<option value=\"stk\">" . (($group_info['stuck']) ? "Unstuck" : "Stick") . " Thread</option>
</select>
<input class=\"button\" id=\"inlinego\" type=\"submit\" value=\"Go\" />
<input name=\"threadid\" value=\"$t\" type=\"hidden\">
<input name=\"groupid\" value=\"$g\" type=\"hidden\">
<input name=\"url\" value=\"viewthread.php?g=$g&t=$t\" type=\"hidden\">
</form>
";
}
else
{
$mod_options = FALSE;
}
the conditional is
if your userid is the same as the leaderid AND you're usergroup permissions allow you to edit groups OR
you're a groups moderator (as set within the usergroup options) then display the info, otherwise don't.
however i can't get this to work. what am i doing wrong?