Re: More work on the gnome website



<quote who="Joshua Eichorn">

> I've done more work on the framework needed for automatic xlst 
> processing of xml pages.

Rawk. :)

> http://gnome.joshuaeichorn.com/prepend.phps
> contains code for browser and language detection and for reading from 
> the cache.

- a lot of the variables here should probably be defined once they're fully
  worked out (language, cache_key, etc)

- this is really short and sweet, I like it a lot

- post/get stuff is great

> http://gnome.joshuaeichorn.com/append.phps
> contains code for writing generated files to the cache

- heh, use unlink() instead of exec('rm') ;)

- seems that the use of output buffering isn't so evil. it's pretty easy to
  follow, even given that most authors won't have to care about it anyway.

- i'm still playing with the i18n/xml stuff, will post something when it
  doesn't look like monkeybutt.

> Issue still to resolve:
>    cache only uses one directory and we could run into performance 
> issues if we have a large number of pages cached

Ouch, yeah. Probably a pita to build a mirrored tree too. Hmm.

> Extras we may want:
>    support for reading a cookie to override default language

Definitely! Anyway, here's some .htaccess gumph to make this all a bit
cleaner and cooler. This would go in the <virtual> section for the sites, I
imagine.

  ---

DirectoryIndex   index.xml index.php index.html index.shtml
php_value   include_path    ".:/home/jdub/public_html/www/developer.gnome.org/include"

<FilesMatch "\.xml$">
    php_value   auto_prepend_file   "prepend.php"
    php_value   auto_append_file    "append.php"
    ForceType   application/x-httpd-php
</FilesMatch>

  ---

Makes life easy. :)

- Jeff

-- 
          Perl: Making thick Windows admins redundant since 1987.           




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