rejetto forum

Diff Template (=alternative template) Proposal

~GeeS~ · 26 · 48006

0 Members and 1 Guest are viewing this topic.

Offline ~GeeS~

  • Tireless poster
  • ****
    • Posts: 269
  • "The web was made for sharing..."
    • View Profile
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~
« Last Edit: August 26, 2006, 08:38:44 AM by ~GeeS~ »
~GeeS~


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
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.

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


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
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. :(


Offline ~GeeS~

  • Tireless poster
  • ****
    • Posts: 269
  • "The web was made for sharing..."
    • View Profile

Offline TCube

  • Tireless poster
  • ****
    • Posts: 440
    • View Profile
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)
« Last Edit: August 09, 2007, 07:18:21 AM by TCube »
Make it idiot-proof and I will make a better idiot


Offline bacter

  • Operator
  • Tireless poster
  • *****
    • Posts: 681
    • View Profile
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


your computer has no brain - use your own !


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
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 :)

Quote
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


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
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


Offline Alons0

  • Tireless poster
  • ****
    • Posts: 197
    • View Profile
    • Alons0's site
Is it possible using two templates (two languages)? I wanna have site in two languages ::)


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
i will introduce a %lang% symbol that will be the one reported by the browser


Offline Alons0

  • Tireless poster
  • ****
    • Posts: 197
    • View Profile
    • Alons0's site
i will introduce a %lang% symbol that will be the one reported by the browser
And maybe we'll have section [lang]?


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
[lang] ? for what?
you shot too fast.
does %item-name% have a [item-name] ?


Offline Alons0

  • Tireless poster
  • ****
    • Posts: 197
    • View Profile
    • Alons0's site
Ummm sorry. Please tell me how %lang% will work (changing the languages) ::) :-\


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
by letting you specify the file of the template with the %lang% in the file name


Offline Alons0

  • Tireless poster
  • ****
    • Posts: 197
    • View Profile
    • Alons0's site