MyBB Hacks

Full Version: Ignored Forums
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Where exactly do I upload the ignoreforum.php file?

I uploaded it to the plugins folder and nothing.
Sounds right but nothing.
this plugin simply very usable,

and I add some message on top of search result,
So, user know whether there is a setting to exclude forum search.

just add:

PHP Code:
$plugins->add_hook('search_results_end', 'ignoreforum_search_guide');

and function

PHP Code:
function ignoreforum_search_guide () {
    global $mybb, $ignoreforum_search_guide_message;
// display message on top of Search Result to let user know, there is an "ignored forum" setting
    $ignoreforum_search_guide_message = '<div class="pm_alert">Too many search result? Don\'t like some forum? Click <a href="usercp.php?action=options" target="_blank">here</a>, and select your ignored forum!</div>';
}


and add this after {$header} in search_results_threads TEMPLATES

Code:
{$ignoreforum_search_guide_message}


It will display additional message alert with directive link to usercp like this screenshot Smile
[attachment=1003]


Too lazy to edit/modifying? Here the attachment plugin

Thanks FBI. very useful.
Also ZiNgA BuRgA you may want to know this works in 1.8 beta 2 also
Will also work with the View Unread Posts plugin.
Just replace this code in line 127
Quote:if($mybb->input['action'] != 'getnew' && $mybb->input['action'] != 'getdaily') return;
with this
Quote:if($mybb->input['action'] != 'getnew' && $mybb->input['action'] != 'getdaily' && $mybb->input['action'] != 'unread') return;
v1.1: update compatibility string for MyBB 1.8
Pages: 1 2
Reference URL's