Language driven templates

Questions about how to install and problems installing - please read the documentation first!
cmb
Posts: 13342
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: Language driven templates

Post by cmb » Tue Apr 10, 2012 11:32 am

Hi Tata,

there are two config options regarding the template. In config.php there is $cf['site']['template']. This is the default template for the complete CMSimple installation. In SUBSITEconfig.php there is $txc['subsite']['template']. If set this will override the default template in $cf['site']['template']. This works fine on my installation, and the configuration is totally independent.

Do you have something like $txc['site']['template'] in your SUBSITEconfig.php?

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

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

Re: Language driven templates

Post by Gert » Tue Apr 10, 2012 11:33 am

Hi Tata,

I guess you have TemplatSwitch_XH active.
Tata wrote:After changing the subsite template in mysubsiteconfig.php also the default template is overwritten in config.php.
I guess you have AN OLD TemplateSwitch_XH active,

Gert

PS: Try TemplateSwitch_XH 1.4, released today: http://www.ge-webdesign.de/cmsimpleplug ... eswitch_XH

But if you have choosen a template by TemplateSwitch_XH, this template will be active in all second languages and subsites, and you have to delete the session-cookie in your browser.
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 » Tue Apr 10, 2012 12:44 pm

No, templateswitch is not installed.
Installed are the latest:
advancedform, calendar, comments, fotogalerie, hi_fancybox, hi_kcfinder, hi_pd_scripting,
imagescroller, memberpages, realblog, uploader and wdir.

Tried again:

1. 2site copied/renamed to mysubsite and there cmsimplesubsite.htm renamed to mysubsite.htm
2. sk.php and skconfig.php copied/renamed to mysubsite.php and mysubsiteconfig.php - in mysubsiteconfig.php also inserted

Code: Select all

$txc['subsite']['template']="mysubsite";
$txc['subsite']['password']="test2";

added new template [mysubsite]
Made no change. The default template is loaded with /mysite and mysite/mysubsite.
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 » Tue Apr 10, 2012 1:32 pm

Tata wrote:and there cmsimplesubsite.htm renamed to mysubsite.htm
That's wrong :!:

cmsimplesubsite.htm must remain cmsimplesubsite.htm,

Gert
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 » Tue Apr 10, 2012 1:41 pm

Then calling mysite/mysubsite I get Access denied
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 » Tue Apr 10, 2012 2:10 pm

Hallo Tata,

have you installed hi_shutter_reloaded? For me that caused the same problem. Maybe other plugins from Holger causes this problem by this line in admin.php:

Code: Select all

if ((!function_exists('sv')) || (strlen($sl) !== 2) || preg_match('/adm.php/i', sv('PHP_SELF')))die('Access denied'); 
... or so, you should search for "strlen($sl)" and delete in this case "(strlen($sl) !== 2) || " from this line.

Please check all plugins from Holger for that code,

Gert
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 » Tue Apr 10, 2012 2:33 pm

Seems to be the reason. Removing it only from hi_fancybox did not help. But then I found the same in memberpages plugin and removin it from there made it working.
Thank you for the hint.
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 » Tue Apr 10, 2012 2:46 pm

Tata wrote:But then I found the same in memberpages plugin ...
I didn't know, that Holger had his hands on memberpages some years ago:

Code: Select all

if ((!function_exists('sv')) || (strlen($sl) !== 2) || eregi('admin.php', sv('PHP_SELF')))die('Access denied'); //HI prevent direct access      
Have a look at the comment behind, I never have tested memberpages under subsites, and so that old code still is inside. I think it was added before I rewrote Memberpages for CMSimple_XH,

Gert
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 » Tue Apr 10, 2012 3:05 pm

I'll do it, however no more warnings occured. Only now I see, that all plugins communicate since then only in EN. A little confusing in some cases.
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 » Tue Apr 10, 2012 4:07 pm

Hi Tata,
Tata wrote:that all plugins communicate since then only in EN.
To be exact: the plugins communicate in mysubsite-ish ;), as the mysubsite.php files in the plugin's language folders are a copy of default.php. To change that, you can copy sk.php to mysubsite.php for every plugin.

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

Post Reply