diff --git a/e107_plugins/news/e_featurebox.php b/e107_plugins/news/e_featurebox.php new file mode 100644 index 000000000..5071ebdd1 --- /dev/null +++ b/e107_plugins/news/e_featurebox.php @@ -0,0 +1,66 @@ + "Featurebox", + 'function' => "process", + 'description' => "" + ); + + return $links; + } + + + + function process() + { + $sql = e107::getDb(); + $fbox = array(); + + $nobody_regexp = "'(^|,)(".str_replace(",", "|", e_UC_NOBODY).")(,|$)'"; + $query = "SELECT * FROM #news WHERE news_class REGEXP '".e_CLASS_REGEXP."' AND NOT (news_class REGEXP ".$nobody_regexp.") AND FIND_IN_SET(4,news_render_type) ORDER BY news_datestamp DESC LIMIT 10"; + + if($sql->db_Select_gen($query)) + { + while($row = $sql->db_Fetch()) + { + $fbox[] = array( + 'title' => $row['news_title'], + 'url' => '{e_BASE}news.php?extend.'.$row['news_id'], + 'body' => $row['news_summary'], + 'image' => $row['news_image'], + 'class' => $row['news_class'] + ); + } + + return $fbox; + }; + } + +} + + + +?> \ No newline at end of file