|
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 |
my_elygen Smarty n00b
Joined: 22 Jun 2006 Posts: 3 Location: New Jersey , USA
|
Posted: Thu Jun 22, 2006 2:16 pm Post subject: custom plugin not working |
|
|
i am tring to use custom plugins. the fckeditor is one of them. now at the risk of sounding like an newbie ass i need help getting the to work.
i am setting the plugins_dir
array_unshift($t->plugins_dir, dirname(__FILE__).'/smarty/plugins') ;
including the file
include (dirname(__FILE__).'/smarty/plugins/function.fckeditor.php');
and registering it
$t->register_function('fckeditor', 'fckeditor');
When i run the template no error just a blank area where the editor should be.
what am i doing wrong.
Thanks
Todd |
|
Back to top |
|
my_elygen Smarty n00b
Joined: 22 Jun 2006 Posts: 3 Location: New Jersey , USA
|
Posted: Mon Jun 26, 2006 5:17 pm Post subject: ? |
|
|
is it a stupid question? |
|
Back to top |
|
TGKnIght Smarty Junkie
Joined: 07 Sep 2005 Posts: 580 Location: Philadelphia, PA
|
Posted: Mon Jun 26, 2006 5:27 pm Post subject: |
|
|
You don't need to include your plugins if you are putting them in the plugins directory... They will be auto-included as long as they can be found in the $smarty->plugins_dir variable.
Regarding how you set your plugins directory.. It looks correct if you want to make your custom plugins_dir the first to be searched instead of the one located off the smarty class directory.
what is "dirname(__FILE__).'/smarty/plugins'" ?
Is this your custom directory or are you simply pointing back to the one located in the same directory as your smarty.class.php?? _________________ Smarty site with one index.php controller file
Working with MySQL and Smarty
SmartyColumnSort
Custom Smarty Javascript Debug Template |
|
Back to top |
|
my_elygen Smarty n00b
Joined: 22 Jun 2006 Posts: 3 Location: New Jersey , USA
|
Posted: Mon Jun 26, 2006 7:04 pm Post subject: |
|
|
i used what is "dirname(__FILE__).'/smarty/plugins'" because i put a plugins directory in the rootfolder>smarty>plugins just for testing. i originally put the plugin in the directory with the rest of the plug-ins that came with smarty.
From what i've read i assumed the plugins autoloaded but since it was not working i tried to include them. i assumed with it in both directory and both being called it would have to work, but apparently i was wrong.
there are no errors but the fckeditor does not display anything.
It should work this way (correct me if im wrong) with the fckeditor (or any plugin) if i put it in the plugins directory. then i just have to call {fckeditor ....} in the template and this should just then display. Or is there an _init i have to add |
|
Back to top |
|
mjs Smarty Rookie
Joined: 13 May 2006 Posts: 9 Location: Lithuania, Vilnius
|
Posted: Fri Aug 04, 2006 1:17 pm Post subject: |
|
|
Same problem I have... I got just blank page... with code:
Code: | {fckeditor BasePath="/modules/fckeditor/" InstanceName="test" Width="650px" Height="300px"} | and if I deleting that string everything works fine....
Where is the problem? |
|
Back to top |
|
mjs Smarty Rookie
Joined: 13 May 2006 Posts: 9 Location: Lithuania, Vilnius
|
Posted: Fri Aug 04, 2006 2:13 pm Post subject: |
|
|
LOL
function.fckeditor.php file was not in right plugins directory...
It must be here:
{smarty_dir}/libs/plugins/function.fckeditor.php |
|
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
|