Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Remove Post Edit History (from within postbits) Details »»
Remove Post Edit History (from within postbits)
Version: 1.5, by MarkFL MarkFL is offline
Developer Last Online: Jun 2020 Show Printable Version Email this Page

Category: Administrative and Maintenance Tools - Version: 4.2.x Rating:
Released: 02-26-2016 Last Update: 03-10-2017 Installs: 18
Uses Plugins
Additional Files Translations  
No support by the author.

Overview:

This simple mod allows you to give certain usergroups the ability to remove post edit histories via a button to the left of the edit history data. Clicking the button will execute an external script that removes the post's edit history from the database, with a redirect message confirming the action taken. Both the redirect and the button's tooltip are phrased, and can be found by searching in the phrase variable names for "markfl_rpeh".

There is now also a button that allows for posts to be reverted to the previous version.



Updates

Version 1.1:
  • Fixed error where multiple buttons would be displayed for threads having more than one post with a post edit history.
  • Added setting for usergroups who can remove their own post edit histories.

Version 1.2:
  • Bug with multiple buttons fixed.

Version 1.3:
  • Bug preventing button from appearing on any page of a thread except the first fixed.

Version 1.4:
  • Added button that allows posts to be reverted to the previous version.

Version 1.5:
  • Uses intrinsic datamanager functions on post revert.
  • Make sure only forum posts are affected.
  • User returned to specific post upon action performed.

Compatibility:

Tested and working on VB 4.2.x and may work on all 4.x versions of vBulletin.

Backup/Warning:

This product does not alter your database upon installation, however it is always good practice to make regular backups and you should make a backup before installing ANY new mod.

As always, products are USE AT YOUR OWN RISK. I will provide support and do my best to help but no absolute guarantee is offered.

To Install:
  1. Download and extract the attached .zip file.
  2. Upload the contents of the "upload" folder to your forum's root directory.
  3. Follow AdminCP -> Plugins & Products -> Manage Products -> Add/Import Product.
  4. Click on "Choose File" and browse to the product .xml file that was packaged in the .zip file.
  5. Click "Import."
  6. You MUST enable the product in the settings before it will function.
  7. Configure the remaining settings to your liking. Each setting has a detailed explanation of its use.



Support for this product can be found here:

Download Now

File Type: zip MarkFL - Remove Post Edit History v1.5.zip (4.9 KB, 34 views)

Screenshots

