thanks a million -- that's really great stuff there. it seems to work, but unfortunately it's only displaying the nothumb.gif image -- as if there was no image in the thread (even though there is)
other thing is that that codeblock was around 1200 something, not 2518 -- must be installed mods on your search.php or something
my codeblock in search.php looks like this:
PHP 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]"]);
// Delphy's Search Thumbnail Hack
$thread[attachmentid] = "";
$forumids = array(1,2,3,4,5,6,7,);
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);
}
$itemcount++;
exec_switch_bg();
eval('$searchbits .= "' . fetch_template('threadbit') . '";');
}
}
// #############################################################################