Managing includes

Managing includes

am 27.06.2007 10:10:53 von dorayme

For almost all of the sites I maintain, I am decking them out
with PHP includes, some are operating fine outside on external
servers. There is no management problem for this majority because
of the portability of the construction I am using:

($_SERVER['DOCUMENT_ROOT'].'/site/includes/section.inc'); ?>

Works beaut on both external and my local apache Mac server.

But, now that I have the solution to a global construction for a
Windows server for a couple of my sites (courtesy of help here in
a recent thread), I am going to have a slight management problem.
Because the construction used for these servers is double dutch
to my Mac server.



my solution so far is to put both constructions of the includes
on the files with one of them commented out for use here on my
server (for testing) and the other commented out for upload to
the actual server delivering the company site to the internet.
This is obviously easy to do for just a few files. And for the
business of uploading the newly "decked out with includes" whole
site, I guess I can just use S&R (on the whole site) to switch it
back and forth.

Anyone got any better idea of how to do this? It's surely not
that bad what I propose but I have this instinct that there are
likely smarter way of proceeding.

--
dorayme

Re: Managing includes

am 27.06.2007 11:09:23 von Neredbojias

On Wed, 27 Jun 2007 08:10:53 GMT dorayme scribed:

> For almost all of the sites I maintain, I am decking them out
> with PHP includes, some are operating fine outside on external
> servers. There is no management problem for this majority because
> of the portability of the construction I am using:
>
> ($_SERVER['DOCUMENT_ROOT'].'/site/includes/section.inc'); ?>
>
> Works beaut on both external and my local apache Mac server.
>
> But, now that I have the solution to a global construction for a
> Windows server for a couple of my sites (courtesy of help here in
> a recent thread), I am going to have a slight management problem.
> Because the construction used for these servers is double dutch
> to my Mac server.
>
>
>
> my solution so far is to put both constructions of the includes
> on the files with one of them commented out for use here on my
> server (for testing) and the other commented out for upload to
> the actual server delivering the company site to the internet.
> This is obviously easy to do for just a few files. And for the
> business of uploading the newly "decked out with includes" whole
> site, I guess I can just use S&R (on the whole site) to switch it
> back and forth.
>
> Anyone got any better idea of how to do this? It's surely not
> that bad what I propose but I have this instinct that there are
> likely smarter way of proceeding.

How about a simple conditional checking for the existence of "e:\inetpub
\abc12345\includes\section.inc"?

--
Neredbojias

Once I had a little bird
That made me rather hasty.
So now I have no little bird,
But it was very tasty.

Re: Managing includes

am 27.06.2007 11:46:20 von dorayme

In article
,
Neredbojias wrote:

> How about a simple conditional checking for the existence of "e:\inetpub
> \abc12345\includes\section.inc"?

How about it... I'll nick out to see if I have one in the boot of
my car and if I find one I will.. I will... well, I will bring
it inside to keep me company I guess. My cat died last week.

--
dorayme

Re: Managing includes

am 27.06.2007 11:51:13 von Disco Octopus

dorayme wrote:
> For almost all of the sites I maintain, I am decking them out
> with PHP includes, some are operating fine outside on external
> servers. There is no management problem for this majority because
> of the portability of the construction I am using:
>
> ($_SERVER['DOCUMENT_ROOT'].'/site/includes/section.inc'); ?>
>
> Works beaut on both external and my local apache Mac server.
>
> But, now that I have the solution to a global construction for a
> Windows server for a couple of my sites (courtesy of help here in
> a recent thread), I am going to have a slight management problem.
> Because the construction used for these servers is double dutch
> to my Mac server.
>
>
>
> my solution so far is to put both constructions of the includes
> on the files with one of them commented out for use here on my
> server (for testing) and the other commented out for upload to
> the actual server delivering the company site to the internet.
> This is obviously easy to do for just a few files. And for the
> business of uploading the newly "decked out with includes" whole
> site, I guess I can just use S&R (on the whole site) to switch it
> back and forth.
>
> Anyone got any better idea of how to do this? It's surely not
> that bad what I propose but I have this instinct that there are
> likely smarter way of proceeding.
>
Hi,

In your php.ini file, or you .htaccess file, or your httpd.conf file,
you have a include setting...

This would be unique to the server. So you only really need to enter
your include like this....



You should look into the "include_path" setting in php.

*or*, you could do something like this.... (but then, you may need to
include this chunk of code into its own included thing???)


$GLocalDev1 = 'l-mylocallinuxserver.com';
$GLocalDev2 = 'l-mylocalmacserver.com';
$GLocalDev3 = 'l-mylocalpcserver.com';
$GLive = 'live-site.example.com.au';
if ($_SERVER['HTTP_HOST'] == $GLocalDev1){
$IncludePath = "e:/inetpub/abc12345/includes/";
}
elseif ($_SERVER['HTTP_HOST'] == $GLocalDev2){
$IncludePath = "/home/www/mywebsite/includes/";
}
elseif ($_SERVER['HTTP_HOST'] == $GLocalDev3){
$IncludePath = "/whatever/your/mac/path/is/includes/";
}
include $IncludePath . "section.inc";
?>

--
Disco Octopus
www.choicebeefjerky.com.au

Re: Managing includes

am 27.06.2007 12:46:31 von Neredbojias

