Private message notifications

Note: We are moving the topics of this forum and it will be deleted at some point

Publish your own request for comments/change or patches for the next version of phpBB. Discuss the contributions and proposals of others. Upcoming releases are 3.2/Rhea and 3.3.
_hsr
Registered User
Posts: 42
Joined: Mon Mar 26, 2012 7:06 am

Private message notifications

Post by _hsr »

The current system of new message notification is just updating the 0 new messages to (int) new messages. If we ajax-enable the same, we could reproduce something similar to a notification we see on Facebook, or just a pulsating number. This can be done in two ways:

Without backend modifications:
As the user changes a page, If there is a new private message, a notification is given when the page finishes loading. This requires no backend support as all it does is parse the (int) portion from the (new messages).

With backend changes:
A ticker, say of 5 secs fetches JSON encoded data from a file(say ucp.php modified), which displays the new message count, at the same time showing a fadeIn(, fadeOut()) animation at the bottom. When the user clicks (x new messages) a dropdown list provides, if any, multiple message overviews (like from whom).


Comments?
There is a text here !

Senky
Extension Customisations
Extension Customisations
Posts: 315
Joined: Thu Jul 16, 2009 4:41 pm

Re: [RFC] Private message notifications

Post by Senky »

I am not sure it is worth of doing it... I mean, great idea, however phpBB itself needs to provide only basic functionality end users want. I consider this request be the same as "the latest posts on forum index" - it can be easily done as MOD, and many users not wanting it do not need to turn it off on ACP. Provate messages on boards usually have no such frequency of replying. Many users use IMs rather than old-style messaging via PMs...

_hsr
Registered User
Posts: 42
Joined: Mon Mar 26, 2012 7:06 am

Re: [RFC] Private message notifications

Post by _hsr »

The first functionality can be done simply by adding the following code:

Code: Select all

$(document).ready(function(){
  var msgNos = parseInt($("#page-header .navbar a strong")[0].innerText);
  var msgInbx = $("#page-header .navbar a[accesskey='e']").next()[0].href;
  if(msgNos > 0){
    phpbb.confirm('You have '+ msgNos +' unread message(s) in your inbox, go there?', function(x){
    if(x)
      window.location.href = msgInbx;
    });
  }
});
There is a text here !

_hsr
Registered User
Posts: 42
Joined: Mon Mar 26, 2012 7:06 am

Re: [RFC] Private message notifications

Post by _hsr »

Senky wrote:I am not sure it is worth of doing it... I mean, great idea, however phpBB itself needs to provide only basic functionality end users want. I consider this request be the same as "the latest posts on forum index" - it can be easily done as MOD, and many users not wanting it do not need to turn it off on ACP. Provate messages on boards usually have no such frequency of replying. Many users use IMs rather than old-style messaging via PMs...
In my opinion, it would rather serve helpful for users. Since the frequency of private messages are much less and those sent are more likely to be official requests, a notification would not harm, I guess.
There is a text here !

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

Re: [RFC] Private message notifications

Post by callumacrae »

_hsr wrote:The first functionality can be done simply by adding the following code:

Code: Select all

$(document).ready(function(){
  var msgNos = parseInt($("#page-header .navbar a strong")[0].innerText);
  var msgInbx = $("#page-header .navbar a[accesskey='e']").next()[0].href;
  if(msgNos > 0){
    phpbb.confirm('You have '+ msgNos +' unread message(s) in your inbox, go there?', function(x){
    if(x)
      window.location.href = msgInbx;
    });
  }
});
Should really be more like this:

Code: Select all

$(function() {
  var msg_nos = parseInt($("#page-header .navbar a strong").text());
  var inbox = $("#page-header .navbar a[accesskey='e']").next().attr('href');
  if (msg_nos) {
    phpbb.confirm('You have '+ msg_nos +' unread message(s) in your inbox, go there?', function(x) {
      if (x) {
        window.location.href = inbox;
      }
    });
  }
});
Made by developers, for developers!
My blog

igorw
Registered User
Posts: 500
Joined: Thu Jan 04, 2007 11:47 pm

Re: [RFC] Private message notifications

Post by igorw »

No confirm boxes please. A notification should never block what the user is doing right now.

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1904
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: [RFC] Private message notifications

Post by DavidIQ »

igorw wrote:No confirm boxes please. A notification should never block what the user is doing right now.
This. I am also not too fond of the ticker idea. Some hosted server solutions only give users an x amount of bandwidth a month. Someone could leave the computer on the site for days and use up a chunk of that.
Image

_hsr
Registered User
Posts: 42
Joined: Mon Mar 26, 2012 7:06 am

Re: [RFC] Private message notifications

Post by _hsr »

The alternative to confirm box would be something similar to the Facebook Beeper, the notification shall contain "You have # unread messages.", which fades/slides in and stays for about 5 secs, which has the option to hide the notif, preferably a close button like in phpbb_alert, which when clicked would hide further notifications. The use can click on the notification and be redirected to the inbox*.


*If possible, an inline Inbox can be shown, with the help of iframes/jsonFetch where there is no need of refresh/redirect.

P.S. I'll upload some previews later.
There is a text here !

_hsr
Registered User
Posts: 42
Joined: Mon Mar 26, 2012 7:06 am

Re: [RFC] Private message notifications

Post by _hsr »

bump, since there is a running RFC on a Notifications Box for 3.2, pausing this discussion until it is merged/rejected.
There is a text here !

User avatar
jsebean
Registered User
Posts: 165
Joined: Wed Nov 17, 2010 1:40 am
Location: Atlantic Canada

[RFC] Improved PM Notification

Post by jsebean »

When a user receives a PM, it is displayed simply in the little header bar in prosilver where it shows 0 new messages, 1 new message, etc. You can also choose to have a popup for new PMs, however, for people like me, I run Google Chrome and by default the popup is blocked, plus I'm sure a lot of other people and browsers have the same problem. Maybe this was discussed earlier but I'm not sure but I propose to have an improved PM notification system. The New messages thing in the header should remain of course, but instead of a popup windows, it should be made in something like jquery so a popup blocker doesn't block it.
-Jonah

Post Reply