summaryrefslogtreecommitdiff
path: root/modules/mod_top_visited_blogs.php
blob: 88ed8c23a19c6ab33b098b480f563134ad12d1c8 (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
30
31
<?php
/**
 * @version $Header$
 * @package blogs
 * @subpackage modules
 */

/**
 * required setup
 */
include_once( BLOGS_PKG_CLASS_PATH.'BitBlog.php' );

global $gBitThemes;

extract( $moduleParams );
//$params = $gBitThemes->getModuleParameters('bitpackage:blogs/mod_top_visited_blogs.tpl', $gQueryUserId);

$listHash['max_records'] = $params['module_rows'];
$listHash['sort_mode'] = 'hits_desc';

//produces White Screen Of Death:
//$listHash['is_hit'] = TRUE;

BitUser::userCollection( $_REQUEST, $listHash );

$blog = new BitBlog();
$ranking = $blog->getList( $listHash );

$_template->tpl_vars['modTopVisitedBlogs'] = new Smarty_variable( $ranking);
$_template->tpl_vars['bulletSrc'] = new Smarty_variable( isset($params["bullet"]) ? $params['bullet'] : NULL);
?>