From 369dbc19d6ae35c97a2306ae4821c7812e2f24b2 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 17 Aug 2012 14:20:55 +0400 Subject: rework class system to use subdirectories add placeholder plugin/hook system --- classes/feeds.php | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'classes/feeds.php') diff --git a/classes/feeds.php b/classes/feeds.php index a3062565a..7598b0af8 100644 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -1,5 +1,5 @@ hook('headlines_before', $reply); + if (get_pref($this->link, 'COMBINED_DISPLAY_MODE')) { $button_plugins = array(); foreach (explode(",", ARTICLE_BUTTON_PLUGINS) as $p) { - $pclass = trim("${p}_button"); + $pclass = trim("button_${p}"); if (class_exists($pclass)) { $plugin = new $pclass($link); @@ -245,6 +249,12 @@ class Feeds extends Protected_Handler { while ($line = db_fetch_assoc($result)) { + if (get_pref($this->link, 'COMBINED_DISPLAY_MODE')) { + $plugins->hook('cdm_article_before', $line); + } else { + $plugins->hook('headlines_row', $line); + } + $class = ($lnum % 2) ? "even" : "odd"; $id = $line["id"]; @@ -673,11 +683,15 @@ class Feeds extends Protected_Handler { $reply['content'] .= ""; + $plugins->hook('cdm_article_after', $reply['content']); + } ++$lnum; } + $plugins->hook('headlines_after', $reply); + if ($_REQUEST["debug"]) $timing_info = print_checkpoint("PE", $timing_info); } else { -- cgit v1.2.3-54-g00ecf