[geeklog-devel] Proposal: Plugin vars in templates

Oliver Spiesshofer oliver at spiesshofer.com
Sat Aug 11 15:17:14 EDT 2007


We should urgently take up the discussion again about the plugin vars...
that has been sleeping for 6 month now or so...

Oliver

Joe Mucchiello wrote:

> This is a simple suggestion. The professional theme should be modified

> to add the following to just about every thtml file:

> {plg1}{plg2}{plg3}{plg4}{plg5}

>

> The location would be "at the end" but before any form buttons.

>

> Why? So plugins like the ratings plugin would work across version

> upgrades without necessitating that the user go in an modify their

> thtml files over and over again.

>

> In the plugin's config file would be a placeholder option:

> $_PLG_CONF['placeholder'] = 'plg3'; The user would be responsible for

> making sure each plugin requiring the placeholder service had a unique

> placeholder. Now when the template wanted to add itself to an existing

> page it would use $T->set_var($_PLG_CONF['placeholder'], $mycontent);

> to do so. As long as the user ensures the placeholders are unique,

> nothing stomps all over something else.

>

> About the only other change probably needed would be to add the

> following to the Template class' constructor.

>

> for ($i = 1 to 5) { set_var("plg$i", ''); }

>

> I'm sure folks using stuff like the Ratings plugin would find this

> helpful.

>

> ----

> Joe Mucchiello

> Throwing Dice Games

> http://www.throwingdice.com

> _______________________________________________

> geeklog-devel mailing list

> geeklog-devel at lists.geeklog.net

> http://eight.pairlist.net/mailman/listinfo/geeklog-devel

>

>





More information about the geeklog-devel mailing list