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

Smarty error: modifier '...' is not implemented

 
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 -> General
View previous topic :: View next topic  
Author Message
gaba
Smarty n00b


Joined: 26 Aug 2003
Posts: 4
Location: Poland

PostPosted: Wed Aug 27, 2003 8:09 am    Post subject: Smarty error: modifier '...' is not implemented Reply with quote

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
View user's profile Send private message
boots
Administrator


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

PostPosted: Wed Aug 27, 2003 8:39 am    Post subject: Reply with quote

Did you copy the plugins directory to your SMARTY_DIR location?
Back to top
View user's profile Send private message
gaba
Smarty n00b


Joined: 26 Aug 2003
Posts: 4
Location: Poland

PostPosted: Wed Aug 27, 2003 8:49 am    Post subject: Smarty error: modifier '...' is not implemented Reply with quote

Thanks for your reply

All plugins are in
/Smarty-2.5.0/libs/plugins/

modifier.capitalize.php is among others
Back to top
View user's profile Send private message
boots
Administrator


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

PostPosted: Wed Aug 27, 2003 8:59 am    Post subject: Reply with quote

then SMARTY_DIR should be:

define("SMARTY_DIR", "/home/me/Smarty-2.5.0/libs/");
Back to top
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Wed Aug 27, 2003 9:04 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
gaba
Smarty n00b


Joined: 26 Aug 2003
Posts: 4
Location: Poland

PostPosted: Wed Aug 27, 2003 9:08 am    Post subject: Reply with quote

thanks a lot

I misunderstood what should be the target folder.
Thanks Smile
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 -> General 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