createCategoryOption("title", "title", "text", ""); $this->createCategoryOption("body", "body", "textarea", ""); $this->createCategoryOption("more", "more", "textarea", ""); } /*function event_PreAddItemForm(&$data) { $contents =& $data['contents']; if (! $contents['hasBeenSet']) { $contents['title'] = $this->getOption('title'); $contents['body'] = $this->getOption('body'); $contents['more'] = $this->getOption('more'); $contents['hasBeenSet'] = 1; } }*/ function doAction($type) { global $member; if (! $member->isLoggedIn()) return; switch ($type) { case 'get': $cid = intGetVar('cid'); if ($cid < 1) return; $data = array(); $data[]= $this->getCategoryOption($cid, 'title'); $data[]= $this->getCategoryOption($cid, 'body'); $data[]= $this->getCategoryOption($cid, 'more'); echo @join("[[[ itemformat_splitter ]]]", $data); break; default: break; } } function event_AdminPrePageHead(&$data){ global $CONF; $path = $CONF['PluginURL']; switch ($data['action']) { case 'createitem': $data['extrahead'] .= <<< EOS EOS; break; default: return; } $this->ob_ok = ob_start(); } function event_AdminPrePageFoot(){ if (!$this->ob_ok) return; $html = ob_get_contents(); ob_end_clean(); // add event $target = '