Change "0 new messages" display in header

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The current feature release of phpBB 3 is 3.3/Proteus.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.3.x. If you need support for phpBB 3.3.x please visit the 3.3.x Support Forum on phpbb.com.

If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
Post Reply
User avatar
tbackoff
Registered User
Posts: 180
Joined: Sat Jun 12, 2010 3:25 am

Re: Change "0 new messages" display in header

Post by tbackoff »

Sorry, I think this is a bad idea. I like the consistency of whether or not I have new messages.

Frug
Registered User
Posts: 57
Joined: Thu Jul 02, 2009 3:33 am

Re: Change "0 new messages" display in header

Post by Frug »

t_backoff wrote:Sorry, I think this is a bad idea. I like the consistency of whether or not I have new messages.
I believe DocSommer's solution posted on the last page addresses this issue anyway:

<!-- IF S_DISPLAY_PM and (S_USER_NEW_PRIVMSG) --> ...

Aside from a possible performance hit, this looks like it answers the request perfectly.

User avatar
tbackoff
Registered User
Posts: 180
Joined: Sat Jun 12, 2010 3:25 am

Re: Change "0 new messages" display in header

Post by tbackoff »

No, it doesn't. Read the code he posted. It basically says "if there are new PMs, show the number of PMs; otherwise, just show the words 'Private Messaging'". :wink:

keith10456
Registered User
Posts: 523
Joined: Sat Apr 22, 2006 10:29 pm
Contact:

Re: Change "0 new messages" display in header

Post by keith10456 »

t_backoff wrote:No, it doesn't. Read the code he posted. It basically says "if there are new PMs, show the number of PMs; otherwise, just show the words 'Private Messaging'". :wink:
I like it... Many people that use a phpBB board for the first time don't know how to send a PM. If they see "Private Messages", or something similar, at least it will give them an idea as to where to click to send a PM to someone.

Frug
Registered User
Posts: 57
Joined: Thu Jul 02, 2009 3:33 am

Re: Change "0 new messages" display in header

Post by Frug »

t_backoff wrote:No, it doesn't. Read the code he posted. It basically says "if there are new PMs, show the number of PMs; otherwise, just show the words 'Private Messaging'". :wink:
I can see that. His code does exactly what the OP is requesting to be able to do.
I'm saying that your "bad idea" is already doable with the current setup, so there is no reason anyone should ask to change anything, unless the performance hit of using a conditional on the template is enough to justify a lower level change.

DocSommer
Registered User
Posts: 13
Joined: Sun Dec 09, 2012 12:27 pm

Re: Change "0 new messages" display in header

Post by DocSommer »

The code does indeed display the pm like you guys can see in the first post. SInce I'm not a coder I can't tell if my trial&error solution is the most efficient way performance-wise. Still I don't see a problem to question the current behaviour, even if it's a running and established solution since ages (like a dial plate on a phone^^). If that's undesired we wouldn't need that forum - at least I thing that optimizing existing things is at least as important than ask for new features. So far I do notice mostly positive feedback to this sugegstion, especially if one ask users who experienced the default and modified PM display. It just fits more into todays digital world of smartphones/computers - simply check misc. devices/software with comparable messaging functions how notifications work these days....

@keith:

That's interesting with the new notification system for 3.1 - haven't dig into the topic tbh
t_backoff wrote:Sorry, I think this is a bad idea. I like the consistency of whether or not I have new messages.
Consistency could also be archived if you stick with the word "Private Messages" in both scenarios and add a notification in case there is something to alert the user, like a simple count "(x)" while x stands for the number of unread messages of course - perhaps with a different color or bold-style text to enhance the visual effect for a notifications. I can think of many possibilities here but first of all I was interested to put the idea beside cosmetical debates in the room.

User avatar
hanakin
Front-End Dev Team Lead
Front-End Dev Team Lead
Posts: 968
Joined: Sat Dec 25, 2010 9:02 pm
Contact:

Re: Change "0 new messages" display in header

Post by hanakin »

+ 1

i would say that the

Current:

Code: Select all

<!-- IF S_DISPLAY_PM --> (<a href="{U_PRIVATEMSGS}">{PRIVATE_MESSAGE_INFO}<!-- IF PRIVATE_MESSAGE_INFO_UNREAD -->, {PRIVATE_MESSAGE_INFO_UNREAD}<!-- ENDIF --></a>)<!-- ENDIF -->
Should be:

Code: Select all

<!-- IF S_DISPLAY_PM and (S_USER_NEW_PRIVMSG) --><a class="hide-text" href="{U_PRIVATEMSGS}" title="{PRIVATE_MESSAGE_LABEL}"> {PRIVATE_MESSAGE_LABEL} <span class="badge">{UNREAD_MESSAGE_COUNT}</span> <!-- ENDIF --></a><!-- ENDIF -->
Thus allowing for a semantic markup:

Code: Select all

<a class="hide-text" href="http://area51.phpbb.com/phpBB/ucp.php?i=pm&folder=inbox" title="Private Message"><i class="icon-message"></i> Private Messages <span class="badge">2</span></a>
where:

Code: Select all

{PRIVATE_MESSAGE_LABEL} = Language specific value for "Private Messages"
{UNREAD_MESSAGE_COUNT} = # of unread messages
to avoid having code in the variables at all cost as it is now its

Code: Select all

{PRIVATE_MESSAGE_INFO} = "<strong># of unread messages</strong> new messages"
the hide text class could be put on the parent selector for the entire nav but i included it so you could see what is happening

this way we are providing a consistant approach through our semantic markup and let the css control how to display it to the user
Donations welcome via Paypal Image

KnocksX
Registered User
Posts: 80
Joined: Thu Jul 19, 2012 2:03 am

Re: Change "0 new messages" display in header

Post by KnocksX »

t_backoff wrote:Sorry, I think this is a bad idea. I like the consistency of whether or not I have new messages.
So you like your mailman to ring your doorbell every morning, whether or not he has any mail for you? Just for consistency.

User avatar
callumacrae
Former Team Member
Posts: 1046
Joined: Tue Apr 27, 2010 9:37 am
Location: England
Contact:

Re: Change "0 new messages" display in header

Post by callumacrae »

KnocksX wrote:
t_backoff wrote:Sorry, I think this is a bad idea. I like the consistency of whether or not I have new messages.
So you like your mailman to ring your doorbell every morning, whether or not he has any mail for you? Just for consistency.
Bad example.
Made by developers, for developers!
My blog

User avatar
Pony99CA
Registered User
Posts: 986
Joined: Sun Feb 08, 2009 2:35 am
Location: Hollister, CA
Contact:

Re: Change "0 new messages" display in header

Post by Pony99CA »

A better example would be a phone application icon. An E-mail application icon can have a "tag" (for want of the correct term) showing how many new (or unread) E-mails you have. If there are 0, you just see the icon.

I'd rather see something like:

Code: Select all

User Control Panel * Private Messages * View Your Posts
If you have no messages and

Code: Select all

User Control Panel * New Private Messages: [n] * View Your Posts
If you have n messages.

That's consistent in placement at least. (Also note the subtle differences having a separator between UCP and Private Messages instead of using parentheses and using a format that doesn't require different coding for "1 new message".)

You could have:

Code: Select all

User Control Panel * New Private Messages: 0 * View Your Posts
if you really wanted to indicate zero, of course.

Steve
Silicon Valley Pocket PC (http://www.svpocketpc.com)
Creator of manage_bots and spoof_user (ask me)
Need hosting for a small forum with full cPanel & MySQL access? Contact me or PM me.

Post Reply