On Wed, 27 Jun 2007 09:46:20 GMT dorayme scribed:

> In article
> ,
> Neredbojias wrote:
>
>> How about a simple conditional checking for the existence of "e:\inetpub
>> \abc12345\includes\section.inc"?
>
> How about it... I'll nick out to see if I have one in the boot of
> my car and if I find one I will.. I will... well, I will bring
> it inside to keep me company I guess. My cat died last week.

Well, I don't have a mac to check, but this might help further:

http://us2.php.net/file_exists

--
Neredbojias

Once I had a little bird
That made me rather hasty.
So now I have no little bird,
But it was very tasty.

Re: Managing includes

am 27.06.2007 12:47:31 von dorayme

In article
,
Neredbojias wrote:

> On Wed, 27 Jun 2007 09:46:20 GMT dorayme scribed:
>
> > In article
> > ,
> > Neredbojias wrote:
> >
> >> How about a simple conditional checking for the existence of "e:\inetpub
> >> \abc12345\includes\section.inc"?
> >
> > How about it... I'll nick out to see if I have one in the boot of
> > my car and if I find one I will.. I will... well, I will bring
> > it inside to keep me company I guess. My cat died last week.
>
> Well, I don't have a mac to check, but this might help further:
>
> http://us2.php.net/file_exists

OK, thanks Boji. I will take a look in the morning.

--
dorayme

Re: Managing includes

am 27.06.2007 12:50:43 von Neredbojias

On Wed, 27 Jun 2007 10:46:31 GMT Neredbojias scribed:

>> How about it... I'll nick out to see if I have one in the boot of
>> my car and if I find one I will.. I will... well, I will bring
>> it inside to keep me company I guess. My cat died last week.
>
> Well, I don't have a mac to check, but this might help further:
>
> http://us2.php.net/file_exists

Hmm, interesting on ie6. Make sure you scroll down...

Sorry about your cat.

--
Neredbojias

Once I had a little bird
That made me rather hasty.
So now I have no little bird,
But it was very tasty.

Re: Managing includes

am 27.06.2007 12:55:13 von dorayme

In article <46823319$0$995$afc38c87@news.optusnet.com.au>,
Disco Octopus wrote:

> dorayme wrote:
....
>
> In your php.ini file, or you .htaccess file, or your httpd.conf file,
> you have a include setting...
>
> This would be unique to the server. So you only really need to enter
> your include like this....
>
>
>
> You should look into the "include_path" setting in php.
>
> *or*, you could do something like this.... (but then, you may need to
> include this chunk of code into its own included thing???)
>
>
> > $GLocalDev1 = 'l-mylocallinuxserver.com';
> $GLocalDev2 = 'l-mylocalmacserver.com';
> $GLocalDev3 = 'l-mylocalpcserver.com';
> $GLive = 'live-site.example.com.au';
> if ($_SERVER['HTTP_HOST'] == $GLocalDev1){
> $IncludePath = "e:/inetpub/abc12345/includes/";
> }
> elseif ($_SERVER['HTTP_HOST'] == $GLocalDev2){
> $IncludePath = "/home/www/mywebsite/includes/";
> }
> elseif ($_SERVER['HTTP_HOST'] == $GLocalDev3){
> $IncludePath = "/whatever/your/mac/path/is/includes/";
> }
> include $IncludePath . "section.inc";
> ?>

Thanks Disco Octopus, will look at it tomorrow... one thing is
this, I can fiddle about as I please with my own server but have
little control over a public Windows server and am looking to an
avenue that does not involve altering that server if possible. I
ftp things up and that causes the least trouble, no awkward
communications needed with giant ISP concerned. My plan (snipped
above) has that going for it (even if it is a bit inelegant).

--
dorayme

Re: Managing includes

am 27.06.2007 12:56:13 von dorayme

In article
,
Neredbojias wrote:

> Hmm, interesting on ie6. Make sure you scroll down...
>
> Sorry about your cat.

17 years old. Dear little thing.

--
dorayme

Re: Managing includes

am 27.06.2007 13:44:32 von Toby A Inkster

Disco Octopus wrote:

> You should look into the "include_path" setting in php.

include_path is awesome indeed. You create a directory, put all your
included files in there and then set the include_path for your website
to point to that directory. (This can be set in .htaccess if need be.)

Then in your code, you just reference:

include "something.php";

and the PHP interpreter will look to see if there is a file called
"something.php" in your include_path. Whatsmore, your include_path can
contain multiple paths, and your PHP script can modify it on-the-fly.

For example, my CMS has this at the top of its index.php file:

$ip = get_include_path();
$dirs = array('includes', 'lib', 'PEAR');
$base = dirname(__FILE__);
if (!preg_match('#/$#', $base)) $base .= '/';
foreach ($dirs as $d)
$ip .= ':' . $base . $d . '/';
set_include_path($ip);

define('DEMIBLOG_BASE_DIR', $base);
define('DEMIBLOG_SETTINGS_DIR', $base);

This takes the path of the directory where index.php is itself contained,
and calls that the "base" directory. It then finds subdirectories of the
base directory called "includes", "lib" and "PEAR" and adds them to the
include_path. It then saves the base directory as a PHP constant, and
defines a "settings directory" which is the same as the base directory by
default. (All other important directories are then loaded up as settings.)

