SquirrelMail Login Page Embedded Customizing
We already know, by default, squirrelmail does not come with an attractive form login, therefore base on squirrelmail wiki page in this url : http://squirrelmail.org/wiki/Embedded SquirrelMail Login, we customize our squirrelmail login page to get more attractive form login, so the login screen look more exciting.
Here we share my steps to customize squirrelmail login page using squirrelmail wiki embedded technique:
1. Download free css login form that you like from your favorite site and extract it.
2. Expand index.html from source that you’re already download on step above, add this code below before closing </head>
<script language=”JavaScript” type=”text/javascript”>
<!–
function squirrelmail_loginpage_onload() {
document.forms[0].js_autodetect_results.value = ‘1’;
for (i = 0; i < document.forms[0].elements.length; i++) {
if (document.forms[0].elements[i].type == “text” || document.forms[0].elements[i].type == “password”) {
document.forms[0].elements[i].focus();
break;
}
}
}
// –>
</script>
3. Add on body tag this code below:
<body onload="squirrelmail_loginpage_onload()">
4. Add this code below to your form:
<form id=”login” method=”post” action=”http://YOUR-WEBMAIL-URL/src/redirect.php”>
<input type=”hidden” name=”js_autodetect_results” value=”0″>
<input type=”hidden” name=”just_logged_in” value=”1″>You’re code here ..
</form>
5. After finish setup all your condition, upload it to your squirrelmail installation on your server, usually in /your/www/path, asume that directory you’re create call login, put it on the same as squirrelmail src directory.
6. Now on /your/www/path, open src/signout.php, with your editor find this code below:
href=”login.php” , and change with this code:
href=”../login”
7. On /your/www/path, open functions/display_messages.php, with your editor find this code below:
$logout_link = $base_uri . ‘login.php’; , and change with this code:
$logout_link = $base_uri . ‘login’;
8. On /your/www/path, open src/redirect.php, with your editor find this code below:
header(“Location: $redirect_url”); , and right before it, add this code:
if (strstr($redirect_url,’?’)) { $redirect_url .= ‘&’; } else { $redirect_url .= ‘?’; }
$redirect_url .= strip_tags(SID);
9. And final steps on /your/www/path, open index.php, with your editor find this code below:
header(‘Location: src/login.php’); , and change with this code:
header(‘Location: login’);
That’s it, is not too dificult to have a nice login page with squirrelmail embedded login page customizing, and you can choose any login template that you like, just add nine steps above with your condition, the default template is still there but we add customizing login page to get an more attractive login page.
Here my squirrelmail login page cutomizing : http://mail.unas.ac.id, sorry for login demo, now I am using roundcube for webmail agent. (update 15/09/2014)
And if you want download my implementation script on that site above, here the download link : http://ferdi.blog.unas.ac.id/files/2013/04/login.zip
If you have got some trouble to implement this guide, feel free to leave a comment here, thanks.
google adwords tool
Aw, this was a really good post. Taking a few minutes and actual
effort to generate a superb article… but what can I say… I put things off a whole lot
and never manage to get nearly anything done.
kumud
Perfect configuration it works, good things must be appreciated , but i want to implement Captcha pluggin with it, but alas…… please show us how to implement it with your customised page.
Unas Support
I think you must combine it with google recaptcha, activated it with your google account and follow instruction on they documentation.
I don’t use captcha with my login. 😀
thanks
antonio
it works…congratulations