Regular expression for word filter

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
Lsha
Registered User
Posts: 61
Joined: Mon Feb 25, 2019 10:38 am

Regular expression for word filter

Post by Lsha » Fri Oct 04, 2019 10:32 pm

is there anyway we can use regular expression for word filter

User avatar
Exclusive
Registered User
Posts: 421
Joined: Mon Jun 25, 2018 1:33 pm

Re: Regular expression for word filter

Post by Exclusive » Sat Oct 05, 2019 2:19 am

Do you mean word censoring?
Use Search Button to get Instant Results | Follow Forum Rules
Avoid Spams in the forum to prevent banning the offending account. | ⟿ Visit My Awesome phpBB Forum! ⬳

Get The Best Web Hosting | ✔ Buy Cheap Domain Names

Lsha
Registered User
Posts: 61
Joined: Mon Feb 25, 2019 10:38 am

Re: Regular expression for word filter

Post by Lsha » Sat Oct 05, 2019 6:55 am

yes, word censoring

i6eal
Registered User
Posts: 4
Joined: Fri Oct 04, 2019 11:44 am

Re: Regular expression for word filter

Post by i6eal » Sat Oct 05, 2019 12:31 pm

I would do it like so:

create an array with all the bad words ["fuck","shit", ...], create a funktion to run after the post/comment is created and iterate through the bad words array and censor all the bad words with i.E. ******.

User avatar
canonknipser
Registered User
Posts: 2096
Joined: Thu Sep 08, 2011 4:16 am
Location: Germany
Name: Frank Jakobs
Contact:

Re: Regular expression for word filter

Post by canonknipser » Sat Oct 05, 2019 7:18 pm

That function is builtin with phpBB and is called "word censoring", working when any part of a word contains a censored word.

I guess the OP wants something working with regular expressions, which will be beyond the scope of a regular phpBB admin :oops:
Greetings, Frank
phpbb.de support team member
English is not my native language - no support via PM or mail
New arrival - Extensions and scripts for phpBB

Lsha
Registered User
Posts: 61
Joined: Mon Feb 25, 2019 10:38 am

Re: Regular expression for word filter

Post by Lsha » Sat Oct 05, 2019 7:21 pm

@canonknipser

thanks for the confirmation

Post Reply

Return to “[3.2.x] Support Forum”