Overall, "index.php" is lean and mean: only 17 lines excluding whitespace
and comments -- so I'm sure the fact that it dedicates over half of its
lines to playing around with paths says something very profound, though
I'm not entirely sure what.

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 6 days, 15:07.]

The End of an Era
http://tobyinkster.co.uk/blog/2007/06/26/end-of-an-era/

Re: Managing includes

am 27.06.2007 15:44:33 von lws4art

dorayme wrote:
> For almost all of the sites I maintain, I am decking them out
> with PHP includes, some are operating fine outside on external
> servers. There is no management problem for this majority because
> of the portability of the construction I am using:
>
> ($_SERVER['DOCUMENT_ROOT'].'/site/includes/section.inc'); ?>
>
> Works beaut on both external and my local apache Mac server.
>
> But, now that I have the solution to a global construction for a
> Windows server for a couple of my sites (courtesy of help here in
> a recent thread), I am going to have a slight management problem.
> Because the construction used for these servers is double dutch
> to my Mac server.
>
>
>
> my solution so far is to put both constructions of the includes
> on the files with one of them commented out for use here on my
> server (for testing) and the other commented out for upload to
> the actual server delivering the company site to the internet.
> This is obviously easy to do for just a few files. And for the
> business of uploading the newly "decked out with includes" whole
> site, I guess I can just use S&R (on the whole site) to switch it
> back and forth.
>
> Anyone got any better idea of how to do this? It's surely not
> that bad what I propose but I have this instinct that there are
> likely smarter way of proceeding.
>

What I do is have a DNS server setup for my LAN and set to a private TLD
so all websites have a different domain name whether it is the "live"
version or the locally maintained mirror, e.g.,

live => www.example.com
local => www.example.private.lan

then I have a universal configuration object which in addition to
maintaining client information also configs URL and paths...

in the script I define the local and live server names for each site

define('LOCAL_SERVER', 'www.example.private.lan');
define('REMOTE_SERVER', 'www.example.com');

and upon init of the object a method sets a flag for whether or not the
site is "on web" or not.

....
$this->onweb=($host==REMOTE_SERVER)? 1 : 0;
....

the flag is used to set any differences between local and live server
condition like SSL url and server root, include paths, mailserver
settings, etc.













--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

Re: Managing includes

am 28.06.2007 00:09:59 von Neredbojias

On Wed, 27 Jun 2007 10:56:13 GMT dorayme scribed:

> In article
> ,
> Neredbojias wrote:
>
>> Hmm, interesting on ie6. Make sure you scroll down...
>>
>> Sorry about your cat.
>
> 17 years old. Dear little thing.

I've noticed, in general, women seem to prefer cats, and men, dogs. Do you
think it says anything pertinent about the human psyche or just that men
are drawn to a wagging tail?

--
Neredbojias

Once I had a little bird
That made me rather hasty.
So now I have no little bird,
But it was very tasty.

Re: Managing includes

am 28.06.2007 00:22:03 von Neredbojias

On Wed, 27 Jun 2007 11:44:32 GMT Toby A Inkster scribed:

> Disco Octopus wrote:
>
>> You should look into the "include_path" setting in php.
>
> include_path is awesome indeed. You create a directory, put all your
> included files in there and then set the include_path for your website
> to point to that directory. (This can be set in .htaccess if need be.)
>
> Then in your code, you just reference:
>
> include "something.php";

I see no advantage to this. What is wrong with just inserting the path
as you do in a link, eg: ../par_dir/somefile.html? That way one could
address an include file anywhere on the site with a minimum of confusion
or effort. Now I realize the powers that be haven't allowed for this,
but stating an include_path is awesome seems a bit much.

> and the PHP interpreter will look to see if there is a file called
> "something.php" in your include_path. Whatsmore, your include_path can
> contain multiple paths, and your PHP script can modify it on-the-fly.
>
> For example, my CMS has this at the top of its index.php file:
>
> $ip = get_include_path();
> $dirs = array('includes', 'lib', 'PEAR');
> $base = dirname(__FILE__);
> if (!preg_match('#/$#', $base)) $base .= '/';
> foreach ($dirs as $d)
> $ip .= ':' . $base . $d . '/';
> set_include_path($ip);
>
> define('DEMIBLOG_BASE_DIR', $base);
> define('DEMIBLOG_SETTINGS_DIR', $base);
>
> This takes the path of the directory where index.php is itself
> contained, and calls that the "base" directory. It then finds
> subdirectories of the base directory called "includes", "lib" and
> "PEAR" and adds them to the include_path. It then saves the base
> directory as a PHP constant, and defines a "settings directory" which
> is the same as the base directory by default. (All other important
> directories are then loaded up as settings.)
>
> Overall, "index.php" is lean and mean: only 17 lines excluding
> whitespace and comments -- so I'm sure the fact that it dedicates over
> half of its lines to playing around with paths says something very
> profound, though I'm not entirely sure what.

Clever but cumbersome. And how many pagemakers are as adept at php as
you?

--
Neredbojias

Once I had a little bird
That made me rather hasty.
So now I have no little bird,
But it was very tasty.

Re: Managing includes

am 28.06.2007 01:05:50 von dorayme

In article
,
Neredbojias wrote:

