[Phpslash-devel] Re: [minor annoyance in new release
Brought to you by:
joestewart,
nhruby
From: Luis M <le...@ho...> - 2003-03-05 00:46:44
|
<snip> >On Mon, Mar 03, 2003 at 10:09:01AM -0500, Luis M wrote: > > > > I found this to be a little annoyance which might or might not be a bug. >The > > templates under $PATH/templates/en/ are only offer under the "skin" >block to > > the browsers who have English languages (en). Thus if you, say, have a > > $PATH/fr/skin1 directory for the french language (and the same for other > > languages) only that skin is offer to french browsers. > >Yes, I think I follow this now. This is one reason you don't want to >cache the skin block. Another is you get links to articles, etc. > >This is the designed behavior. > good to know. I noticed the same kind of behaviour for the "Votes" block. If a user in a different language goes to the site, and happens to go after the cache for this block has time out, then the next time I go with a different language I see the block in whatever the last language it was cache. To avoid this, I set the cache to 0 -- I remember that setting a block's cache to 0 used to cause problems in earlier versions of phpSlash. In any case, setting this to zero helps, but doesn't solve the problem ... more on this later on... > > Since the text for the whole site gets translated regardless of the skin > > being used, I think it would make more sense to offer all templates from >a > > given directory (or have a folder which is the default language for all > > other -- I think this is what "en" is). > >Uh, some templates contain text that is not translated - the submission >form, login form, poll results, etc. True. But, eventually they will be able to translate from the "gettext"-like functions phpSlash uses, right? In any case, only a few strings are left out. > > > Either that or users will have to > > create a directory in e/a directory for the language they want to >support > > and put a "skin.ini" file whose skin.parent is the default language for >the > > given site. > >Yes. Except you can't refer back to the default language's skin >(yet, maybe?) in the skin.ini. > yes you can :-) it's tricky thought. You have to use "skin.parent=../../en/basic"; but it works. I'm doing this now. I hope that it's not possible to pass something like this in the actual URL. If not users will be doing things like "skin=../../../../../../../../etc/passwd" and who knows what can happen. I have not tried to break the installation by doing all illegal things I can think of, but I will very soon. I will report whatever I find. > > I know that modifying the algorithm for the "skin" blocktype could >easily > > yield to recurring thru a list of duplicated directories, so a solution > > should involved default-ing to just one directory and not to all other > > languages to look for template directories that are not present in the > > current language... (confusing uh, just read this paragraph again...). > > > > I hope that this makes sense to you guys out there (Joe?). > > > >I think I understood after reading it a few times :) > >Setting the skin using the user accounts and preferences hopefully will >be the preferred method to choose skins. However, I have done no testing >on what skins are available after a language change. >I think this might be broken. > I knew it was confusing to write it, so it had to be worse to understand it. I have not tried to register a "normal" user account and changing the users' preferences. Will users be able to see all skins regardless of language settings and the directories used to placed the skins? i.e. skins in $templates/en $templates/fr $templates/lang will all show as options to the users? Let me play with the site a bit so that I can get a better sense of these things. So far, I think that the best solution is to just put an empty directory in all the language directories with a skin.ini file pointing couple of directories backward to whatever the "basic" directory is for a given site. peace out! ----)(----- Luis Mondesi System Administrator/Web developer LatinoMixed.com le...@ho... "Black holes are where God divided by zero" - Steven Wright Public signature: http://www.latinomixed.com/lems1/public-a.asc _________________________________________________________________ MSN Messenger : discutez en direct avec vos amis ! http://www.msn.fr/msger/default.asp |