Log in

View Full Version : New Posting Features - Prevent certain links in posts per subforum/usergroup


Disasterpiece
04-18-2011, 10:00 PM
==== QUICKINFO

This mod checks each post for certain keywords if the user is not a mod/admin in a specific subforum. If a keyword is found, the post is matched against a variety of regular expressions and if at least one disallowed string is found, the post is rejected with an understandable errormessage.

==== WHY THIS MOD?

I coded this mod so I could prevent users from posting filehost-images.
Reasons are slow pageload if those filehosters are overloaded and
most filehoster delete images after some time, so if you have a supportforum, the thread is practically useless if the images are missing.

So to make my users stop using those ugly filehosters, I coded this little plugin so they would use the vb attachment system with fast page load and unlimited lifetime. (I paid for the space so use it!)

You can use this mod for other things as well, however this is presented as "anti-filehost-mod" so if you want to use it for anything else, feel free to do so, support may be limited.

==== INSTALLATION

Download attached xml product file and upload as new addon.
You'll find all necessary settings in Settings > No Filehosts plz!
-ger for german translated addon,
-en for english translated addon.

==== CONFIGURATION

There are already a number of filters preset from links I've captured, if you know regex it'll be easy for you to add new ones, If not ask here with the link and I'll help you out if you can't figure it out by yourself.

Keywords exist, because it's much faster to perform quick-checks for certain strings than to perform slow regex-checks. So the keywords speed-up the posting process without loosing any features.

Forumids should be self-explanatory, you'll find forum-ids in your admincp or in the url to the specific forum. For each forum-id specified in the setting, the filter-rules will apply and reject posts if they contain illegal strings.

Groupids should be self-explanatory as well, noticable is that admins and mods are already filtered out by the "can_moderate" condition, so the ids 5,6,7 are only examples. If you don't want to exclude any other usergroup than the mods/admins, leave it blank.

Error Message is the text that gets displayed when a post is rejected. Use sample text or use your own, html allowed.

==== ETC

If you find more filehosts that are frequently used, share your filters here!

If you like this mod, please click "Installed" and consider a small donation to keep me motivated spreading out helpful tools for free in the future.

Report any bugs/issues that might occur!

ssslippy
04-19-2011, 03:38 PM
Is it possible to get this to check again when a user edits a post?

Disasterpiece
04-20-2011, 12:12 AM
It already does. Did you try it out yet?

If it doesn't work for you, let me know. Because it's supposed to do that too.

Alecsmith
04-20-2011, 08:42 AM
Tagged for future :)

Thanks

yahooooh
04-22-2011, 06:05 AM
thanks this will prevent new user to put links ,
i want only to prevent links betweein [URL] but not the links between [IMG]
could you help on this thanks

naisho
04-22-2011, 10:59 AM
Very good, I recently noticed that almost all pictures hosted by one of my members on photobucket.com had been deleted... I had to delete a large number of his threads and posts.

Here is the regex I added for photobucket.com:

/(http?:\/\/)?(img\.)?photobucket\.com\/[a-zA-Z0-9-_\.\\\/]+/

Possible Improvement: I think that the error message that is displayed should be phrased, so that it is displayed in the member's language.

vb_nils
01-01-2013, 07:44 AM
Exactly what I'm looking for but still in beta stage since more than 1 year.
Does any one installed it on vb4.2?
Or does someone knows if a similar mod exists?
Thank you

karabaja3
01-31-2014, 08:10 PM
Great mod?
What would happen to existing URL's when I ban them?
Will this work on v3.8?