> On Wed, 27 Jun 2007 10:56:13 GMT dorayme scribed:
>
> > In article
> > ,
> > Neredbojias wrote:
> >
> >> Hmm, interesting on ie6. Make sure you scroll down...
> >>
> >> Sorry about your cat.
> >
> > 17 years old. Dear little thing.
>
> I've noticed, in general, women seem to prefer cats, and men, dogs. Do you
> think it says anything pertinent about the human psyche or just that men
> are drawn to a wagging tail?

I have walked a dog on the foreshores of Botany Bay for years,
and have keenly noticed women walking dogs with tails. I have
seen no women walking cats, with or without tails.

--
dorayme

Re: Managing includes

am 28.06.2007 01:12:07 von dorayme

In article ,
"Jonathan N. Little" wrote:

> dorayme wrote:

> > But, now that I have the solution to a global construction for a
> > Windows server for a couple of my sites (courtesy of help here in
> > a recent thread), I am going to have a slight management problem.
> > Because the construction used for these servers is double dutch
> > to my Mac server.

> What I do is have a DNS server setup for my LAN and set to a private TLD
> so all websites have a different domain name whether it is the "live"
> version or the locally maintained mirror, e.g.,
>
> live => www.example.com
> local => www.example.private.lan
>
> then I have a universal configuration object which in addition to
> maintaining client information also configs URL and paths...
>
> in the script I define the local and live server names for each site
>
> define('LOCAL_SERVER', 'www.example.private.lan');
> define('REMOTE_SERVER', 'www.example.com');
>
> and upon init of the object a method sets a flag for whether or not the
> site is "on web" or not.
>
> ...
> $this->onweb=($host==REMOTE_SERVER)? 1 : 0;
> ...
>
> the flag is used to set any differences between local and live server
> condition like SSL url and server root, include paths, mailserver
> settings, etc.

I am impressed. Do you maintain any sites on external Windows
servers?

--
dorayme

Re: Managing includes

am 28.06.2007 01:22:27 von dorayme

In article <06v9l4-9se.ln1@ophelia.g5n.co.uk>,
Toby A Inkster wrote:

> Whatsmore, your include_path can
> contain multiple paths, and your PHP script can modify it on-the-fly.

This is the sort of thing that is getting my attention. That it
can be done is encouragement. I proceed slowly, fathoming what is
said and testing for my own situation.

Do you maintain any sites on external Windows servers?

--
dorayme

Re: Managing includes

am 28.06.2007 02:22:04 von lws4art

dorayme wrote:

> I am impressed. Do you maintain any sites on external Windows
> servers?
>

Nope, I try to avoid IIS like the plaque. Our public library use it and
their PAC (Public Access Catalog) is in ASP...other then keep their
network and server running I let their software fiddle with the site.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

Re: Managing includes

am 28.06.2007 03:23:05 von dorayme

In article ,
"Jonathan N. Little" wrote:

> dorayme wrote:
>
> > I am impressed. Do you maintain any sites on external Windows
> > servers?
> >
>
> Nope, I try to avoid IIS like the plaque.

hmmm... mostly for me, the prob became pressing with having to
work with such a server. It's all very manageable... but your
set up is neat.

--
dorayme

Re: Managing includes

am 28.06.2007 08:50:57 von Neredbojias

On Wed, 27 Jun 2007 23:05:50 GMT dorayme scribed:

>> I've noticed, in general, women seem to prefer cats, and men, dogs.
>> Do you think it says anything pertinent about the human psyche or
>> just that men are drawn to a wagging tail?
>
> I have walked a dog on the foreshores of Botany Bay for years,
> and have keenly noticed women walking dogs with tails. I have
> seen no women walking cats, with or without tails.

Botany Bay...

Reminds me of a song I sung lo-o-o-o-o-ng ago and the part I (may
imperfectly) remember.

It's not leaving ol' England we care about
Or sailing for shores far away.
It's the bloomin' monotony wears us out,
And the prospect of Botony Bay.

Never knew it was in Sydney.

--
Neredbojias

Once I had a little bird
That made me rather hasty.
So now I have no little bird,
But it was very tasty.

Re: Managing includes

am 28.06.2007 09:47:47 von Toby A Inkster

dorayme wrote:

> Do you maintain any sites on external Windows servers?

Yes, a couple -- but they're Windows+Apache.

A couple of others too, on IIS, but they don't use PHP.

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 7 days, 11:25.]

Long-Awaited Zeldman Article
http://tobyinkster.co.uk/blog/2007/06/27/zeldman-in-time/

Re: Managing includes

am 28.06.2007 09:56:46 von Toby A Inkster

Neredbojias wrote:

> I see no advantage to this. What is wrong with just inserting the path
> as you do in a link, eg: ../par_dir/somefile.html?

Firstly, consistency. If I want to include "navigation.php" from
"/index.php", with your system you have to write:

include "includes/navigation.php";

but if you want to include the same navigation menu from
"/birds/parrots.php" then you need to use:

include "../includes/navigation.php";

The path is different, you see. Now, say my site takes on more of a parrot
focus, so I decide to move "parrots.php" out of the "birds" directory and
into my site's root directory, then this breaks the include path, and I
need to change it.

