Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

something is not working

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Installation and Setup
View previous topic :: View next topic  
Author Message
dafire
Smarty n00b


Joined: 11 Aug 2004
Posts: 3

PostPosted: Wed Aug 11, 2004 7:22 pm    Post subject: something is not working Reply with quote

I can't use debugging or config_load in my templates.. in the demo it works.. I get following error:

Fatal error: Smarty error: [in index.tpl line 2]: syntax error: unrecognized tag 'config_load' (Smarty_Compiler.class.php, line 556) in /usr/local/daphp/Smarty/libs/Smarty.class.php on line 1083

my index.tpl:
Code:

{config_load file=test.conf section="setup"}

{include file = "header.tpl"}


<div id=content>
   <h1>{t}Welcome to Neocron2 Betatest{/t}</h1>


</div>

{include file = "footer.tpl"}


and index.php:
Code:

   require('Smarty.class.php');

   $GLOBALS['t_language_from'] = 'en';
   $GLOBALS['t_language'] = 'de';
   // Path for translation directories
   $GLOBALS['t_gettext_message_dir'] = '../languages/'; // ending / required
   // Full path to msgfmt binary
   $GLOBALS['t_msgfmt_location'] = '/usr/bin/msgfmt';
   // An array of all languages you want to support.  This is only
   // used in development mode so you don't need to change
   // t_language and rebrowse for each language you want to support.
   $GLOBALS['t_language_all'] = array(
      'fr', 'de', 'it', 'en', 'es'
   );
   
   putenv ("LC_ALL={$GLOBALS[t_language]}");
   bindtextdomain ('messages', $t_gettext_message_dir);
   bind_textdomain_codeset('messages', 'UTF-8');
   textdomain('messages');
   
   $smarty = new Smarty;
   
   $smarty->template_dir = '../templates/';
   $smarty->compile_dir = '../templates_c/';
   $smarty->config_dir = '../configs/';
   $smarty->cache_dir = '../cache/';
   $smarty->plugins_dir = '../plugins/';

   $smarty->assign("version",$_GET['VERSION']);
   $smarty->display('index.tpl');


I don't need to include anything else than Smarty.class.php, do I ?
Back to top
View user's profile Send private message
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Wed Aug 11, 2004 7:57 pm    Post subject: Reply with quote

Well, you are doing a require 'Smarty.class.php' but you set your plugins dir to the parent path. That suggests to me that you moved your plugins dir from the Smarty distribution. Did you?
Back to top
View user's profile Send private message
dafire
Smarty n00b


Joined: 11 Aug 2004
Posts: 3

PostPosted: Wed Aug 11, 2004 8:06 pm    Post subject: Reply with quote

I didn't move the plugins dir but in fact this row caused the problem. I guess smarty thinks that "../plugins/" is a absolut path.
After moving my plugins into the webroot and setting it to just "plugins" it works fine
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Installation and Setup All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP