rejetto forum
Software => HFS ~ HTTP File Server => Topic started by: ~GeeS~ on August 26, 2006, 07:02:38 AM
-
Does anybody make use of the diff template function?
I'm starting to redesign some templates and want to use this functionality. Am i right, that when i want to apply a different template other than the hfs.tpl to certain folders, i have to enter a different code in the window which pops up when i select this folders. Is there then still interaction with the hfs.tpl code? I guess not.
If i am wrong, could somebody please explain this function (i searched the boards, but could not find the info). Thx!
Edit:
Meanwhile i got the picture: Code from the pop up window is applied and inherited to subdirectories. But...when i entered a complete template like "clean[EN].tpl from chionsas" it worked, except that the different style was not applied! Still the style from hfs.tpl was valid. Is this a bug?
Proposal:
Is it possible to implement, instead of copy/pasting code to the popup window, entering the file name for the alternative code, like hfs_jpg.tpl, hfs_clean.tpl, hfs_1 ... etc. These alternative tpl files would reside in the same directory as the default hfs.tpl and applied instead of hfs_default. This would increase usability a lot.
______
~GeeS~
-
when i entered a complete template like "clean[EN].tpl from chionsas" it worked, except that the different style was not applied! Still the style from hfs.tpl was valid. Is this a bug?
the [style] section is handled as any other. you can check it by doing "view source" in your browser.
Is it possible to implement, instead of copy/pasting code to the popup window, entering the file name for the alternative code, like hfs_jpg.tpl, hfs_clean.tpl, hfs_1 ... etc.
there is an undocumented feature, that works for sure in real folders.
just put the template in a file called hfs.diff.tpl inside the folder you want to customize.
-
anyway, i think your FR is interesting, and i will implement it.
but i also noticed there is a bug in difftemplate feature. it doesn't apply to some sections, like [up]. it will require some internal change to fix this. :(
-
Great! Thanks alot!!! :)
-
Hello,
Just moved to 2.2a (124) and haven't seen this requested feature yet. Is it on ?
TCube
Edit : arrgggg .... not yet ??? [new] per user diff-tpl (apply both folder and user diff-tpl.s, and let the user decide priority, default:user,folder)
-
proposal for the implementation:
Now, diff templates is handled in two ways: a section [whateveritis] is stored with the folder caracteristics. A whole template is placed outside, in the folder as hfs.diff.tpl
I think with a third mode to handle the content of the diff template window, we could have some advantages:
A: No need to copy the same template in diferent folders, one copy in any accessible directory would be enough.
B: It would be possible to realize the often demanded 'per user template'!
how?
The third form to handle the diff template text could be something like "#use or #include
Sintaxis: #use path/filname ...(#use ..)
Examples: #use /sys/bigimage.tpl (for full or partial template)
#use /sys/templates/snd%user%.tpl (should exist: snd.tpl (for @anonymous) as sndusername.tpl for each user with access rights to the folder, or even it would be possible search first for sndusername.tpl, and if it doesn't exist, use snd.tpl
-
Just moved to 2.2a (124) and haven't seen this requested feature yet. Is it on ?
no, i forgot to put it in the to-do-list. i did it now :)
Edit : arrgggg .... not yet ??? [new] per user diff-tpl (apply both folder and user diff-tpl.s, and let the user decide priority, default:user,folder)
that's another feature, unrelated
-
Examples: #use /sys/bigimage.tpl (for full or partial template)
#use /sys/templates/snd%user%.tpl (should exist: snd.tpl (for @anonymous) as sndusername.tpl for each user with access rights to the folder, or even it would be possible search first for sndusername.tpl, and if it doesn't exist, use snd.tpl
yes, this would fit both needs...
in to-do
-
Is it possible using two templates (two languages)? I wanna have site in two languages ::)
-
i will introduce a %lang% symbol that will be the one reported by the browser
-
i will introduce a %lang% symbol that will be the one reported by the browser
And maybe we'll have section [lang]?
-
[lang] ? for what?
you shot too fast.
does %item-name% have a [item-name] ?
-
Ummm sorry. Please tell me how %lang% will work (changing the languages) ::) :-\
-
by letting you specify the file of the template with the %lang% in the file name
-
by letting you specify the file of the template with the %lang% in the file name
ok it'll be great ;D
-
Very good idea the %lang% symbol !
I've tried to use java to get the language of the browser/system, but it will produce much overhead having different languages in the same template.
But the %lang% poses some problems. Supose than %lang% can be something like 'de','en','es','fr','it' and so on. Could we then use something like [sym-tblde],[sym-tblit] with %symtbl%lang%% ??
In all case, y think %lang% will need in the hfs.ini a list of our supported languages, and in the case that the language isn't in this list, %lang% should be empty, in order to use our default language.
Many thanks, rejetto, for your great work!
Molte grazie per il tuo lavoro eccellente !
-
i get the idea.
such thing is possible, but i'm not sure it will be done, i have to consider how this will affect the rest of the code.
-
how about you create a new template file for each language and have them called <language>.diff.tpl and then when you first connect to hfs, hfs requests the client lnguage and if a templae matching the language is found it is then used otherwise use the one set in the editor.
-
this was already accepted few posts before
-
So now, U all talked about AlOnso's crap comment about %lang% (http://xs121.xs.to/xs121/07484/whistling.gif) (http://xs.to)
Back to diff. temp. please ... rejetto, times are tough ... how are things going for diff. temp ?
Merci
Tcube
-
how about you create a new template file for each language and have them called <language>.diff.tpl and then when you first connect to hfs, hfs requests the client lnguage and if a templae matching the language is found it is then used otherwise use the one set in the editor.
re-reading your proposal, i misread, it is different than others.
but now that we have macros, i think it is possible to make it by putting this at the end of the template
{{load|%lang%.diff.tpl}}
-
Back to diff. temp. please ... rejetto, times are tough ... how are things going for diff. temp ?
what are you referring to?
-
Mars, I hope there was nothing I was supposed to answer to in your post, because i didn't get any point.
Anyway, consider that starting with "sym-" is no more mandatory.
-
Not sure which side is getting silly ;) anyway, I 'm refering to this 1st post 1 page :
Proposal:
Is it possible to implement, instead of copy/pasting code to the popup window, entering the file name for the alternative code, like hfs_jpg.tpl, hfs_clean.tpl, hfs_1 ... etc. These alternative tpl files would reside in the same directory as the default hfs.tpl and applied instead of hfs_default. This would increase usability a lot.
-
sorry, i probably considered implicit:
in the popup dialog just type {{load|hfs_jpg.tpl}}
or any other file name
you could even BUILD the file name (by other commands) instead of typing it ;D
-
No harm done : I moved to built 146 couple of days ago ...
don't know shit yet about macros I'll read the wiki ;D merci Rejetto