From 1baac2803c1dee2fc2005c1039d349f4759d20e3 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 21 Dec 2011 08:46:39 +0400 Subject: add mail and share plugins --- classes/feeds.php | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) (limited to 'classes/feeds.php') diff --git a/classes/feeds.php b/classes/feeds.php index ec96d7050..5d55f2f02 100644 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -272,6 +272,18 @@ class Feeds extends Protected_Handler { $headlines_count = db_num_rows($result); + if (get_pref($this->link, 'COMBINED_DISPLAY_MODE')) { + $button_plugins = array(); + foreach (explode(",", ARTICLE_BUTTON_PLUGINS) as $p) { + $pclass = trim("${p}_button"); + + if (class_exists($pclass)) { + $plugin = new $pclass($link); + array_push($button_plugins, $plugin); + } + } + } + if (db_num_rows($result) > 0) { $lnum = $offset; @@ -699,27 +711,10 @@ class Feeds extends Protected_Handler { onclick=\"editArticleNote($id)\" alt='PubNote' title='".__('Edit article note')."'>"; - $reply['content'] .= "link, 'images/art-email.png')."\" - style=\"cursor : pointer\" - onclick=\"emailArticle($id)\" - alt='Zoom' title='".__('Forward by email')."'>"; - - $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'] .= $p->render($id, $line); } - $reply['content'] .= "link, 'images/art-share.png')."\" - class='tagsPic' style=\"cursor : pointer\" - onclick=\"shareArticle(".$line['int_id'].")\" - alt='Zoom' title='".__('Share by URL')."'>"; - $reply['content'] .= "