Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
Dedicated server web hosting provided by Guru-host.eu.
Fatal error: Smarty error: [plugin] could not load plugin

 
Post new topic   Reply to topic    Smarty Forum Index -> Plugins
View previous topic :: View next topic  
Author Message
lbottoni
Smarty n00b


Joined: 17 Jul 2009
Posts: 2

PostPosted: Fri Jul 17, 2009 1:02 pm    Post subject: Fatal error: Smarty error: [plugin] could not load plugin Reply with quote

Hi,
this is my first try with a plug in

hi have this message
----------------------------
Fatal error: Smarty error: [plugin] could not load plugin file 'prefilter.replacepath.php' (core.load_plugins.php, line 118) in /data/httpd01/html/cpanel/test/newself/system/framework/php/Smarty/libs/Smarty.class.php on line 1093
----------------------------

in /test/newself/system/framework/php/Smarty/plugins i have create this file

prefilter.replacepath.php
Code:

/*
* Smarty plugin
* -------------------------------------------------------------
* File: prefilter.replacepath.php
* Type: prefilter
* Name: replacepath
* Purpose: Convert html tags to be lowercase.
* -------------------------------------------------------------
*/
function smarty_prefilter_replacepath($source, &$smarty)
{
return preg_replace('!<(\w+)[^>]+>!e', 'strtoupper("$1")', $source);
}



/content/default/index.php
Code:


require_once($_SESSION["PATH"]["COREFRWPHP"]."/Smarty/libs/Smarty.class.php");

$smarty = new Smarty();
$smarty->load_filter("pre","replacepath");
$smarty->template_dir = $_SESSION["PATH"]["THEMEDEFAULT"];
$smarty->config_dir =$_SESSION["PATH"]["COREFRWPHP"]."/Smarty/wwwconfigs";
$smarty->compile_dir = $_SESSION["PATH"]["COREFRWPHP"]."/Smarty/templates_c";#777 come permessi
$smarty->cache_dir = $_SESSION["PATH"]["COREFRWPHP"]."/Smarty/cache";#777 come permessi
$smarty->assign("miavariabile","Ciao");
$smarty->display("index.htm");



/content/theme/default/index.htm (template)
Code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento senza titolo</title>
</head>

<body>

HTM!!!!!!!!!!!!!!! :D
{$miavariabile}
</body>
</html>


the {$miavariabile} work if i don't use the $smarty->load_filter("pre","replacepath");


why i have this error?? Confused
Back to top
View user's profile Send private message
lbottoni
Smarty n00b


Joined: 17 Jul 2009
Posts: 2

PostPosted: Fri Jul 17, 2009 2:01 pm    Post subject: Reply with quote

resolved!!!! error in the name of file!!! Embarassed
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Plugins 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