Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to change the notifications background color when there is new notifications

  • Avatar of pieyum
    pieyum
    Participant

    @pieyum

    Hello!

    I’m trying to figure out the following; if there are notifications then the title of the notifications widget would be a different color, say red.

    I’m using the the latest buddypress with the widgetized theme. I’m losing it a bit.

    Hope someone can help!

    Pi

Viewing 5 replies - 1 through 5 (of 5 total)
  • Avatar of stwc
    stwc
    Participant

    @stwc

    It’s defined in default.css. If you want to change it, create a child theme (search on this site for instructions), copy over the _inc/css folder structure, edit the appropriate elements (div#message if I recall correctly) in default.css and you’re good to go.

    You may find the Firebug addon for Firefox extremely useful for tracking down and playing with stuff like this, if you don’t already use it.

    Avatar of pieyum
    pieyum
    Participant

    @pieyum

    Ok so Firebug is awesome and I’m sure now that I can track down the location for the notification title. Now my question is this, how would I switch the widget title for notifications from one color to another when there are new notifications.

    So I would have the same color (lets say gray) as all other widget titles but then when there’s a new message or request, the color shows as something else. I’m guessing this needs more than just CSS?

    Avatar of pieyum
    pieyum
    Participant

    @pieyum

    Also, I’m using the Widgetized buddypress theme. Can I still create a child theme?

    Avatar of pieyum
    pieyum
    Participant

    @pieyum

    Anyone?

    Avatar of r-a-y
    r-a-y
    Moderator

    @r-a-y

    Make a copy of the bp_adminbar_notifications_menu() function (located in /buddypress/bp-core/bp-core-adminbar.php) and add a check to see if there are any notifications to the main list item, if there are, output a CSS class for the list item.

    You’ll need to override the default notifications menu in the BuddyBar.

    Read this guide to find out how to modify the BuddyBar:

    http://codex.buddypress.org/how-to-guides/modifying-the-buddypress-admin-bar/

Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.