Skip to:

Opened 14 years ago

Closed 2 months ago

#1475 closed enhancement (maybelater)


Reported by: _dorsvenabili's profile _DorsVenabili Owned by:
Milestone: Priority: trivial
Severity: trivial Version:
Component: Messages Keywords: needs-patch
Cc: _DorsVenabili


This function returns the total unread messages of my Inbox, but it could be very useful to count if there is a administrator notice active aswell (the function should count it only if the user has not closed the notice). So, with a variable we could choose if we want to count only the unread messages or the unread messages more the admin's notices.

Change History (16)

#1 @_DorsVenabili
14 years ago

  • Cc _DorsVenabili added

#2 @cnorris23
14 years ago

  • Keywords reporter-feedback added
  • Milestone set to Future Release

Could you explain more what you're looking to do?

#3 @cnorris23
13 years ago

  • Component set to Messaging
  • Keywords messages classes functions removed

#4 @luccame
12 years ago

  • Keywords close added
  • Severity set to trivial

#5 @DJPaul
8 years ago

  • Keywords good-first-bug added; reporter-feedback close removed

#6 follow-up: @tw2113
7 years ago

Only used in two places.

Inside messages_get_unread_count() and bp_get_total_unread_messages_count()

#7 in reply to: ↑ 6 @thuanphuoc
3 years ago

Replying to tw2113:

Only used in two places.

Inside messages_get_unread_count() and bp_get_total_unread_messages_count()

Thank you for your advising

Last edited 3 years ago by imath (previous) (diff)

#8 @espellcaste
2 years ago

  • Milestone changed from Awaiting Contributions to 11.0.0
  • Owner set to espellcaste
  • Status changed from new to assigned

#9 @espellcaste
19 months ago

  • Milestone changed from 11.0.0 to Up Next

Bumping to the next release.

#10 @espellcaste
17 months ago

  • Keywords needs-patch 2nd-opinion added

I might have an unpopular opinion about this request. I'd suggest NOT doing this. Here is why:

1 - The ticket does not have enough information to help me decide how useful this would be or what problem is solving;

2 - If you want to get the admin notices, you can use BP_Messages_Notice::get_total_notice_count(), here I can see us improving this function since it doesn't seem to be getting only active notices, but all notices;

3 - bp_get_total_unread_messages_count and BP_Messages_Notice::get_total_notice_count() serve different types of messages, so I don't think they should be bundled together by the use of a param/variable.

I do think that we could introduce something like bp_get_total_unread_notices_count, to get the total count of the current unread admin notices (assuming several can be created at the same time, which I think that's not currently possible or offered out of the box), which I'm guessing is what @_DorsVenabili is looking for.

#11 @espellcaste
17 months ago

@imath I'd love your opinion about this ticket.

#12 @imath
17 months ago

  • Keywords good-first-bug 2nd-opinion removed

Hi @espellcaste

I'm very dubitative about the interest of mixing notices count with messages count. I think these are 2 different objects. BTW, that's why I moved notices publishing into the WP Admin screen since 3.0 (it's a community administrator only tool). IMHO, It should be a feature living outside of the Messages component (in core or in a Notice component).

There might be a limited interest to get the unread notice count, so why not introducing bp_get_total_unread_notices_count(). So far, the feature only loads one notice at a time. So you get the n+1 notice once you've marked the n one as read.

#13 @imath
17 months ago

  • Milestone changed from Up Next to 12.0.0

#14 @espellcaste
16 months ago

  • Owner espellcaste deleted

#15 @imath
13 months ago

  • Milestone changed from 12.0.0 to Awaiting Contributions

I'd love to see a patch about it.

#16 @espellcaste
2 months ago

  • Milestone Awaiting Contributions deleted
  • Resolution set to maybelater
  • Status changed from assigned to closed

Resolving as won't do.

Note: See TracTickets for help on using tickets.