OK, in search.php, you have a block like this:
PHP Code:
// ###################### Start get daily #######################
if ($action=="getdaily") {
// get allowable forums:
$forumsql=getallforumsql();
if (isset($forumid)) {
$forums=$DB_site->query("SELECT forumid FROM forum WHERE INSTR(CONCAT(',',parentlist,','),',".addslashes($forumid).",')>0");
$forumsql.=" AND forumid IN (0";
while ($forum=$DB_site->fetch_array($forums)) {
$forumsql.=",$forum[forumid]";
}
$forumsql.=") ";
}
// get date:
$days = intval($days);
if ($days < 1) {
$days = 1;
}
$datesql=" AND thread.lastpost>=".(time() - (24 * 60 *60 * $days));
$wheresql="1=1".$forumsql.$datesql;
$wheresql.=" AND thread.open<>10";
// insert query into db
$DB_site->query("INSERT INTO search (searchid,query,dateline,querystring,showposts,userid,ipaddress) VALUES (NULL,'".addslashes($wheresql)."',".time().",'".addslashes($query)."',0,$bbuserinfo[userid],'".addslashes($ipaddress)."')");
$searchid=$DB_site->insert_id();
eval("standardredirect(\"".gettemplate("redirect_search")."\",\"search.php?s=$session[sessionhash]&action=showresults&getnew=true&searchid=$searchid\");");
}
After it, add:
PHP Code:
// ###################### Start get yesterday #######################
if ($action=="getyesterday") {
// get allowable forums:
$forumsql=getallforumsql();
if (isset($forumid)) {
$forums=$DB_site->query("SELECT forumid FROM forum WHERE INSTR(CONCAT(',',parentlist,','),',".addslashes($forumid).",')>0");
$forumsql.=" AND forumid IN (0";
while ($forum=$DB_site->fetch_array($forums)) {
$forumsql.=",$forum[forumid]";
}
$forumsql.=") ";
}
// get midnight last night and the night before:
$thismidnight=mktime(0,0,0,vbdate("m"),vbdate("d"),vbdate("Y"));
$lastmidnight=$thismidnight-86400;
$datesql=" AND thread.lastpost>=".$lastmidnight);
$wheresql="1=1".$forumsql.$datesql;
$wheresql.=" AND thread.open<>10";
// insert query into db
$DB_site->query("INSERT INTO search (searchid,query,dateline,querystring,showposts,userid,ipaddress) VALUES (NULL,'".addslashes($wheresql)."',".time().",'".addslashes($query)."',0,$bbuserinfo[userid],'".addslashes($ipaddress)."')");
$searchid=$DB_site->insert_id();
eval("standardredirect(\"".gettemplate("redirect_search")."\",\"search.php?s=$session[sessionhash]&action=showresults&getnew=true&searchid=$searchid\");");
}
Then access
http://your.forums/search.php?s=&action=getyesterday . I see no reason why it shouldn't work, but note that I didn't test it.
Hope that helps you.