Removing message count next to Inbox/Outbox modules

Need some custom code changes to the phpBB core simple enough that you feel doesn't require an extension? Then post your request here so that community members can provide some assistance.

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Post Reply
User avatar
teebling
Registered User
Posts: 113
Joined: Sat Apr 14, 2018 7:38 pm
Contact:

Removing message count next to Inbox/Outbox modules

Post by teebling »

Hello,

In the UCP sidebar for PMs there is a section that looks like this:

-------
Inbox
Outbox (3)
Sent messages
-------

What I would like to do by changing the core files (I'm aware of how to maintain this in the future) is to remove the number + brackets surrounding that number so that it looks like this (even when new messages exist etc.):

-------
Inbox
Outbox
Sent messages
-------

I have looked through all the en/lang/ files but cannot find the place where this is specified so I can just delete it. Also looked through includes, and other core files but can't find the little thing anywhere!

Any help locating where those (3) type numbers are stored in the core files so I can remove them?

Teeb

EDIT: solution below
Last edited by teebling on Wed Apr 17, 2019 1:12 pm, edited 2 times in total.
User avatar
teebling
Registered User
Posts: 113
Joined: Sat Apr 14, 2018 7:38 pm
Contact:

Re: Removing message count next to Inbox/Outbox modules

Post by teebling »

Just did it successfully - for any future readers:

In /includes/functions_privmsgs.php

Find, around line 182:

Code: Select all

$db->sql_freeresult($result);

	$folder[PRIVMSGS_OUTBOX] = array(
		'folder_name'		=> $user->lang['PM_OUTBOX'],
		'num_messages'		=> $num_messages[PRIVMSGS_OUTBOX],
		'unread_messages'	=> $num_unread[PRIVMSGS_OUTBOX]
	);

	$folder[PRIVMSGS_SENTBOX] = array(
		'folder_name'		=> $user->lang['PM_SENTBOX'],
		'num_messages'		=> $num_messages[PRIVMSGS_SENTBOX],
		'unread_messages'	=> $num_unread[PRIVMSGS_SENTBOX]
	);
Replace with:

Code: Select all

	$db->sql_freeresult($result);

	$folder[PRIVMSGS_OUTBOX] = array(
		'folder_name'		=> $user->lang['PM_OUTBOX']
	);

	$folder[PRIVMSGS_SENTBOX] = array(
		'folder_name'		=> $user->lang['PM_SENTBOX']
	);
That removed the numbers in brackets next to the module names for 'Outbox' and 'Sent messages'. I kept the number in brackets for Inbox.
Post Reply

Return to “phpBB Custom Coding”