Re: template path problems

Tim Janik:
> well, the simplest reason is probably that we don't ahev access to httpd.conf,
> just yosh.

Then the symlinks will be handy there.

> >

> eh? this starts to get really ugly ;)

Personally, I find that URL beautiful, but, you know, beauty is in the
of the beholder ;)

I prefer those path_info style URLs over


> as an aside, it's inherently unsafe as people could point their
> browsers at
> or so similar things.

That's not an issue:

  - One line of code, ie. $perpage = 30 if $perpage > 30;
  - Since those are thumbnails, 34 of them won't get any bigger than
    a beast tarball.  Also, logical browsers and proxies will not try
    to open 34 connections at a time.

> > images from ../html/screenshots

> why would this take images from ../html/screenshots and the
> other from ../html/images/screenshots?
> i'm sorry, this is just too much magic for me ;)

Uh oh, nothing but pure typo magic ;)  I tried to mean

> can we please go for a simple and explicit solution like:
> --- cgi-bin/screenshots.cgi ---
> IMAGE_ROOT=images/screenshots/
> HTML_TEMPLATE=screenshots.html
> exec gallery.cgi
> --- cgi-bin/screenshots.cgi ---

I can easily see a pattern in the above snippet.  Why not shorten it
to a single


and let the script evolve that to


and since the script is gallery.cgi, no need to explicitly exec
gallery.cgi ($0 is different than the script's real name, it's what
apache calls it, ie. via a symlink a la gzip vs. gunzip).

> >   cd /web/beast/cgi-bin/
> >   ln -s gallery screenshots
> >   ln -s gallery logo-submissions

> and where is the template?


> i don't see what "Ultimate configurability" is missing if
> you specify things explicitely. i'm just getting confused
> and don't know what magic naming/links etc. the scripts
> rely on (and if you explain i'll prolly have it forgotten
> in a month).

Of course you will forget.  I will forget too.  But then, we will
forget how we added current galleries also.  So we will look at the
cgi-bin directory, and notice this:

  $ ls -l cgi-bin
  -rwxrwxr-x  6 timj beast      10001 May  9 gallery
  -rwxrwxr-x  1 timj beast          7 May  9 logo-submissions -> gallery
  -rwxrwxr-x  1 timj beast          7 May  9 screenshots -> gallery


  $ ls -l cgi-bin
  -rwxrwxr-x  6 timj beast      10001 May  9 gallery
  -rwxrwxr-x  1 timj beast        543 May  9 logo-submissions
  -rwxrwxr-x  1 timj beast        606 May  9 screenshots

Tell me which one is more obvious ;)

There is a whole lot more to forget about.  I always believed that's
the best part of writing a script, it means it's doing its job very
well ;)

If the CGI script will be a part of texitheque, I will document it.
I will also add a part about it in /web/beast/NOTES.

Alper Ersoy

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]