diff options
author | Andrew Dolgov <[email protected]> | 2013-07-10 16:45:37 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2013-07-10 16:45:37 +0400 |
commit | 0790ea4643c47284f0bfe589e050ff484f96bba2 (patch) | |
tree | 7b8b66eb9679398a461858b68a3a98e90db89ad3 | |
parent | 4f2a2ca945f61437cfe9ed1e395e5461c4f55511 (diff) |
remove query_headlines example plugin
-rw-r--r-- | plugins/query_headlines/init.js | 0 | ||||
-rw-r--r-- | plugins/query_headlines/init.php | 50 |
2 files changed, 0 insertions, 50 deletions
diff --git a/plugins/query_headlines/init.js b/plugins/query_headlines/init.js deleted file mode 100644 index e69de29bb..000000000 --- a/plugins/query_headlines/init.js +++ /dev/null diff --git a/plugins/query_headlines/init.php b/plugins/query_headlines/init.php deleted file mode 100644 index 5d71d0356..000000000 --- a/plugins/query_headlines/init.php +++ /dev/null @@ -1,50 +0,0 @@ -<?php -class Query_Headlines extends Plugin { - // example of the use of the HOOK_QUERY_HEADLINES - // this example will change the author and tags to be empty string so they don't display - // the arguements are: - // - the array of elements that are returned by queryFeedHeadlines - // - the length that the caller wants to truncate the content preview to - // - a boolean that indicates if the caller is from an API call - // The field content_preview has been shortened and sanitized, as appropriate - // before the plugin is called. If you want to do your own preview handling - // use the content field and create the preview from that - //NOTE:**** You have to make this a system plugin if you want it to also work - // on API calls. If you just make it a user plugin it will work on web page output - // but not on API calls - private $host; - - function about() { - return array(1.0, - "Example of use of HOOK_QUERY_HEADLINES", - "justauser" ); - } - - function init($host) { - $this->host = $host; - $host->add_hook($host::HOOK_QUERY_HEADLINES, $this); - } - - // passes in the array for an item - // second argument is the length of the preview the caller is using - // create a key called "modified_preview" if you change the preview and don't want - // caller to override with their default - - function hook_query_headlines($line, $preview_length = 100,$api_call=false) { - //make the author field empty - $line["author"] = ""; - - // and toss tags, since I don't use - $line["tag_cache"] = ""; - return $line; - - - } - - - function api_version() { - return 2; - } - -} -?> |