From: Thomas Renard Date: Thu, 27 Dec 2012 18:57:24 +0000 (+0100) Subject: Preferences panel for owncloud (not tested yet) X-Git-Tag: 1.7.0~90^2~2^2~2 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=7e8b6f32cb70b546a960a82f12c1d1e526202eb1;p=tt-rss.git Preferences panel for owncloud (not tested yet) --- diff --git a/plugins/owncloud/owncloud.php b/plugins/owncloud/owncloud.php index 99b7a37b..06aeda70 100644 --- a/plugins/owncloud/owncloud.php +++ b/plugins/owncloud/owncloud.php @@ -22,12 +22,58 @@ class OwnCloud extends Plugin { $this->host = $host; $host->add_hook($host::HOOK_ARTICLE_BUTTON, $this); + $host->add_hook($host::HOOK_PREFS_TAB, $this); + } + + function save() { + $owncloud_url = db_escape_string($_POST["owncloud_url"]); + $this->host->set($this, "owncloud", $owncloud_url); + echo "Value set to $owncloud_url"; } function get_js() { return file_get_contents(dirname(__FILE__) . "/owncloud.js"); } + function hook_prefs_tab($args) { + if ($args != "prefPrefs") return; + + print "
"; + + print "
"; + + $value = $this->host->get($this, "owncloud"); + print "
"; + + print ""; + + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print "
".__("Owncloud url")."
"; + print "

"; + + print "

"; + + print "
"; #pane + + } + function hook_article_button($line) { return "link, "plugins/owncloud/owncloud.png")."\" style=\"cursor : pointer\" style=\"cursor : pointer\"