|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
gaba Smarty n00b
Joined: 26 Aug 2003 Posts: 4 Location: Poland
|
Posted: Wed Aug 27, 2003 8:09 am Post subject: Smarty error: modifier '...' is not implemented |
|
|
I got this error and completely don't know the cause:
Fatal error: Smarty error: [in .../main.tpl line 4]: [plugin] modifier 'capitalize' is not implemented (Smarty.class.php, line 2543) in .../Smarty.class.php on line 2652
It affects all modifiers, not only 'capitalize'. Here's my folders and files' structure:
/public_html
- config.php
- index.php
/Smarty 2.5.0
/smarty_folders
- cache
- configs
- templates
-- main.tpl
- templates_c
main.tpl Code: | <!--{*Smarty*}-->
<html>
<head>
<title>[b]{$title|capitalize}</[/b]title>
<body>
...
</body>
</html> |
index.php
Code: |
<?php
require('config.php');
$smarty->assign('title', title);
$smarty->display($smarty->template_dir . '/main.tpl');
?> |
config.php
Code: | <?
define("SMARTY_DIR", "/home/me/Smarty-2.5.0/");
define("SMARTY1_DIR", "/home/me/smarty_folders");
require(SMARTY_DIR."libs/Smarty.class.php");
$smarty = new Smarty;
$smarty->template_dir = SMARTY1_DIR . '/templates';
$smarty->compile_dir = SMARTY1_DIR . '/templates_c';
$smarty->config_dir = SMARTY1_DIR . '/configs';
$smarty->cache_dir =SMARTY1_DIR . '/cache';
?> |
If you can help me, thanks a lot. |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Wed Aug 27, 2003 8:39 am Post subject: |
|
|
Did you copy the plugins directory to your SMARTY_DIR location? |
|
Back to top |
|
gaba Smarty n00b
Joined: 26 Aug 2003 Posts: 4 Location: Poland
|
Posted: Wed Aug 27, 2003 8:49 am Post subject: Smarty error: modifier '...' is not implemented |
|
|
Thanks for your reply
All plugins are in
/Smarty-2.5.0/libs/plugins/
modifier.capitalize.php is among others |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Wed Aug 27, 2003 8:59 am Post subject: |
|
|
then SMARTY_DIR should be:
define("SMARTY_DIR", "/home/me/Smarty-2.5.0/libs/"); |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Wed Aug 27, 2003 9:04 am Post subject: |
|
|
if the plugins-dir is not in the cwd (where your index.php is), you have to add:
$smarty->plugins_dir = array(SMARTY_DIR . '/pluins');
or
$smarty->plugins_dir = SMARTY_DIR . '/plugins';
to your setup of $smarty.
HTH
messju |
|
Back to top |
|
gaba Smarty n00b
Joined: 26 Aug 2003 Posts: 4 Location: Poland
|
Posted: Wed Aug 27, 2003 9:08 am Post subject: |
|
|
thanks a lot
I misunderstood what should be the target folder.
Thanks |
|
Back to top |
|
|
|
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
|