Changeset 1160
- Timestamp:
- 02/29/2008 03:48:44 AM (18 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
-
bb-admin/admin-functions.php (modified) (1 diff)
-
bb-admin/options-general.php (modified) (1 diff)
-
bb-includes/locale.php (modified) (4 diffs)
-
bb-includes/template-functions.php (modified) (1 diff)
-
bb-templates/kakumei/search.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bb-admin/admin-functions.php
r1107 r1160 209 209 $r .= "\t\t<td><a href='mailto:$email'>$email</a></td>\n"; 210 210 } 211 $r .= "\t\t<td> $user->user_registered</td>\n";211 $r .= "\t\t<td>" . date( 'Y-m-d H:i:s', bb_offset_time( bb_gmtstrtotime( $user->user_registered ) ) ) . "</td>\n"; 212 212 $actions = ''; 213 213 if ( bb_current_user_can( 'edit_user', $user_id ) ) -
trunk/bb-admin/options-general.php
r1058 r1160 104 104 <p><?php _e('Example: -7 for Pacific Daylight Time.'); ?></p> 105 105 </div> 106 <label for="datetime_format"> 107 <?php _e('Date and time format:') ?> 108 </label> 109 <div> 110 <input class="text" name="datetime_format" id="datetime_format" value="<?php echo(attribute_escape(bb_get_datetime_formatstring_i18n())); ?>" /> 111 <p><?php printf(__('Output: <strong>%s</strong>'), bb_datetime_format_i18n( bb_current_time() )); ?></p> 112 </div> 113 <label for="date_format"> 114 <?php _e('Date format:') ?> 115 </label> 116 <div> 117 <input class="text" name="date_format" id="date_format" value="<?php echo(attribute_escape(bb_get_datetime_formatstring_i18n('date'))); ?>" /> 118 <p><?php printf(__('Output: <strong>%s</strong>'), bb_datetime_format_i18n( bb_current_time(), 'date' )); ?></p> 119 <p><?php _e('Click "Update options" to update sample output.') ?></p> 120 <p><?php _e('<a href="http://codex.wordpress.org/Formatting_Date_and_Time">Documentation on date formatting</a>.'); ?></p> 121 </div> 106 122 </fieldset> 107 123 <fieldset> -
trunk/bb-includes/locale.php
r831 r1160 12 12 13 13 var $meridiem; 14 var $number_format; 15 var $datetime_formatstring; 14 16 15 17 var $text_direction = ''; … … 100 102 $this->number_format['thousands_sep'] = ('number_format_thousands_sep' == $trans) ? ',' : $trans; 101 103 104 // Date/Time formatting 105 106 $this->datetime_formatstring['datetime'] = __('F j, Y - h:i A'); 107 $this->datetime_formatstring['date'] = __('F j, Y'); 108 $this->datetime_formatstring['time'] = __('h:i A'); 109 102 110 $this->_load_locale_data(); 103 111 } … … 142 150 function get_meridiem($meridiem) { 143 151 return $this->meridiem[$meridiem]; 152 } 153 154 function get_datetime_formatstring($type = 'datetime') { 155 return $this->datetime_formatstring[$type]; 144 156 } 145 157 … … 183 195 } 184 196 197 function bb_get_datetime_formatstring_i18n( $type = 'datetime' ) { 198 $formatstring = bb_get_option( $type . '_format' ); 199 if ( empty($formatstring) ) { 200 global $bb_locale; 201 $formatstring = $bb_locale->get_datetime_formatstring( $type ); 202 } 203 return $formatstring; 204 } 205 206 function bb_datetime_format_i18n( $unixtimestamp, $type = 'datetime', $formatstring = '' ) { 207 if ( empty($formatstring) ) { 208 $formatstring = bb_get_datetime_formatstring_i18n( $type ); 209 } 210 return bb_gmdate_i18n( $formatstring, bb_offset_time( $unixtimestamp ) ); 211 } 212 185 213 function bb_number_format_i18n($number, $decimals = null) { 186 214 global $bb_locale; -
trunk/bb-includes/template-functions.php
r1156 r1160 1420 1420 echo "<dl id='userinfo'>\n"; 1421 1421 echo "\t<dt>" . __('Member Since') . "</dt>\n"; 1422 echo "\t<dd>" . bb_ gmdate_i18n(__('F j, Y'), $reg_time) . ' (' . bb_since($reg_time) . ")</dd>\n";1422 echo "\t<dd>" . bb_datetime_format_i18n($reg_time, 'date') . ' (' . bb_since($reg_time) . ")</dd>\n"; 1423 1423 if ( is_array( $profile_info_keys ) ) { 1424 1424 foreach ( $profile_info_keys as $key => $label ) { -
trunk/bb-templates/kakumei/search.php
r909 r1160 14 14 <li><h4><a href="<?php post_link(); ?>"><?php topic_title($bb_post->topic_id); ?></a></h4> 15 15 <p><?php echo bb_show_context($q, $bb_post->post_text); ?></p> 16 <p><small><?php _e('Posted') ?> <?php bb_post_time( __('F j, Y, h:i A') ); ?></small></p>16 <p><small><?php _e('Posted') ?> <?php echo bb_datetime_format_i18n( bb_get_post_time( array( 'format' => 'timestamp' ) ) ); ?></small></p> 17 17 </li> 18 18 <?php endforeach; ?> … … 26 26 <li><h4><a href="<?php post_link(); ?>"><?php topic_title($bb_post->topic_id); ?></a></h4> 27 27 <p><?php echo bb_show_context($q, $bb_post->post_text); ?></p> 28 <p><small><?php _e('Posted') ?> <?php bb_post_time( __('F j, Y, h:i A') ); ?></small></p>28 <p><small><?php _e('Posted') ?> <?php echo bb_datetime_format_i18n( bb_get_post_time( array( 'format' => 'timestamp' ) ) ); ?></small></p> 29 29 </li> 30 30 <?php endforeach; ?>
Note: See TracChangeset
for help on using the changeset viewer.