From e938b1de117cfde17a5773fe0c6fc92185c873fe Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 30 Dec 2012 13:36:40 +0400 Subject: rename plugin main class files --- plugins/example/example.php | 82 --------------------------------------------- plugins/example/init.php | 82 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+), 82 deletions(-) delete mode 100644 plugins/example/example.php create mode 100644 plugins/example/init.php (limited to 'plugins/example') diff --git a/plugins/example/example.php b/plugins/example/example.php deleted file mode 100644 index f3788ae8c..000000000 --- a/plugins/example/example.php +++ /dev/null @@ -1,82 +0,0 @@ -link = $host->get_link(); - $this->host = $host; - - $host->add_hook($host::HOOK_PREFS_TAB, $this); - } - - function save() { - $example_value = db_escape_string($_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 - } -} -?> diff --git a/plugins/example/init.php b/plugins/example/init.php new file mode 100644 index 000000000..f3788ae8c --- /dev/null +++ b/plugins/example/init.php @@ -0,0 +1,82 @@ +link = $host->get_link(); + $this->host = $host; + + $host->add_hook($host::HOOK_PREFS_TAB, $this); + } + + function save() { + $example_value = db_escape_string($_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 + } +} +?> -- cgit v1.2.3