1
Tiran_Kenja
Module specific Smarty Plugins

Heya!

Kinda new to this place. But I have been working a bit on wrapping a Smarty based blog (bblog) into a XOOPS module and it's been going fine. I just finished making it use the XOOPS tempting system to render it's templates. And it works fine. BUT it use a lot of plugins and that's a problem.

Normal operation work fine. I can set my own plugin dirs fine there. But when installing or updating the module I can't find any way of setting this up before XOOPS tries to parse the templates.

So I'm wondering if there is a way around this. Or perhaps it would be a nice feature if you could set up plugin dirs up in the xoops_version file?

2
Dave_L
Re: Module specific Smarty Plugins
  • 2004/8/12 20:18

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


I don't have a good solution, but I've run into the same problem. Although you can register a Smarty plugin dynamically, Xoops' "pre-compiling" of the templates bypasses that, resulting in errors.

The only remedy I've found is to locate the custom plugins in class/smarty/plugins, which isn't really desirable.

I've heard that a future version of XOOPS (2.1?) will no longer precompile the templates, so that may solve the issue.

3
skalpa
Re: Module specific Smarty Plugins
  • 2004/8/12 20:33

  • skalpa

  • Quite a regular

  • Posts: 300

  • Since: 2003/4/16


Quote:
I've heard that a future version of XOOPS (2.1?) will no longer precompile the templates, so that may solve the issue.


Exact (I think I'm the one who said that... ). It's already done and will be in CVS soon.

Now for your problem, I can't find a real solution... I think people like Dave got problem because they assign object to templates variables, and this can be surrounded using well-placed {if isset($var)}. But for plugins I can't find anything similar.
One solution would be to put all your custom plugins into a specific folder and tell people to copy this folder files into /class/smarty/plugins/ to ensure they can be autoloaded by smarty. It's not perfect, but the only one that comes to my mind @ the mo...

skalpa.>

Login

Who's Online

142 user(s) are online (111 user(s) are browsing Support Forums)


Members: 0


Guests: 142


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits