Update of /cvsroot/tikiwiki/tiki/modules
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27666/modules
Modified Files:
Tag: BRANCH-1-9
mod-articles.php
Log Message:
add a param to mod_articles topic=topic_name (topicId needs to be find in the db)
Index: mod-articles.php
===================================================================
RCS file: /cvsroot/tikiwiki/tiki/modules/mod-articles.php,v
retrieving revision 1.3.4.1
retrieving revision 1.3.4.2
diff -u -d -r1.3.4.1 -r1.3.4.2
--- mod-articles.php 26 Aug 2004 17:39:15 -0000 1.3.4.1
+++ mod-articles.php 30 Sep 2004 11:05:34 -0000 1.3.4.2
@@ -18,15 +18,13 @@
} else {
$topicId = '';
}
-/*
-$smarty->assign('type', isset($module_params["type"]) ? $module_params["type"] : '');
-$smarty->assign('topicId', isset($module_params["topicId"]) ? $module_params["topicId"] : '');
-
-function list_articles($offset = 0, $maxRecords = -1, $sort_mode = 'publishDate_desc', $find = '', $date = '', $user, $type = '', $topicId = '') {
-*/
+if (isset($module_params["topic"])) {
+ $topic = $module_params["topic"];
+} else {
+ $topic = '';
+}
-$ranking = $tikilib->list_articles(0, $module_rows, 'publishDate_desc', '', '', $user, $type, $topicId);
-//$ranking = $tikilib->list_articles(0, $module_rows, 'reads_desc', '', '', $user);
+$ranking = $tikilib->list_articles(0, $module_rows, 'publishDate_desc', '', '', $user, $type, $topicId, 'y', $topic);
$smarty->assign('modArticles', $ranking["data"]);
|