mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
- topic/forum icon img additions
git-svn-id: file:///svn/phpbb/trunk@5134 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
7c8ed09c9a
commit
7eee98f316
4 changed files with 29 additions and 10 deletions
|
@ -82,6 +82,10 @@ function mcp_forum_view($id, $mode, $action, $url, $forum_info)
|
|||
'TOTAL' => $forum_topics)
|
||||
);
|
||||
|
||||
// Grab icons
|
||||
$icons = array();
|
||||
obtain_icons($icons);
|
||||
|
||||
$topic_rows = array();
|
||||
|
||||
$sql = 'SELECT t.*
|
||||
|
@ -125,25 +129,30 @@ function mcp_forum_view($id, $mode, $action, $url, $forum_info)
|
|||
|
||||
if ($row['topic_status'] == ITEM_LOCKED)
|
||||
{
|
||||
$folder_img = $user->img('folder_locked', 'VIEW_TOPIC_LOCKED');
|
||||
$folder_img = 'folder_locked';
|
||||
$folder_alt = 'VIEW_TOPIC_LOCKED';
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($row['topic_type'] == POST_ANNOUNCE || $row['topic_type'] == POST_GLOBAL)
|
||||
{
|
||||
$folder_img = $user->img('folder_announce', 'VIEW_TOPIC_ANNOUNCEMENT');
|
||||
$folder_img = 'folder_announce';
|
||||
$folder_alt = 'VIEW_TOPIC_ANNOUNCEMENT';
|
||||
}
|
||||
else if ($row['topic_type'] == POST_STICKY)
|
||||
{
|
||||
$folder_img = $user->img('folder_sticky', 'VIEW_TOPIC_STICKY');
|
||||
$folder_img = 'folder_sticky';
|
||||
$folder_alt = 'VIEW_TOPIC_STICKY';
|
||||
}
|
||||
else if ($row['topic_status'] == ITEM_MOVED)
|
||||
{
|
||||
$folder_img = $user->img('folder_moved', 'VIEW_TOPIC_MOVED');
|
||||
$folder_img = 'folder_moved';
|
||||
$folder_alt = 'VIEW_TOPIC_MOVED';
|
||||
}
|
||||
else
|
||||
{
|
||||
$folder_img = $user->img('folder', 'NO_NEW_POSTS');
|
||||
$folder_img = 'folder';
|
||||
$folder_alt = 'NO_NEW_POSTS';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -179,8 +188,13 @@ function mcp_forum_view($id, $mode, $action, $url, $forum_info)
|
|||
'U_MCP_QUEUE' => $url . '&i=queue&mode=approve_details&t=' . $row['topic_id'],
|
||||
'U_MCP_REPORT' => "mcp.$phpEx$SID&i=main&mode=topic_view&t={$row['topic_id']}&action=reports",
|
||||
|
||||
'ATTACH_ICON_IMG' => ($auth->acl_gets('f_download', 'u_download', $row['forum_id']) && $row['topic_attachment']) ? $user->img('icon_attach', sprintf($user->lang['TOTAL_ATTACHMENTS'], $row['topic_attachment'])) : '',
|
||||
'TOPIC_FOLDER_IMG' => $folder_img,
|
||||
'ATTACH_ICON_IMG' => ($auth->acl_gets('f_download', 'u_download', $row['forum_id']) && $row['topic_attachment']) ? $user->img('icon_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
|
||||
'TOPIC_FOLDER_IMG' => $user->img($folder_img, $folder_alt),
|
||||
'TOPIC_FOLDER_IMG_SRC' => $user->img($folder_img, $folder_alt, false, '', 'src'),
|
||||
'TOPIC_ICON_IMG' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['img'] : '',
|
||||
'TOPIC_ICON_IMG_WIDTH' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['width'] : '',
|
||||
'TOPIC_ICON_IMG_HEIGHT' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['height'] : '',
|
||||
|
||||
'TOPIC_TYPE' => $topic_type,
|
||||
'TOPIC_TITLE' => $topic_title,
|
||||
'REPLIES' => $row['topic_replies'],
|
||||
|
|
|
@ -389,6 +389,7 @@ class ucp_main extends module
|
|||
$template->assign_block_vars('forumrow', array(
|
||||
'FORUM_ID' => $forum_id,
|
||||
'FORUM_FOLDER_IMG' => $user->img($folder_image, $folder_alt),
|
||||
'FORUM_FOLDER_IMG_SRC' => $user->img($folder_image, $folder_alt, false, '', 'src'),
|
||||
'FORUM_NAME' => $row['forum_name'],
|
||||
'LAST_POST_IMG' => $user->img('icon_post_latest', 'VIEW_LATEST_POST'),
|
||||
'LAST_POST_TIME' => $last_post_time,
|
||||
|
@ -487,8 +488,11 @@ class ucp_main extends module
|
|||
'LAST_POST_IMG' => $user->img('icon_post_latest', 'VIEW_LATEST_POST'),
|
||||
'NEWEST_POST_IMG' => $newest_post_img,
|
||||
'TOPIC_FOLDER_IMG' => $user->img($folder_img, $folder_alt),
|
||||
'TOPIC_ICON_IMG' => (!empty($icons[$row['icon_id']])) ? '<img src="' . $config['icons_path'] . '/' . $icons[$row['icon_id']]['img'] . '" width="' . $icons[$row['icon_id']]['width'] . '" height="' . $icons[$row['icon_id']]['height'] . '" alt="" title="" />' : '',
|
||||
'ATTACH_ICON_IMG' => ($auth->acl_gets('f_download', 'u_download', $forum_id) && $row['topic_attachment']) ? $user->img('icon_attach', sprintf($user->lang['TOTAL_ATTACHMENTS'], $row['topic_attachment'])) : '',
|
||||
'TOPIC_FOLDER_IMG_SRC' => $user->img($folder_img, $folder_alt, false, '', 'src'),
|
||||
'TOPIC_ICON_IMG' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['img'] : '',
|
||||
'TOPIC_ICON_IMG_WIDTH' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['width'] : '',
|
||||
'TOPIC_ICON_IMG_HEIGHT' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['height'] : '',
|
||||
'ATTACH_ICON_IMG' => ($auth->acl_gets('f_download', 'u_download', $forum_id) && $row['topic_attachment']) ? $user->img('icon_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
|
||||
|
||||
'S_TOPIC_TYPE' => $row['topic_type'],
|
||||
'S_USER_POSTED' => (!empty($row['mark_type'])) ? true : false,
|
||||
|
|
|
@ -156,7 +156,7 @@ function view_folder($id, $mode, $folder_id, $folder, $type)
|
|||
'PM_ICON_IMG' => (!empty($icons[$row['icon_id']])) ? '<img src="' . $config['icons_path'] . '/' . $icons[$row['icon_id']]['img'] . '" width="' . $icons[$row['icon_id']]['width'] . '" height="' . $icons[$row['icon_id']]['height'] . '" alt="" title="" />' : '',
|
||||
'FOLDER_IMG' => $user->img($folder_img, $folder_alt),
|
||||
'PM_IMG' => ($row_indicator) ? $user->img('pm_' . $row_indicator, '') : '',
|
||||
'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $row['message_attachment'] && $config['allow_pm_attach'] && $config['auth_download_pm']) ? $user->img('icon_attach', sprintf($user->lang['TOTAL_ATTACHMENTS'], $row['message_attachment'])) : '',
|
||||
'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $row['message_attachment'] && $config['allow_pm_attach'] && $config['auth_download_pm']) ? $user->img('icon_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
|
||||
|
||||
'S_PM_REPORTED' => (!empty($row['message_reported']) && $auth->acl_get('m_')) ? true : false,
|
||||
'S_PM_DELETED' => ($row['deleted']) ? true : false,
|
||||
|
|
|
@ -121,6 +121,7 @@ class ucp_zebra extends module
|
|||
break;
|
||||
|
||||
case 'mysql4':
|
||||
case 'mysqli':
|
||||
case 'mssql':
|
||||
case 'sqlite':
|
||||
$sql = 'INSERT INTO ' . ZEBRA_TABLE . " (user_id, zebra_id, $sql_mode)
|
||||
|
|
Loading…
Add table
Reference in a new issue