Check & Display Password Strength [Paid] [Deleted]

Gopala Subramanium

Active member
Gopala Subramanium submitted a new resource:

Check & Display Password Strength (version 1.0.3) - Check and display the strength of the password entered by the user during registration/change

This is a very simple add-on to check and display the strength of the password entered by the user during registration/password change. It checks the following conditions to create secure password:
  • The password must contain greater than 6 character
  • The password must have both lower and uppercase characters
  • The password must have at least one number
  • The password must have at least one special character
You need to have...

Read more about this resource...
 
I don't like the idea of having to sign up on another site just to download the addon.

Will give your addon a try anyways, looks pretty useful.
 
Sorry, but I want to maintain all my resouce publishing and updates on FixMyStuff.In going forward. All registered user, if they don't want to be a part of the community, always have the option delete their account [Another wonderful add-on by Chris]. Thanks,
 
Sorry, but I want to maintain all my resouce publishing and updates on FixMyStuff.In going forward. All registered user, if they don't want to be a part of the community, always have the option delete their account [Another wonderful add-on by Chris]. Thanks,
How would you deal with pirated users then? Since your copy of RM only requires registration to download.
 
My resources are free, it's beyond my scope to stop piracy :( , hence no worries, let the pirates maintain their resource manager updated all the time :)
 
Just thought I would kindly let you know that this add-on does not seem to work in XenForo 1.2

Don't expect you to rush on this. It is after all only a beta. But thought you should know. :)
 
Just thought I would kindly let you know that this add-on does not seem to work in XenForo 1.2

Don't expect you to rush on this. It is after all only a beta. But thought you should know. :)

Sorry for the delay in reply but I'll update all my addons after the final release of xenForo 1.2 as i'll remove the dependency of TMS for my add-ons.
 
XenForo 1.2 patch

Originally I had reported this doesn't work, because I had forgotten that it depends on TMS which isn't supported in XenForo 1.2. However.... XenForo does have its own Template Modification System (TMS) and so if you apply the code manually it does work. :)

Template: register_form

Search for:
PHP:
<dd><input type="password" name="password" class="textCtrl OptOut" id="ctrl_password" autocomplete="off" /></dd>


Replace with:

PHP:
<script language="javascript" type="text/javascript">
function pwdStrength(password)
{
  var desc = new Array();
  desc[0] = "<font color='red'>Very Weak</font>";
  desc[1] = "<font color='red'>Weak</font>";
  desc[2] = "<font color='orange'>Better</font>";
  desc[3] = "<font color='orange'>Medium</font>";
  desc[4] = "<font color='green'>Strong</font>";
  desc[5] = "<font color='green'>Strongest</font>";
  var score  = 0;
  //if password bigger than 6 give 1 point
  if (password.length > 6) score++;
  //if password has both lower and uppercase characters give 1 point
  if ( ( password.match(/[a-z]/) ) && ( password.match(/[A-Z]/) ) ) score++;
  //if password has at least one number give 1 point
  if (password.match(/\d+/)) score++;
  //if password has at least one special caracther give 1 point
  if ( password.match(/.[!,@,#,$,%,^,&,*,?,_,~,-,(,)]/) ) score++;
  //if password bigger than 12 give another 1 point
  if (password.length > 12) score++;
  document.getElementById("pwdDescription").innerHTML = desc[score];
  document.getElementById("pwdStrength").className = "strength" + score;
}
</script>
<dd><input type="password" name="password" class="textCtrl OptOut" id="ctrl_password" autocomplete="off" onkeyup="pwdStrength(this.value)">
<div id="pwdDescription" class="explain" style="color: red""></div></dd>

Save :D

Next in template: account_security

search for

PHP:
dd><input type="password" name="password" value="" dir="ltr" class="textCtrl" id="ctrl_password" /></dd>

replace with

PHP:
<script language="javascript" type="text/javascript">
function pwdStrength(password)
{
  var desc = new Array();
  desc[0] = "<font color='red'>Very Weak</font>";
  desc[1] = "<font color='red'>Weak</font>";
  desc[2] = "<font color='orange'>Better</font>";
  desc[3] = "<font color='orange'>Medium</font>";
  desc[4] = "<font color='green'>Strong</font>";
  desc[5] = "<font color='green'>Strongest</font>";
  var score  = 0;
  //if password bigger than 6 give 1 point
  if (password.length > 6) score++;
  //if password has both lower and uppercase characters give 1 point  
  if ( ( password.match(/[a-z]/) ) && ( password.match(/[A-Z]/) ) ) score++;
  //if password has at least one number give 1 point
  if (password.match(/\d+/)) score++;
  //if password has at least one special caracther give 1 point
  if ( password.match(/.[!,@,#,$,%,^,&,*,?,_,~,-,(,)]/) ) score++;
  //if password bigger than 12 give another 1 point
  if (password.length > 12) score++;
  document.getElementById("pwdDescription").innerHTML = desc[score];
  document.getElementById("pwdStrength").className = "strength" + score;
}
</script>
<dd><input type="password" name="password" class="textCtrl OptOut" id="ctrl_password" onkeyup="pwdStrength(this.value)">
<div id="pwdDescription" class="explain" style="color: red""></div></dd>

SAVE. :D

Simple, easy, and I'm sorry I overlooked it.
 
Last edited:
this one looks better :p
Başlıksız-1.webp

Code:
<script language="javascript" type="text/javascript">
function pwdStrength(password)
{
        var desc = new Array();
        desc[0] = "<font color='black' style='background: red; border-right: 1px solid rgb(124, 0, 0); border-bottom: 1px solid rgb(124, 0, 0); height: 20px; line-height: 20px; display: block; '>Very Weak</font>";
        desc[1] = "<font color='black' style='background: rgb(255, 113, 113); border-right: 1px solid rgb(252, 67, 67); border-bottom: 1px solid rgb(252, 67, 67); height: 20px; line-height: 20px; display: block; '>Weak</font>";
        desc[2] = "<font color='black' style='background: rgb(255, 121, 69); border-right: 1px solid rgb(255, 71, 0); border-bottom: 1px solid rgb(255, 71, 0); height: 20px; line-height: 20px; display: block; '>Better</font>";
        desc[3] = "<font color='black' style='background: rgb(255, 173, 69); border-right: 1px solid rgb(224, 125, 0); border-bottom: 1px solid rgb(224, 125, 0); height: 20px; line-height: 20px; display: block; '>Medium</font>";
        desc[4] = "<font color='black' style='background: rgb(35, 173, 0); border-right: 1px solid rgb(40, 107, 22); border-bottom: 1px solid rgb(40, 107, 22); height: 20px; line-height: 20px; display: block; '>Strong</font>";
        desc[5] = "<font color='black' style='background: rgb(48, 219, 3); border-right: 1px solid rgb(42, 148, 11); border-bottom: 1px solid rgb(42, 148, 11); height: 20px; line-height: 20px; display: block; '>Strongest</font>";
        var score  = 0;
        //if password bigger than 6 give 1 point
        if (password.length > 6) score++;
        //if password has both lower and uppercase characters give 1 point     
        if ( ( password.match(/[a-z]/) ) && ( password.match(/[A-Z]/) ) ) score++;
        //if password has at least one number give 1 point
        if (password.match(/\d+/)) score++;
        //if password has at least one special caracther give 1 point
        if ( password.match(/.[!,@,#,$,%,^,&,*,?,_,~,-,(,)]/) ) score++;
        //if password bigger than 12 give another 1 point
        if (password.length > 12) score++;
        document.getElementById("pwdDescription").innerHTML = desc[score];
        document.getElementById("pwdStrength").className = "strength" + score;
}
</script>
<dd><input type="password" name="password" class="textCtrl OptOut" id="ctrl_password" autocomplete="off" onkeyup="pwdStrength(this.value)">
<div id="pwdDescription" class="explain" style="font-weight: bold;background: rgb(216, 216, 216);text-align: center;width: 150px;"></div></dd>
 
this one looks better :p
View attachment 56875

Code:
<script language="javascript" type="text/javascript">
function pwdStrength(password)
{
        var desc = new Array();
        desc[0] = "<font color='black' style='background: red; border-right: 1px solid rgb(124, 0, 0); border-bottom: 1px solid rgb(124, 0, 0); height: 20px; line-height: 20px; display: block; '>Very Weak</font>";
        desc[1] = "<font color='black' style='background: rgb(255, 113, 113); border-right: 1px solid rgb(252, 67, 67); border-bottom: 1px solid rgb(252, 67, 67); height: 20px; line-height: 20px; display: block; '>Weak</font>";
        desc[2] = "<font color='black' style='background: rgb(255, 121, 69); border-right: 1px solid rgb(255, 71, 0); border-bottom: 1px solid rgb(255, 71, 0); height: 20px; line-height: 20px; display: block; '>Better</font>";
        desc[3] = "<font color='black' style='background: rgb(255, 173, 69); border-right: 1px solid rgb(224, 125, 0); border-bottom: 1px solid rgb(224, 125, 0); height: 20px; line-height: 20px; display: block; '>Medium</font>";
        desc[4] = "<font color='black' style='background: rgb(35, 173, 0); border-right: 1px solid rgb(40, 107, 22); border-bottom: 1px solid rgb(40, 107, 22); height: 20px; line-height: 20px; display: block; '>Strong</font>";
        desc[5] = "<font color='black' style='background: rgb(48, 219, 3); border-right: 1px solid rgb(42, 148, 11); border-bottom: 1px solid rgb(42, 148, 11); height: 20px; line-height: 20px; display: block; '>Strongest</font>";
        var score  = 0;
        //if password bigger than 6 give 1 point
        if (password.length > 6) score++;
        //if password has both lower and uppercase characters give 1 point    
        if ( ( password.match(/[a-z]/) ) && ( password.match(/[A-Z]/) ) ) score++;
        //if password has at least one number give 1 point
        if (password.match(/\d+/)) score++;
        //if password has at least one special caracther give 1 point
        if ( password.match(/.[!,@,#,$,%,^,&,*,?,_,~,-,(,)]/) ) score++;
        //if password bigger than 12 give another 1 point
        if (password.length > 12) score++;
        document.getElementById("pwdDescription").innerHTML = desc[score];
        document.getElementById("pwdStrength").className = "strength" + score;
}
</script>
<dd><input type="password" name="password" class="textCtrl OptOut" id="ctrl_password" autocomplete="off" onkeyup="pwdStrength(this.value)">
<div id="pwdDescription" class="explain" style="font-weight: bold;background: rgb(216, 216, 216);text-align: center;width: 150px;"></div></dd>
Yes, of course :) Thanks
 
Top Bottom