File Type: png markfl_rpeh_acp.png (42.3 KB, 0 views)
File Type: png markfl_rpeh_buttons.png (5.2 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
Alan_SP

Comments
  #22  
Old 03-10-2017, 10:32 AM
X-or X-or is offline
 
Join Date: Nov 2005
Posts: 201
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This mod is not compatible with latest vb 4.2.4 update.
Accessing a CMS article can result in a database error.

Uninstalled.
Reply With Quote
  #23  
Old 03-10-2017, 11:15 AM
BadgerDog BadgerDog is offline
 
Join Date: Oct 2006
Location: Toronto
Posts: 1,789
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed with thanks to Mark on v4.13...

It seems to work fine, except when you edit a post to perhaps add additional text etc., then after saving it, you choose to click the "Revert Post" button because you want to restore the first original post.

That "Revert Post" button then removes all edit info from bottom of the post so it appears as it it was never edited, which is probably what it should do since you've only done one edit of the original post.

However, the content showing in the post is NOT just the content of the original post you wanted to revert to, but rather the last edited post state you had saved, which included the changes you had made? If you then select EDIT POST again, you now see correctly just the content of the original post you wanted to revert to?

Is there something I'm not understanding?

Thanks...

Regards,
Doug
Reply With Quote
  #24  
Old 03-10-2017, 02:56 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by X-or View Post
This mod is not compatible with latest vb 4.2.4 update.
Accessing a CMS article can result in a database error.

Uninstalled.
Sorry, I never intended it to work with CMS, but with forum posts only...it is in fact compatible with vB 4.2.4.

In the next update, I will add a condition that prevents the button from showing up on CMS articles.

Quote:
Originally Posted by BadgerDog View Post
Installed with thanks to Mark on v4.13...

It seems to work fine, except when you edit a post to perhaps add additional text etc., then after saving it, you choose to click the "Revert Post" button because you want to restore the first original post.

That "Revert Post" button then removes all edit info from bottom of the post so it appears as it it was never edited, which is probably what it should do since you've only done one edit of the original post.

However, the content showing in the post is NOT just the content of the original post you wanted to revert to, but rather the last edited post state you had saved, which included the changes you had made? If you then select EDIT POST again, you now see correctly just the content of the original post you wanted to revert to?

Is there something I'm not understanding?

Thanks...

Regards,
Doug
That likely has to do with post caching. I may need to look into using vBulletin's intrinsic data manager rather than writing to the db.
Reply With Quote
  #25  
Old 03-10-2017, 03:40 PM
BadgerDog BadgerDog is offline
 
Join Date: Oct 2006
Location: Toronto
Posts: 1,789
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MarkFL View Post
That likely has to do with post caching. I may need to look into using vBulletin's intrinsic data manager rather than writing to the db.
Ahhh... that could be ... :up:

If you want to add something to code that forces (flushes) the cache to eliminate the residual left over text, I'd be happy to test an update for you.

Thanks Mark ...

Regards,
Doug
Reply With Quote
  #26  
Old 03-11-2017, 12:23 AM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Update - Version 1.5:
  • Uses intrinsic datamanager functions on post revert.
  • Make sure only forum posts are affected.
  • User returned to specific post upon action performed.
Reply With Quote
  #27  
Old 03-11-2017, 09:32 AM
BadgerDog BadgerDog is offline
 
Join Date: Oct 2006
Location: Toronto
Posts: 1,789
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Mark...

Updated to 1.5 and ran a test thread ..

1. Created a new thread (first post)...
2. Edited (didn't go to advanced edit) first post simply adding some text..
3. After saving the edited post, screen flashed and edited first post returned showing correctly edits post adding the new text, however, there was only the standard vbulletin edit link notification at bottom of post (see right pic). I then clicked page refresh and that link, plus your add on options appeared. (see left pic)
4.Clicked "Revert" button and web page screen cleared to a white page and froze. It didn't return to the post and I had to click on home page to work my way back to the test post.
5. The good news is when I did that and got back to the test post, it had reverted correctly to the original first post content, as it should have, plus no vBulletin edit link or your add-on option appeared any longer, whic would also be correct for your mod. The locked up white screen seems to be something new for us in 1.5.

If there's anything else we can do to help, please let use know..

Note: we do use Sucuri firewal..

https://sucuri.net/website-firewall/

It has been an outstanding product for our site to protect it from spam, viruses and added improved performance. It uses a world wide caching system, so I wonder if that's a factor.

Regards,
Doug
Attached Images
File Type: png Screen Shot 2017-03-11 at 6.24.45 AM.png (8.7 KB, 0 views)
File Type: png Screen Shot 2017-03-11 at 6.24.23 AM.png (7.6 KB, 0 views)
Reply With Quote
  #28  
Old 03-11-2017, 11:36 AM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello Doug,

I suspect the white screen you got is an issue with using vB 4.1.x, as I'm not getting that on my local dev site running vB 4.2.5. The buttons don't appear immediately after using the quick editor, only the advanced editor but I don't consider that much of an issue since you would typically use this on the posts of others.
Reply With Quote
  #29  
Old 03-11-2017, 11:52 AM
BadgerDog BadgerDog is offline
 
Join Date: Oct 2006
Location: Toronto
Posts: 1,789
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MarkFL View Post
Hello Doug,

I suspect the white screen you got is an issue with using vB 4.1.x, as I'm not getting that on my local dev site running vB 4.2.5. The buttons don't appear immediately after using the quick editor, only the advanced editor but I don't consider that much of an issue since you would typically use this on the posts of others.
Thanks Mark..

I didn't get the white screen hang with v1.4, so something changed in 1.5 that has caused the hanging white screeninteraction.

Appreciate your efforts, but I'll uninstall the mod, since it's unlikely to work with our site at this point...

Regards,
Doug
Reply With Quote
  #30  
Old 03-11-2017, 12:05 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I made only one change to the removal portion of the script, and this change is also in the revert portion, so it's odd that the removal portion gives you a white screen while the revert portion doesn't.

However, as I said, I can't replicate the issue. Sorry about that.
Reply With Quote
  #31  
Old 03-12-2017, 08:44 PM
X-or X-or is offline
 
Join Date: Nov 2005
Posts: 201
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

database error on cms articles still happen
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:10 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.09693 seconds
  • Memory Usage 2,356KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (1)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (5)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete