*** ../tiki-5.0/lib/wiki-plugins/wikiplugin_articles.php	2010-02-19 15:44:35.000000000 +0100
--- lib/wiki-plugins/wikiplugin_articles.php	2010-07-26 21:56:24.000000000 +0200
***************
*** 13,19 ****
  {
          $help = tra("Includes articles listing into a wiki page");
          $help .= "<br />";
!         $help .= tra("~np~{ARTICLES(max=>3, topic=>topicName, topicId=>id, type=>type, categId=>Category parent ID, lang=>en, sort=>columnName_asc|columnName_desc), quiet=>y|n, titleonly=>y|n}{ARTICLES}~/np~");
  
          return $help;
  }
--- 13,19 ----
  {
          $help = tra("Includes articles listing into a wiki page");
          $help .= "<br />";
!         $help .= tra("~np~{ARTICLES(max=>3, topic=>topicName, topicId=>id, type=>type, categId=>Category parent ID, lang=>en, sort=>columnName_asc|columnName_desc), quiet=>y|n, titleonly=>y|n, paginate=>y|n}{ARTICLES}~/np~");
  
          return $help;
  }
***************
*** 116,121 ****
--- 116,127 ----
  				'description' => tra('CSS Class to add to the container DIV.article. (Default="wikiplugin_articles")'),
  				'filter' => 'striptags',
  			),
+ 				'paginate' => array(
+ 				'required' => false,
+ 				'name' => tra('Paginate'),
+ 				'description' => tra('Whether to paginate the articles or not') . ' (n|y)',
+ 				'filter' => 'alpha',
+ 			),
  		),
  	);
  }
***************
*** 165,174 ****
  	
  	if (!isset($overrideDates))	$overrideDates = 'n';
  	
  	include_once("lib/commentslib.php");
  	$commentslib = new Comments($dbTiki);
  	
! 	$listpages = $artlib->list_articles($start, $max, $sort, '', $dateStartTS, $dateEndTS, 'admin', $type, $topicId, 'y', $topic, $categId, '', '', $lang, '', '', ($overrideDates == 'y'));
   	if ($prefs['feature_multilingual'] == 'y') {
  		global $multilinguallib;
  		include_once("lib/multilingual/multilinguallib.php");
--- 171,193 ----
  	
  	if (!isset($overrideDates))	$overrideDates = 'n';
  	
+ 	if ($paginate== 'y'){
+ 	        if (!isset($_REQUEST["offset"])) {
+ 	                $offset = $start;
+                 } else {
+                         $offset = $_REQUEST["offset"];
+                 }
+ 	        $smarty->assign_by_ref('offset', $offset);
+ 	        $smarty->assign('maxArticles', $max);
+ 	}
+ 	else{
+ 	        $offset=$start;
+ 	}
+ 	
  	include_once("lib/commentslib.php");
  	$commentslib = new Comments($dbTiki);
  	
! 	$listpages = $artlib->list_articles($offset, $max, $sort, '', $dateStartTS, $dateEndTS, 'admin', $type, $topicId, 'y', $topic, $categId, '', '', $lang, '', '', ($overrideDates == 'y'));
   	if ($prefs['feature_multilingual'] == 'y') {
  		global $multilinguallib;
  		include_once("lib/multilingual/multilinguallib.php");
***************
*** 206,213 ****
  		$smarty->assign_by_ref('type', $type);
  	}
  
- 	$smarty->assign_by_ref('listpages', $listpages["data"]);
  
  	if (isset($titleonly) && $titleonly == 'y') {
  		return "~np~ ".$smarty->fetch('tiki-view_articles-titleonly.tpl')." ~/np~";
  	} else {
--- 225,236 ----
  		$smarty->assign_by_ref('type', $type);
  	}
  
  
+ 	$smarty->assign_by_ref('listpages', $listpages["data"]);
+ 	if ($paginate == 'y'){
+ 	        $smarty->assign_by_ref('cant', $listpages["cant"]);
+         }
+         
  	if (isset($titleonly) && $titleonly == 'y') {
  		return "~np~ ".$smarty->fetch('tiki-view_articles-titleonly.tpl')." ~/np~";
  	} else {
*** ../tiki-5.0/lib/setup/prefs.php	2010-05-31 16:12:59.000000000 +0200
--- lib/setup/prefs.php	2010-07-26 16:44:47.000000000 +0200
***************
*** 271,276 ****
--- 271,277 ----
  		'wikiplugin_mwtable' => 'n',
  		'wikiplugin_myspace' => 'n',
  		'wikiplugin_objecthits' => 'n',
+ 		'wikiplugin_paginate' => 'n',
  		'wikiplugin_payment' => 'y',
  		'wikiplugin_perm' => 'n',
  		'wikiplugin_picture' => 'n',  // Old syntax for images
