Note: this list is kept only as a demonstration for CVSNotice. For the latest CVS notices, see the Xaraya and Postnuke sites
View Statistics - Next Notice - Previous NoticeDirectory filter : [ all ] / postnuke_modules / articles [ view in CVS ]
Date | Directory [filter] | File(s) [view] | Author [filter] |
31 Jul 2002 00:20:09 | postnuke_modules/articles | pnuser.php,1.36,1.37 pnuserapi.php,1.26,1.27 | Mike |
support for All Stories in article archive |
Update of /home/cvsroot/postnuke_modules/articles In directory ns7.hostnuke.net:/tmp/cvs-serv7067 Modified Files: pnuser.php pnuserapi.php Log Message: support for All Stories in article archive Index: pnuser.php =================================================================== RCS file: /home/cvsroot/postnuke_modules/articles/pnuser.php,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** pnuser.php 30 Jul 2002 22:22:11 -0000 1.36 --- pnuser.php 31 Jul 2002 00:20:06 -0000 1.37 *************** *** 487,491 **** // Get monthly statistics ! $monthcount = pnModAPIFunc('articles','user','getmonthcount'); if(!isset($monthcount)) { $monthcount = array(); --- 487,492 ---- // Get monthly statistics ! $monthcount = pnModAPIFunc('articles','user','getmonthcount', ! array('ptid' => $ptid)); if(!isset($monthcount)) { $monthcount = array(); *************** *** 494,497 **** --- 495,499 ---- reset($monthcount); $months = array(); + $total = 0; foreach ($monthcount as $thismonth => $count) { if ($thismonth == $month) { *************** *** 504,512 **** 'mcount' => $count, 'mlink' => $mlink); } ! ! // get the links and counts for all publication types ! $publinks = pnModAPIFunc('articles','user','getpublinks', ! array('all' => 1)); // Load API --- 506,521 ---- 'mcount' => $count, 'mlink' => $mlink); + $total += $count; } ! $thismonth = pnML('All Articles'); ! if ($month == 'all') { ! $mlink = ''; ! } else { ! $mlink = pnModURL('articles','user','archive', ! array('month' => 'all')); ! } ! $months[] = array('month' => $thismonth, ! 'mcount' => $total, ! 'mlink' => $mlink); // Load API *************** *** 549,553 **** // Get articles ! if ($startdate && $enddate) { $articles = pnModAPIFunc('articles', 'user', --- 558,562 ---- // Get articles ! if ($month == 'all' || ($startdate && $enddate)) { $articles = pnModAPIFunc('articles', 'user', *************** *** 566,569 **** --- 575,580 ---- } + // TODO: add print / recommend_us link for each article ? + // TODO: add view count to table/query/template someday ? foreach ($articles as $key => $article) { $articles[$key]['link'] = pnModURL('articles','user','display', *************** *** 572,575 **** --- 583,587 ---- $articles[$key]['date'] = strftime("%Y-%m-%d %H:%M:%S", $articles[$key]['pubdate']); + // TODO: find some better way to do this... $list = array(); // get all the categories for that article and put them under the Index: pnuserapi.php =================================================================== RCS file: /home/cvsroot/postnuke_modules/articles/pnuserapi.php,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** pnuserapi.php 30 Jul 2002 23:47:59 -0000 1.26 --- pnuserapi.php 31 Jul 2002 00:20:06 -0000 1.27 *************** *** 799,803 **** return array('view', $args); } elseif ($params[1] == 'archive') { ! if (!empty($params[2]) && preg_match('/^(\d{4}-\d+)/',$params[2],$matches)) { $args['month'] = $matches[1]; } --- 799,803 ---- return array('view', $args); } elseif ($params[1] == 'archive') { ! if (!empty($params[2]) && preg_match('/^(\d{4}-\d+|all)/',$params[2],$matches)) { $args['month'] = $matches[1]; }
View Statistics - Next Notice - Previous Notice
Visit Developer Site - Browse CVS Repository |
Syndicate via backend.rss (max. once per hour please) | Powered by CVSNotice 0.1.3 |