files to edit
/templates/base/scripts/BxBaseMailBox.php
Step 1:
around line 1712-1719
find this code
$aNewMessages = array();
$aLanguageKeys = array (
'sent' => _t('_Sent'),
'compose' => _t('_Compose new letter'),
'trash' => _t('_Trash'),
'inbox' => _t('_Inbox'),
);
and change to
$aNewMessages = array();
$aLanguageKeys = array (
'sent' => _t('_Sent'),
'compose' => _t('_Compose new letter'),
'trash' => _t('_Trash'),
'contacts' => _t('_Contacts'),
'inbox' => _t('_Inbox'),
);
------------------------------------------------------------------------------
next
around line 1731
// generate member's new messages list ;
above that line add this code
$sQuery =
"
SELECT
COUNT( DISTINCT if(`Recipient` = {$iMemberId}, `Sender`, `Recipient`) ) AS `Contacts`
FROM
`sys_messages`
WHERE
`Sender` = {$iMemberId}
OR
`Recipient` = {$iMemberId}
";
// number of contacts ;
$iContacts = db_value($sQuery);
----------------------------------------------------------------------------
last stap
around line 1773-1784
$aExtraSection = array(
'go_inbox' => $aLanguageKeys['inbox'],
'inbox_count' => $iInboxCount,
'go_outbox' => $aLanguageKeys['sent'],
'outbox_count' => $iSentCount,
'go_compose' => $aLanguageKeys['compose'],
'go_trash' => $aLanguageKeys['trash'],
'trash_count' => $iTrashCount,
);
change to
$aExtraSection = array(
'go_inbox' => $aLanguageKeys['inbox'],
'inbox_count' => $iInboxCount,
'go_outbox' => $aLanguageKeys['sent'],
'outbox_count' => $iSentCount,
'go_compose' => $aLanguageKeys['compose'],
'go_trash' => $aLanguageKeys['trash'],
'trash_count' => $iTrashCount,
'contacts' => $aLanguageKeys['contacts'],
'contacts_count' => $iContacts,
);
that's it
if you prefer no contacts in the menu
file to edit
/templates/base/mail_box_member_menu_messages.html
at the end just comment out this line of code
<div>
<img src="<bx_icon_url:memeber_menu_sub_contacted.png />" alt="__contacts__" width="16" height="16" /> __contacts__ (__contacts_count__)
</div>
</div>