Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Thread/Post Title Characters Details »
Thread/Post Title Characters
Mod Version: 2.0, by MarkFL (Moderator) MarkFL is online now
Developer Last Online: Mar 2017 I like it Show Printable Version Email this Page

vB Version: 4.2.x Rating: (1 vote - 5.00 average) Installs: 5
Released: 23 Dec 2016 Last Update: Never Downloads: 21
Supported Uses Plugins Auto-Template Re-usable Code Translations  

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:



Otherwise, they will see something like:



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.

Download Now

Only licensed members can download files, Click Here for more information.

Supporters / CoAuthors

Screenshots

Click image for larger version

Name:	markfl_alphanum_html5.png
Views:	265
Size:	7.6 KB
ID:	155592   Click image for larger version

Name:	markfl_alphanum_nohtml5.png
Views:	271
Size:	8.8 KB
ID:	155593   Click image for larger version

Name:	markfl_alphanum_acp.png
Views:	291
Size:	43.9 KB
ID:	155594  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
New Posting Features Minimum Characters Per Thread Title Atakan KOC vBulletin 3.6 Add-ons 13 13 Nov 2014 11:38
Add spanish characters/ or other language characters kypdurron vBulletin 2.x Beta Releases 3 24 Feb 2007 20:51

Comments
  #2  
Old 23 Dec 2016, 20:30
Snowhog's Avatar
Snowhog Snowhog is offline
 
Join Date: Oct 2011
Real name: Paul L
Thumbs up Thank you

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!
__________________
"It is a capital mistake to theorize in advance of the facts." - Sherlock Holmes
Kubuntu Forums . Net | ZB BLOCK | StopForumSpam
Reply With Quote
  #3  
Old 23 Dec 2016, 20:38
MarkFL's Avatar
MarkFL MarkFL is online now
 
Join Date: Feb 2014
Real name: Mark
Glad to help out, Paul...and if others find this useful then that's just icing on the cake.
__________________
Reply With Quote
  #4  
Old 24 Dec 2016, 14:50
Stratis's Avatar
Stratis Stratis is offline
 
Join Date: Jan 2010
Real name: Stratis
I assume this only works with English language? with a little try.
I did not manage to make it work in Greek [Α-Ω]
Reply With Quote
  #5  
Old 24 Dec 2016, 15:29
MarkFL's Avatar
MarkFL MarkFL is online now
 
Join Date: Feb 2014
Real name: Mark
Yes, as it stands now, non-Latin characters are not supported.
__________________
Reply With Quote
  #6  
Old 25 Dec 2016, 22:11
Snowhog's Avatar
Snowhog Snowhog is offline
 
Join Date: Oct 2011
Real name: Paul L
Message word change

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.
__________________
"It is a capital mistake to theorize in advance of the facts." - Sherlock Holmes
Kubuntu Forums . Net | ZB BLOCK | StopForumSpam
Reply With Quote
  #7  
Old 25 Dec 2016, 23:08
MarkFL's Avatar
MarkFL MarkFL is online now
 
Join Date: Feb 2014
Real name: Mark
Originally Posted by Snowhog View Post
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.
__________________
Reply With Quote
  #8  
Old 26 Dec 2016, 21:37
Snowhog's Avatar
Snowhog Snowhog is offline
 
Join Date: Oct 2011
Real name: Paul L
Replace illegal with prohibited

Would you change the word illegal to prohibited in the Overview?
__________________
"It is a capital mistake to theorize in advance of the facts." - Sherlock Holmes
Kubuntu Forums . Net | ZB BLOCK | StopForumSpam
Reply With Quote
  #9  
Old 02 Jan 2017, 01:32
Snowhog's Avatar
Snowhog Snowhog is offline
 
Join Date: Oct 2011
Real name: Paul L
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.
__________________
"It is a capital mistake to theorize in advance of the facts." - Sherlock Holmes
Kubuntu Forums . Net | ZB BLOCK | StopForumSpam
Reply With Quote
  #10  
Old 02 Jan 2017, 09:43
MarkFL's Avatar
MarkFL MarkFL is online now
 
Join Date: Feb 2014
Real name: Mark
Originally Posted by Snowhog View Post
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.
__________________
Reply With Quote
  #11  
