Commit d072063b authored by chealer's avatar chealer

[ENH] change forums_most_visited_forums module to new module style (modules-doc).

[FIX] HTML special chars escaping
parent e3eb0af1
......@@ -2819,7 +2819,6 @@ modules/mod-comm_received_objects.php -text
modules/mod-directory_last_sites.php -text
modules/mod-directory_stats.php -text
modules/mod-directory_top_sites.php -text
modules/mod-forums_most_visited_forums.php -text
modules/mod-freetag.php -text
modules/mod-freetags_current.php -text
modules/mod-freetags_morelikethis.php -text
......@@ -2837,6 +2836,7 @@ modules/mod-func-forums_best_voted_topics.php -text
modules/mod-func-forums_last_posts.php -text
modules/mod-func-forums_most_commented_forums.php -text
modules/mod-func-forums_most_read_topics.php -text
modules/mod-func-forums_most_visited_forums.php -text
modules/mod-func-google.php -text
modules/mod-func-logged_users.php -text
modules/mod-func-menupage.php -text
......
<?php
//this script may only be included - so its better to die if called directly.
if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
header("location: index.php");
exit;
}
global $smarty;
global $ranklib; include_once ('lib/rankings/ranklib.php');
$ranking = $ranklib->forums_ranking_most_visited_forums($module_rows);
$smarty->assign('modForumsMostVisitedForums', $ranking["data"]);
$smarty->assign('nonums', isset($module_params["nonums"]) ? $module_params["nonums"] : 'n');
<?php
//this script may only be included - so its better to die if called directly.
if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
header("location: index.php");
exit;
}
function module_forums_most_visited_forums_info() {
return array(
'name' => tra('Most visited forums'),
'description' => tra('Displays the specified number of the forums with the most visits.'),
'prefs' => array( 'feature_forums' ),
'params' => array(),
'common_params' => array('nonums')
);
}
function module_forums_most_visited_forums( $mod_reference, $module_params ) {
global $smarty;
global $ranklib; include_once ('lib/rankings/ranklib.php');
$ranking = $ranklib->forums_ranking_most_visited_forums($mod_reference["rows"]);
$smarty->assign('modForumsMostVisitedForums', $ranking["data"]);
}
\ No newline at end of file
{* $Id$ *}
{if $prefs.feature_forums eq 'y'}
{if !isset($tpl_module_title)}
{if $nonums eq 'y'}
{eval var="`$module_rows` {tr}Most visited forums{/tr}" assign="tpl_module_title"}
{else}
{eval var="{tr}Most visited forums{/tr}" assign="tpl_module_title"}
{/if}
{/if}
{tikimodule error=$module_params.error title=$tpl_module_title name="forums_most_visited_forums" flip=$module_params.flip decorations=$module_params.decorations nobox=$module_params.nobox notitle=$module_params.notitle}
{if $nonums != 'y'}<ol>{else}<ul>{/if}
{section name=ix loop=$modForumsMostVisitedForums}
<li>
<a class="linkmodule" href="{$modForumsMostVisitedForums[ix].href}">
{$modForumsMostVisitedForums[ix].name}
{$modForumsMostVisitedForums[ix].name|escape}
</a>
</li>
{/section}
{if $nonums != 'y'}</ol>{else}</ul>{/if}
{/tikimodule}
{/if}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment