I had the same idea but implemented it differently, without the added table field:
Open search.php and find:
PHP Code:
// ###################### Start get new #######################
if ($action=="getnew") {
// generate query
// do it!
if ($bbuserinfo[userid]!=0 or $bbuserinfo[lastvisit]!=0) {
$forumsql=getallforumsql();
After that, add:
PHP Code:
// HACK: search for normal or usenet posts
if ($usenet=="true") {
$forums=$DB_site->query("SELECT forum FROM nntp_groups");
$forumsql.=" AND forumid IN (0";
while ($forum=$DB_site->fetch_array($forums)) {
$forumsql.=",$forum[forum]";
}
$forumsql.=")";
} else {
$forums=$DB_site->query("SELECT forum FROM nntp_groups");
$forumsql.=" AND forumid NOT IN (0";
while ($forum=$DB_site->fetch_array($forums)) {
$forumsql.=",$forum[forum]";
}
$forumsql.=")";
}
// HACK: search for normal or usenet posts
Then update your forumhome_newposts template to include 2 links rather than one:
To look for normal posts:
<a href="search.php?s=$session[sessionhash]&action=getnew&usenet=false">
To look for usenet posts:
<a href="search.php?s=$session[sessionhash]&action=getnew&usenet=true">
Not being a PHP wizard I am not 100% sure that this would cover all angles but it seems to work for me fine so far