Old 02 Jan 2017, 17:01
Snowhog's Avatar
Snowhog Snowhog is offline
 
Join Date: Oct 2011
Real name: Paul L
I've set Require Threads to have a Prefix to No and the MOD doesn't get triggered. We have only one forum where I had this requirement, which is why I hadn't noticed this before this. All our other forums don't have this as a requirment.

All Thread Prefixes I created are encased in [], so I thought it was those characters triggering the MOD (they aren't in the defined approved character list). I added them to the approved characters, but that forum was still being triggered by the MOD if I had Require Threads to have a Prefix set to Yes, even when the Thread Title contained only alpha-numeric characters.

Can you suggest what I might want to examine to help why this is happening on our site and not yours?
__________________
"It is a capital mistake to theorize in advance of the facts." - Sherlock Holmes
Kubuntu Forums . Net | ZB BLOCK | StopForumSpam

Last edited by Snowhog; 02 Jan 2017 at 17:09.
Reply With Quote
  #12  
Old 02 Jan 2017, 18:43
MarkFL's Avatar
MarkFL MarkFL is online now
 
Join Date: Feb 2014
Real name: Mark
My prefixes are also wrapped in square brackets, and I did not add the brackets to the approved character list, and I changed one of my forums to require a prefix, and the title did not cause an error, unless there were illegal characters actually in the title.

At the moment, I have no idea why you are getting this issue on your site.
__________________
Reply With Quote
  #13  
Old 02 Jan 2017, 19:51
Snowhog's Avatar
Snowhog Snowhog is offline
 
Join Date: Oct 2011
Real name: Paul L
For the time being I'm keeping the Require Threads to have a Prefix in the affected forum set to No, and have unchecked the two Prefix sets.

Something else I noticed. Adding ' to the character set and clicking on Post New Thread resulted in the entire site page not loading; just a blank page.

1st image: Preview of new thread when Thread Prefix is required.
2nd image: Preview of new thread when Thread Prefix is not required.
3rd image: MOD settings.
4th image: Affected forum Features settings.
5th image: Our installed products (1st page)
6th image: Our installed products (2nd page)
Attached Images
File Type: jpg WithMODEnabled.jpg (65.0 KB, 4 views)
File Type: jpg WithMODDisabled.jpg (56.7 KB, 4 views)
File Type: jpg MODSettings.jpg (59.0 KB, 4 views)
File Type: jpg ForumFeatures.jpg (35.3 KB, 3 views)
File Type: jpg InstalledProducts1.jpg (73.5 KB, 2 views)
File Type: jpg InstalledProducts2.jpg (77.0 KB, 2 views)
__________________
"It is a capital mistake to theorize in advance of the facts." - Sherlock Holmes
Kubuntu Forums . Net | ZB BLOCK | StopForumSpam
Reply With Quote
  #14  
Old 02 Jan 2017, 20:23
MarkFL's Avatar
MarkFL MarkFL is online now
 
Join Date: Feb 2014
Real name: Mark
You will have to escape that character...add \' to the allowed characters. You will also need to escape the dash and the forward slash. Use:

[a-zA-Z0-9\,\-\/\' ]
__________________
Reply With Quote
  #15  
Old 02 Jan 2017, 20:51
Snowhog's Avatar
Snowhog Snowhog is offline
 
Join Date: Oct 2011
Real name: Paul L
My brother-in-law and I were just discussing this issue, and he asked if I had escaped any of the non-alphanumeric characters. I hadn't, but didn't think I needed to (should have known better -- Regular Expression rules ya know).

Just escaped them and no false triggering of the MOD. Interestingly, it also answers (I think) why the MOD was being triggered when the title contained only alpha-numeric characters; it was triggered because I had unescaped characters in the MOD list! At least, that's what I think is/was the cause, as with those characters now properly escaped, a title with only alpha-numeric characters doesn't trigger the MOD.

Thank you very much.
__________________
"It is a capital mistake to theorize in advance of the facts." - Sherlock Holmes
Kubuntu Forums . Net | ZB BLOCK | StopForumSpam
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


New To Site? Need Help?

All times are GMT. The time now is 06:03.

Layout Options | Width: Wide Color: