Jump to content

[SOLVED] Two languages and TemplateSet.class problem


Galihom

Recommended Posts

Hi,

Firstly, I should like to apologise for my English ! I wanted to propose my Virtual airline's website in different languages so with forum's explanation I did like this : http://forum.phpvms....ins/#entry22043

I started to translate and after a bit a problem occured, I tried to resolve it by myself without solution and I searched an alternative on forum where the same problem is exposed but the solution isn't published.

See you here :http://forum.phpvms....-two-languages/

My issue :

Notice: The template file "/home/airlibva/www//lib/skins/ocean_blue/action.php/acars/data/header.tpl" doesn't exist in /home/airlibva/www/core/classes/TemplateSet.class.php on line 248

Maybe the problem is here :

/home/airlibva/www//lib/skins/ocean_blue/action.php/acars/data/header.tpl

Please, Do You've any idea where is the trouble ?

Thanks a lot

Link to comment
Share on other sites

Hi Tom, thank's for your answer, no I didn't to. I just added in /core/codon.config.php this :

session_start();

if(isset($_GET['template']) && $_GET['template'] != ''){

$_SESSION['template'] = $_GET['template'];

define('CURRENT_SKIN',$_GET['template']);

}

if(isset($_SESSION['template']) && $_SESSION['template'] != '')

{

define('CURRENT_SKIN',$_SESSION['template']);

}

Then I created a second skin's folder and make link to there in my core_navigation.php like this :

Link to comment
Share on other sites

I added it like this and it works :

session_start();

if(isset($_GET['template']) && $_GET['template'] != ''){

$_SESSION['template'] = $_GET['template'];

define('CURRENT_SKIN',$_GET['template']);

}

if(isset($_SESSION['template']) && $_SESSION['template'] != '')

{

define('CURRENT_SKIN',$_SESSION['template']);

}

print_r(CURRENT_SKIN);

Thanks a lot !

Can you explain me why the first time was failed ?

Link to comment
Share on other sites

Exactly, I don't understand : I don't do anything and now the issues is come back !

Notice: The template file "/home/airlibva/www//lib/skins/ocean_blue_french/action.php/acars/data/header.tpl" doesn't exist in /home/airlibva/www/core/classes/TemplateSet.class.php on line 248

The issues appears when I use : http://www.mysite.fr but when I use http://mysite.fr?template=folder1 ( or 2), all is right

Link to comment
Share on other sites

Thanks Tom ! Now I've www behind my website adress but... now the issues is come with "www"...

I don't understand really, yesterday with website adress and www it worked...

I must be inactive by comment this code in order to use the VA, really don't understand

if(isset($_GET['template']) && $_GET ['template'] != ''){

$_SESSION['template'] = $_GET['template'];

define('CURRENT_SKIN',$_GET['template']);

}

if(isset($_SESSION['template']) && $_SESSION['template'] != '')

{

define('CURRENT_SKIN',$_SESSION['template']);

}

print_r(CURRENT_SKIN);

print_r($_SESSION['template']);

already this error with the precedent code uncomment :

Notice: The template file "/home/airlibva/www//lib/skins/ocean_blue_french/action.php/acars/data/header.tpl" doesn't exist in /home/airlibva/www/core/classes/TemplateSet.class.php on line 248

EDIT : I delete our actual skin, we have an other problem more important to corrige...

EDIT: Login problem solved, always the skin problem.

Link to comment
Share on other sites

  • Members

Step 1 add the this code on the top of your local.config.php

<?php
session_start();
if(isset($_GET['template']) && $_GET['template'] != ''){
		    $_SESSION['template'] = $_GET['template'];
		    define('CURRENT_SKIN',$_GET['template']);
}
if(isset($_SESSION['template']) && $_SESSION['template'] != '')
{
		    define('CURRENT_SKIN',$_SESSION['template']);
}
?>

Step 2 Create 2 folders

WIth the names

ocean_blueEn

and

ocean_blueFR

In the admin section make 1 of the 2 default template

Make sure your links are correct.

If you want to open your website in english your link should be

www.yourlink.com/index.php/acars/?template=ocean_blueEn

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...