Re: More work on the gnome website



Jeff Waugh wrote:

<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') ;)

i didn't think you could do unlink with wildcard operators



- 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.

I'm thinking about just using the first 1 or 2 characters of the key as directories, this should help any single directory from having a huge amount of entries but i don't know big of a deal it is, ext2 should have decent performance with 5000 files in one dir and if we need better performance for say 10000 files there is always reiserfs


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>

yea i got something similar running on my laptop for testing


 ---

Makes life easy. :)

- Jeff

-josh







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