From: Jeff D. <da...@da...> - 2001-11-28 19:45:24
|
On Tue, 27 Nov 2001 19:02:17 -0500 "Carsten Klapp" <car...@ma...> wrote: > -security > Below is another folder layout which I believe takes these issues into > consideration. Templates for all the various languages can still be > grouped inside a locale folder within a theme, the whole > /themes/default/locale/ folder could be excluded from server access. I think Lawrence's idea for embedding translatable strings in the templates is a great idea which will eliminate the need for having a separate template for each language. With that, you only need one version of each template for each theme (or even less? some themes may share templates). > -selection of style sheets independent of themes > -muliple style sheets can exist within /themes/default/, independent of > language. Here's another crackpot idea. Have the main phpwiki script (or another new php script) serve up the CSS stylesheets. I.e. all the templates link to the style sheet with: <link rel="stylesheet" href="index.php?action=css" type="text/css" /> When index.php is invoked with the action=css argument, it serves up the style sheet from the file themes/default/phpwiki.css (or possibly some other style sheet, depending on what the user has set in his preferences.) Advantages: o Direct web access to phpwiki.css is not required. o Actual wiki HTML is completely independent of what style sheet the user has selected in his preferences. (This might be a big win if we ever implement HTML caching, or if the wiki is served through a caching proxy.) Disadvantages: o Wierd? o Have to pay attention to the HTTP cache-control headers when we serve up the CSS, so that the browser doesn't have to reload it for every page view. (We should probably be paying more attention to the cache-control headers anyway...) > Moving language specific stuff from index.php is a good idea too. > [other good notes deleted] To rephrase your notes (which I deleted): There are basically two indepedent purposes for which we set language preferences. (Currently the config controls for these are all mangled into one...) 1) To select the initial pgsrc. Maybe we should fire up wikis with (perhaps selectable) pgsrc in multiple languages by default? 2) To select run-time (gettext) translations (and also things like date and time formats) (and currently also to select templates, though Lawrence's idea would eliminate that need altogether) Just rambling, I guess, sorry... More random comments on your proposed directory structure: > /admin > .htaccess DENY Admin seems mostly vestigal to me. Can we do away with it altogether? > /docs > .htaccess DENY We don't have this now. It's probably a good idea. I think 'doc' would be the more standard name. > /tests > .htaccess DENY tests/unit_test_backend_cvs.php currently need to be HTTP accessible to be used. > /themes > .htaccess ALLOW > /default > .htaccess ALLOW > -default.php If avoidable, this should not be HTTP accessible. (It would be an error to try to run it.) Also, since it's already in the themes/default subdirectory, why not name it config.php, instead of the redundant themes/default/default.php? > -phpwiki.css My crackpot idea (above) would make it so that this need not be HTTP accessible. > -wikibase.png Making the image files the only ones which still need to be directly HTTP accessible. Because of this I still think they ought to go somewhere else... > -themes.README Should go either in /themes or in /doc (or /), I would think. > /themes/locale Probably not needed once we make templates non-language-dependent? (Templates can go directly in /themes/default.) So, here would be my counter proposal (today, at least): /images (.htaccess ALLOW) - wikibase.png Leave images here. Get rid of /templates (& the templates in /locale) in favor of /themes (.htaccess DENY) /default -config.php -default.css -default-heavy.css -psychadelic.css ... -browse.html (or browse.tmpl)? ... /classic -config.php ... Jeff |