Loading...
 
Features / Usability

Features / Usability


How do plugins integrate with Smarty?

posts: 38 United States

Apologies if this isn't in the right forum... I've look at all of them, and I'm not sure if it should go here or in Development. By the name "Development" sounds like the better choice, but by the description ("developers to discuss future features and releases") it definitely does not, as this question is more on how to develop with the existing product.

My question concerns plugins. I have looked at the page on Creating a Wiki Plugin. From that I see that a plug-in's main function (named based on the plug-in's file name) is supposed to return the HTML to be inserted in place of where the plug-in appeared. Now I go and look at a specific plugin, for Trackerlist. But instead of seeing it create HTML, I see it passing a bunch of parameters to the Smarty Templating engine, after which it returns "$back" which isn't even declared or referenced anywhere else in the php script. After reading a bit on smarty, I would expect to see a call that looks something like "$smarty->display('index.tpl')" to render the actual output, or maybe a similar function which returns the HTML instead of printing it. But I don't see this, and I don't see it documented where it is pulling the Smarty template from to actually generate this output. I suspect that I need this template to actually modify what the output rendering is, but where is it?

Can somebody point me to some actual information on how this works? At the moment the plugin is just a black box, and I don't have enough information to make any meaningful modifications to it. Thanks!

posts: 3665 United States

Are you just looking for the template (TPL) for a specific plugin? Look in ..\templates\wiki-plugins\..

But note that not all templates have a specific plugin. Some very simple ones (such as the BOX plugin) simply output directly from the plugin PHP file.

It might help if you further explain what you're trying to accomplish (and be sure to specify which Tiki version you're using).

HTH,

- Rick  |  My Tiki Blog |  My Tiki UserPage

Why be a dummy? Get smarty! TikiForSmarties.com
Tiki for Smarties, your source for the best (and only) Tiki books, guides, and tutorials.

Upcoming Events

1)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7) 
Tiki birthday
8)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting