Galihom Posted August 9, 2014 Report Posted August 9, 2014 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 Quote
Tom Posted August 9, 2014 Report Posted August 9, 2014 Are you calling Template::Show yourself somewhere? That's trying to load in a template from a location it shouldn't be. Quote
Galihom Posted August 10, 2014 Author Report Posted August 10, 2014 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 : http://mysite.fr/?template=folder_one http://mysite.fr/?template=folder_two Quote
Tom Posted August 10, 2014 Report Posted August 10, 2014 If you print_r(CURRENT_SKIN); what does it return? Quote
Galihom Posted August 10, 2014 Author Report Posted August 10, 2014 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 ? Quote
Tom Posted August 10, 2014 Report Posted August 10, 2014 That wasn't supposed to fix it, only reveal what CURRENT_SKIN was set to... strange. You shouldn't really be printing things like that on a live site, especially not permanently. Quote
Galihom Posted August 10, 2014 Author Report Posted August 10, 2014 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 Quote
Tom Posted August 10, 2014 Report Posted August 10, 2014 Do you have an actual link? Can you tell us what it's printing for CURRENT_SKIN in each case? Quote
Galihom Posted August 10, 2014 Author Report Posted August 10, 2014 I'm not sure to understand, if you want the website's link it's : www.airnationalva.fr Where can I found what you call by "printing for CURRENT_SKIN in each case" Thanks for your help Quote
Tom Posted August 11, 2014 Report Posted August 11, 2014 Ok and can you name the folders you're using that work? print_r(CURRENT_SKIN) should output the value of CURRENT_SKIN, allowing you to see what's being set (and perhaps where it's going wrong) Quote
Galihom Posted August 11, 2014 Author Report Posted August 11, 2014 For sure ! You have = http://airnationalva.fr/?template=ocean_blue and http://airnationalva.fr/?template=ocean_blue_french And exactly when I add print_r(CURRENT_SKIN), I saw a print with ocean_blue or ocean_blue_french Quote
Tom Posted August 11, 2014 Report Posted August 11, 2014 And what does it print without ?template=... ? Quote
Galihom Posted August 11, 2014 Author Report Posted August 11, 2014 Ok now I added again the code in codon.config.php. Sorry the company was out with this. Quote
Tom Posted August 11, 2014 Report Posted August 11, 2014 can you also print_r($_SESSION['template']); at the same time? Quote
Galihom Posted August 11, 2014 Author Report Posted August 11, 2014 I did it and same result with the "?=template" EDIT : I've issues cause my website appears without www. ! With www. behind the adress no problem, how to force www. to be present ? Quote
Tom Posted August 11, 2014 Report Posted August 11, 2014 Inside .htaccess in the root of your public folder: RewriteEngine On RewriteCond %{HTTP_HOST} ^airnationalva.fr [NC] RewriteRule ^(.*)$ http://www.airnationalva.fr/$1 [L,R=301] Quote
Galihom Posted August 12, 2014 Author Report Posted August 12, 2014 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. Quote
Members Vangelis Posted August 13, 2014 Members Report Posted August 13, 2014 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 Quote
Galihom Posted August 14, 2014 Author Report Posted August 14, 2014 I did this but already the issues so I setup twice phpvms and add a selector page at index.php. Thanks for helping Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.