From f9ac31d6712b4400a616e49d6217d55edb0daf9c Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 20 Dec 2011 23:57:27 +0400 Subject: move tweet button to a plugin, implement basic support for article action button plugins --- classes/feeds.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'classes/feeds.php') diff --git a/classes/feeds.php b/classes/feeds.php index 2e9aea686..ec96d7050 100644 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -704,11 +704,15 @@ class Feeds extends Protected_Handler { onclick=\"emailArticle($id)\" alt='Zoom' title='".__('Forward by email')."'>"; - if (ENABLE_TWEET_BUTTON) { - $reply['content'] .= "link, 'images/art-tweet.png')."\" - class='tagsPic' style=\"cursor : pointer\" - onclick=\"tweetArticle($id)\" - alt='Zoom' title='".__('Share on Twitter')."'>"; + $button_plugins = explode(",", ARTICLE_BUTTON_PLUGINS); + + foreach ($button_plugins as $p) { + $pclass = "${p}_button"; + + if (class_exists($pclass)) { + $plugin = new $pclass($link); + $rv['content'] .= $plugin->render($id); + } } $reply['content'] .= "link, 'images/art-share.png')."\" -- cgit v1.2.3