Using include_path makes maintenance a lot easier. I put "navigation.php"
into a directory listed in my include path, then I can use it on
"/index.php" or "/birds/parrots.php" like this:

include "navigation.php";

without having to specify the path to it. I can then move my "parrots.php"
file about as much as I like, and don't need to make any changes to it.

This is much the same way that C programmers work. They specify the file
name of a library they want to include, but not the full or relative path
to it. They rely on the build environment to specify the location of all
the library files.

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 7 days, 11:27.]

Long-Awaited Zeldman Article
http://tobyinkster.co.uk/blog/2007/06/27/zeldman-in-time/

Re: Managing includes

am 28.06.2007 10:11:26 von dorayme

In article
,
Neredbojias wrote:

> On Wed, 27 Jun 2007 23:05:50 GMT dorayme scribed:
> > I have walked a dog on the foreshores of Botany Bay for years

> Botany Bay...

> Never knew it was in Sydney.

Yup, it is and it was the place Captain Cook first made land and
saw native inhabitants of the continent.

Here is a little snap of the bit I walk:



--
dorayme

Re: Managing includes

am 28.06.2007 10:18:27 von dorayme

In article
,
dorayme wrote:

> In article
> ,
> Neredbojias wrote:
>
> > On Wed, 27 Jun 2007 23:05:50 GMT dorayme scribed:
> > > I have walked a dog on the foreshores of Botany Bay for years
>
> > Botany Bay...
>
> > Never knew it was in Sydney.
>
> Yup, it is and it was the place Captain Cook first made land and
> saw native inhabitants of the continent.
>
> Here is a little snap of the bit I walk:
>
>

Oh shit! Bergamot will notice the crummy alt text. I will change
it right now.

--
dorayme

Re: Managing includes

am 28.06.2007 13:03:15 von Toby A Inkster

dorayme wrote:

> Yup, it is and it was the place Captain Cook first made land and
> saw native inhabitants of the continent.

It was named in honour of Sir Joseph Banks, the ship's lead scientist, who
specialised in botany, and collected and catalogued many thousands of
samples on the Endeavour voyage. It was, after all, supposed to be a
scientific expedition -- its primary aim was to observe the transit of
Venus from Tahiti.

The river flowing into Botany Bay is Cook River. It's a rubbishy little
stream.

Banks was also an amateur linguist and would try to learn bits of local
languages and help the Endeavour's crew to communicate with the native
population.

Banks was later President of the Royal Society and adviser to Kew Gardens.
He maintained a keen interest in Australia -- he was a great proponent of
the establishment of the British colony which grew to be New South
Wales[1], and kept correspondence with many of her governors; he received
deliveries of seeds and other specimens from every ship that returned from
the burgeoning colony; and he read with great interest the accounts of
early Australian explorers. He may well have returned to the continent,
but he was severely afflicted by gout for the last thirty years of his
life, and was wheelchair-bound for the last fifteen.

____
1. To this day, nobody knows whether NSW is supposed to be a new version
of South Wales, or a new southern version of Wales.

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 7 days, 14:09.]

Long-Awaited Zeldman Article
http://tobyinkster.co.uk/blog/2007/06/27/zeldman-in-time/

Re: Managing includes

am 28.06.2007 14:04:56 von Neredbojias

On Thu, 28 Jun 2007 08:11:26 GMT dorayme scribed:

> In article
> ,
> Neredbojias wrote:
>
>> On Wed, 27 Jun 2007 23:05:50 GMT dorayme scribed:
>> > I have walked a dog on the foreshores of Botany Bay for years
>
>> Botany Bay...
>
>> Never knew it was in Sydney.
>
> Yup, it is and it was the place Captain Cook first made land and
> saw native inhabitants of the continent.
>
> Here is a little snap of the bit I walk:
>
>

Wow, looks cool. Maybe I'll do some Googling. Strange they'd name it
"Botany" although it's pleasant-sounding enough. Can't say I know of any
"Zoology Bay", however.

--
Neredbojias

Once I had a little dog
Who wagged its tail spritely.
But it walked by the harvestor
And now is shorter slightly.

Re: Managing includes

am 28.06.2007 14:07:28 von Neredbojias

On Thu, 28 Jun 2007 08:18:27 GMT dorayme scribed:

>> Here is a little snap of the bit I walk:
>>
>>
>
> Oh shit! Bergamot will notice the crummy alt text. I will change
> it right now.

Unsure whether you changed it or not, but I would've put "Pic of Botany
Bay" at most.

--
Neredbojias

Once I had a little dog
Who wagged its tail spritely.
But it walked by the harvestor
And now is shorter slightly.

Re: Managing includes

am 28.06.2007 14:19:57 von Neredbojias

On Thu, 28 Jun 2007 07:56:46 GMT Toby A Inkster scribed:

