I want to be able to only have the "Edit Post" button show up for anyone who is able to edit posts. I troed the caneditposts variable and I can't get it to work. the button still shows up for those who are not able to edit posts. this is the code I started with:
Code:
if ($post[userid]==$bbuserinfo[userid] or ($bbuserinfo[usergroupid]=="5" or $bbuserinfo[usergroupid]=="6" or $bbuserinfo[usergroupid]=="7")) {
eval("\$post[editpost] = \"".gettemplate("postbit_editpost")."\";");
} else {
$post[editpost]="";
}
and this is what I have and can't get to work:
Code:
if ($post[userid]==$bbuserinfo[userid] or ($bbuserinfo[usergroupid]=="6" or !ismoderator($threadinfo[forumid],"caneditposts"))) {
eval("\$post[editpost] = \"".gettemplate("postbit_editpost")."\";");
} else {
$post[editpost]="";
}