Simple Machines Community Forum

Customizing SMF => Tips and Tricks => Topic started by: ZerK on March 09, 2013, 05:02:06 PM

Title: [TIP/TRICK] Add open reports to the menu
Post by: ZerK on March 09, 2013, 05:02:06 PM
Open Sources/Subs.php
Find:
Code (Subs.php) Select
$context['menu_buttons'][$current_action]['active_button'] = true;

Add after:

Code (Subs.php) Select
if (!empty($user_info['mod_cache']) && $user_info['mod_cache']['bq'] != '0=1' && $context['open_mod_reports'] > 0)
$context['menu_buttons']['moderate']['title'] .= ' [<strong>' .$context['open_mod_reports'] . '</strong>]';


And we are done! its going to look like that:

Code (Subs.php) Select
$context['menu_buttons'][$current_action]['active_button'] = true;

if (!empty($user_info['mod_cache']) && $user_info['mod_cache']['bq'] != '0=1' && $context['open_mod_reports'] > 0)
$context['menu_buttons']['moderate']['title'] .= ' [<strong>' .$context['open_mod_reports'] . '</strong>]';