After a lot of thinking, reading and programming I have successfully add a strength meter to the original password plugin. I use it since Roundcube version 1.2.2 with no issues, so far.
The strength meter has both javascript and php code. The javascript code came from here:
https://stackoverflow.com/questions/948172/password-strength-meter/11268104#11268104while the php (which mathematically is the same as the javascript code) from here:
http://pastie.org/8889985We will need a working Roundcube installation with the password plugin enabled (and also working). The directions below are the same for every version (at least, after v1.2.2) of Roundcube. Where given, the line numbers are relate to Roundcube v1.3.6.
The files that need to be changed are:
<Roundcube installation directory>/program/lib/Roundcube/html.php
and
<Roundcube installation directory>/plugins/password/localization/en_US.inc (or any other language needed)
<Roundcube installation directory>/plugins/password/config.inc.php
<Roundcube installation directory>/plugins/password/password.js
<Roundcube installation directory>/plugins/password/password.php
File ../program/lib/Roundcube/html.phpadd value to array $common_attrib (line 34): 'name'
add value to array $allowed (line 402 to 407): 'onkeyup'
and save file html.php
File ../plugins/password/localization/en_US.incafter the $labels = array();
add
$labels['passwdstrength'] = 'New password strength:';
and after $messages = array();
add
$messages['passwordstrength'] = 'New password is easy to guess, please try again.';
and save file en_US.inc
File ../plugins/password/config.inc.phpadd $config['password_strength'] = <required password strength - number>;
and save file config.inc.php
File ../plugins/password/password.js (attached)lines 56 and 57 are changing the color according to password strength. With a bit more programming these values could go to config.inc.php.
File password.php will follow.
PS: I couldn't put the images inline...