../Sources/Display.php
Pesquisar
fatal_lang_error('smf232', false);
Trocar por:
fatal_lang_error('smf232', false);
if(!empty($_REQUEST['sa']) && $_REQUEST['sa'] == 'log') {
DisplayLog();
}
Pesquisar
?>
Adicionar
function DisplayLog()
{
global $context, $scripturl, $db_prefix, $topic;
isAllowedTo('moderate_forum');
$request = db_query("
SELECT
lt.ID_MEMBER, lt.ID_TOPIC, mem.realName
FROM {$db_prefix}log_topics AS lt
LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = lt.ID_MEMBER)
WHERE ID_TOPIC = $topic", __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($request))
{
// Build the array.
$context['logs'][] = array(
'member' => array(
'id' => $row['ID_MEMBER'],
'name' => $row['realName'],
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . $row['realName'] . '</a>',
'href' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'],
),
);
}
mysql_free_result($request);
$context['sub_template'] = 'displaylog';
}
?>
../Themes/default/Display.template.php
Pesquisar
?>
Adicionar
function template_displaylog()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;
echo '
<table border="0" cellpadding="0" cellspacing="0" style="padding-top: 1ex;" align="center">
<tr class="titlebg">
<td>Who Viewed The Topic</td>
</tr>';
foreach($context['logs'] as $log) {
echo '
<tr class="windowbg">
<td>', $log['member']['link'], '</td>
</tr>';
}
echo '
</table>';
}
?>
Pesquisar
<div class="nav" style="margin-bottom: 2px;"> ', $context['previous_next'], '</div>
Alterar por
<div class="nav" style="margin-bottom: 2px;"> ', $context['previous_next'], '</div>';
if($context['can_moderate_forum'])
echo '
<a href="' . $scripturl . '?topic='. $context['current_topic'] . '.0;sa=log">View Topic Log</a>';
echo '