OK. I have put in those post how to do it both ways you requested. You can pick which one you want.
Quote:
1- not show edited by for moderators like is currently setup for admins
|
In editpost.php find
PHP Code:
if ($showeditedby and $postinfo[dateline]<(time()-($noeditedbytime*60)) and !($getperms[ismoderator] and !$showeditedbyadmin)) {
$editedbysql=",edituserid='$bbuserinfo[userid]',editdate='".time()."'";
}
and replace it with
PHP Code:
if (!$getperms[ismoderator]) {
if ($showeditedby and $postinfo[dateline]<(time()-($noeditedbytime*60)) and !($getperms[ismoderator] and !$showeditedbyadmin)) {
$editedbysql=",edituserid='$bbuserinfo[userid]',editdate='".time()."'";
}
}
Quote:
2- have it says "edited by the moderator" instead of their username when they edit threads?
|
In editpost.php find
PHP Code:
if ($showeditedby and $postinfo[dateline]<(time()-($noeditedbytime*60)) and !($getperms[ismoderator] and !$showeditedbyadmin)) {
$editedbysql=",edituserid='$bbuserinfo[userid]',editdate='".time()."'";
}
and replace it with
PHP Code:
if ($getperms[ismoderator]) {
$editedbysql=",edituserid='1000000',editdate='".time()."'";
} else {
if ($showeditedby and $postinfo[dateline]<(time()-($noeditedbytime*60)) and !($getperms[ismoderator] and !$showeditedbyadmin)) {
$editedbysql=",edituserid='$bbuserinfo[userid]',editdate='".time()."'";
}
}
Then in functions.php find
PHP Code:
if ($post[edituserid]!=0) {
if ($post['edituserid']!=$post['userid']) {
$edituser=getuserinfo($post[edituserid]);
} else {
$edituser = $post;
}
$post[edittime]=vbdate($timeformat,$post[editdate]);
$post[editdate]=vbdate($dateformat,$post[editdate]);
eval("\$post[editedby] = \"".gettemplate("postbit_editedby")."\";");
} else {
$post[editedby]="";
}
and replace it with
PHP Code:
if ($post[edituserid]!=0 and $post[edituserid]<1000000) {
if ($post['edituserid']!=$post['userid']) {
$edituser=getuserinfo($post[edituserid]);
} else {
$edituser = $post;
}
$post[edittime]=vbdate($timeformat,$post[editdate]);
$post[editdate]=vbdate($dateformat,$post[editdate]);
eval("\$post[editedby] = \"".gettemplate("postbit_editedby")."\";");
} elseif ($post[edituserid]==1000000) {
$post[edittime]=vbdate($timeformat,$post[editdate]);
$post[editdate]=vbdate($dateformat,$post[editdate]);
eval("\$post[editedby] = \"".gettemplate("postbit_editedbymod")."\";");
} else {
$post[editedby]="";
}
You will need to add a template called postbit_editedbymod with these contents:
Code:
<smallfont><i>edited by the moderator on $post[editdate] at $post[edittime]</i></smallfont>
You can obviously change that to whatever you wish.
If you hit 1,000,000 users, this second way will break but in that case just bump the 1000000 to 10000000 in both places it appears.