Skip to main content.

Saturday, October 30, 2004

This article is oriented towards plugin authors. It explains how you can use plugin options in combinations with the Nucleus parser functions in order to allow easy templating of the plugin-generated output.

Note that this article is actually sort of a draft. I started to write it exactly 2 months ago, and I have a feeling that it will never get finished, so I'm publishing it as-is. The most important part of the article, the sample code, can be found here: NewsFeed and NewsFeed_Parser plugins. They're both unfinished and not compatible with other versions of the plugin. Their implementation also slightly differs from what's in the code samples below.

Monday, August 30, 2004

If you're a plugin author, remember that a plugin option name can be no longer than 20 characters. While creating an option with a longer name won't fail, getting or setting the option value will.

This example won't work, e.g.

$this->createOption('ReadonlyNumericalTextOption1', '...); /succeeds
$this->setOption('ReadonlyNumericalTextOption1','foo'); // fails
$v = $this->getOption('ReadonlyNumericalTextOption1'); // fails

Knowing this could save you some time debugging a mysterious problem :)