isPackageActive( 'articles' ); $gBitSystem->isFeatureActive( 'feature_cms_rankings' ); $gBitSystem->verifyPermission( 'bit_p_read_article' ); $allrankings = array( array( 'name' => tra( 'Top articles' ), 'value' => 'contentRanking' ), // array( // 'name' => tra( 'Top authors' ), // 'value' => 'cms_ranking_top_authors' // ) ); $gBitSmarty->assign( 'allrankings', $allrankings ); if ( !isset( $_REQUEST["which"] ) ) { $func = 'contentRanking'; } else { $func = $_REQUEST["which"]; } $gBitSmarty->assign( 'which', $func ); $listHash = array( 'title' => tra( 'Article Rankings' ), 'content_type_guid' => BITARTICLE_CONTENT_TYPE_GUID, 'limit' => ( !empty( $_REQUEST['limit'] ) ? $_REQUEST['limit'] : 10 ), ); $rankings[] = $ranklib->$func( $listHash ); $gBitSmarty->assign( 'rankings', $rankings ); // Display the template $gBitSystem->display( 'bitpackage:kernel/ranking.tpl', tra( "Articles" ) ); ?>