From: <pk...@us...> - 2008-01-28 16:44:12
|
Update of /cvsroot/tikiwiki/tiki In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv8615 Modified Files: Tag: BRANCH-1-10 tiki-forums.php Log Message: [MOD] tiki-forums: change pagination for nyloth's smarty plugin Index: tiki-forums.php =================================================================== RCS file: /cvsroot/tikiwiki/tiki/tiki-forums.php,v retrieving revision 1.18.2.1 retrieving revision 1.18.2.2 diff -u -d -r1.18.2.1 -r1.18.2.2 --- tiki-forums.php 8 Nov 2007 21:34:48 -0000 1.18.2.1 +++ tiki-forums.php 28 Jan 2008 16:44:10 -0000 1.18.2.2 @@ -10,6 +10,7 @@ $section = 'forums'; require_once ('tiki-setup.php'); +$auto_query_args = array('sort_mode', 'offset', 'find', 'mode'); $smarty->assign('headtitle',tra('Forums')); @@ -96,25 +97,8 @@ } } -$cant_pages = ceil($channels["cant"] / $maxRecords); -$smarty->assign_by_ref('cant_pages', $cant_pages); -$smarty->assign('actual_page', 1 + ($offset / $maxRecords)); - -if ($channels["cant"] > ($offset + $maxRecords)) { - $smarty->assign('next_offset', $offset + $maxRecords); -} else { - $smarty->assign('next_offset', -1); -} - -// If offset is > 0 then prev_offset -if ($offset > 0) { - $smarty->assign('prev_offset', $offset - $maxRecords); -} else { - $smarty->assign('prev_offset', -1); -} - $smarty->assign_by_ref('channels', $channels["data"]); - +$smarty->assign('cant',$channels["cant"]); include_once ('tiki-section_options.php'); if ($prefs['feature_mobile'] =='y' && isset($_REQUEST['mode']) && $_REQUEST['mode'] == 'mobile') { |