View Full Version : edited by xxx
brookelyn
10-01-2001, 12:49 AM
how can I have it either
1- not show edited by for moderators like is currently setup for admins
or
2- have it says "edited by the moderator" instead of their username when they edit threads?
Mark Hewitt
10-01-2001, 08:37 AM
Couldn't you set it up so it doesn't show edited by - at all - ?
Alien
10-01-2001, 11:55 AM
Yes, I really wish this was an option as well..
I really don't want to have it show edited by for moderators, like it doesn't for me (the admin). Would be great as another option in a future release.
:D
Mark Hewitt
10-01-2001, 11:58 AM
Find template - postbit_editedby
And remove it's contents.
Admin
10-01-2001, 12:06 PM
[QUOTE]Originally posted by Mark Hewitt
Find template - postbit_editedby
And remove it's contents.
Admin
10-01-2001, 01:03 PM
I just checked, and by the code that is in editpost.php, it shouldn't appear for mods:
if ($showeditedby and $postinfo[dateline]<(time()-($noeditedbytime*60)) and !($getperms[ismoderator] and !$showeditedbyadmin)) {
$editedbysql=",edituserid='$bbuserinfo[userid]',editdate='".time()."'";
}
but it does. :eek:
brookelyn
10-01-2001, 05:54 PM
Originally posted by Mark Hewitt
Couldn't you set it up so it doesn't show edited by - at all - ?
of course i could, but that's not how i want it set up - I would like it to say edited by for regular users
tubedogg
10-01-2001, 06:21 PM
OK. I have put in those post how to do it both ways you requested. You can pick which one you want. :)
1- not show edited by for moderators like is currently setup for admins
In editpost.php find
if ($showeditedby and $postinfo[dateline]<(time()-($noeditedbytime*60)) and !($getperms[ismoderator] and !$showeditedbyadmin)) {
$editedbysql=",edituserid='$bbuserinfo[userid]',editdate='".time()."'";
}and replace it withif (!$getperms[ismoderator]) {
if ($showeditedby and $postinfo[dateline]<(time()-($noeditedbytime*60)) and !($getperms[ismoderator] and !$showeditedbyadmin)) {
$editedbysql=",edituserid='$bbuserinfo[userid]',editdate='".time()."'";
}
}
2- have it says "edited by the moderator" instead of their username when they edit threads?
In editpost.php findif ($showeditedby and $postinfo[dateline]<(time()-($noeditedbytime*60)) and !($getperms[ismoderator] and !$showeditedbyadmin)) {
$editedbysql=",edituserid='$bbuserinfo[userid]',editdate='".time()."'";
}and replace it withif ($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 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 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:<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.
Admin
10-01-2001, 06:47 PM
Kevin (happy 5000th post :)), can you explain why it didn't work in the first place?
Looking at the code, it should. Right? :confused:
tubedogg
10-01-2001, 10:40 PM
It should but for some reason it doesn't, which I don't understand...
Alien
10-01-2001, 11:28 PM
Wow thanks!
I'll be sure to test this out and see which method I like the most. :)
I loooooooooove options!
Axel Foley
12-02-2001, 01:56 PM
I've setup both options in the CP, but if I edit a post it still doesn't show that I edited a post, I'm the admin.
I also installed Chen's Edit Reason hack, but I can't understand why it doesn't show.
Should I start looking into the code? I don't know know if it's a bug or not.
Thanks for the help.
tubedogg, method 2 doesn't work for me, instead:
When admin edited the post, it says the edited by moderators.
When moderator edited the post, it says their name, as the same as before.
Just to let you know, there is something wrong with method 2.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.