createOption('NumericTextOption1', 'Numeric text option', 'text', '', 'datatype=numerical'); $this->createOption('ReadonlyTextOption1', 'Readonly text option', 'text', '', 'access=readonly'); $this->createOption('ReadonlyNumericalTextOption1', 'Readonly, Numerical text option', 'text', '', 'access=readonly;datatype=numerical'); $this->createOption('ReadonlyTextAreaOption1', 'Readonly textarea option', 'textarea', 'This textarea is readonly (at least it should be :-p)', 'access=readonly'); $this->createOption('HiddenTextOption1', 'Hidden text option', 'text', 'hidden...', 'access=hidden'); // itemoptoins $this->createItemOption('NumericTextOption1', 'Numeric text option', 'text', '', 'datatype=numerical'); $this->createItemOption('ReadonlyTextOption1', 'Readonly text option', 'text', '', 'access=readonly'); $this->createItemOption('ReadonlyNumericalTextOption1', 'Readonly, Numerical text option', 'text', '', 'access=readonly;datatype=numerical'); $this->createItemOption('ReadonlyTextAreaOption1', 'Readonly textarea option', 'textarea', 'This textarea is readonly (at least it should be :-p)', 'access=readonly'); } // }}} // -- events ------------------------------------ {{{ function event_PrePluginOptionsUpdate(&$data) { /* * this way of saving the date into the readonly option doesn't work anymore * since readonly options aren't saved anymore automatically and thus this event is * not triggered for a readonly option */ if (($this->getID() == $data['plugid']) && ($data['optionname'] == 'ReadonlyTextOption1')) { $data['value'] = date('Y-m-d H:i:s'); } /* * but we can do it by using it while this event is triggered for a non-readonly * option (there are better events that are better suited for this task) */ if (($this->getID() == $data['plugid']) && ($data['optionname'] == 'NumericTextOption1')) { $this->setOption('HiddenTextOption1', date('Y-m-d H:i:s')); $this->setOption('ReadonlyTextOption1', date('Y-m-d H:i:s')); } } // }}} /* jedit edit rules | http://jedit.org: powerful, open-source (gpl) texteditor :mode=php:tabSize=4:indentSize=4:noTabs=false:encoding=UTF-8: :folding=explicit:collapseFolds=1:wrap=none:maxLineLen=85: */ } ?>