Sharing gnucash.css between htdocs and mail-search?
Derek Atkins
warlord at MIT.EDU
Tue Jan 17 17:41:35 EST 2006
Neil,
Quoting Neil Williams <linux at codehelp.co.uk>:
> On Tuesday 17 January 2006 9:51 pm, you wrote:
>> Actually, as I think about this more... we ONLY want the menus.phtml
>> to have absolute paths on the mail-search server...
>
> <?php
> $self = $_SERVER["HTTP_HOST"];
> if(ereg("lists.gnucash.org",$self)) {
> $home = "http://www.gnucash.org";
> }
> else {
> $home = "";
> }
>
> echo "<li><a href=\"$home/en/index.phtml\">Home / News </a></li>\n";
>
> ?>
Oooh, interesting! Neat...
I assume that HTTP_HOST is the client's http://XXX/ URL name and
not what you'd get from running hostname at the shell, right?
>> I wonder if there's
>> some way we can do that based upon including some additional file?
>
> The only problem with this is that it has to be run every single time
> the page
> is loaded. It's probably a price worth paying, it's not as if it's calling a
> database connection.
Fair enough. We're probably already running php on each file, so I
wouldn't expect it to be a significant amount of additional work.
>> Note that I have no clue if something like this is even possible...
>> We could even ignore this file
>
> No need to use a separate file, that only wastes I/O.
True, doing it the way you suggest definitely implies we don't need
an additional file..
>> But as I was thinking about it, you're right, we don't want /htdocs to
>> have absolute paths because we want to allow mirrors to pull off
>> the content directly from SVN and be able to use it locally without
>> significant amounts of work.
>
> I'll update the links to svn etc at the same time.
Okay. Cool!
Then we can think about where we want stuff to be. svn:externals only
works on directories, not individual files, but if there are directories
we want shared we can home them in htdocs and share them into mail-search
via an external link.
:)
-derek
PS: Nice work so far on all this so far! :)
--
Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
Member, MIT Student Information Processing Board (SIPB)
URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH
warlord at MIT.EDU PGP key available
More information about the gnucash-devel
mailing list