Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Date in profile is broken in latest BP release


altargratiae
Participant

@altargratiae

Something more… (sorry, previous post was too old to edit??)

Editing \wp-content\plugins\buddypress\bp-xprofile\bp-xprofile-classes.php to output

<option value="February">Febbraio</option>

gets the date correctly saved into the database. However the month still won’t be selected when re-editing the profile, and month name is still displayed in English in the profile page. I can’t seem to be able to find the right files to edit. Any suggestions?

By the way, here’s how i changed bp-xprofile-classes.php. Edit from line 555 onward

$months = array( __( 'January', 'buddypress' ), __( 'February', 'buddypress' ), __( 'March', 'buddypress' ),
__( 'April', 'buddypress' ), __( 'May', 'buddypress' ), __( 'June', 'buddypress' ),
__( 'July', 'buddypress' ), __( 'August', 'buddypress' ), __( 'September', 'buddypress' ),
__( 'October', 'buddypress' ), __( 'November', 'buddypress' ), __( 'December', 'buddypress' )
);

$html .= '
<select name="field_' . $this->id . '_month" id="field_' . $this->id . '_month">';
$html .= '<option value=""' . attribute_escape( $default_select ) . '>
</option>';

for ( $i = 0; $i < 12; $i++ ) {
if ( $month == $months[$i] ) {
$selected = ' selected = "selected"';
} else {
$selected = '';
}

$html .= '<option value="' . $months[$i] . '"' . $selected . '>' . $months[$i] . '</option>';

Skip to toolbar