Foren / Cotonti / Skins / 0.0.6 and plugin tpl

Kingsley
#1 22. Juli 2009, 22:13
I really like the new plugin map in the skinfile, it leaves me with one question though..

if I move all tpl to that folder, some things don't work after that.

Is there something I need to add in a php file so that the plugin knows it must search voor the tpl on a specific location?
If so, what do I need to add, and where?
Trustmaster
#2 22. Juli 2009, 22:14
Yes, there is the second parameter of sed_skinfile() for that. So the plugins should call it like:
$tpl_file = sed_skinfile('myplug', true);
May the Source be with you!
Kingsley
#3 22. Juli 2009, 22:20
I presume this must be added in pluginname.php. At the start? before or after if (!defined('SED_CODE')) { die('Wrong URL.'); }?

When I check news.php it stands under a bunch of other code, in this case on line 137, and the code is different too ($news = new XTemplate(sed_skinfile('news'));) Does that make any difference? Coz I know that Xtemplate thingy is rather new in cotonti..
Trustmaster
#4 22. Juli 2009, 23:19
sed_skinfile() is used to find the TPL file, then the path is passed to XTemplate constructor
May the Source be with you!