[dev] Re: [imp] trailer.txt with multuple domains
Edwin L. Culp
eculp@EnContacto.Net
Wed, 21 Mar 2001 10:29:40 -0800
Quoting Rich Lafferty <rich@horde.org>:
> On Wed, Mar 21, 2001 at 08:59:50AM -0800, Edwin L. Culp
> (eculp@EnContacto.Net) wrote:
> > >
> > > I lean towards solving the problem once -- maybe documenting how to do
> > > multi-domains setups with conditionals? In other words, PHP-parsed
> > > files already do per-domain,
> >
> > In my rush to not have multiple instances of IMP, I may have been
> > trying to reinvent the wheel - again:-(. What are the existing,
> > per-domain conditionals using as a base for comparison? Which files
> > contain them?
>
> Er, well, this is the dev list, you can't assume that things talked
> about here exist yet. :-) I'm not exactly up-to-date on the 2.3
> tree. But with what I was suggesting, you could do something like this
> (using 2.2's variable names):
>
> <?php if ($imp->server == 'mail.biscuit.ca') { ?>
> --
O.K., Sorry for the wishfull thinking:-). I haven't used 2.2 but that is
basically what I do in 2.3 but using HTTP_HOST to know which virtual domain they
are accessing. I have hardcoded them into the respective template include. Not
very pretty but it does work.
ed
> This mail sent from Biscuits Online Webmail!
> <?php } elseif ($imp->server == 'post.platzchen.de') { ?>
> --
> Diese Meldung gesendet von den Platzchen-Online!
> <?php } ?>
>
> or, for instance, use the environment variables the webserver
> provides. (Locally, we give the user a "Use our secure site" link if
> they're using http and not https, but no "Use our insecure site" link
> if they're already using https, based on $SERVER_PORT.)
>
> But note that Chuck and I were talking about a feature that doesn't
> exist yet, with respect to trailer.txt; it happens to work in MOTD.txt
> (now motd.php) in 2.2 right now because that file's sucked up with
> include() rather than file().
>
> -Rich
>
> --
> ------------------------------ Rich Lafferty ---------------------------
> Sysadmin/Programmer, Instructional and Information Technology Services
> Concordia University, Montreal, QC (514) 848-7625
> ------------------------- rich@alcor.concordia.ca ----------------------
>
> --
> Horde Developers mailing list: http://horde.org/
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: dev-unsubscribe@lists.horde.org
>
>
-----------------------------------------------------------------------
The illiterate of the 21st century will not be
those who cannot read and write,
but those who cannot learn, unlearn and relearn.
--Alvin Toffler