vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Administrative and Maintenance Tools - Remove Post Edit History (from within postbits) (https://vborg.vbsupport.ru/showthread.php?t=321937)

MarkFL 02-26-2016 10:00 PM

Remove Post Edit History (from within postbits)
 
1 Attachment(s)
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.

https://vborg.vbsupport.ru/attachmen...1&d=1463551611

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.

https://vborg.vbsupport.ru/attachmen...1&d=1456557227

Support for this product can be found here:

Elixar 02-27-2016 06:26 AM

Awesome mod Mark. :)

hazem_aliraqi 02-27-2016 02:55 PM

thank you mark

Alan_SP 02-27-2016 04:23 PM

Great idea.

Stratis 02-27-2016 04:33 PM

Works perfect, nice Mod.

For future use. You have this now:
Allowed Usergroup(s)
Set the usergroup(s) allowed to remove post edit histories.

How about one more option, if it can be done.
Allowed Usergroup(s)
Set the usergroup(s) allowed to remove from there own posts edit histories.

* I have this now for use to Admins, SMods and Mods.
* If forums have experts members or else (as I have), they might want to give them the privileges to use this mod,
but only effect to there own posts. :D

Mark you Rock :)

Nirjonadda 02-27-2016 05:44 PM

Can add user option? Who user can Use this mod ?

MarkFL 02-27-2016 05:49 PM

Quote:

Originally Posted by Stratis (Post 2565760)
Works perfect, nice Mod.

For future use. You have this now:
Allowed Usergroup(s)
Set the usergroup(s) allowed to remove post edit histories.

How about one more option, if it can be done.
Allowed Usergroup(s)
Set the usergroup(s) allowed to remove from there own posts edit histories.

* I have this now for use to Admins, SMods and Mods.
* If forums have experts members or else (as I have), they might want to give them the privileges to use this mod,
but only effect to there own posts. :D

Mark you Rock :)

That will be easy to add. I will do so tonight. :)

Quote:

Originally Posted by Nirjonadda (Post 2565764)
Can add user option? Who user can Use this mod ?

Do you mean you want to permit users individually, rather than entire usergroups?

Nirjonadda 02-27-2016 06:27 PM

Yes, Enter user ID option.

MarkFL 02-27-2016 06:45 PM

Quote:

Originally Posted by Nirjonadda (Post 2565768)
Yes, Enter user ID option.

Why not just create a usergroup for that purpose?

In Omnibus 02-27-2016 08:37 PM

Quote:

Originally Posted by MarkFL (Post 2565769)
Why not just create a usergroup for that purpose?

Too easy. :D

MarkFL 02-28-2016 01:11 AM

Update - 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.

Note: If upgrading from version 1.0 to version 1.1, there is no need to re-upload the external .PHP file included in the .ZIP file.

Stratis 02-28-2016 07:53 AM

I have seen multiple button yesterday, you prevent me.

Now with this v1.1 nothing works at least for me.
Made clean install, same thing. Install v1.0 works again.
Tried this change 3-4 times.

MarkFL 02-28-2016 03:34 PM

Quote:

Originally Posted by Stratis (Post 2565788)
I have seen multiple button yesterday, you prevent me.

Now with this v1.1 nothing works at least for me.
Made clean install, same thing. Install v1.0 works again.
Tried this change 3-4 times.

I made a slight change, please try version 1.1 again. :)

Stratis 03-21-2016 06:19 AM

Quote:

Originally Posted by MarkFL (Post 2565808)
I made a slight change, please try version 1.1 again. :)

Until now i was using v1.0, v1.1 did not work to me whatever i done.

Update v1.3 works fine. Than you, very useful mod :)

MarkFL 05-18-2016 04:10 AM

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

Techno Cowboy 01-15-2017 10:47 PM

What A Cool Tool! :cool:

Will load it on my vB 4.2.5 Beta 1 test site here shortly.

Thanks...:up:

UPDATE:

Running As Should On My Beastly Build! :D

mobster46 02-03-2017 03:06 PM

Quote:

Originally Posted by MarkFL (Post 2565778)
Update - 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.

Note: If upgrading from version 1.0 to version 1.1, there is no need to re-upload the external .PHP file included in the .ZIP file.

Can I see a message before it was edited?

MarkFL 02-03-2017 03:08 PM

Quote:

Originally Posted by mobster46 (Post 2581770)
Can I see a message before it was edited?

Yes, you can compare versions by clicking on the "Edited by" link provided by vBulletin. ;)

mobster46 02-03-2017 03:11 PM

Quote:

Originally Posted by MarkFL (Post 2581771)
Yes, you can compare versions by clicking on the "Edited by" link provided by vBulletin. ;)

Is there a more practical solution to this?
2 message will be opened in the form of a pop-up window that I can see at the same moment?

mobster46 02-03-2017 03:12 PM

Quote:

Originally Posted by MarkFL (Post 2581771)
Yes, you can compare versions by clicking on the "Edited by" link provided by vBulletin. ;)

Okay, I noticed. Thank you.

X-or 03-10-2017 10:32 AM

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

Uninstalled.

BadgerDog 03-10-2017 11:15 AM

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

MarkFL 03-10-2017 02:56 PM

Quote:

Originally Posted by X-or (Post 2583595)
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 (Post 2583596)
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. :)

BadgerDog 03-10-2017 03:40 PM

Quote:

Originally Posted by MarkFL (Post 2583604)
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

MarkFL 03-11-2017 12:23 AM

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.

BadgerDog 03-11-2017 09:32 AM

1 Attachment(s)
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

MarkFL 03-11-2017 11:36 AM

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. :)

BadgerDog 03-11-2017 11:52 AM

Quote:

Originally Posted by MarkFL (Post 2583661)
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

MarkFL 03-11-2017 12:05 PM

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. :(

X-or 03-12-2017 08:44 PM

database error on cms articles still happen

MarkFL 03-12-2017 10:34 PM

Quote:

Originally Posted by X-or (Post 2583766)
database error on cms articles still happen

I am getting an issue with viewing CMS articles, but the issue doesn't come from this product.

Do you happen to have Mark Thread Unread On Edit [v2.2] installed?

X-or 03-13-2017 10:22 AM

Quote:

Originally Posted by MarkFL (Post 2583772)
I am getting an issue with viewing CMS articles, but the issue doesn't come from this product.

Do you happen to have Mark Thread Unread On Edit [v2.2] installed?

No I don't have that other mod.

The database error happens only when this post edit mod is installed and enabled. As soon as it is disabled, the error no longer happens.

I'm not 100% sure but I think there is a set of conditions for the database crash to occur
-cms article must be published
-cms article must be edited
-user must be logged in

try re-access the article then and the crash should occur

MarkFL 03-13-2017 03:16 PM

Quote:

Originally Posted by X-or (Post 2583801)
No I don't have that other mod.

The database error happens only when this post edit mod is installed and enabled. As soon as it is disabled, the error no longer happens.

I'm not 100% sure but I think there is a set of conditions for the database crash to occur
-cms article must be published
-cms article must be edited
-user must be logged in

try re-access the article then and the crash should occur

I'm having no issues accessing articles now. :confused:

X-or 03-17-2017 10:05 PM

all I know is if I uninstall this product I no longer have issues with cms ¯\_(ツ)_/¯


All times are GMT. The time now is 03:28 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01260 seconds
  • Memory Usage 1,827KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (17)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (34)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete