PDA

View Full Version : Premissions.


Kedmyster
07-15-2003, 03:26 PM
I added FireFly's hack (Click Here (http://www.vbulletin.org/hacks/index.php?s=&action=showhack&hackid=53)).
Basically it adds a new field to the editpots.php page that allows you to write why you edited the reply.
I want this field to be showen only to mods/supermods/admins so I added this on editpost.php

if ($bbuserinfo[usergroupid]==5 or $bbuserinfo[usergroupid]==6 or $bbuserinfo[usergroupid]==7)


Whole thing -

if ($showeditedby and $postinfo[dateline]<(time()-($noeditedbytime*60)) and !($getperms[ismoderator] and !$showeditedbyadmin) or $editreason)
{
if ($bbuserinfo[usergroupid]==5 or $bbuserinfo[usergroupid]==6 or $bbuserinfo[usergroupid]==7)
{
// Edit Reason (v1.0)
$editreason=censortext($editreason);

$editedbysql=",edituserid='$bbuserinfo[userid]',editdate='".time()."',editreason='".addslashes(htmlspecialchars($editreason))."'";
// Edit Reason (v1.0)
}
}


Anyway, it doesn't work.
Do I need to add anything to that line before I use the "IF"?
If not, what's wrong with the file (second quote)?

Thanks in advance!

Gary King
07-15-2003, 04:26 PM
What's the problem?