dbFields = array( 'tabSize'=>'2', 'toolbar'=>'"bold", "italic", "heading", "|", "quote", "unordered-list", "|", "link", "image", "code", "horizontal-rule", "|", "preview", "side-by-side", "fullscreen", "guide"', 'autosave'=>0, 'spellChecker'=>0 ); } // Returns true if the plugins is loaded on the controller defined private function enabled() { global $layout; return in_array($layout['controller'], $this->loadWhenController); } public function adminHead() { $html = ''; if( $this->enabled() ) { $html .= ''; $html .= ''; } return $html; } public function form() { global $Language; $html = '
'; $html .= ''; $html .= ''; $html .= '
'; $html .= '
'; $html .= ''; $html .= ''; $html .= '
'; $html .= '
'; $html .= ''; $html .= 'getDbField('autosave')?'checked':'').'>'; $html .= ''; $html .= '
'; $html .= '
'; $html .= ''; $html .= 'getDbField('spellChecker')?'checked':'').'>'; $html .= ''; $html .= '
'; return $html; } public function adminBodyEnd() { global $layout; global $Language; $html = ''; // Load CSS and JS only on Controllers in array. if(in_array($layout['controller'], $this->loadWhenController)) { $html .= ' '; } return $html; } }