Skip to:
Content

BuddyPress.org

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#5169 closed enhancement (fixed)

Class for number of new messages

Reported by: sgr33n's profile sgr33n Owned by: djpaul's profile DJPaul
Milestone: 2.0 Priority: low
Severity: normal Version: 1.2
Component: Messages 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 11 years ago.

Download all attachments as: .zip

Change History (9)

#1 @r-a-y
11 years ago

  • Milestone changed from Awaiting Review to 2.0
  • Priority changed from normal to low
  • Version changed from 1.8.1 to 1.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
11 years ago

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

#3 @DJPaul
11 years ago

  • Keywords good-first-bug added

#4 @DJPaul
11 years ago

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

@markoheijnen
11 years ago

#5 @markoheijnen
11 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
11 years ago

  • Owner set to DJPaul
  • Status changed from new to assigned

#7 @djpaul
11 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

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
11 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.