> Neredbojias wrote:
>
>> I see no advantage to this. What is wrong with just inserting the
>> path as you do in a link, eg: ../par_dir/somefile.html?
>
> Firstly, consistency. If I want to include "navigation.php" from
> "/index.php", with your system you have to write:
>
> include "includes/navigation.php";
>
> but if you want to include the same navigation menu from
> "/birds/parrots.php" then you need to use:
>
> include "../includes/navigation.php";
>
> The path is different, you see. Now, say my site takes on more of a
> parrot focus, so I decide to move "parrots.php" out of the "birds"
> directory and into my site's root directory, then this breaks the
> include path, and I need to change it.
>
> Using include_path makes maintenance a lot easier. I put
> "navigation.php" into a directory listed in my include path, then I
> can use it on "/index.php" or "/birds/parrots.php" like this:
>
> include "navigation.php";
>
> without having to specify the path to it. I can then move my
> "parrots.php" file about as much as I like, and don't need to make any
> changes to it.
>
> This is much the same way that C programmers work. They specify the
> file name of a library they want to include, but not the full or
> relative path to it. They rely on the build environment to specify the
> location of all the library files.

I can see the advantage to having multiple paths comprise the include
path. Long ago, there was even a DOS command which did virtually the
same thing (-joining directories.) But my real objection is that this
convenience kabashes the ability to hand-list a path and have it work as
does a link, which is intuitive. If the forefathers of modern html had
really been sharp, they would have allowed for both. (Eg: any non-pathed
file listing would seek the current directory and any directories in the
include path while a pathed url would only access that directory.)

--
Neredbojias

Once I had a little dog
Who wagged its tail spritely.
But it walked by the harvestor
And now is shorter slightly.

Re: Managing includes

am 28.06.2007 19:06:38 von dorayme

In article
,
Neredbojias wrote:

> On Thu, 28 Jun 2007 08:18:27 GMT dorayme scribed:
>
> >> Here is a little snap of the bit I walk:
> >>
> >>
> >
> > Oh deary me! Bergamot will notice the crummy alt text. I will change
> > it right now.
>
> Unsure whether you changed it or not, but I would've put "Pic of Botany
> Bay" at most.

I changed the arrow gif alt text and restrained myself when it
got to about 3 chapters long... I assume that a screen reader
will read more than what a visual browser will often display
(they often cut spiels depending on the size of the pics). These
alt texts are from the days when I was bad and slack and not
given to helping folk. Selfish days when I would generate them
with S&R and GREP, pinching things from the name of the img file,
considering how I usually try to name the pics to mean something
to me. But I now know that the web is not about me, it is about
everyone else. I think that is very selfish of the world at large
but what can I do? With a bit more care in greping, one could
remove the .jpg and use the handle of the capital letters to put
in spaces and start to make it a bit better. It is an amazing
task facing me to go and fix up all the alt text on my sites to
be first rate rather than generally 2nd rate. I should pay
someone to do it considering it is such a boring little thing to
do. Bergamot ought to offer me some discount for doing it!

--
dorayme

Re: Managing includes

am 28.06.2007 22:33:43 von Neredbojias

On Thu, 28 Jun 2007 17:06:38 GMT dorayme scribed:

>> >> Here is a little snap of the bit I walk:
>> >>
>> >>
>> >
>> > Oh deary me! Bergamot will notice the crummy alt text. I will change
>> > it right now.
>>
>> Unsure whether you changed it or not, but I would've put "Pic of
Botany
>> Bay" at most.
>
> I changed the arrow gif alt text and restrained myself when it
> got to about 3 chapters long... I assume that a screen reader
> will read more than what a visual browser will often display
> (they often cut spiels depending on the size of the pics). These
> alt texts are from the days when I was bad and slack and not
> given to helping folk. Selfish days when I would generate them
> with S&R and GREP, pinching things from the name of the img file,
> considering how I usually try to name the pics to mean something
> to me. But I now know that the web is not about me, it is about
> everyone else. I think that is very selfish of the world at large
> but what can I do? With a bit more care in greping, one could
> remove the .jpg and use the handle of the capital letters to put
> in spaces and start to make it a bit better. It is an amazing
> task facing me to go and fix up all the alt text on my sites to
> be first rate rather than generally 2nd rate. I should pay
> someone to do it considering it is such a boring little thing to
> do. Bergamot ought to offer me some discount for doing it!

Well, if you look at the institution of capitalism-flavoured democracy,
you can't help but see that it recognizes the import of self-interest
while attempting to universalize fairness and equality among the masses
near and far. I view alt text the same way: it has to please me first
before it pleases a bunch of strangers and aliens. While The Web may not
be one's personal manservant, I embrace it solely for the pleasure and
benefit it brings to *my* life. Were it an obnoxious edifice of
repugnant quality, I would avoid it like an overly-vociferous woman.

--
Neredbojias

Once I had a little dog
Who wagged its tail spritely.
But it walked by the harvestor
And now is shorter slightly.

Re: Managing includes

am 29.06.2007 01:26:28 von dorayme

In article
,
Neredbojias wrote:

> I view alt text the same way: it has to please me first
> before it pleases a bunch of strangers and aliens.

In this we differ. I have a conscience. True, mine is a boring
little thing, nothing grand and mysterious that can communicate
with a god. No, just a set of little subroutines that keep
getting called. I have Beauregard ones, Korpela ones, JL ones and
many more. It is terrible, I might get a firmware zap when I go
back home.

--
dorayme

Re: Managing includes

am 29.06.2007 03:22:24 von Blinky the Shark

