blob: f508aa008f32b825b54b04797c9671d6ae664ab2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
<?php
/**
* @version $Header$
* @package blogs
* @subpackage modules
*/
/**
* required setup
*/
include_once( BLOGS_PKG_CLASS_PATH.'BitBlog.php' );
global $gQueryUserId, $module_rows, $moduleParams;
$listHash['max_records'] = $module_rows;
$listHash['sort_mode'] = ( !empty( $moduleParams['module_params']['sort_mode'] ) ) ? $moduleParams['module_params']['sort_mode'] : 'created_desc';
BitUser::userCollection( $moduleParams['module_params'], $listHash );
$blog = new BitBlog();
if( $modBlogs = $blog->getList( $listHash ) ) {
foreach( array_keys( $modBlogs ) as $b ) {
$modBlogs[$b]['post'] = $blog->getPost( array( 'blog_id' => $modBlogs[$b]['blog_id'] ) );
}
$_template->tpl_vars['modBlogs'] = new Smarty_variable( $modBlogs );
}
$moduleTitle = (!empty( $moduleParams['title'] ) ? $moduleParams['title'] : 'Blog Roll');
$_template->tpl_vars['moduleTitle'] = new Smarty_variable( $moduleTitle );
?>
|