mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
Merge pull request #6406 from Noxwizard/ticket/17003
[ticket/17003] Include topic icon on UCP front page
This commit is contained in:
commit
89b07af756
2 changed files with 11 additions and 4 deletions
|
@ -35,7 +35,7 @@ class ucp_main
|
|||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $config, $db, $user, $auth, $template, $phpbb_root_path, $phpEx, $phpbb_dispatcher;
|
||||
global $config, $db, $user, $auth, $template, $phpbb_root_path, $phpEx, $phpbb_dispatcher, $cache;
|
||||
global $request;
|
||||
|
||||
switch ($mode)
|
||||
|
@ -44,8 +44,8 @@ class ucp_main
|
|||
|
||||
$user->add_lang('memberlist');
|
||||
|
||||
$sql_from = TOPICS_TABLE . ' t ';
|
||||
$sql_select = '';
|
||||
$sql_from = TOPICS_TABLE . ' t LEFT JOIN ' . FORUMS_TABLE . ' f ON (f.forum_id = t.forum_id) ';
|
||||
$sql_select = ', f.enable_icons';
|
||||
|
||||
if ($config['load_db_track'])
|
||||
{
|
||||
|
@ -137,6 +137,9 @@ class ucp_main
|
|||
}
|
||||
unset($topic_forum_list);
|
||||
|
||||
// Grab icons
|
||||
$icons = $cache->obtain_icons();
|
||||
|
||||
foreach ($topic_list as $topic_id)
|
||||
{
|
||||
$row = &$rowset[$topic_id];
|
||||
|
@ -176,10 +179,14 @@ class ucp_main
|
|||
'TOPIC_TITLE' => censor_text($row['topic_title']),
|
||||
'TOPIC_TYPE' => $topic_type,
|
||||
|
||||
'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_IMG_STYLE' => $folder_img,
|
||||
'TOPIC_FOLDER_IMG' => $user->img($folder_img, $folder_alt),
|
||||
'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $forum_id) && $row['topic_attachment']) ? $user->img('icon_topic_attach', '') : '',
|
||||
|
||||
'S_TOPIC_ICONS' => $row['enable_icons'] ? true : false,
|
||||
'S_USER_POSTED' => (!empty($row['topic_posted']) && $row['topic_posted']) ? true : false,
|
||||
'S_UNREAD' => $unread_topic,
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<!-- BEGIN topicrow -->
|
||||
<li class="row<!-- IF topicrow.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
|
||||
<dl class="row-item {topicrow.TOPIC_IMG_STYLE}">
|
||||
<dt <!-- IF topicrow.TOPIC_ICON_IMG -->style="background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF -->>
|
||||
<dt <!-- IF topicrow.TOPIC_ICON_IMG and topicrow.S_TOPIC_ICONS -->style="background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF -->>
|
||||
<!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}" class="row-item-link"></a><!-- ENDIF -->
|
||||
<div class="list-inner">
|
||||
<!-- IF topicrow.S_UNREAD -->
|
||||
|
|
Loading…
Add table
Reference in a new issue