"PM Status" Only to Usergroups with PM Permission
#1
Could this be released like a mod, please?


I want to exclude "PM Usage" to GID=2 - "Registered Usergroup" - they dont have permission to use PM function...

I need a PHP code to Hide this line to this group (GID=2) only, in header_welcomeblock_member Template:

<a href="{$mybb->settings['bburl']}/private.php">{$lang->welcome_pms}</a> {$lang->welcome_pms_usage}


Thanks,
Claudio


Attached Files Thumbnail(s)
   
Reply
#2
Open global.php (Dont use Notepad)
Find
	// Tell the user their PM usage
		$lang->welcome_pms_usage = sprintf($lang->welcome_pms_usage, my_number_format($mybb->user['pms_new']), my_number_format($mybb->user['pms_unread']), my_number_format($mybb->user['pms_total']));

Change by
	// Tell the user their PM usage
	if($mybb->usergroup['canusepms'] == "yes")
	{
		$lang->welcome_pms_usage = sprintf($lang->welcome_pms_usage, my_number_format($mybb->user['pms_new']), my_number_format($mybb->user['pms_unread']), my_number_format($mybb->user['pms_total']));
		$pm_usage = "| <a href=\"{$mybb->settings['bburl']}/private.php\">{$lang->welcome_pms}</a> {$lang->welcome_pms_usage}";
	}

Open your header_welcomeblock_member template
Find
| <a href="{$mybb->settings['bburl']}/private.php">{$lang->welcome_pms}</a> {$lang->welcome_pms_usage}

Replace by
{$pm_usage}
Reply
#3
Thanks LeX- it Works perfectly Big Grin


Attached Files Thumbnail(s)
   
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)