Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Prevent shouting in usernames. Details »»
Prevent shouting in usernames.
Version: 1.1, by Jolten Jolten is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 3.0.7 Rating:
Released: 03-16-2005 Last Update: Never Installs: 11
Re-useable Code  
No support by the author.

What's this do?
If you're like me you hate users who register with names like USERNAME. What this mini-hack does is transform all uppercase usernames upon registration to lowercase with an uppercase first letter. This "borrows" a function from the posting functions, therefore if you've got "prevent shouting" applied for posts it will also effect usernames. Preventing shouting in usernames. It will still allow all lowercase names or mixed case names to register properly.

Time to intall: less than 5 minutes
Queries: 0
Files to edit:1
Templates to edit: 0

Open register.php

find:
PHP Code:
// convert any whitespace to a single space to prevent users entering 'user    one' to look like 'user one'
    
$_POST['username'] = trim(preg_replace('#\s+#si'' '$_POST['username'])); 

BELOW it add:
PHP Code:
// prevent username shouting 
    
function fetch_no_shouting_text($text)
    {
        
// stops $text being all UPPER CASE
        
global $vboptions;
        return 
iif($vboptions['stopshouting'] AND $text == strtoupper($text), ucwords(vbstrtolower($text)), $text);
    }
    
$_POST['username'] = fetch_no_shouting_text($_POST['username']); 
Save

upload

Your done!

This does not effect users already registered. It only prevents new registrations form shouting usernames.

There shouldn't be any support needed, but if there is, I'll handle it exclusively in this thread.


Version history
-------------------------------

v1.00 //initial release

v1.1 // updated to only prevent all uppercase usernames.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 09-10-2005, 08:25 PM
007's Avatar
007 007 is offline
 
Join Date: Jan 2003
Location: United States
Posts: 872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anybody else want this for 3.5 as a plugin?? I sure would...
Reply With Quote
  #13  
Old 06-10-2006, 02:53 PM
tanyeri24 tanyeri24 is offline
 
Join Date: Feb 2005
Location: Switzerland
Posts: 229
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There a option to give cumstom characters lik if it's İ then convert to i etc..
Reply With Quote
  #14  
Old 06-10-2006, 02:55 PM
tanyeri24 tanyeri24 is offline
 
Join Date: Feb 2005
Location: Switzerland
Posts: 229
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is this hack also available for 3.5.x ?
Reply With Quote
  #15  
Old 10-12-2006, 03:27 PM
Chadi's Avatar
Chadi Chadi is offline
 
Join Date: May 2004
Location: USA
Posts: 2,043
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does this work on 3.6.2?
Reply With Quote
  #16  
Old 03-31-2008, 09:43 AM
karabaja3's Avatar
karabaja3 karabaja3 is offline
 
Join Date: Jan 2008
Posts: 143
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this is not supported for 3.6.8.?
Reply With Quote
  #17  
Old 03-31-2008, 11:43 AM
Jolten Jolten is offline
 
Join Date: Mar 2004
Posts: 749
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry. I am no longer developing anything for vBulletin. I have changed the settings to allow someone reuse this code in some other modification if they wish. And if anyone wants to update it for more modern versions of vBulletin, they have my permission.
Reply With Quote
Reply


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 10:53 AM.


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.16856 seconds
  • Memory Usage 2,263KB
  • Queries Executed 21 (?)
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
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (6)postbit
  • (7)postbit_onlinestatus
  • (7)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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete