View Full Version : Need help: Excluding Forums from search when searching for 0 reply threads
StarBuG
06-21-2010, 07:48 AM
Hi
Since 4.0.4 the ability to search for threads with 0 replies was added again.
However for this search the exclusion of forums parameter does not work.
this url should work but the exclusion does not:
search.php?do=process&contenttype=vBForum_Post&rep lyless=1&replylimit=0&exclude=10,15Bug Issued: klick (http://tracker.vbulletin.com/browse/VBIV-7593)
If anyone can tell me how to fix this that would really be appreciated.
Waiting another 2+ month for a fix would be painful.
This is THE most needed feature in my medical help forum that is broken since the upgrade to the 4 series
To clarify:
I need this search phrase to work as URL so that I can create a Tab showing all unanswered Threads in the Navbar like the "what's new" tab.
Please help me :)
StarBuG
KDawg08
06-21-2010, 06:42 PM
idk how to setup the 0 replies thing, BUT i do know that you can exclude forums in the forums permissions. it's about halfway down right where you post if u want it to act as a forum or category, u just disable search from there.
StarBuG
06-21-2010, 09:15 PM
Thanks for trying to help but you are totally off track here ;)
the &exclude=X,Y,Z parameter does not work and I need it to work.
This will (unfortunately) require code changes until it is officially fixed
I need help with that ;)
Boofo
06-21-2010, 09:34 PM
Why don't you just enable it in the forums you want it to work in? You should be able to wrap it in an if condition clause. I think Mosh released a mod that does that, too.
StarBuG
06-21-2010, 09:54 PM
What I want is a navtab that shows all threads in all forums (a few excluded) that have 0 replies.
I run a medical help forum and this is needed to show all unanswered questions.
This can't be "enabled" in forum settings.
It has nothing to do with the overall forum search functionality.
Forums excluded from this search will still be searchable via the search function.
It works like "What's new" search.
It was working in the 3.8 Versions and was not included into the 4.0 series untill now.
And still it is not fully functional.
The mod from Mosh (https://vborg.vbsupport.ru/showthread.php?t=244842) is simply a plugin that uses the link code I posted in my initial request and automatically add the link to the navbar template.
And like me he has the same problem I am searching a solution for with this thread:
Question:I can not exlude forums. What can I do?Answer:See the above F.A.Q. item, that is part of the functionality Internet Brands has not added back in, and there is nothing I can do about it!!!
StarBuG
06-26-2010, 11:28 AM
*bump*
Boofo
06-26-2010, 11:44 AM
<a href="https://vborg.vbsupport.ru/showthread.php?t=244875" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=244875</a>
StarBuG
06-26-2010, 12:26 PM
Thanks but it is not what I need.
I don't need it to be in the search function I need it to be a navtab like the "What's new" Tab.
Therefor I need this search url to work including the exclude part:
search.php?do=process&contenttype=vBForum_Post&rep lyless=1&replylimit=0&exclude=10,15
Boofo
06-26-2010, 08:10 PM
Well, until they add that back to the code, there's no way to do it like you want.
StarBuG
06-26-2010, 08:57 PM
That is why I posted in the Programming Discussion forum.
the exclusion works for new threads so maybe it is simply copying some existing code.
I am no programmer though that is why I ask for help
StarBuG
06-29-2010, 07:11 AM
Solution for everybody who needs it:
In file search.php search for:
//caputure the search form values for backreferencing
add after it:
$vbulletin->input->clean_array_gpc('r', array(
'exclude' => TYPE_NOHTML,
'include' => TYPE_NOHTML
));
if ($vbulletin->GPC['include'])
{
$list = explode(',', $vbulletin->GPC['include']);
if (is_array($list))
{
$list = array_map('intval', $list);
$criteria->add_forumid_filter($list, false);
}
}
if ($vbulletin->GPC['exclude'])
{
$list = explode(',', $vbulletin->GPC['exclude']);
if (is_array($list))
{
$list = array_map('intval', $list);
$criteria->add_excludeforumid_filter($list);
}
}
Works perfect
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.