Skip to:
Content

BuddyPress.org

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#5169 closed enhancement (fixed)

Class for number of new messages

Reported by: sgr33n Owned by: DJPaul
Priority: low Milestone: 2.0
Component: Messages Version: 1.2
Severity: normal Keywords: good-first-bug has-patch
Cc:

Description

Hi,

The <span> containing the number of new messages in object-nav (#messages-personal-li) doesn't have a different class for no messages (could also be a different class if there are new messages). In this way you could hide the number for 0 new messages or give a different style if there are new messages.

Attachments (1)

5169.diff (3.5 KB ) - added by markoheijnen 13 years ago.

Download all attachments as: .zip

Change History (9)

#1 @r-a-y
13 years ago

  • Milestone Awaiting Review2.0
  • Priority normallow
  • Version 1.8.11.2

I can see how this would be useful.

In the meantime, you could set a CSS class with jQuery if you really need to.

#2 @karmatosed
13 years ago

I like this idea, it's very similar to post-idnumber and makes sense to me.

#3 @DJPaul
13 years ago

  • Keywords good-first-bug added

#4 @DJPaul
13 years ago

Turns out none of the BP profile nav items have classes around the span count, not just Messages.

@markoheijnen
13 years ago

#5 @markoheijnen
13 years ago

  • Keywords has-patch added

Created a patch for all menu items (friends,groups,messages,notifications). I added a small change that all counts are now using number_format_i18n() for styling the number if needed. Also bp-messages-loader.php is now synced to look the same as the others.

#6 @DJPaul
13 years ago

  • Owner set to DJPaul
  • Status newassigned

#7 @djpaul
13 years ago

  • Resolutionfixed
  • Status assignedclosed

In 7758:

Navigation: add CSS classes for BP nav bar item counts

Allows themes to show/hide the bubble depending on if there is a count to display.

Fixes #5169, props markoheijnen

#8 @johnjamesjacoby
13 years ago

I'd like to try to keep markup out of our gettext calls. Thoughts on inverting this so the spans are passed through the sprintf(), rather than through the __()?

Note: See TracTickets for help on using tickets.