Err... No offsense, dude, but do you check your hacks before posting them?
You have both syntax and logic error in your hack...
Syntax error:
if ($npwlength > 0 AND $npwlength <= 7{
Don't you need a closing ')' before '{'???
Logic error:
It says:
if ($npwlength > 0 AND $npwlength <= 7{
If you want your password to be not less than 7 characters in length, then it logically follows that it will be more than 0 characters. Therefore, the first part of the condition does not make any sense.
A final, more valid, condition would be:
if ($npwlength <= 7) {

But anyway, this is a nice hack, and I am going to install it when you finish developing it