summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorwjames5 <will@tekimaki.com>2007-03-31 22:39:15 +0000
committerwjames5 <will@tekimaki.com>2007-03-31 22:39:15 +0000
commit9167ff58a5c82a799b5725dedce7dde87ea05d9b (patch)
treed684cd4ae9147fd82b6c76e5707c6fabbd9b9c1c /modules
parentdde16ca8ec2d990694723ec896e7d6665e6cec7c (diff)
downloadblogs-9167ff58a5c82a799b5725dedce7dde87ea05d9b.tar.gz
blogs-9167ff58a5c82a799b5725dedce7dde87ea05d9b.tar.bz2
blogs-9167ff58a5c82a799b5725dedce7dde87ea05d9b.zip
accepts params user and blog id to limit list
Diffstat (limited to 'modules')
-rw-r--r--modules/mod_last_blog_posts.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/modules/mod_last_blog_posts.php b/modules/mod_last_blog_posts.php
index b2c9d47..2baa92e 100644
--- a/modules/mod_last_blog_posts.php
+++ b/modules/mod_last_blog_posts.php
@@ -3,7 +3,7 @@
* Params:
* - title : if is "title", show the title of the post, else show the date of creation
*
- * @version $Header: /cvsroot/bitweaver/_bit_blogs/modules/mod_last_blog_posts.php,v 1.7 2007/03/27 21:54:30 wjames5 Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_blogs/modules/mod_last_blog_posts.php,v 1.8 2007/03/31 22:39:15 wjames5 Exp $
* @package blogs
* @subpackage modules
*/
@@ -15,17 +15,20 @@ if( !defined( 'MAX_BLOG_PREVIEW_LENGTH' ) ) {
define ('MAX_BLOG_PREVIEW_LENGTH', 100);
}
-//DEPRECATED Slated for removal -wjames5
-//include_once( BLOGS_PKG_PATH.'BitBlog.php' );
include_once( BLOGS_PKG_PATH.'BitBlogPost.php' );
require_once( USERS_PKG_PATH.'BitUser.php' );
global $gBitSmarty, $gQueryUserId, $module_rows, $module_params, $gBitSystem;
$listHash = array( 'user_id' => $gQueryUserId, 'sort_mode' => 'created_desc', 'max_records' => $module_rows, 'parse_data' => TRUE );
+
+if ( isset($module_params['user']) ){ $listHash['login'] = $module_params['user']; }
+if ( isset($module_params['id']) ){ $listHash['blog_id'] = $module_params['id'];}
+
$blogPost = new BitBlogPost();
$ranking = $blogPost->getList( $listHash );
+
$gBitThemes = new BitThemes();
$modParams = $gBitThemes->getModuleParameters('bitpackage:blogs/mod_last_blog_posts.tpl', $gQueryUserId);