How can I modify the phpbb-files to get the Attachment Topic Icon to be displayed on the search results as well?
Thanks.
/Marcus
Icon on search results too
Moderator: Experts
A few modifications to what I had already shown you on phpBB.com:
Code: Select all
#
#-----[ OPEN ]---------------------------------------------
#
search.php
#
#-----[ FIND ]---------------------------------------------
#
'NEWEST_POST_IMG' => $newest_post_img,
#
#-----[ AFTER, ADD ]---------------------------------------
#
'TOPIC_ATTACHMENT_IMG' => topic_attachment_image_searchresults($searchset[$i]['topic_attachment']),
#
#-----[ OPEN ]---------------------------------------------
#
attach_mod/displaying.php
#
#-----[ FIND ]---------------------------------------------
#
return $image;
}
#
#-----[ AFTER, ADD ]---------------------------------------
#
/**
* Returns the image-tag for the topic image icon in search results
*/
function topic_attachment_image_searchresults($switch_attachment)
{
global $attach_config, $is_auth;
if (intval($switch_attachment) == 0 || $is_auth['auth_view'] || intval($attach_config['disable_mod']) || $attach_config['topic_icon'] == '')
{
return '';
}
$image = '<img src="' . $attach_config['topic_icon'] . '" alt="" border="0" /> ';
return $image;
}
#
#-----[ OPEN ]---------------------------------------------
#
templates/subSilver/search_results_topics.tpl
#
#-----[ FIND ]---------------------------------------------
#
<td class="row2"><span class="topictitle">{searchresults.NEWEST_POST_IMG}{searchresults.TOPIC_TYPE}<a href="{searchresults.U_VIEW_TOPIC}" class="topictitle">{searchresults.TOPIC_TITLE}</a></span><br /><span class="gensmall">{searchresults.GOTO_PAGE}</span></td>
#
#-----[ IN-LINE FIND ]---------------------------------------------
# around line 26 (directly in that line)
{searchresults.NEWEST_POST_IMG}
#
#-----[ IN-LINE AFTER, ADD ]---------------------------------------
#
{searchresults.TOPIC_ATTACHMENT_IMG}
-
- Posts: 3
- Joined: Sat Apr 28, 2007 1:19 pm
-
- Posts: 3
- Joined: Sat Apr 28, 2007 1:19 pm