Hello everyone
This trick allows you how to add the "Show My Password" option when a member wants to log on to your forum. This tip is compatible for all versions including the modern mobile version.
Screen Capture
Admin Control Panel settings:
ACP HTML and JAVASCRIPT Modules - Javascript Code Management
Make sure Javascript code management is enabled:
Title: "Show the password." Placement: "On all pages"
Insert the following code for your forum version:
phpBB2 version.- Code:
$(function() { $('label[for="autologin"], .block-login label.label, .gen input[name="autologin"]').after('<br />Show My Password <input type="checkbox" class="gen" name="visumdp" id="visumdp"></input><br /><br />'); $('.box-login-btns-main, .form_login > div:last').before('<label><span class="checkbox"><input type="checkbox" name="visumdp" id="visumdp"></input><span class="checkbox-check"></span></span><span>Show My Password</span></label><br />'); $("#visumdp").on("click", function() { if ($(this).is(":checked")) { $('input[name="password"]').prop("type", "text"); } else { $('input[name="password"]').prop("type", "password"); } }); });
PhpBB3, PunBB, Invision and ModernBB versions.- Code:
$(function() { $('label[for="autologin"], .block-login label.label, .gen input[name="autologin"]').after('<br /><input type="checkbox" name="visumdp" id="visumdp"> Show My Password</input><br />'); $('.box-login-btns-main, .form_login > div:last').before('<label><span class="checkbox"><input type="checkbox" name="visumdp" id="visumdp"></input><span class="checkbox-check"></span></span><span>Show My Password</span></label><br />'); $("#visumdp").on("click", function() { if ($(this).is(":checked")) { $('input[name="password"]').prop("type", "text"); } else { $('input[name="password"]').prop("type", "password"); } }); });
AwesomeBB version.- Code:
$(function() { $('label[for="autologin"], .block-login label.label, .gen input[name="autologin"]').after('<input type="checkbox" name="visumdp" id="visumdp"> Show My Password</input><br /><br />'); $('.box-login-btns-main, .form_login > div:last').before('<label><span class="checkbox"><input type="checkbox" name="visumdp" id="visumdp"></input><span class="checkbox-check"></span></span><span>Show My Password</span></label><br />'); $("#visumdp").on("click", function() { if ($(this).is(":checked")) { $('input[name="password"]').prop("type", "text"); } else { $('input[name="password"]').prop("type", "password"); } }); });
Don't Forget To Click
Language Modification. To Change the text "Show My Password" to something else or in your own Language Just find the words Show My Password and remove it and add your own. Please Note in some codes you may see this text twice it will need to be changed on both.
We Hope you like this great little plugin for your forum's.
Any Problems please make a topic With the URL of this topic.
|