link = $host->get_link(); $this->host = $host; $host->add_hook($host::HOOK_PREFS_TAB, $this); } function save() { $example_value = db_escape_string($this->link, $_POST["example_value"]); $this->host->set($this, "example", $example_value); echo "Value set to $example_value"; } function get_prefs_js() { return file_get_contents(dirname(__FILE__) . "/example.js"); } function hook_prefs_tab($args) { if ($args != "prefPrefs") return; print "
"; print "
"; // print_r($this->host->set($this, "example", rand(0,100))); // print_r($this->host->get_all($this)); $value = $this->host->get($this, "example"); print "
"; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print "
".__("Sample value")."
"; print "

"; print "

"; print "
"; #pane } } ?>