It's not possible to bulk delete posts containing a keyword, right?

Get help with installation and running phpBB 3.1.x here. Please do not post bug reports, feature requests, or extension related questions here.
Suggested Hosts
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: phpBB 3.1.x is at its End of Life stage and support will NOT be provided after July 1st, 2018.
Locked
oliverfr
Registered User
Posts: 58
Joined: Thu Jul 14, 2011 12:38 am

It's not possible to bulk delete posts containing a keyword, right?

Post by oliverfr » Wed Mar 28, 2018 9:58 pm

Hello hello!

I had that idea five minutes ago, however apparently, my google searches show me that's not a thing.

Could I please ask you for a confirmation, that there indeed is no way that could be done with a PhpBB forum, to:
-> delete every post containing a precise string of text (call it a keyword if you like) in a PhpBB forum

- The closest I found is word censoring, but it forbids/replaces the unwanted terms, it doesn't do anything like deleting the entire post.
- I also checked with pruning, but you can't rule that a post whose content matches a keyword deserves the pruning (in hindsight, that would be a cool idea though ^^ ).
- I found https://www.phpbb.com/support/docs/en/3 ... t-by-spam/, results don't match the needs here.
- I also checked if you couldn't do a forum search as a mod, and delete the matching post results - no, search results aren't bulk selectable and deletable.
- This isn't one of the features mentioned for the PhpBB Support Toolkit ( https://www.phpbb.com/support/stk/ )

I think it shows it simply can't be done. No worries if it indeed can't.

But hey, maybe I missed something, I prefer to ask for a final confirmation, thanks if you can :)

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 50583
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: It's not possible to bulk delete posts containing a keyword, right?

Post by stevemaury » Wed Mar 28, 2018 11:44 pm

It is possible with SQL to substitute, for example "text deleted" for the existing text in a post. To delete the post, revise the topic table, and synchronize all the other entries that go with posts, although possible, would be extremely difficult.

To do the former:

Code: Select all

UPDATE phpbb_posts SET post_text = REPLACE(post_text, 'some_string', 'Text deleted')
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)

User avatar
pierredu
Registered User
Posts: 931
Joined: Thu Nov 01, 2012 8:04 am
Location: Paris (France)

Re: It's not possible to bulk delete posts containing a keyword, right?

Post by pierredu » Thu Mar 29, 2018 7:22 am

I would rather use

Code: Select all

UPDATE phpbb_posts SET post_text = 'Message text deleted' where post_text LIKE '%some_string%'

Locked

Return to “[3.1.x] Support Forum”