|
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 |
atm0n3r Smarty n00b
Joined: 05 Nov 2011 Posts: 3
|
Posted: Sat Nov 05, 2011 3:33 pm Post subject: Plugin install |
|
|
greetings ....
Since yesterday, I try to install a plugin on smarty. I read the tutorial on the installation (not complicated), but impossible to run the plugin
here is the plugin I want to run: http://sourceforge.net/projects/smartypages/
I understand it, simply add the php file in the plugin folder and add the tag in the tpl.
but this does not work. (I also try with another plugin, and I still have the same error)
the error:
Quote: | [Sat Nov 05 16:12:23 2011] [error] [client 127.0.0.1] PHP Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "./templates/post.tpl" on line 5 "{return_paged_results query=$query}" unknown tag "return_paged_results"' in /var/www/libs/sysplugins/smarty_internal_templatecompilerbase.php:617\nStack trace:\n#0 /var/www/libs/sysplugins/smarty_internal_templatecompilerbase.php(402): Smarty_Internal_TemplateCompilerBase->trigger_template_error('unknown tag "re...', 5)\n#1 /var/www/libs/sysplugins/smarty_internal_templateparser.php(2366): Smarty_Internal_TemplateCompilerBase->compileTag('return_paged_re...', Array)\n#2 /var/www/libs/sysplugins/smarty_internal_templateparser.php(3064): Smarty_Internal_Templateparser->yy_r35()\n#3 /var/www/libs/sysplugins/smarty_internal_templateparser.php(3164): Smarty_Internal_Templateparser->yy_reduce(35)\n#4 /var/www/libs/sysplugins/smarty_internal_smartytemplatecompiler.php(105): Smarty_Internal_Templateparser->doParse(11, '???')\n#5 /var/www/libs/sysplugins/smarty_internal_templatecompilerbase.php(171): Sma in /var/www/libs/sysplugins/smarty_internal_templatecompilerbase.php on line 617, referer: http://localhost/ |
for me, I feel that the plugin is not loaded!
I try to define the path of the folder plugins with this:
Quote: | $smarty->plugins_dir[] = '/var/www/plugins'; |
but I have this error:
Quote: | [Sat Nov 05 16:29:26 2011] [error] [client 127.0.0.1] PHP Notice: Indirect modification of overloaded property Smarty::$plugins_dir has no effect in /var/www/index.php on line 20, referer: http://localhost/ |
if anyone has an idea about the problem |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Sat Nov 05, 2011 4:46 pm Post subject: |
|
|
As with Smarty 3.1 you can't access the directory properties of the Smarty object directly. You must use corresponding setter methodes like setPluginsDir() or addPluginsDir().
So $smarty->addPluginsDir('/var/www/plugins'); should solve your problem. |
|
Back to top |
|
atm0n3r Smarty n00b
Joined: 05 Nov 2011 Posts: 3
|
Posted: Sat Nov 05, 2011 11:31 pm Post subject: |
|
|
U.Tews wrote: | As with Smarty 3.1 you can't access the directory properties of the Smarty object directly. You must use corresponding setter methodes like setPluginsDir() or addPluginsDir().
So $smarty->addPluginsDir('/var/www/plugins'); should solve your problem. |
Work... perfect ! thanks |
|
Back to top |
|
ivica Smarty Rookie
Joined: 11 Jul 2016 Posts: 6
|
Posted: Mon Jul 11, 2016 8:46 pm Post subject: |
|
|
atm0n3r wrote: | U.Tews wrote: | As with Smarty 3.1 you can't access the directory properties of the Smarty object directly. You must use corresponding setter methodes like setPluginsDir() or addPluginsDir().
So $smarty->addPluginsDir('/var/www/plugins'); should solve your problem. |
Work... perfect ! thanks |
I have same problem, but do not work:
Application::$plugins_dir has no effect
after
$this->addPluginsDir('http://localhost/tshirtshop4/presentation/smarty_plugins/'); |
|
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
|