Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons

Reply
 
Thread Tools
Thread/Post Title Characters Details »»
Thread/Post Title Characters
Version: 2.0, by MarkFL MarkFL is offline
Developer Last Online: Jun 2020 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 4.2.x Rating:
Released: 12-22-2016 Last Update: Never Installs: 12
Uses Plugins Auto-Templates
Translations  
No support by the author.

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.



Support for this product can be found here:

Download Now

File Type: zip MarkFL - Thread & Post Titles v2.0.zip (3.5 KB, 43 views)

Screenshots

File Type: png markfl_alphanum_html5.png (7.6 KB, 0 views)
File Type: png markfl_alphanum_nohtml5.png (8.8 KB, 0 views)
File Type: png markfl_alphanum_acp.png (43.9 KB, 0 views)

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
Seven Skins

Comments
  #12  
Old 01-02-2017, 04:01 PM
Snowhog's Avatar
Snowhog Snowhog is offline
 
Join Date: Oct 2011
Location: Andover, MN
Posts: 423
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #13  
Old 01-02-2017, 05:43 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
  #14  
Old 01-02-2017, 06:51 PM
Snowhog's Avatar
Snowhog Snowhog is offline
 
Join Date: Oct 2011
Location: Andover, MN
Posts: 423
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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, 0 views)
File Type: jpg WithMODDisabled.jpg (56.7 KB, 0 views)
File Type: jpg MODSettings.jpg (59.0 KB, 0 views)
File Type: jpg ForumFeatures.jpg (35.3 KB, 0 views)
File Type: jpg InstalledProducts1.jpg (73.5 KB, 0 views)
File Type: jpg InstalledProducts2.jpg (77.0 KB, 0 views)
Reply With Quote
  #15  
Old 01-02-2017, 07:23 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
  #16  
Old 01-02-2017, 07:51 PM
Snowhog's Avatar
Snowhog Snowhog is offline
 
Join Date: Oct 2011
Location: Andover, MN
Posts: 423
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.:up:
Reply With Quote
  #17  
Old 01-02-2017, 10:06 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Glad to hear all is well now!
Reply With Quote
  #18  
Old 01-21-2017, 07:35 PM
Inna Inna is offline
 
Join Date: Jul 2016
Posts: 65
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there any mod acts like this when users registering?
I mean I don't want my guest be allowed to register with non-English letters (only a-z capital and small, and 0-9)
Reply With Quote
  #19  
Old 01-21-2017, 08:03 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Inna View Post
Is there any mod acts like this when users registering?
I mean I don't want my guest be allowed to register with non-English letters (only a-z capital and small, and 0-9)
vBulletin has that feature built in...follow:

AdminCP -> Options -> Settings -> User Registration Options

Find the setting "Username Regular Expression"

and enter there:

Code:
^[A-Z0-9 ]+$
Reply With Quote
Благодарность от:
Inna
Reply

Thread Tools

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


All times are GMT. The time now is 08:36 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.04599 seconds
  • Memory Usage 2,329KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (9)post_thanks_box
  • (2)post_thanks_box_bit
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (10)postbit_attachment
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete