// Most replied-to threads
$most_replied = $cache->read("most_replied_threads");
if(!$most_replied)
{
$cache->update_most_replied_threads();
$most_replied = $cache->read("most_replied_threads", true);
}
if(!empty($most_replied))
{
foreach($most_replied as $key => $thread)
{
if(!in_array("'{$thread['fid']}'", $unviewableforumsarray))
{
$thread['subject'] = htmlspecialchars_uni($parser->parse_badwords($thread['subject']));
$numberbit = my_number_format($thread['replies']);
$numbertype = $lang->replies;
$thread['threadlink'] = get_thread_link($thread['tid']);
eval("\$mostreplies .= \"".$templates->get("stats_thread")."\";");
}
}
}
// Most viewed threads
$most_viewed = $cache->read("most_viewed_threads");
if(!$most_viewed)
{
$cache->update_most_viewed_threads();
$most_viewed = $cache->read("most_viewed_threads", true);
}
if(!empty($most_viewed))
{
foreach($most_viewed as $key => $thread)
{
if(!in_array("'{$thread['fid']}'", $unviewableforumsarray))
{
$thread['subject'] = htmlspecialchars_uni($parser->parse_badwords($thread['subject']));
$numberbit = my_number_format($thread['views']);
$numbertype = $lang->views;
$thread['threadlink'] = get_thread_link($thread['tid']);
eval("\$mostviews .= \"".$templates->get("stats_thread")."\";");
}
}
}