From: Andrew Dolgov Date: Tue, 7 May 2013 06:09:38 +0000 (+0400) Subject: move example plugins to -contrib X-Git-Tag: 1.7.9~25^2~5 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=2c967d60237c5890549b9c9fa680ee7adec10e6a;p=tt-rss.git move example plugins to -contrib --- diff --git a/plugins/example/example.js b/plugins/example/example.js deleted file mode 100644 index a31f2c2a..00000000 --- a/plugins/example/example.js +++ /dev/null @@ -1,3 +0,0 @@ -function example(value) { - alert("Value saved: " + value); -} diff --git a/plugins/example/init.php b/plugins/example/init.php deleted file mode 100644 index 67f50277..00000000 --- a/plugins/example/init.php +++ /dev/null @@ -1,85 +0,0 @@ -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 - } - - function api_version() { - return 2; - } - -} -?> diff --git a/plugins/example_api/init.php b/plugins/example_api/init.php deleted file mode 100644 index 1f896bad..00000000 --- a/plugins/example_api/init.php +++ /dev/null @@ -1,34 +0,0 @@ -host = $host; - - $host->add_api_method("example_testmethod", $this); - } - - function example_testmethod() { - return array(API::STATUS_OK, array("current_time" => time())); - } - - function api_version() { - return 2; - } - -} -?> diff --git a/plugins/example_article/init.js b/plugins/example_article/init.js deleted file mode 100644 index e69de29b..00000000 diff --git a/plugins/example_article/init.php b/plugins/example_article/init.php deleted file mode 100644 index 69902cbf..00000000 --- a/plugins/example_article/init.php +++ /dev/null @@ -1,34 +0,0 @@ -host = $host; - - $host->add_hook($host::HOOK_RENDER_ARTICLE, $this); - } - - function get_prefs_js() { - return file_get_contents(dirname(__FILE__) . "/init.js"); - } - - function hook_render_article($article) { - $article["content"] = "Content changed: " . $article["content"]; - - return $article; - } - - function api_version() { - return 2; - } - -} -?> diff --git a/plugins/example_feed/init.php b/plugins/example_feed/init.php deleted file mode 100644 index 1d653a9f..00000000 --- a/plugins/example_feed/init.php +++ /dev/null @@ -1,32 +0,0 @@ -host = $host; - - $host->add_hook($host::HOOK_FEED_PARSED, $this); - } - - function hook_feed_parsed($feed) { - _debug("I'm a little feed short and stout, here's my title: " . $feed->get_title()); - _debug("... here's my link element: " . $feed->get_link()); - } - - function api_version() { - return 2; - } - -} -?> diff --git a/plugins/example_routing/init.php b/plugins/example_routing/init.php deleted file mode 100644 index a7b19d78..00000000 --- a/plugins/example_routing/init.php +++ /dev/null @@ -1,56 +0,0 @@ -host = $host; - - $host->add_handler("test", "example", $this); - $host->add_handler("public", "getunread", $this); - } - - function getunread() { - print rand(0,100); # yeah right - } - - function example() { - print "example method called"; - } - - function csrf_ignore($method) { - return true; - } - - function before($method) { - return true; - } - - function after() { - return true; - } - - function api_version() { - return 2; - } - -} -?> diff --git a/plugins/example_vfeed/init.php b/plugins/example_vfeed/init.php deleted file mode 100644 index 31076190..00000000 --- a/plugins/example_vfeed/init.php +++ /dev/null @@ -1,52 +0,0 @@ -host = $host; - - $this->dummy_id = $host->add_feed(-1, 'Dummy feed', 'images/pub_set.svg', $this); - } - - function get_unread($feed_id) { - return 1234; - } - - function get_headlines($feed_id, $options) { - $qfh_ret = queryFeedHeadlines(-4, - $options['limit'], - $options['view_mode'], $options['cat_view'], - $options['search'], - $options['search_mode'], - $options['override_order'], - $options['offset'], - $options['owner_uid'], - $options['filter'], - $options['since_id'], - $options['include_children']); - - $qfh_ret[1] = 'Dummy feed'; - - return $qfh_ret; - } - - function api_version() { - return 2; - } - -} -?>