I made a page so you can externally login to horde webmail. I use it so people on my site can directly login to their webmail.
Maybe some people find it usefull.
I just stripped the login page and changed my preferred settings, don’t shoot me if some things aren’t correct.
You can change the things I marked in red.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<!-- IMP: Copyright 2001, The Horde Project. IMP is under the GPL. -->
<!-- Horde Project: [http://horde.org/](http://horde.org/) | IMP: [http://horde.org/imp/](http://horde.org/imp/) -->
<!-- GNU Public License: [http://www.fsf.org/copyleft/gpl.html](http://www.fsf.org/copyleft/gpl.html) -->
<html lang="nl-NL"><head>
<title>Webmail :: Welkom</title>
<link href="[http://66.36.228.155/horde/css.php?app=imp](http://66.36.228.155/horde/css.php?app=imp)" rel="stylesheet" type="text/css" />
</head>
<body onload="setFocus()">
<script language="JavaScript" type="text/javascript">
<!--
function setFocus()
{
document.implogin.imapuser.focus();
}
function submit_login()
{
if (document.implogin.server[document.implogin.server.selectedIndex].value.substr(0, 1) == "_") {
return false;
}
if (document.implogin.imapuser.value == "") {
alert('Please enter a login and password.');
document.implogin.imapuser.focus();
return false;
} else if (document.implogin.pass.value == "") {
alert('Please enter a login and password.');
document.implogin.pass.focus();
return false;
} else {
return true;
}
}
//-->
</script>
<script language="JavaScript1.2" type="text/javascript">
<!--
function enter_key_trap(e)
{
var keyPressed;
if (document.layers) {
keyPressed = String.fromCharCode(e.which);
} else if (document.all) {
keyPressed = String.fromCharCode(window.event.keyCode);
} else if (document.getElementById) {
keyPressed = String.fromCharCode(e.keyCode);
}
if ((keyPressed == "\r" || keyPressed == "\n") && (submit_login())) {
document.implogin.submit();
}
}
//-->
</script>
<form action="[http://66.36.228.155/horde/imp/redirect.php](http://66.36.228.155/horde/imp/redirect.php)" method="post" name="implogin">
<input type="hidden" name="actionID" value="105" />
<input type="hidden" name="url" value="" />
<input type="hidden" name="mailbox" value="INBOX" />
<table align="center" border="0" width="300">
<tr>
<td align="center" colspan="2" class="header"> <strong>Webmail</strong></td>
</tr>
<tr>
<td align="right" class="light"><b>Username</b></td>
<td align="left"><input type="text" tabindex="1" name="imapuser" value="" /></td>
</tr>
<tr>
<td align="right" class="light"><b>Password</b></td>
<td align="left"><input type="password" tabindex="2" name="pass" /></td>
</tr>
<tr>
<td><input type="hidden" name="folders" value="INBOX" />
<input type="hidden" name="new_lang" value="en_US"> this is your language code, horde will have this language you put here.
<input type="hidden" tabindex="3" name="server" value="mail.m****here.biz"></td>
</tr>
<tr>
<td> </td>
<td align="left" class="light"><input type="submit" class="button" name="button" tabindex="4" value="Submit" onclick="return submit_login();" /></td>
</tr>
</table>
</form>
<script language="JavaScript" type="text/javascript">
<!--
function selectLang()
{
// We need to reload the login page here, but only if the user hasn't
// already entered a username and password.
if (document.implogin.imapuser.value == '' &&
document.implogin.pass.value == '') {
var lang_page = 'login.php?new_lang=' + document.implogin.new_lang[document.implogin.new_lang.selectedIndex].value;
self.location = lang_page;
}
}
//-->
</script>
<script language="JavaScript1.2" type="text/javascript">
<!--
// Setup the enter keytrap code
if (window.document.captureEvents != null) {
window.document.captureEvents(Event.KEYPRESS);
window.document.onkeypress = enter_key_trap;
}
//-->
</script>
<!-- This file contains any "Message Of The Day" Type information -->
<!-- It will be included below the log-in form on the login page. -->
<script language="JavaScript" type="text/javascript">
<!--
if (parent.frames.horde_main) parent.document.title = 'Webmail :: Welcome';
//-->
</script>
</body>
</html>
Maybe I’ll strip it more later on, hope it works and you that you can use it.
You can put this script anywhere it can always login to jodohost horde webmail. Even on your own desktop
Hi I copy paste the code you posted (changed the ip)
and I got the following:
Warning: registry(/usr/local/cpanel/base/horde/lib/../config/registry.php): failed to open stream: Permission denied in /usr/local/cpanel/base/horde/lib/Registry.php on line 102
Warning: registry(): Failed opening ‘/usr/local/cpanel/base/horde/lib/../config/registry.php’ for inclusion (include_path=‘.:/usr/lib/php:/usr/local/lib/php’) in /usr/local/cpanel/base/horde/lib/Registry.php on line 102
Warning: setlang(/usr/local/cpanel/base/horde/imp/lib/../../config/lang.php): failed to open stream: Permission denied in /usr/local/cpanel/base/horde/lib/Lang.php on line 72
Warning: setlang(): Failed opening ‘/usr/local/cpanel/base/horde/imp/lib/../../config/lang.php’ for inclusion (include_path=‘.:/usr/lib/php:/usr/local/lib/php’) in /usr/local/cpanel/base/horde/lib/Lang.php on line 72
Warning: importconfig(/usr/local/cpanel/base/horde/imp/lib/../../config/horde.php): failed to open stream: Permission denied in /usr/local/cpanel/base/horde/lib/Registry.php on line 588
Warning: importconfig(): Failed opening ‘/usr/local/cpanel/base/horde/imp/lib/../../config/horde.php’ for inclusion (include_path=‘.:/usr/lib/php:/usr/local/lib/php’) in /usr/local/cpanel/base/horde/lib/Registry.php on line 588
Do you have any idea what should I do?
My horde came along with cpanel.
Sorry for flooding the thread, but I have another important information.
I have cpanel installed, so horde is installed with cpanel automatically. moreover it is not installed under the webroot.
So I can apache access this directory, I’m created some kind of an alias for /horde to the correct directory and it seem to work but still horde is not loading.
I made one. Just look at the code behind the one that already exists and stick that type of form on one of your own pages. The only trick is to make sure to include the absolute path to the file for the form action.
Just the form code. Mine doesn’t check to see if the two new password fields match. The H-Sphere page that it posts to does that anyway. This code opens the H-Sphere page in a new window.
Dude, you guys are making it so hard on yourselves, the login page you have is fine for custom logins, but to return back to this page after failed login, or invalid login attempt, i know they sound similar but i don’t mean the same thing, just edit two lines at the bottom of the /horde/imp/redirect.php
should look something like this:
echo “”;
}
}
/* No session, and no login attempt. Just go to the login page. */
echo “”;