Neredbojias wrote:
> On Thu, 28 Jun 2007 08:11:26 GMT dorayme scribed:
>
>> In article ,
>> Neredbojias wrote:
>>
>>> On Wed, 27 Jun 2007 23:05:50 GMT dorayme scribed:
>>> > I have walked a dog on the foreshores of Botany Bay for years
>>
>>> Botany Bay...
>>
>>> Never knew it was in Sydney.
>>
>> Yup, it is and it was the place Captain Cook first made land and saw
>> native inhabitants of the continent.
>>
>> Here is a little snap of the bit I walk:
>>
>>
>
> Wow, looks cool. Maybe I'll do some Googling. Strange they'd name it
> "Botany" although it's pleasant-sounding enough. Can't say I know of
> any "Zoology Bay", however.

The Chinese seem to think they do.

"They landed in a horrible bay that Cook named Zoology Bay because of
the beautiful animals that they found there. Later this was to become
the place of the first French settlements in Australia. They found
Austra­lia to be a boring country where the soil was white, bears
climbed ladders, birds ran but didn¿t fly and large animals jumped about
on four legs carrying their young on their heads."

Source: http://www.54laoshi.cn/Teaching/test3/test07/19307.html


--
Blinky RLU 297263
Killing all posts from Google Groups
The Usenet Improvement Project: http://blinkynet.net/comp/uip5.html

Re: Managing includes

am 29.06.2007 07:10:20 von Neredbojias

On Thu, 28 Jun 2007 23:26:28 GMT dorayme scribed:

> In article
> ,
> Neredbojias wrote:
>
>> I view alt text the same way: it has to please me first
>> before it pleases a bunch of strangers and aliens.
>
> In this we differ. I have a conscience. True, mine is a boring
> little thing, nothing grand and mysterious that can communicate
> with a god. No, just a set of little subroutines that keep
> getting called. I have Beauregard ones, Korpela ones, JL ones and
> many more. It is terrible, I might get a firmware zap when I go
> back home.

I have a conscience, too, but it dictates that if I am not true to myself
first, how can I possibly be true to others? This isn't the same as
selfishness but it closely reflects honesty in its purest sense. If I
truly believe something is BS, I would be nothing more than a lowly
hypocrite to embrace it. And I truly believe most of the so-called
accessibility guidelines are BS.

--
Neredbojias

Once I had a little dog
Who wagged its tail spritely.
But it walked by the harvestor
And now is shorter slightly.

Re: Managing includes

am 29.06.2007 07:22:08 von Neredbojias

On Fri, 29 Jun 2007 01:22:24 GMT Blinky the Shark scribed:

>> Wow, looks cool. Maybe I'll do some Googling. Strange they'd name it
>> "Botany" although it's pleasant-sounding enough. Can't say I know of
>> any "Zoology Bay", however.
>
> The Chinese seem to think they do.
>
> "They landed in a horrible bay that Cook named Zoology Bay because of
> the beautiful animals that they found there. Later this was to become
> the place of the first French settlements in Australia. They found
> Austra­lia to be a boring country where the soil was white, bears
> climbed ladders, birds ran but didn¿t fly and large animals jumped about
> on four legs carrying their young on their heads."
>
> Source: http://www.54laoshi.cn/Teaching/test3/test07/19307.html

Hah, what a coincidence! Of course there are those out there who may give
this less credence than it deserves because the Chinese also refer to their
boats as junks. Tao only knows what they call sharks, but I'd laugh if it
was "trash-fish" or something equally alliterative.

What a minute... Upon reading your link, it says it's a *mistake* in a
lesson. Tryin' to pull the lids over my eyes, eh?

--
Neredbojias

Once I had a little dog
Who wagged its tail spritely.
But it walked by the harvestor
And now is shorter slightly.

Re: Managing includes

am 29.06.2007 08:33:08 von Blinky the Shark

Neredbojias wrote:
> On Fri, 29 Jun 2007 01:22:24 GMT Blinky the Shark scribed:
>
>>> Wow, looks cool. Maybe I'll do some Googling. Strange they'd name it
>>> "Botany" although it's pleasant-sounding enough. Can't say I know of
>>> any "Zoology Bay", however.
>>
>> The Chinese seem to think they do.
>>
>> "They landed in a horrible bay that Cook named Zoology Bay because of
>> the beautiful animals that they found there. Later this was to become
>> the place of the first French settlements in Australia. They found
>> Austra­lia to be a boring country where the soil was white, bears
>> climbed ladders, birds ran but didn¿t fly and large animals jumped about
>> on four legs carrying their young on their heads."
>>
>> Source: http://www.54laoshi.cn/Teaching/test3/test07/19307.html
>
> Hah, what a coincidence! Of course there are those out there who may give
> this less credence than it deserves because the Chinese also refer to their
> boats as junks. Tao only knows what they call sharks, but I'd laugh if it
> was "trash-fish" or something equally alliterative.
>
> What a minute... Upon reading your link, it says it's a *mistake* in a
> lesson. Tryin' to pull the lids over my eyes, eh?



Actually, I didn't catch that.


--
Blinky RLU 297263
Killing all posts from Google Groups
The Usenet Improvement Project: http://blinkynet.net/comp/uip5.html

Re: Managing includes

am 30.06.2007 00:13:57 von dorayme

In article
,
Neredbojias wrote:

