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)
-   -   Miscellaneous Hacks - Thread/Post Title Characters (https://vborg.vbsupport.ru/showthread.php?t=324059)

MarkFL 12-22-2016 10:00 PM

Thread/Post Title Characters
 
1 Attachment(s)
Overview:

This simple product allows you to define what chracters will be permitted in thread/post titles using regex. You may elect to use HTML5 form validation when the user's browser supports it, but if you choose not to use this method, or the user's browser doesn't support it, then a message will be displayed above the editor block advising the user that they have illegal characters in their thread/post title if applicable. They will not be allowed to submit their post until the title has the illegal characters removed. You may define the CSS applied to the error message.

If a user has illegal characters in their thread/post title, and you have HTML5 form validation on and the user's browser supports the validation, then when they attempt to preview or submit their post, they will see something like:

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

Otherwise, they will see something like:

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

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, 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. Follow AdminCP -> Plugins & Products -> Manage Products -> Add/Import Product.
  3. Click on "Choose File" and browse to the product .xml file that was packaged in the .zip file.
  4. Click "Import."
  5. You MUST enable the product in the settings before it will function.
  6. Configure the remaining settings to your liking. Each setting has a detailed explanation of its use.

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

Support for this product can be found here:

Snowhog 12-23-2016 07:30 PM

MarkFL has cited me as a Co-Author of this MOD, but my contribution was a request to vBulletin for a MOD that would do this. I don't write vBulletin MODS. I don't have the knowledge or skills to do so, rather, I'm an 'idea guy'.

I am continually amazed at the support I receive here in this Forum. Several members; MarkFL among them; have been willing and able to assist me in developing unique tools (MODs/Plugins) that address specific concerns I have in our Forum. This MOD/Plugin addresses a likely unique situation that has happened on our Forum due to our use of ZB Block. In short, it will greatly minimize (if not entirely prevent) Post/Thread Titles from being interpreted by ZB Block as possible SQL Injection vectors, a condition that has happened when non-alphanumeric characters were used.

Thank you MarkFL!

MarkFL 12-23-2016 07:38 PM

Glad to help out, Paul...and if others find this useful then that's just icing on the cake. :D

Stratis 12-24-2016 01:50 PM

I assume this only works with English language? with a little try.
I did not manage to make it work in Greek [Α-Ω] :)

MarkFL 12-24-2016 02:29 PM

Yes, as it stands now, non-Latin characters are not supported.

Snowhog 12-25-2016 09:11 PM

I changed "illegal" to "prohibited" in the message text. Comes across a little bit nicer and accurately conveys what "we" are doing; prohibiting the use of all but the allowed characters shown in the message.

MarkFL 12-25-2016 10:08 PM

Quote:

Originally Posted by Snowhog (Post 2579876)
I changed "illegal" to "prohibited" in the message text. Comes across a little bit nicer and accurately conveys what "we" are doing; prohibiting the use of all but the allowed characters shown in the message.

That was one reason I phrased the messages, so they can be customized and translated. :)

Snowhog 12-26-2016 08:37 PM

Would you change the word illegal to prohibited in the Overview?

Snowhog 01-02-2017 12:32 AM

Discovered a problem.

If one has Require Threads to have a Prefix in Forum Manager set to Yes, this MOD is triggered. Not what we want.

MarkFL 01-02-2017 08:43 AM

Quote:

Originally Posted by Snowhog (Post 2580166)
Discovered a problem.

If one has Require Threads to have a Prefix in Forum Manager set to Yes, this MOD is triggered. Not what we want.

I'm not getting this behavior on my local dev site. :confused:


All times are GMT. The time now is 09:57 PM.

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.00992 seconds
  • Memory Usage 1,739KB
  • 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
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete