Log in

View Full Version : Not Show Edit Post Button


Boofo
12-24-2002, 10:59 PM
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:

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:

if ($post[userid]==$bbuserinfo[userid] or ($bbuserinfo[usergroupid]=="6" or !ismoderator($threadinfo[forumid],"caneditposts"))) {
eval("\$post[editpost] = \"".gettemplate("postbit_editpost")."\";");
} else {
$post[editpost]="";
}

Dean C
12-25-2002, 11:14 AM
Lol your trying to do the same as me :P

I'm still working on this little hack you know!

Both myself and Xenon couldn't get it to work..

But that code snippet there ^

I think it looks wrong but xmas so i can't be bothered to look thru showthread.php hehe

- miSt

Boofo
12-25-2002, 01:10 PM
That first code snippet is not wrong. It is from Firefly and it is the same code he uses here. The second piece of code is definately wrong. That's what I changed it to.

Dean C
12-25-2002, 03:59 PM
I meant the second snippet hehe :P

Boofo
12-25-2002, 05:35 PM
Oops! Sorry. :o