> On Thu, 28 Jun 2007 23:26:28 GMT dorayme scribed:
>
> > In article
> > ,
> > Neredbojias wrote:
> >
> >> I view alt text the same way: it has to please me first
> >> before it pleases a bunch of strangers and aliens.
> >
> > In this we differ. I have a conscience. True, mine is a boring
> > little thing, nothing grand and mysterious that can communicate
> > with a god. No, just a set of little subroutines that keep
> > getting called. I have Beauregard ones, Korpela ones, JL ones and
> > many more. It is terrible, I might get a firmware zap when I go
> > back home.
>
> I have a conscience, too, but it dictates that if I am not true to myself
> first, how can I possibly be true to others? This isn't the same as
> selfishness but it closely reflects honesty in its purest sense. If I
> truly believe something is BS, I would be nothing more than a lowly
> hypocrite to embrace it. And I truly believe most of the so-called
> accessibility guidelines are BS.

That's another way in which we differ. I am a lowly, no-good,
truly selfish hypocrite and could not be true even to my own arm.
Still, I shed a tear at your goodness and wholesomeness and high
moral integrity.

--
dorayme

Re: Managing includes

am 30.06.2007 11:22:16 von Neredbojias

On Fri, 29 Jun 2007 22:13:57 GMT dorayme scribed:

>> I have a conscience, too, but it dictates that if I am not true to
>> myself first, how can I possibly be true to others? This isn't the
>> same as selfishness but it closely reflects honesty in its purest
>> sense. If I truly believe something is BS, I would be nothing more
>> than a lowly hypocrite to embrace it. And I truly believe most of
>> the so-called accessibility guidelines are BS.
>
> That's another way in which we differ. I am a lowly, no-good,
> truly selfish hypocrite and could not be true even to my own arm.
> Still, I shed a tear at your goodness and wholesomeness and high
> moral integrity.

Well, seldom have I been so gratified by testimony to my conscience and
abilty to differentiate between the nobility of spirit and the hocum of
egotistical world drivel. I shall strive not to let it go to my head since
if I were any purer, they might deify me prematurely.

--
Neredbojias

Once I had a little dog
Who wagged its tail spritely.
But it walked by the harvestor
And now is shorter slightly.

Re: Managing includes

am 03.07.2007 02:35:03 von Andy Dingley

On Wed, 27 Jun 2007 20:22:04 -0400, "Jonathan N. Little"
wrote:

>Nope, I try to avoid IIS like the plaque.

Now why might that be?
http://www.theregister.co.uk/2007/07/02/ms_uk_defacement/

Re: Managing includes

am 08.07.2007 21:37:16 von Toby A Inkster

Neredbojias wrote:

> I can see the advantage to having multiple paths comprise the include
> path. Long ago, there was even a DOS command which did virtually the
> same thing (-joining directories.)

Not quite -- if you want a DOS equivalent, it's more like the PATH
environment variable.

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 17 days, 23:16.]

demiblog 0.2.0 Released
http://tobyinkster.co.uk/blog/2007/06/28/demiblog-0.2.0/

Re: Managing includes

am 09.07.2007 11:23:05 von Neredbojias

On Sun, 08 Jul 2007 19:37:16 GMT Toby A Inkster scribed:

> Neredbojias wrote:
>
>> I can see the advantage to having multiple paths comprise the include
>> path. Long ago, there was even a DOS command which did virtually the
>> same thing (-joining directories.)
>
> Not quite -- if you want a DOS equivalent, it's more like the PATH
> environment variable.

Sure, forgot that, and I used it extensively in the DOS days. It's
possible that, combined, I had the biggest config.sys and autoexec.bat pair
in the world...

--
Neredbojias

Re: Managing includes

am 10.07.2007 20:00:09 von Toby A Inkster

Neredbojias wrote:

> Sure, forgot that, and I used it extensively in the DOS days. It's
> possible that, combined, I had the biggest config.sys and autoexec.bat pair
> in the world...

My "autoexec.bat" had only one or two lines: it simply launched a compiled
executable "autoexec.exe", which was a compiled BASIC application offering
a menu allowing you to mount additional (Doublespace/Drivespace) volumes,
launch commonly used programs or break out into command.com.

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 19 days, 21:37.]

demiblog 0.2.0 Released
http://tobyinkster.co.uk/blog/2007/06/28/demiblog-0.2.0/

Re: Managing includes

am 10.07.2007 20:16:42 von Neredbojias

Well bust mah britches and call me cheeky, on Tue, 10 Jul 2007 18:00:09
GMT Toby A Inkster scribed:

> Neredbojias wrote:
>
>> Sure, forgot that, and I used it extensively in the DOS days. It's
>> possible that, combined, I had the biggest config.sys and
>> autoexec.bat pair in the world...
>
> My "autoexec.bat" had only one or two lines: it simply launched a
> compiled executable "autoexec.exe", which was a compiled BASIC
> application offering a menu allowing you to mount additional
> (Doublespace/Drivespace) volumes, launch commonly used programs or
> break out into command.com.

I had a similar program which compiled batch files. Although I never used
it for a majority "autoexec", I did call a few flavors from the
autoexec.bat without a hitch.

I also remember the doublespace-to-drivespace "upgrade"... In a way, DOS
was more interesting but I don't miss it. I think it can be compared to
non-doctyped html vs 4.01 strict. At least it could be manipulated in many
interesting ways.

--
Neredbojias
A self-made man who worships his creator