Language driven templates

Questions about how to install and problems installing - please read the documentation first!
Tata
Posts: 3190
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: Language driven templates

Post by Tata » Fri Feb 04, 2011 3:49 pm

Excuse me, Gert, eventhough you closed the discussion, I have found solution for my specific problem. You mentioned using 2lang for splitting the content. I did it and have found that the meals can be split into categories (e.g. soups, poultry, fish etc.). I made "2lang" folder for each category and named the folders only by numbers (10,20,31,32,33,41,42...). In flags folder I have saved "labels.gif" for each category (soups => 10.gif, poultry=>41.gif etc.) And it works. I am happy that I didn't need to change anything in the core PHPs.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

Gert
Posts: 3075
Joined: Fri May 30, 2008 4:53 pm
Location: Berlin
Contact:

Re: Language driven templates

Post by Gert » Fri Feb 04, 2011 4:04 pm

Tata wrote:Excuse me, Gert, eventhough you closed the discussion ...
Sorry Tata, I can't close the discussion ;)

I meaned just for me the discussion is closed ;)

Your solution works, because CMsimple only folders with 2 characters (but without numbers) interprets as a language folder ( [A-z] ). So the folders 10, 11, 12 are not displayed in the language menu.

The Sitelink plugin of FCKeditor interprets all folders wit 2 characters OR 2numbers OR mixed characters and numbers as an language folder, and so the internal link function works with that folders.

Nice solution, you also can use folders with a1, a2, a3 and so on for that ;)
Gert Ebersbach | CMSimple | Templates - Plugins - Services

Holger
Site Admin
Posts: 3212
Joined: Mon May 19, 2008 7:10 pm
Location: Hessen, Germany
Contact:

Re: Language driven templates

Post by Holger » Fri Feb 04, 2011 4:06 pm

It's not closed, we've just switched to PM ;) .
But don't worry, it seems we love each other again :mrgreen:

BTW: fine, that you found your solution!

BR
Holger

Holger
Site Admin
Posts: 3212
Joined: Mon May 19, 2008 7:10 pm
Location: Hessen, Germany
Contact:

Re: Language driven templates

Post by Holger » Fri Feb 04, 2011 4:08 pm

Gert wrote:The Sitelink plugin of FCKeditor interprets all folders wit 2 characters OR 2numbers OR mixed characters and numbers as an language folder, and so the internal link function works with that folders.
Ups, seems to be a bug I've never noticed before.

Gert
Posts: 3075
Joined: Fri May 30, 2008 4:53 pm
Location: Berlin
Contact:

Re: Language driven templates

Post by Gert » Fri Feb 04, 2011 4:23 pm

Holger wrote:Ups, seems to be a bug I've never noticed before.
sitelink.php line 88:

Code: Select all

if (... && strlen($value) == 2 && ...)  
It's not a bug, it's a feature :lol:
Gert Ebersbach | CMSimple | Templates - Plugins - Services

Tata
Posts: 3190
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: Language driven templates

Post by Tata » Fri Feb 04, 2011 4:26 pm

You see, Holger, sometime even a lama like me can find solutions which gurus don't think about. And mostly the solution is found only because the lama does something absolutely unpredicctable, just as I did :-D. I wrote it on the very beginning of CMSimple_XH. I often know exactly WHAT. I just mostly don't know HOW. You - gurus - mostly know exactly HOW. You just don't think WHAT more. Keep cooperating.
And between your and Gert's lines I see you love each other. You just need more time to convince yourself that there is some potencially good point in what the other is saying.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

Gert
Posts: 3075
Joined: Fri May 30, 2008 4:53 pm
Location: Berlin
Contact:

Re: Language driven templates

Post by Gert » Fri Feb 04, 2011 4:28 pm

Tata wrote:And between your and Gert's lines I see you love each other
That's a really good description :lol: :lol: :lol:
Gert Ebersbach | CMSimple | Templates - Plugins - Services

Tata
Posts: 3190
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: Language driven templates

Post by Tata » Mon Apr 09, 2012 9:24 pm

Gert wrote:You will find a folder "2site" (like "2lang"), copy it and rename it to "anything", copy a language-file of your choice and rename it to "anything.php", do the same with a language-config-file of your choice ("anythingconfig.php") - ready, you can call the subsite by calling the folder "anything", login and set template and password by langconfig settings.
How shall it workk with 1.5.3? I tried to do all the steps as with 1.4.1, but stil only default template is loaded.
1. made/renamed a copy of 2site
2. made/renamed/adjusted the copy of sk.php => newsubsite.php
3. made/renamed/adjusted the copy of skconfig.php => newsubsiteconfig.php
4. made/renamed/adjusted tke copy of "template" = > "newsubsitetemplate"

Adjustments were made both in backend and in Nnotepad++. None of these helped.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

cmb
Posts: 13342
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: Language driven templates

Post by cmb » Mon Apr 09, 2012 9:57 pm

Hi Tata,

you additionally have to set $txc['subsite']['template'] in the respective SUBSITEconfig.php (Settings -> Website -> subsite -> template).

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

Tata
Posts: 3190
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: Language driven templates

Post by Tata » Tue Apr 10, 2012 11:13 am

Seems not to work with my CMSimple_XHv1.5.3. It works fine with 1.4.1. But the subsite - whatever I set up in configs loads only the default template.
After changing the subsite template in mysubsiteconfig.php also the default template is overwritten in config.php.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

Post Reply