vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Mini Mods - Caps Lock Warning (https://vborg.vbsupport.ru/showthread.php?t=166019)

alexgeek 12-23-2007 10:00 PM

Caps Lock Warning
 
What it does.
This mini-mod will detect if the password entered is in all caps and alert the user that caps lock may be on. Not much of a mod I know, but this is my first.



Step 1.

Upload tooltip.js to the your forum root (website.com/, website.com/forums/ etc.).

Step 2.
In navbar at the following at the top.
HTML Code:

<script type="text/javascript" src="tooltip.js"></script>
Step 3.
find the following in navbar or header (possibly other template, dependent on style.):
PHP Code:

<input name="vb_login_password" id="navbar_password" type="password" tabindex="102" class="forms3"  /> 

Replace it with:
PHP Code:

<input type="password" class="bginput" style="font-size: 11px" name="vb_login_password" id="navbar_password" size="10" tabindex="102" onkeydown="caps(this.value);" /> 

Done!

Test by putting caps lock on and entering a password such as "AAAA" you should get a small tooltip as a warning (may take a second to load).


German Version

alexgeek 12-24-2007 01:18 AM

Note!
If you want to use this validation in any other text inputs just add the following attribute to the <input> tag of said text input.
HTML Code:

onkeydown="caps(this.value);"
e.g. To check when giving a rep comment.
Find in reputation bit:
Code:

<input type="text" class="bginput" size="40" maxlength="250" name="reason" id="reason_$postid"/>
Add in the event:
Code:

<input type="text" class="bginput" size="40" maxlength="250" name="reason" id="reason_$postid" onkeydown="caps(this.value);" />

________________


Also, do not try to move the script include to the <head>, the object will throw an error.

skrazydogz 12-24-2007 06:23 AM

I dont find in navbar the code

Code:

<td><input type="password" class="bginput" style="font-size: 11px" name="vb_login_password" id="navbar_password" size="10" tabindex="102" /></td>
:mad:

skrazydogz 12-24-2007 06:28 AM

My step 3 is:!!!

Find in template "header"!

Code:

<input name="vb_login_password" id="navbar_password" type="password" tabindex="102" class="forms3"  />

Replace with!

Code:

<input name="vb_login_password" id="navbar_password" type="password" tabindex="102" class="forms3" onkeydown="caps(this.value);" />

Thats the right way and it goes ;):D


And the German version as attachment!

alexgeek 12-24-2007 07:07 AM

Great I've updated it.
Thanks for the translation!

skrazydogz 12-24-2007 07:24 AM

you must type "find the following in header" and not "find the following in navbar" ;)

alexgeek 12-24-2007 08:35 AM

It's in the navbar for me.

daz1967 12-24-2007 08:59 AM

it all depends on the style to where the code is, I have several skins on my site and in 70% it's in the navbar and the rest it's in the header

alexgeek 12-24-2007 10:19 AM

Updated instructions! :)

Konstantinos 12-25-2007 06:05 PM

does this work for greek posts ?


All times are GMT. The time now is 01:57 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.01043 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
  • (5)bbcode_code_printable
  • (2)bbcode_html_printable
  • (2)bbcode_php_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