In somecases it makes sense to limit search to posts with attachments
This can be done by changing /src/search.php.t
add ca. at Line 26:
$attach = isset($_GET['attach']) ? $_GET['attach'] : '0';
add ca. at Line 96:
if ($GLOBALS['attach']> 0) {
$qry_lmt .= ' AND m.attach_cnt>0';
}
ca. Line 120
replace
return q('SELECT u.alias, f.name AS forum_name, f.id AS forum_id,
m.poster_id, m.id, m.thread_id, m.subject, m.poster_id, m.foff, m.length, m.post_stamp, m.file_id, m.icon,
mm.id AS md, (t.root_msg_id = m.id) AS is_rootm, (t.thread_opt & 1) AS is_lckd
with
return q('SELECT u.alias, f.name AS forum_name, f.id AS forum_id,
m.poster_id, m.attach_cnt,m.id, m.thread_id, m.subject, m.poster_id, m.foff, m.length, m.post_stamp, m.file_id, m.icon,
mm.id AS md, (t.root_msg_id = m.id) AS is_rootm, (t.thread_opt & 1) AS is_lckd
In fact just the addition of m.attach_cnt !
and
adding to template search.tmpl a line
<div class="sr">Attachments<br /><select class="SmallText" name="attach" /><option selected value="0">all</option><option value="1">only with attachment</option></div>
Rebuild theme and it should be done