phpBB

Development Discussion Board

phpBB's testing ground of bleeding edge code
Advanced search

Private message notifications

Publish your own request for comments or patches for the next version of phpBB. Discuss the contributions and proposals of others. Upcoming releases are 3.1/Ascraeus and 3.2/Arsia.

Private message notifications

Postby _hsr » Sun Apr 01, 2012 6:02 am

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 !
_hsr
Registered User
 
Posts: 42
Joined: Mon Mar 26, 2012 7:06 am

Re: [RFC] Private message notifications

Postby Senky » Sun Apr 01, 2012 8:35 am

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...
Senky
Registered User
 
Posts: 222
Joined: Thu Jul 16, 2009 4:41 pm

Re: [RFC] Private message notifications

Postby _hsr » Sun Apr 01, 2012 9:04 am

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

Postby _hsr » Sun Apr 01, 2012 9:08 am

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 !
_hsr
Registered User
 
Posts: 42
Joined: Mon Mar 26, 2012 7:06 am

Re: [RFC] Private message notifications

Postby callumacrae » Sun Apr 01, 2012 9:32 am

_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;
      }
    });
  }
});
"In JavaScript, there is a beautiful, elegant, highly expressive language that is buried under a steaming pile of good intentions and blunders"
—Douglas Crockford

View my MOD, phpBB Mobile
User avatar
callumacrae
Website Team
Website Team
 
Posts: 883
Joined: Tue Apr 27, 2010 9:37 am
Location: England

Re: [RFC] Private message notifications

Postby igorw » Sun Apr 01, 2012 10:32 am

No confirm boxes please. A notification should never block what the user is doing right now.
User avatar
igorw
Registered User
 
Posts: 500
Joined: Thu Jan 04, 2007 11:47 pm

Re: [RFC] Private message notifications

Postby DavidIQ » Sun Apr 01, 2012 12:04 pm

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
User avatar
DavidIQ
MOD Team Leader
MOD Team Leader
 
Posts: 760
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth

Re: [RFC] Private message notifications

Postby _hsr » Mon Apr 02, 2012 3:33 am

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

Postby _hsr » Sun Apr 15, 2012 3:13 am

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 !
_hsr
Registered User
 
Posts: 42
Joined: Mon Mar 26, 2012 7:06 am

[RFC] Improved PM Notification

Postby jsebean » Mon Apr 30, 2012 12:38 pm

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
Formerly known as jsbean.
User avatar
jsebean
Registered User
 
Posts: 136
Joined: Wed Nov 17, 2010 1:40 am
Location: Atlantic Canada

Next

Return to [3.x] RFCs

Who is online

Users browsing this forum: No registered users and 14 guests