sicloan, works fine here. Might be becuase of some small other changes I made.
Bent, you need to alter search.php
Find:
Code:
// #############################################################################
// show results as threads
else
{
$show['threadicons'] = true;
$show['forumlink'] = true;
foreach ($itemids AS $thread)
{
// add highlight words
$thread['highlight'] = &$highlightwords;
// get info from thread
$thread = process_thread_array($thread, $lastread["$thread[forumid]"]);
(Should be around line 2518)
AFTER this add:
Code:
// Delphy's Search Thumbnail Hack
$thread[attachmentid] = "";
$forumids = array(1, 2, 3);
if (in_array($thread[forumid], $forumids)) {
$displaythumbs = true;
$sql_images = "SELECT DISTINCT postid,attachmentid FROM " . TABLE_PREFIX ."attachment WHERE postid IN (0$thread[firstpostid]) AND thumbnail_dateline > 0";
$images = $DB_site->query($sql_images);
while ($image = $DB_site->fetch_array($images)) {
$thread[attachmentid] = $image[attachmentid];
}
$DB_site->free_result($images);
unset($image);
}
Replace 1,2,3 with the forum ids similar to the way you did in forumdisplay.php