[buddypress-trac] [BuddyPress] #3074: XProfile - Incorrect CSS zebra striping

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Tue Jul 26 15:18:50 UTC 2011


#3074: XProfile - Incorrect CSS zebra striping
-----------------------+-----------------------
 Reporter:  ezd        |       Owner:
     Type:  defect     |      Status:  reopened
 Priority:  normal     |   Milestone:  1.3
Component:  Theme      |     Version:  1.3
 Severity:  normal     |  Resolution:
 Keywords:  has-patch  |
-----------------------+-----------------------

Comment (by johnjamesjacoby):

 Replying to [comment:11 boonebgorges]:
 > Re 3074.04.patch. Your IS NOT NULL query assumes that blank rows exist
 in the profile data table for optional fields left blank. This may be the
 case during a normal profile edit (I would have to check) but it will not
 be the case if the admin creates a new profile field after the site is up
 and running. I'll grant that this is an edge case, and that your method is
 a bit easier to follow, but the method in 3074.03.patch does not have this
 shortcoming.
 >
 > Also, as DJPaul pointed out in a private channel, the static $alt_row;
 is unnecessary since the query won't be returning empty rows. We can use a
 modulo instead.
 I'm not sure I understand what you mean. When you edit a profile, you're
 not using $hide_empty_fields so that won't matter. The 'IS NOT NULL' part
 of 3074.04.patch assumes we don't want to return empty or null values,
 which IS what we want when viewing a profile. Even if a field is required,
 the user has no data entered so there is nothing to show.

 Either we want empty fields or we don't, required or not?

 $alt_row is necessary because the modulo is based on if the field_id is an
 even or odd number, which when skipping empties or having them be
 rearranged, the ID's could be anything. This is why I went the JS route
 originally - it was an easy way to consistently handle this all until we
 look at it later, which is now. :)

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/3074#comment:12>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list