View Full Version : Reason for post edit
Admin
11-19-2001, 10:00 PM
I won't talk too much, it's been a very very long day. :)
This hacks lets your users specify the reason for editing their post.
If you ever worked with CVS (and alike), you can write the reason you edited the file.
I thought it'd be cool to have the same thing here. :)
So when you edit a post, you'll see a text box at the bottom, for you to enter the reason for editing the post.
That's instead of the ridiculous:
Just fixing a type --Chen.
messages at the bottom of the post.
If you leave the box empty, nothing will be displayed.
This is installed here, so if you want a demo just edit one of your posts here.
(don't forget to wait 2 minutes before editing, that's the setting here)
Download the installed (attached), upload to your admin folder and run from your browser.
Most is automatic, but you need to edit 2 files and 2 templates (1 edit each).
That's it, feedback! :D
RobAC
11-20-2001, 05:04 PM
Very cool. How about a working demo? :D :D :D
Admin
11-20-2001, 05:07 PM
*points up* ;)
RobAC
11-20-2001, 05:12 PM
LOL, looks like there's a bug in it....your smilies don't show up. :D :D
xware
11-20-2001, 05:14 PM
good hack.
But I think it's only to be used by mods or admin would be better .;)
Admin
11-20-2001, 05:17 PM
That's by design, to make the bottom part as scanty and not cluttered as possible.
You can 'fix' this easily thought, in functions.php, add this:
$post[editreason]=bbcodeparse2($post[editreason],0,0,1,0);
right after this:
if ($post[editreason]!='') {
Lesane
11-20-2001, 05:25 PM
Cool, thanks Firefly
So now when I say something stupid like
"Sinecure, you... wonderful guy!"
Great hack man, im tempted to install it now before work, but im late as is. When I get home for sure! Thanks.
Btw, its helpful to turn your "Show edited by, after edited...." to 1 or something, cuz I know I edit my posts the most after the first 2 mins of posting it. (that made NO sence)
snyx
Kumaro
11-20-2001, 07:53 PM
Very Nice Hack!...
Dalius
11-20-2001, 08:14 PM
Originally posted by xware
good hack.
But I think it's only to be used by mods or admin would be better .;)
ditto
Dalius
11-20-2001, 08:38 PM
Does the show admin edit thingy have to be on?
Syphin
11-20-2001, 09:30 PM
ooo... *is amazed* lol great hack... ^^
-Syphin
MarkB
11-20-2001, 10:22 PM
Very tidy work! :D
squawell
11-20-2001, 10:23 PM
that's a great hack!!:)
thankz FireFly:D
where can change this word--why
Princeton
11-20-2001, 11:35 PM
nice hack ... just testing
Tommy Boy
11-21-2001, 12:23 AM
Great hack! The installer is also amazing! Great job!
TheComputerGuy
11-21-2001, 02:36 AM
This is sweet
Baratator
11-21-2001, 06:34 AM
cool :) i'll install it ^^
Admin
11-21-2001, 07:35 AM
[QUOTE]Originally posted by snyx
Btw, its helpful to turn your "Show edited by, after edited...." to 1 or something, cuz I know I edit my posts the most after the first 2 mins of posting it. (that made NO sence)
Mark Hewitt
11-21-2001, 08:45 AM
A feature for the next version methinks.
squawell
11-22-2001, 06:43 AM
Originally posted by FireFly
After you installed it, it's in the postbit template.
FireFly i cann't find this word why in postbit
template??why??should i reinstall this hack again~~
Admin
11-22-2001, 11:43 AM
Hmm, sorry.
It should be in the postbit_editedreason template.
squawell
11-22-2001, 12:53 PM
Originally posted by FireFly
Hmm, sorry.
It should be in the postbit_editedreason template.
thankz~~~FireFly~~
i find it!!:D
Ambex Net
11-23-2001, 11:48 PM
Help I'm lost on this hack :confused:. Sorry to sound dumb but I just bought a vB licence today, I got my color scheme all done so I decicded to start to do some hacks and this is nothing like ubb lol, well actualy the hacking part but anywho I get to this step:
Changes to
postbit template (1)
postbit template
Step 1 of 1 FIND:
$post[editedby]
AFTER that ADD
<br>$post[editedreason]
Now where are these template or postbit template files :confused:. This is probely a stupid question b/c I bet it's right under my nose but I never did a vB hack yet and this would be my first one so I'm just wondering where the heck this is. All help apprecaited, thanks!
Ambex Net
11-23-2001, 11:57 PM
I really hate to double post but I just wanted to say a friend of mine showed me where the templates were and that i had to click show all. I knew it was right under my nose ;)...anyways it's install now. and awesome hack!
Nupraptor
11-24-2001, 04:05 PM
Going to try it soon. :)
Prezident
11-24-2001, 07:19 PM
Very cool. Love the install script.
Thanks for the hack...
SgtSling
11-25-2001, 01:23 AM
I installed this hack.. but for some reason..
my posts do not say
"Edited By"
anymore
I made sure that this was enabled in the admin panel.. so it should appear like before..
Any clues?
Ambex Net
11-25-2001, 01:27 AM
Originally posted by SgtSling
I installed this hack.. but for some reason..
my posts do not say
"Edited By"
anymore
I made sure that this was enabled in the admin panel.. so it should appear like before..
Any clues?
Maybe you deleted a code segment that had to do with that or maybe you deleted something in a template. I dunno just a thought on what might've happened.
SgtSling
11-25-2001, 01:56 AM
Ok I found out why!
Something is messed up in my functions.php!
The "edited by"
won't show when I make the new changes in it.
anyone see anything the matter with this?
I am including the chunk on code before and after on my functions.php
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]);
// Edit Reason (v1.0)
if ($post[editreason]!='') {
eval("\$post[editedreason] = \"".gettemplate("postbit_editedreason")."\";");
} else {
$post[editedreason]='';
}
// Edit Reason (v1.0)
} else {
$post[editedby]="";
}
if ($post[dateline]>$bbuserinfo[lastvisit]) {
$post[foldericon]="<img src=\"{imagesfolder}/posticonnew.gif\" border=\"0\" alt=\"New Post\">";
} else {
$post[foldericon]="<img src=\"{imagesfolder}/posticon.gif\" border=\"0\" alt=\"Old Post\">";
}
if (!$forum[allowicons] or $post[iconid]==0) {
if ($showdeficon) {
$post[icon]='<img src="{imagesfolder}/icons/icon1.gif" border="0" alt="">';
SgtSling
11-25-2001, 03:37 AM
i nailed it.
Forget about it
:)
Dark Blaze
11-30-2001, 11:51 AM
Nice hack :)
Exactly what I needed for my forum's users
I'm going to install it very soon indeed.
Axel Foley
12-03-2001, 11:30 PM
Hi Chen...
I have a little problem that I noticed after I installed your hack. Don't think it's related to it (I hope) but I found it while testing your hack and I'd like to solve it.
The problem is simple: in the CP I have both EDIT BY options checked (for users AND admin), but EDITED BY XXX IN DATE never comes up for anybody (users, mods and admins. Now with your hack the only thing that comes up is "WHY: blablabla". :(
Can't understand what's wrong...could you please help me?
Thanks a lot...
Island Roots
12-12-2001, 10:18 PM
Testing
Sadie Frost
12-19-2001, 07:24 PM
Parse error girl here again lol.
Okay, I'm getting a parse error in the very last line of editpost.php when I go to edit a post. The weird thing is, that I unistalled this hack, and re-uploaded my backup copy of editpost, and I'm still having the same problem. I also don't think I had ever edited it before, and edit was working fine earlier.
Any tips?
:)
Nevermind - I jsut uplaod the original file and it's working now. :)
DelusionalMind
12-29-2001, 07:05 AM
for some reason it won't show up on my board??
hmmm...i followed everything correctly...
Admin
12-29-2001, 11:49 AM
Wait 3 minutes and then edit your post. :)
DelusionalMind
12-29-2001, 05:01 PM
it adds the empty space at the bottom but no text
hmmmm
i'll try re-installing on a fresh install
Psychdrone
12-29-2001, 09:55 PM
TESTING!
LouChipher
01-06-2002, 12:03 PM
testing...
69-FLy-gUy
01-20-2002, 09:29 AM
I am having a little problem with this..
When i edit a post.. it just shows the Edited By: blah blha
but doesn't even show the reason at all...?? Any ideas?
Ciao
Shenlong
01-20-2002, 03:18 PM
spectacular hack firefly!
Stretchr
01-20-2002, 04:17 PM
Great hack. Allows me to pull foot from mouth....and add a smile when I do it! Thanks, FireFly!
:D
69-FLy-gUy
01-20-2002, 11:36 PM
Can anyone help me?
Ciao
-Trip
Admin
01-21-2002, 08:03 AM
Are you sure you added the right stuff to the edit templates?
69-FLy-gUy
01-21-2002, 03:28 PM
Yes, I believe so.. However, I will uninstall this hack, and then reinstall it and i will let you know how it turns out ok?
Thanks for your patience FireFly!
Ciao
69-FLy-gUy
01-22-2002, 11:04 AM
Well I hvae uninstalled it, and reinstalled it.. I am guessing it is something to do with functions.php
here is the part of the code that contains where i have to edit...
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")."\";");
// Edit Reason (v1.0)
if ($post[editreason]= !'') {
eval("\$post[editedreason] = \"".gettemplate("postbit_editedreason")."\";");
} else {
$post[editedreason]='';
}
// Edit Reason (v1.0)
} else {
$post[editedby]="";
}
if ($post[dateline]>$bbuserinfo[lastvisit]) {
and this is the part in my postbit template ->
$post[attachment]
<p>$post[signature]</p>
<p> $post[editedby]</p> <br> $post[editedreason]
</td>
</tr>
<tr>
Any idea?
Ciao
Admin
01-22-2002, 12:00 PM
Looks fine... hmm are you sure you edited editpost.php correctly? Can you see the Edit Reason input box when you edit a box?
69-FLy-gUy
01-22-2002, 07:30 PM
Yes. I can see the edit box.. and i can enter in a message.....
Ciao
Stretchr
01-22-2002, 10:16 PM
Don't know if someone's already suggested this but if you can see the edit box and nothing shows, make sure you aren't doing what I did. I had the "Show edits by Admins" box ticked to NO. Once I changed that, everything was fine.
Joshua Clinard
01-23-2002, 02:54 PM
Can somone modify this hack, or make an option so that I can make it so only admin and mods can use this hack?
monitox
01-26-2002, 08:57 PM
Works perfect ! Thank You ! :)
69-FLy-gUy
01-26-2002, 10:29 PM
I uninstalled vb then redid it. now it works!
Ciao
Wolf42
01-31-2002, 07:16 AM
@FireFly
Great Hack!! Thx!
But one question: how to get smilies into the "editreason"?
Admin
01-31-2002, 08:57 AM
You can't use smilies there...
Bimma Boy
02-03-2002, 03:43 AM
firefly,
I had this hack installed on 2.2.1 and now upgraded to 2.2.2 and it wont work anymore obviosly.. what do I do to re-install? just run the script again or wha?
Admin
02-03-2002, 01:15 PM
Run the script and choose upgrade option.
Lucky
02-05-2002, 04:10 AM
Works on mt new 2.2.2
Thanks.
Admin
02-05-2002, 07:10 AM
Heh Lucky is going over all my hacks and installing them. ;) :)
Lucky
02-05-2002, 07:43 PM
hehehe :)
Well, I have almost all of your hacks installed now.
Just one thing that has me for a whirl.
The online users like you have here in the header...
Since I upgraded to 2.2.2 I can't get it going.
I thought it had something to do with vbportal, but as far as I can see it works here on your board as it shows up on all vb and non vb pages such as your front index.php page.
Been on this for a week now with no resolve.
I have tried tubdogg as well but a no go.
Any ideas?
TIA
BrAinZ
02-05-2002, 08:37 PM
Excellent Hack.. Thanks mate !
lichtflits
02-09-2002, 08:07 AM
great hack,
but is it posible to change "why" into "reason"?
in witch file must I change this?
Admin
02-09-2002, 08:09 AM
In the template this hack adds. :)
Lucky
02-09-2002, 09:07 AM
Originally posted by lichtflits
great hack,
but is it posible to change "why" into "reason"?
in witch file must I change this?
in postbit_editedreson
Admin
02-09-2002, 09:20 AM
Yes, that template. I forgot its name. ;)
lichtflits
02-09-2002, 09:45 AM
thx.
It's :up:
waddy
02-09-2002, 01:05 PM
Shame on me :
I have the Reason for Edit Box ... I can type in there .... Hit the edit post button and nothing appears
Just edited by ......
Uninstalled and reinstalled the scipt and files 3 times...
Show the 'Edited by xxx on yyy' when a post is edited? = ON
Show 'edited by' for admins? = ON
any ideas please ?
X-Fan
02-11-2002, 11:18 PM
Works beautifully and will definitely be handy for my boards' mods. Thanks!!!!!
w00t-0wner
02-17-2002, 06:46 PM
in editpost.php replace
if ($showeditedby and $postinfo[dateline]<(time()-($noeditedbytime*60)) and !($getperms[ismoderator] and !$showeditedbyadmin)) {
with
if ($showeditedby and $postinfo[dateline]<(time()-($noeditedbytime*60)) and !($getperms[ismoderator] and !$showeditedbyadmin) or $editreason ) {
now the reason and time of edit _always_ shows up when a reason is given.
tested on vb 2.2.2
Ice Man_00
02-24-2002, 10:51 PM
Something i did wron here.... hope not.. really love this hack, but need some help..
I added it, no problems at all.. Really sucsess to add it, but when editing only thing i can see it the last edited by:
No reason there. Help, plz ?!?!?!?
Stylez
03-06-2002, 01:14 AM
yus, i got it to work, thanks to wo0t-owner. i did everything else but it didnt work, until i edited editpost.php with that.
lowlight
03-08-2002, 11:47 PM
If you could post an update to work with VB 2.2.3, that would be excellent :D
Admin
03-09-2002, 04:52 AM
It works fine AFAIK.
lowlight
03-10-2002, 09:20 PM
Not for me... It disappeared, and the install script didn't work when I tried it again
Admin
03-11-2002, 11:17 AM
More detail about the not working part would be helpful. :)
ZiRu$
03-18-2002, 04:12 AM
[QUOTE]Originally posted by waddy
Shame on me :
I have the Reason for Edit Box ... I can type in there .... Hit the edit post button and nothing appears
Just edited by ......
Uninstalled and reinstalled the scipt and files 3 times...
Show the 'Edited by xxx on yyy' when a post is edited? = ON
Show 'edited by' for admins? = ON
any ideas please ?
ZiRu$
03-18-2002, 04:23 AM
i also noticed you have some called "editreason" and some called "editedreason"
I tried renameing every editreason to editedreason and that never worked!!!!!!!
Admin
03-18-2002, 10:32 AM
If you upgraded your vBulletin board you must run the install script again to install the new templates.
ZiRu$
03-18-2002, 12:11 PM
[QUOTE]Originally posted by FireFly
If you upgraded your vBulletin board you must run the install script again to install the new templates.
ZiRu$
03-19-2002, 03:52 AM
bumping
Admin
03-19-2002, 05:11 AM
It's not a problem in my coding, because obviously this works for everyone else. Double check that you have done everything correct.
ZiRu$
03-19-2002, 01:03 PM
i have
Crazy Mofo
04-13-2002, 02:47 AM
ooooops
adtestvb
05-06-2002, 05:47 AM
im having the same problem, i cant get it to dispaly the reason for edit in the post. i tired the fix a few post up also
Admin
05-06-2002, 11:32 AM
Have you just upgraded or something?
adtestvb
05-06-2002, 04:08 PM
nope. 2.2.2 and all the code the hack called for was there, it added the database stuff also
Thanks Firefly
Works flawlessly
FleaBag
05-21-2002, 10:12 PM
Working well on 2.2.5. Thanks FireFly!
SWRoleplay.com
05-30-2002, 10:41 PM
Testing
Mone'
06-01-2002, 04:02 AM
working great on 2.2.6 ;)
testing.............
Kyle_TX
06-09-2002, 10:31 PM
I'm having the same problem on my boards. I installed it and even checked over it all several times and it won't show the reason for edit in the posts. I can put in a reason when I edit.. that shows up fine. But once I submit, it's not in the post. I'm going to try uninstalling it and re-installing and see if that helps.
Kyle_TX
06-09-2002, 10:41 PM
ok, That fixed it. For some reason, there was an error the first time I installed it. It didn't do everything that it was suppose to do. All I did was uninstall, reinstall and it worked. I didn't even have to edit anything. :)
Great hack!
Crunch
06-10-2002, 11:09 AM
only hack i havent been able to install. how strange. maybe its 2.2.6?
Boofo
06-10-2002, 03:27 PM
Mine was working fine already but I tried this to see what it would do and it is great! I can leave the "show edited by" turned off for the Admin and it will still show the "edited by and reason" ONLY if I put in a reason. If I do not put in a reason, the edited by never shows up. This is great for correcting spelling errors or minor stuff and not having to keep turning it on and off for the Admin to get the edit reason to show. Thanks a lot! :)
(Works great on vb 2.2.5 by the way)
Originally posted by w00t-0wner
in editpost.php replace
with
now the reason and time of edit _always_ shows up when a reason is given.
tested on vb 2.2.2
Crunch
06-11-2002, 04:50 AM
ahh i know what it is. the template was never added. what is the info I put in there?
FleaBag
06-19-2002, 08:14 PM
Seems to be working well on 2.2.6. :)
Admin
06-20-2002, 05:10 AM
Ahhhh!!!!!
FleaBag
06-20-2002, 09:16 AM
Ahhhh? LOL... :)
Massiel
06-20-2002, 11:08 AM
Does this hack work with version 2.2.2? Pretty cool Firefly!
ezrotunda
07-08-2002, 03:06 PM
test
Joshua Clinard
08-30-2002, 11:48 PM
I have followed these instructions to a T, and it does not show the reason. The edit box does show. I cannot figure this one out. Can someone please help!
FleaBag
09-03-2002, 02:12 AM
Works well on 2.2.7, thanks. ;)
neocorteqz
09-16-2002, 07:19 AM
Nice, Something I can use. Installing in a sec.
Thanks.
edit:
Works Great Thanks.:)
PHiXTiT
09-16-2002, 02:14 PM
Great work ole buddy ole pal!
5 StArZ
Hrm. I've made the changes and I'm getting the error, or lack of, that a few others seem to have. I have version 2.2.6. Made changes to functions.php and editpost.php, as well as the postbit and editpost templates.
Everything seems to show up right, edit reason box and all. But when submitting (with reason), nothing shows up on the post. :(
neocorteqz
10-01-2002, 09:52 AM
Is it not showing up for all members? Or just Super mods and admins? If so then you need to enable Show edit for Admins, in your Admin CP.:)
If it's for all users, i made the mistake of forgetting a step. Go back and try again.
Good Luck.:)
btw, works great in 2.2.7:)
NTLDR
10-01-2002, 11:08 AM
Originally posted by Rose
Hrm. I've made the changes and I'm getting the error, or lack of, that a few others seem to have. I have version 2.2.6. Made changes to functions.php and editpost.php, as well as the postbit and editpost templates.
Everything seems to show up right, edit reason box and all. But when submitting (with reason), nothing shows up on the post. :(
I make a few changes to do what rose wanted with show edited by admins switched to off. Working fine on 2.2.8 too ;)
*hehe* Yep yep. Thanks NTLDR for getting it fixed. I almost forget to come back to this thread. :D
leon2u
10-22-2002, 08:03 PM
test
FleaBag
10-28-2002, 11:14 PM
Working with 2.2.8. Thanks.... :D
yxboom
04-12-2003, 07:21 PM
Ungh! Everything works but just like 10 others before stated the Edited reason doesn't show up. The Edited by does but only the Edited Reason.
Boofo
04-12-2003, 11:55 PM
I am running 2.2.9 and the edit reason shows up fine on my site. I just tested it with a registered user and it is there.
Boofo
04-12-2003, 11:56 PM
10-01-02 at 07:02 AM NTLDR said this in Post #108 (https://vborg.vbsupport.ru/showthread.php?postid=304569#post304569)
I make a few changes to do what rose wanted with show edited by admins switched to off. Working fine on 2.2.8 too ;)
What did you do, may I ask? ;)
BrAinZ
04-28-2003, 09:44 PM
Does it work on 2.3.0 ??
neocorteqz
04-29-2003, 01:14 AM
[QUOTE]Today at 06:44 PM BrAinZ said this in Post #115 (https://vborg.vbsupport.ru/showthread.php?postid=388634#post388634)
Does it work on 2.3.0 ??
RetroDreams
05-03-2003, 03:23 AM
Just testing
RetroDreams
05-07-2003, 01:32 PM
It doesn't post the reason for my most recent post, but any other post it works correctly?
Why is this?
Look at my post above... it wouldn't let me edit until I posted again in this thread.
padblaz
05-23-2003, 06:30 AM
so simple and so useful :)
thanks for this great hack
Sam FT
06-24-2003, 07:13 PM
Awesome hack going to test this out.
-Sidekick-
06-24-2003, 07:47 PM
Did anyone ever modify this so it works for mods and admins only?
Oblivion Knight
07-14-2003, 07:51 PM
Nice little mod..
Would there be any way to remove the reason by editing the post again and clearing the "reason for edit"? At the moment when doing this, the previous comment stays and isn't removed.
I installed the little change to editpost.php that w00t-0wner posted earlier in this thread.
father max
09-01-2003, 06:06 PM
still catching up to install hacks that have been around a long while...this one seems like it should come with...
thank you...
: )
]|fre$h-LoRd|[
12-22-2003, 06:52 PM
Great idea, thank you!
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.