Using vB 4.1.5 PS
I had an add-on for vB3.7.3 for ignoring threads, forums and tags but with the new search system it no longer works, so I want to build up a new one from scratch. I'm not interested much in forums or tags, mostly threads and it only needs to work in New Posts or Daily Posts.
So in my experimental version of search.php I hacked in a hook at the bottom of function set_newitem_forums($criteria) (line 1146) and tried the following plugin:
It works fine for ignoring forums (which I could already do) but the thread ignore doesn't work. Am I doing something wrong or is it somehow impossible to ignore posts by threadid?
I had an add-on for vB3.7.3 for ignoring threads, forums and tags but with the new search system it no longer works, so I want to build up a new one from scratch. I'm not interested much in forums or tags, mostly threads and it only needs to work in New Posts or Daily Posts.
So in my experimental version of search.php I hacked in a hook at the bottom of function set_newitem_forums($criteria) (line 1146) and tried the following plugin:
PHP Code:
if($vbulletin->userinfo['userid'] == 5)
{
//echo 'Testing plugin for ignore system.';
ini_set('display_errors', '1');
$thread_string = '7491,3161,7555';
$forum_string = '16,17';
$threads = explode(',', $thread_string);
$threads = array_map('intval', $threads);
$forums = explode(',', $forum_string);
$forums = array_map('intval', $forums);
global $vbphrase;
$criteria->add_filter('forumid', vB_Search_Core::OP_NEQ, $forums);
$criteria->add_filter('threadid', vB_Search_Core::OP_NEQ, $threads);
}
Comment