title = get_string('pluginname', 'block_search'); } //init // only one instance of this block is required function instance_allow_multiple() { return false; } //instance_allow_multiple // label and button values can be set in admin function has_config() { return true; } //has_config function get_content() { global $CFG; if (empty($CFG->enableglobalsearch)) { return ''; } //cache block contents if ($this->content !== NULL) { return $this->content; } //if $this->content = new stdClass; //basic search form $this->content->text = '
' . '' . '' . '' . '
'; //no footer, thanks $this->content->footer = ''; return $this->content; } //get_content function specialisation() { //empty! } //specialisation /** * wraps up to search engine cron */ function cron(){ global $CFG; include($CFG->dirroot.'/search/cron.php'); } } //block_search