1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2026-01-07 21:09:15 +00:00

more work on user-selectable plugins; properly process system and user plugins

This commit is contained in:
Andrew Dolgov
2012-12-25 10:02:08 +04:00
parent de612e7a38
commit d2a421e3cb
23 changed files with 92 additions and 60 deletions

View File

@@ -4,22 +4,18 @@ class Digest extends Plugin implements IHandler {
private $link;
private $host;
function _about() {
function about() {
return array(1.0,
"Digest mode for tt-rss (tablet friendly UI)",
"fox",
true);
}
function __construct($host) {
function init($host) {
$this->link = $host->get_link();
$this->host = $host;
$host->add_handler("digest", "*", $this);
//$host->add_handler("rpc", "digestinit", $this);
//$host->add_handler("rpc", "digestupdate", $this);
//$host->add_handler("rpc", "digestgetcontents", $this);
}
function index() {

View File

@@ -6,14 +6,14 @@ class Example extends Plugin {
private $link;
private $host;
function _about() {
function about() {
return array(1.0,
"Example plugin #1",
"fox",
true);
}
function __construct($host) {
function init($host) {
$this->link = $host->get_link();
$this->host = $host;

View File

@@ -7,14 +7,14 @@ class Example_Feed extends Plugin {
private $link;
private $host;
function _about() {
function about() {
return array(1.0,
"Example feed plugin",
"fox",
true);
}
function __construct($host) {
function init($host) {
$this->link = $host->get_link();
$this->host = $host;

View File

@@ -15,14 +15,14 @@ class Example_Routing extends Plugin implements IHandler {
private $link;
private $host;
function _about() {
function about() {
return array(1.0,
"Example routing plugin",
"fox",
true);
}
function __construct($host) {
function init($host) {
$this->link = $host->get_link();
$this->host = $host;

View File

@@ -3,14 +3,14 @@ class Flattr extends Plugin {
private $link;
private $host;
function __construct($host) {
function init($host) {
$this->link = $host->get_link();
$this->host = $host;
$host->add_hook($host::HOOK_ARTICLE_BUTTON, $this);
}
function _about() {
function about() {
return array(1.0,
"Share on Flattr plugin",
"Nic Honing");

View File

@@ -3,14 +3,14 @@ class GooglePlus extends Plugin {
private $link;
private $host;
function __construct($host) {
function init($host) {
$this->link = $host->get_link();
$this->host = $host;
$host->add_hook($host::HOOK_ARTICLE_BUTTON, $this);
}
function _about() {
function about() {
return array(1.0,
"Share on Google+ plugin",
"homolibere");

View File

@@ -3,14 +3,14 @@ class Identica extends Plugin {
private $link;
private $host;
function __construct($host) {
function init($host) {
$this->link = $host->get_link();
$this->host = $host;
$host->add_hook($host::HOOK_ARTICLE_BUTTON, $this);
}
function _about() {
function about() {
return array(1.0,
"Share on Identi.ca",
"fox");

View File

@@ -4,7 +4,7 @@ class Import_Export extends Plugin implements IHandler {
private $link;
private $host;
function __construct($host) {
function init($host) {
$this->link = $host->get_link();
$this->host = $host;
@@ -12,7 +12,7 @@ class Import_Export extends Plugin implements IHandler {
$host->add_command("xml-import", "USER FILE: import articles from XML", $this);
}
function _about() {
function about() {
return array(1.0,
"Imports and exports user data using a neutral XML format",
"fox");

View File

@@ -10,14 +10,14 @@ class Instances extends Plugin implements IHandler {
2 => "Invalid object received",
16 => "Access denied" );
function _about() {
function about() {
return array(1.0,
"Support for linking tt-rss instances together and sharing popular feeds.",
"fox",
true);
}
function __construct($host) {
function init($host) {
$this->link = $host->get_link();
$this->host = $host;

View File

@@ -4,13 +4,13 @@ class Mail extends Plugin {
private $link;
private $host;
function _about() {
function about() {
return array(1.0,
"Adds a share article via email button",
"fox");
}
function __construct($host) {
function init($host) {
$this->link = $host->get_link();
$this->host = $host;

View File

@@ -3,13 +3,13 @@ class Note extends Plugin {
private $link;
private $host;
function _about() {
function about() {
return array(1.0,
"Adds support for setting article notes",
"fox");
}
function __construct($host) {
function init($host) {
$this->link = $host->get_link();
$this->host = $host;

View File

@@ -3,13 +3,13 @@ class Pinterest extends Plugin {
private $link;
private $host;
function _about() {
function about() {
return array(1.0,
"Share article via Pinterest",
"?");
}
function __construct($host) {
function init($host) {
$this->link = $host->get_link();
$this->host = $host;

View File

@@ -4,13 +4,13 @@ class Pocket extends Plugin {
private $link;
private $host;
function _about() {
function about() {
return array(1.0,
"Share article via Pocket (formerly Read It Later)",
"?");
}
function __construct($host) {
function init($host) {
$this->link = $host->get_link();
$this->host = $host;

View File

@@ -4,13 +4,13 @@ class RedditImgur extends Plugin {
private $link;
private $host;
function _about() {
function about() {
return array(1.0,
"Inline image links in Reddit RSS feeds",
"fox");
}
function __construct($host) {
function init($host) {
$this->link = $host->get_link();
$this->host = $host;

View File

@@ -3,13 +3,13 @@ class Share extends Plugin {
private $link;
private $host;
function _about() {
function about() {
return array(1.0,
"Share article by unique URL",
"fox");
}
function __construct($host) {
function init($host) {
$this->link = $host->get_link();
$this->host = $host;

View File

@@ -4,14 +4,14 @@ class Updater extends Plugin {
private $link;
private $host;
function _about() {
function about() {
return array(1.0,
"Updates tt-rss installation to latest version.",
"fox",
true);
}
function __construct($host) {
function init($host) {
$this->link = $host->get_link();
$this->host = $host;