What's new

[WMTech] Post Guard (basic)

Allows you to specify invalid posts using regular expressions, or "post guards"
[WMTech] Post Guard (basic)
This add-on allows you to specify invalid posts using regular expressions, or "post guards". If a user attempts to submit a post which matches one of your post guards, it will fail and they will receive an error message that you specify for that post guard. You can also set guards for thread titles.

Overview Feature list Branding info Releases (1)

This add-on is now available in a fully-featured and easy-to-use >> Pro version <<

Introduction
XenForo prevents users from creating posts with no content. However there may be other types of invalid posts that you wish to prevent.

Description
This add-on allows you to specify invalid posts using regular expressions, or "post guards". If a user attempts to submit a post which matches one of your post guards, it will fail and they will receive an error message that you specify for that post guard. You can also set guards for thread titles.

Instructions
  • In admin, go to Applications -> Post Guards -> Manage
  • Click Create Post Guard.
  • Give the post guard a Label which describes what it does, a Regex that matches an invalid post, an Error Phrase that should be returned to a user if the guard is triggered, and an Applies To to set whether the guard applies to post content or thread title content.
  • Create a phrase with the name you specified (Appearance -> Phrases -> Create New Phrase), with the desired content.
    Important: this phrase should NOT be made in Master with the Add-on field set. Only add the phrase to a subordinate language (e.g. English). Alternatively, you can add it to Master with the Add-on field left blank. This is to prevent phrase loss during add-on upgrades.
The regex should match PCRE (php) style.

List of useful regex

Posts

Post is only a quote: /^\s*\[quote.?\].?\[\/quote\]\s*$/si
Post contains specific word or phrase, e.g. "apple": /\bapple\b/si
Post has more than x characters without line breaks: /^.{20,}$/m (where 20 is the number of characters)
Post has more than x characters without punctuation on a line: /[^.,\/#!$%\^&\*;:{}=\-_`~()?]{20,}?/m (where 20 is the number of characters)
Post contains an external URL: /\b(https?|ftp|file):\/\/(?!xenforo.com\b)[-A-Z0-9+&@#\/%?=~|!:,.;]*[A-Z0-9+&@#\/%=~|]/si (where xenforo.com is the local domain to permit links to)

Titles
Title has clickbaity "..." tail: /\.\.\.\s*$/
Two or more exclamation marks in a row: /!{2,}/si

Developer:

This product has been acquired from Yugensoft. If you bought your license from Yugensoft, please see this post in our announcements forum.

Product Information

XenForo 1
Seller
WebMachine Tech.
Release date
Last update
0% 0.00 star(s) 0 ratings

Pricing information

Lifetime
Free

Branding Removal

Lifetime
$25.00

Professional Installation

1 Day
$30.00

Share this product

Top