X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=plugins%2FLinksMagic.php;h=4ba04bd8bdb18bebe0ea7761ef3e37576fa87f1a;hb=824ae29017126c7420683e485d03fdc15ca4fab7;hp=7301c0f57fe52791e8746b72b6558eff33ad4aa0;hpb=6855525e48fad5de270500a5445c4f4ff85d8bda;p=diogenes.git
diff --git a/plugins/LinksMagic.php b/plugins/LinksMagic.php
index 7301c0f..4ba04bd 100644
--- a/plugins/LinksMagic.php
+++ b/plugins/LinksMagic.php
@@ -18,23 +18,30 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-require_once 'Plugin/Filter.php';
+require_once 'Plugin/Skel/Filter.php';
require_once 'diogenes/diogenes.hermes.inc.php';
/** The MailForm plugin allows you to insert a form to send
* an e-mail to a fixed recipient.
*/
-class LinksMagic extends Diogenes_Plugin_Filter
+class LinksMagic extends Diogenes_Plugin_Skel_Filter
{
/** Plugin name */
var $name = "LinksMagic";
/** Plugin description */
var $description = "This plugin allows you to mark external and secure (HTTPS) links in your pages.";
-
- /** Plugin parameters */
- var $params = array('main' => 1, 'sidebar' => 1);
+
+ /** Constructor.
+ */
+ function LinksMagic()
+ {
+ $this->declareParam('main', 1);
+ $this->declareParam('sidebar', 1);
+ }
+
+
/** Apply filtering to the input and return an output.
*
* @param $input
@@ -43,12 +50,12 @@ class LinksMagic extends Diogenes_Plugin_Filter
{
global $page;
- if ($this->params['sidebar'])
+ if ($this->getParamValue('sidebar'))
{
array_unshift($page->head, '');
}
- if ($this->params['main'])
+ if ($this->getParamValue('main'))
{
array_unshift($page->head, '');
}