Skip to:

Opened 10 years ago

Closed 10 years ago

#5238 closed enhancement (fixed)

Missing classes

Reported by: sgr33n's profile sgr33n Owned by: boonebgorges's profile boonebgorges
Milestone: 2.1 Priority: normal
Severity: normal Version:
Component: Core Keywords: good-first-bug
Cc: mercijavier@…



following up on #5169, If you want I could update a list of missing classes that could be useful theming BuddyPress.

On messages/single.php could be useful to have a new class for loggedin user messages.

		<?php while ( bp_thread_messages() ) : bp_thread_the_message(); ?>

			// It's tricky, I've to check if the link is the same in order to know if the message is mine.
			$notmine = bp_get_loggedin_user_link() != bp_get_the_thread_message_sender_link() ? ' notmine' : ' mine'; ?>

			<div class="message-box <?php bp_the_thread_message_alt_class(); ?> <?php echo $notmine; ?>">
				<div class="message-metadata">

Then on profile fields visibility could be useful to add to the container li the visibility level class, on members/single/profile/edit.php:

					<?php if ( bp_current_user_can( 'bp_xprofile_change_field_visibility' ) ) : ?>
						<p class="field-visibility-settings-toggle <?php bp_the_profile_field_visibility_level(); ?>" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>">

Change History (10)

#1 @sgr33n
10 years ago

  • Type changed from defect (bug) to enhancement

#2 @boonebgorges
10 years ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 2.0

Sure, these sound good to me. There's got to be a better way to do the first one, but this is a good start.

#3 @sgr33n
10 years ago

For the first one I have found nothing really good, I'm sure you can :P

#4 @DJPaul
10 years ago

  • Keywords has-patch removed

#5 @boonebgorges
10 years ago

  • Milestone changed from 2.0 to 2.1

#6 @SGr33n
10 years ago

Could be also useful an unique class for the user profile, that are the same of the members directory.

#7 @DJPaul
10 years ago

  • Keywords good-first-bug added

#8 @mercime
10 years ago

  • Cc mercijavier@… added

#9 @boonebgorges
10 years ago

In 8603:

Add the xprofile field visibility level as a CSS class for the field div

See #5238

Props sgr33n for an initial patch

#10 @boonebgorges
10 years ago

  • Owner set to boonebgorges
  • Resolution set to fixed
  • Status changed from new to closed

In 8604:

Introduce bp_get_the_thread_message_css_class()

This centralized function assembles CSS classes for message divs within a
single private message thread. In addition to the existing zebra-striping
classes, classes have been introduced for 'sent-by-[userid]' and 'sent-by-me'.

Fixes #5238

Props sgr33n for an initial patch

Note: See TracTickets for help on using tickets.