erond
03-28-2006, 10:00 PM
There were several hacks in previous versions to limit getnew/getdaily searches to forums that users had subscribed to. I waited to see this appear in 3.5, but never saw it. There is the option in Advanced Search to limit searches to subscribed forums, but I wanted something on the menu bar without needing to add text to search for.
So, if I've totally missed a thread on this, feel free to point me at it. What I ended up doing was modifying search.php so the addition of &subscribed to the search URL would limit searches to subscribed forums.
In search.php, above
// forumid is not specified, get list of all forums user can view
I added
// getnew/getdaily for subscribed forums only?
else if(isset($_REQUEST['subscribed']) &&
($_REQUEST['do']=='getdaily' || $_REQUEST['do']=='getnew'))
{
$sublist=array('subscribed');
$forumids=fetch_search_forumids($sublist,1);
}
I then modified the navbar template to add '&subscribed' as additional search options, based on the "New Posts" and "Today's Posts" menu items.
I don't know if I've done it right, or of there is a simpler way that I'm not aware of, but it works for me.
So, if I've totally missed a thread on this, feel free to point me at it. What I ended up doing was modifying search.php so the addition of &subscribed to the search URL would limit searches to subscribed forums.
In search.php, above
// forumid is not specified, get list of all forums user can view
I added
// getnew/getdaily for subscribed forums only?
else if(isset($_REQUEST['subscribed']) &&
($_REQUEST['do']=='getdaily' || $_REQUEST['do']=='getnew'))
{
$sublist=array('subscribed');
$forumids=fetch_search_forumids($sublist,1);
}
I then modified the navbar template to add '&subscribed' as additional search options, based on the "New Posts" and "Today's Posts" menu items.
I don't know if I've done it right, or of there is a simpler way that I'm not aware of, but it works for me.