Autore: Derky
Versione : 1.0.3
Descrizione: Questa modifica permette un controllo delle segnalazioni degli argomenti maggiore rendendo possibile quasi nell'immediato un'intervento dello staff.. questo grazie al fatto che fa comparire un messaggio nell'index (ben visibile solo allo staff) nel momento in cui un utente fa una segnalazione che cliccandoci sopra porterà proprio al pannello di controllo di moderazione.
Apri: index.php
Trova:
Codice: Seleziona tutto
$birthday_list .= (($birthday_list != '') ? ', ' : '') . get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']);
if ($age = (int) substr($row['user_birthday'], -4))
{
$birthday_list .= ' (' . ($now['year'] - $age) . ')';
}
}
$db->sql_freeresult($result);
}
Codice: Seleziona tutto
// Show amount of reported and queue posts for authenticated users
if ($auth->acl_getf_global('m_report') || $auth->acl_getf_global('m_approve'))
{
if (!function_exists('get_forum_list'))
{
include($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
}
$user->add_lang('mcp');
// Reported Posts
$forum_list = get_forum_list('m_report');
if (!empty($forum_list))
{
$sql = 'SELECT COUNT(r.report_id) AS total_reported
FROM ' . REPORTS_TABLE . ' r, ' . POSTS_TABLE . ' p
WHERE r.post_id = p.post_id
AND r.report_closed = 0
AND ' . $db->sql_in_set('p.forum_id', $forum_list);
$result = $db->sql_query($sql);
$total_reported = (int) $db->sql_fetchfield('total_reported');
$db->sql_freeresult($result);
if ($total_reported)
{
$template->assign_vars(array(
'L_REPORTS_TOTAL' => ($total_reported == 1) ? $user->lang['REPORT_TOTAL'] : sprintf($user->lang['REPORTS_TOTAL'], $total_reported),
'U_MCP_REPORTS' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports'))
);
}
}
// Reported PMs
$sql = 'SELECT COUNT(report_id) AS total_pm_reported
FROM ' . REPORTS_TABLE . '
WHERE pm_id <> 0
AND report_closed = 0';
$result = $db->sql_query($sql);
$total_pm_reported = (int) $db->sql_fetchfield('total_pm_reported');
$db->sql_freeresult($result);
if ($total_pm_reported)
{
$template->assign_vars(array(
'L_PM_REPORTS_TOTAL' => ($total_pm_reported == 1) ? $user->lang['PM_REPORT_TOTAL'] : sprintf($user->lang['PM_REPORTS_TOTAL'], $total_pm_reported),
'U_MCP_PM_REPORTS' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=pm_reports'))
);
}
// Posts and Topics in the Queue
$forum_list = get_forum_list('m_approve');
if (!empty($forum_list))
{
// Get the queue topics and posts in 1 query :)
$sql = 'SELECT COUNT(t.topic_id) AS total_queue_topics, (
SELECT COUNT(p.post_id)
FROM ' . POSTS_TABLE . ' p
WHERE p.post_approved = 0
AND ' . $db->sql_in_set('p.forum_id', $forum_list) . ' ) AS total_queue_posts
FROM ' . TOPICS_TABLE . ' t
WHERE t.topic_approved = 0
AND ' . $db->sql_in_set('t.forum_id', $forum_list);
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
// Topics contain posts, so let's remove these
$total_queue_posts = $row['total_queue_posts'] - $row['total_queue_topics'];
$total_queue_topics = $row['total_queue_topics'];
if ($total_queue_posts)
{
$template->assign_vars(array(
'L_UNAPPROVED_POSTS_TOTAL' => ($total_queue_posts == 1) ? $user->lang['UNAPPROVED_POST_TOTAL'] : sprintf($user->lang['UNAPPROVED_POSTS_TOTAL'], $total_queue_posts),
'U_MCP_POSTS_QUEUE' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=unapproved_posts'))
);
}
if ($total_queue_topics)
{
$template->assign_vars(array(
'L_UNAPPROVED_TOPICS_TOTAL' => ($total_queue_topics == 1) ? $user->lang['UNAPPROVED_TOPIC_TOTAL'] : sprintf($user->lang['UNAPPROVED_TOPICS_TOTAL'], $total_queue_topics),
'U_MCP_TOPICS_QUEUE' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=unapproved_topics'))
);
}
}
}
Trova
Codice: Seleziona tutto
'UNAPPROVED_POST_TOTAL' => 'In total there is <strong>1</strong> post waiting for approval.',
Codice: Seleziona tutto
// MCP info on index
'UNAPPROVED_TOPICS_TOTAL' => 'In total there are <strong>%d</strong> topics waiting for approval.',
'UNAPPROVED_TOPICS_ZERO_TOTAL' => 'There are no topics waiting for approval.',
'UNAPPROVED_TOPIC_TOTAL' => 'In total there is <strong>1</strong> topic waiting for approval.',
Trova
Codice: Seleziona tutto
'UNAPPROVED_POST_TOTAL'
Codice: Seleziona tutto
// MCP info on index
'UNAPPROVED_TOPICS_TOTAL' => 'In totale ci sono <strong>%d</strong> Argomenti in attesa di approvazione.',
'UNAPPROVED_TOPICS_ZERO_TOTAL' => 'Non ci sono argomenti in attesa di approvazione.',
'UNAPPROVED_TOPIC_TOTAL' => 'In totale c'è <strong>1</strong> argomento in attesa di approvazione.',
Trova
Codice: Seleziona tutto
<!-- INCLUDE overall_header.html -->
Codice: Seleziona tutto
<!-- IF U_MCP_REPORTS or U_MCP_PM_REPORTS or U_MCP_POSTS_QUEUE or U_MCP_TOPICS_QUEUE -->
<div id="message" class="rules">
<div class="inner"><span class="corners-top"><span></span></span>
<strong>{L_INFORMATION}:</strong>
<ul>
<!-- IF U_MCP_REPORTS --><li><a href="{U_MCP_REPORTS}">{L_REPORTS_TOTAL}</a></li><!-- ENDIF -->
<!-- IF U_MCP_PM_REPORTS --><li><a href="{U_MCP_PM_REPORTS}">{L_PM_REPORTS_TOTAL}</a></li><!-- ENDIF -->
<!-- IF U_MCP_POSTS_QUEUE --><li><a href="{U_MCP_POSTS_QUEUE}">{L_UNAPPROVED_POSTS_TOTAL}</a></li><!-- ENDIF -->
<!-- IF U_MCP_TOPICS_QUEUE --><li><a href="{U_MCP_TOPICS_QUEUE}">{L_UNAPPROVED_TOPICS_TOTAL}</a></li><!-- ENDIF -->
</ul>
<span class="corners-bottom"><span></span></span></div>
</div>
<!-- ENDIF -->