Line 105 | Line 105 |
---|
* @var int total Number of unapproved posts * @var array post_list List of unapproved posts * @var array forum_list List of forums that contain the posts
|
* @var int total Number of unapproved posts * @var array post_list List of unapproved posts * @var array forum_list List of forums that contain the posts
|
* @var array forum_names Associative array with forum_id as key and it's corresponding forum_name as value
| * @var array forum_names Associative array with forum_id as key and its corresponding forum_name as value
|
* @since 3.1.0-RC3 */ $vars = array('total', 'post_list', 'forum_list', 'forum_names');
| * @since 3.1.0-RC3 */ $vars = array('total', 'post_list', 'forum_list', 'forum_names');
|
Line 119 | Line 119 |
---|
AND t.topic_id = p.topic_id AND p.poster_id = u.user_id ORDER BY p.post_time DESC, p.post_id DESC';
|
AND t.topic_id = p.topic_id AND p.poster_id = u.user_id ORDER BY p.post_time DESC, p.post_id DESC';
|
| /** * Alter posts data SQL query * * @event core.mcp_front_view_modify_posts_data_sql * @var array forum_list List of forums that contain the posts * @var array forum_names Associative array with forum_id as key and its corresponding forum_name as value * @var array post_list List of unapproved posts * @var string sql String with the SQL query to be executed * @var int total Number of unapproved posts * @since 3.3.5-RC1 */ $vars = [ 'forum_list', 'forum_names', 'post_list', 'sql', 'total', ]; extract($phpbb_dispatcher->trigger_event('core.mcp_front_view_modify_posts_data_sql', compact($vars)));
|
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) {
|
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) {
|
$template->assign_block_vars('unapproved', array( 'U_POST_DETAILS' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=approve_details&f=' . $row['forum_id'] . '&p=' . $row['post_id']),
| $unapproved_post_row = [ 'U_POST_DETAILS' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=approve_details&p=' . $row['post_id']),
|
'U_MCP_FORUM' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&mode=forum_view&f=' . $row['forum_id']),
|
'U_MCP_FORUM' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&mode=forum_view&f=' . $row['forum_id']),
|
'U_MCP_TOPIC' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&mode=topic_view&f=' . $row['forum_id'] . '&t=' . $row['topic_id']),
| 'U_MCP_TOPIC' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&mode=topic_view&t=' . $row['topic_id']),
|
'U_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']),
|
'U_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']),
|
'U_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $row['topic_id']),
| 'U_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $row['topic_id']),
|
'AUTHOR_FULL' => get_username_string('full', $row['poster_id'], $row['username'], $row['user_colour']), 'AUTHOR' => get_username_string('username', $row['poster_id'], $row['username'], $row['user_colour']),
| 'AUTHOR_FULL' => get_username_string('full', $row['poster_id'], $row['username'], $row['user_colour']), 'AUTHOR' => get_username_string('username', $row['poster_id'], $row['username'], $row['user_colour']),
|
Line 141 | Line 162 |
---|
'SUBJECT' => ($row['post_subject']) ? $row['post_subject'] : $user->lang['NO_SUBJECT'], 'POST_TIME' => $user->format_date($row['post_time']), 'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $row['forum_id']) && $row['post_attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
|
'SUBJECT' => ($row['post_subject']) ? $row['post_subject'] : $user->lang['NO_SUBJECT'], 'POST_TIME' => $user->format_date($row['post_time']), 'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $row['forum_id']) && $row['post_attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
|
));
| ];
/** * Alter unapproved posts template block for MCP front page * * @event core.mcp_front_view_modify_unapproved_post_row * @var array forum_names Array containing forum names * @var string mode MCP front view mode * @var array row Array with unapproved post data * @var array unapproved_post_row Template block array of the unapproved post * @since 3.3.5-RC1 */ $vars = [ 'forum_names', 'mode', 'row', 'unapproved_post_row', ]; extract($phpbb_dispatcher->trigger_event('core.mcp_front_view_modify_unapproved_post_row', compact($vars)));
$template->assign_block_vars('unapproved', $unapproved_post_row);
|
} $db->sql_freeresult($result); }
| } $db->sql_freeresult($result); }
|
Line 238 | Line 279 |
---|
while ($row = $db->sql_fetchrow($result)) {
|
while ($row = $db->sql_fetchrow($result)) {
|
$template->assign_block_vars('report', array( 'U_POST_DETAILS' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'f=' . $row['forum_id'] . '&p=' . $row['post_id'] . "&i=reports&mode=report_details"),
| $reported_post_row = [ 'U_POST_DETAILS' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'p=' . $row['post_id'] . "&i=reports&mode=report_details"),
|
'U_MCP_FORUM' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'f=' . $row['forum_id'] . "&i=$id&mode=forum_view"),
|
'U_MCP_FORUM' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'f=' . $row['forum_id'] . "&i=$id&mode=forum_view"),
|
'U_MCP_TOPIC' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $row['topic_id'] . "&i=$id&mode=topic_view"),
| 'U_MCP_TOPIC' => append_sid("{$phpbb_root_path}mcp.$phpEx", 't=' . $row['topic_id'] . "&i=$id&mode=topic_view"),
|
'U_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']),
|
'U_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']),
|
'U_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $row['topic_id']),
| 'U_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $row['topic_id']),
|
'REPORTER_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']), 'REPORTER' => get_username_string('username', $row['user_id'], $row['username'], $row['user_colour']),
| 'REPORTER_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']), 'REPORTER' => get_username_string('username', $row['user_id'], $row['username'], $row['user_colour']),
|
Line 261 | Line 302 |
---|
'REPORT_TIME' => $user->format_date($row['report_time']), 'POST_TIME' => $user->format_date($row['post_time']), 'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $row['forum_id']) && $row['post_attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
|
'REPORT_TIME' => $user->format_date($row['report_time']), 'POST_TIME' => $user->format_date($row['post_time']), 'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $row['forum_id']) && $row['post_attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
|
));
| ];
/** * Alter reported posts template block for MCP front page * * @event core.mcp_front_view_modify_reported_post_row * @var array forum_list List of forums that contain the posts * @var string mode MCP front view mode * @var array reported_post_row Template block array of the reported post * @var array row Array with reported post data * @since 3.3.5-RC1 */ $vars = [ 'forum_list', 'mode', 'reported_post_row', 'row', ]; extract($phpbb_dispatcher->trigger_event('core.mcp_front_view_modify_reported_post_row', compact($vars)));
$template->assign_block_vars('report', $reported_post_row);
|
} $db->sql_freeresult($result); }
| } $db->sql_freeresult($result); }
|