[imp] login.inc

Otto Stolz Otto.Stolz at uni-konstanz.de
Fri Dec 22 01:36:31 PST 2006


Hello, Kevin Conley,

you wrote:
> I am trying to customize the login page. Now I found login.inc 
> in both the HORDE/templates/login and IMP/templates/login directories.
> 
> Now looking in IMP/login.inc it seems to only contain the login form 
> HTML. Looking in HORDE/login.inc it contains the rest of the HTML you 
> see when you get the standard HORDE login page - "Welcome to Horde at 
> the top and "powered by horde" logo at the bottom under the login form.

I think, the whole page is defined in imp/login.php + imp/templates/login/login.inc;
though I have not looked in every detail. The "Welcome to Horde" header is
assembled in line 152 of imp/login.php, and subsequently passed down to
imp/templates/login/login.inc.

> How do I customize the login page?

Officially, there are two ways:

- You can provide an imp/config/motd.php file; this will be called from
   Imp's login page after imp/templates/login/login.inc (lines 178..179
   of imp/login.php). See also <http://bugs.horde.org/ticket/?id=4805>.

- You can provide your own "alternate login page", modeled after
   imp/scripts/custom_login.php, and activated via Horde's
   Administration/Setup/Mail menu, under the "User Capabilities
   and Constraints" tab, in an entry labelled "If this is not false,
   it is assumed to be the URL of an alternate login screen which
   will be used in place of IMP's default one...". This will be
   called from lines 100..118 of imp/login.php, and it will duplicate
   much of the code imp/login.php and imp/templates/login/login.inc.

As I do not really understand how that imp/scripts/custom_login.php
works, so I cannot assess what I'd have to enter in most of the
places marked "CUSTOMIZE THIS" therein, I have tried to find
an easier approach to what I need, viz. to adapt the header region
of the login page (in addition to imp/config/motd.php which we have
been using from our 1st Imp installation on).

I have suggested my solution as a permanemt enhancement to IMP, so
I would not have to alter every new Imp version, but that suggestion
has been refused, cf. <http://bugs.horde.org/ticket/?id=4803>.

If all you need is a customization of the login form's top, and
bottom regions, please feel free to copy my solution. If you need
more, try your own alternate login page.

Good luck,
   Otto Stolz




More information about the imp mailing list