summaryrefslogtreecommitdiff
path: root/modules/mod_top_visited_blogs.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules/mod_top_visited_blogs.php')
-rwxr-xr-x[-rw-r--r--]modules/mod_top_visited_blogs.php18
1 files changed, 8 insertions, 10 deletions
diff --git a/modules/mod_top_visited_blogs.php b/modules/mod_top_visited_blogs.php
index 88ed8c2..5ec744d 100644..100755
--- a/modules/mod_top_visited_blogs.php
+++ b/modules/mod_top_visited_blogs.php
@@ -8,24 +8,22 @@
/**
* required setup
*/
-include_once( BLOGS_PKG_CLASS_PATH.'BitBlog.php' );
+use Bitweaver\Blogs\BitBlog;
+use Bitweaver\Users\RoleUser;
+global $gQueryUserId, $moduleParams;
-global $gBitThemes;
-
-extract( $moduleParams );
//$params = $gBitThemes->getModuleParameters('bitpackage:blogs/mod_top_visited_blogs.tpl', $gQueryUserId);
-$listHash['max_records'] = $params['module_rows'];
+$listHash['max_records'] = $moduleParams->value['module_rows'] ?? 10;
$listHash['sort_mode'] = 'hits_desc';
//produces White Screen Of Death:
-//$listHash['is_hit'] = TRUE;
+//$listHash['is_hit'] = true;
-BitUser::userCollection( $_REQUEST, $listHash );
+RoleUser::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);
-?>
+$gBitSmarty->assign( 'modTopVisitedBlogs', $ranking);
+$gBitSmarty->assign( 'bulletSrc', $params['bullet'] ?? ''); \ No newline at end of file