Author Topic: Diff Template (=alternative template) Proposal  (Read 33035 times)

0 Members and 1 Guest are viewing this topic.

Offline ~GeeS~

  • Tireless poster
  • ****
  • Posts: 269
  • "The web was made for sharing..."
    • View Profile
Diff Template (=alternative template) Proposal
« on: August 26, 2006, 01: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~
« Last Edit: August 26, 2006, 02:38:44 AM by ~GeeS~ »
~GeeS~

Offline rejetto

  • Administrator
  • Insane programmer
  • *
  • Posts: 12778
  • Country: it
    • View Profile
Re: Diff Template (=alternative template) Proposal
« Reply #1 on: August 26, 2006, 05:35:14 PM »
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
  • Insane programmer
  • *
  • Posts: 12778
  • Country: it
    • View Profile
Re: Diff Template (=alternative template) Proposal
« Reply #2 on: August 26, 2006, 07:59:36 PM »
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
Re: Diff Template (=alternative template) Proposal
« Reply #3 on: August 27, 2006, 01:18:39 AM »
Great! Thanks alot!!!  :)
~GeeS~

Offline TCube

  • Insane poster
  • *****
  • Posts: 438
    • View Profile
Re: Diff Template (=alternative template) Proposal
« Reply #4 on: August 09, 2007, 12:58:11 AM »
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, 01:18:21 AM by TCube »
Make it idiot-proof and I will make a better idiot

Offline bacter

  • Operator
  • Insane poster
  • *****
  • Posts: 682
    • View Profile
Re: Diff Template (=alternative template) Proposal
« Reply #5 on: September 11, 2007, 01:23:53 PM »
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
  • Insane programmer
  • *
  • Posts: 12778
  • Country: it
    • View Profile
Re: Diff Template (=alternative template) Proposal
« Reply #6 on: September 11, 2007, 03:56:56 PM »
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
  • Insane programmer
  • *
  • Posts: 12778
  • Country: it
    • View Profile
Re: Diff Template (=alternative template) Proposal
« Reply #7 on: September 11, 2007, 04:05:32 PM »
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
Re: Diff Template (=alternative template) Proposal
« Reply #8 on: September 12, 2007, 01:56:30 PM »
Is it possible using two templates (two languages)? I wanna have site in two languages ::)

Offline rejetto

  • Administrator
  • Insane programmer
  • *
  • Posts: 12778
  • Country: it
    • View Profile
Re: Diff Template (=alternative template) Proposal
« Reply #9 on: September 13, 2007, 03:35:57 AM »
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
Re: Diff Template (=alternative template) Proposal
« Reply #10 on: September 13, 2007, 07:49:14 AM »
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
  • Insane programmer
  • *
  • Posts: 12778
  • Country: it
    • View Profile
Re: Diff Template (=alternative template) Proposal
« Reply #11 on: September 13, 2007, 02:22:37 PM »
[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
Re: Diff Template (=alternative template) Proposal
« Reply #12 on: September 13, 2007, 02:46:03 PM »
Ummm sorry. Please tell me how %lang% will work (changing the languages) ::) :-\

Offline rejetto

  • Administrator
  • Insane programmer
  • *
  • Posts: 12778
  • Country: it
    • View Profile
Re: Diff Template (=alternative template) Proposal
« Reply #13 on: September 14, 2007, 02:14:18 AM »
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
Re: Diff Template (=alternative template) Proposal
« Reply #14 on: September 14, 2007, 03:54:50 AM »
by letting you specify the file of the template with the %lang% in the file name
ok it'll be great ;D