function bb_profile_data($id = 0) { if (!($user = bb_get_user(bb_get_user_id($id)))) { return; } $reg_time = bb_gmtstrtotime($user->user_registered); $profile_info_keys = bb_get_profile_info_keys(); echo "<dl id='userinfo'>\n"; echo "\t<dt>" . __('Member Since') . "</dt>\n"; echo "\t<dd>" . bb_datetime_format_i18n($reg_time, 'date') . ' (' . bb_since($reg_time) . ")</dd>\n"; if (is_array($profile_info_keys)) { foreach ($profile_info_keys as $key => $label) { if (in_array($key, array('first_name', 'last_name', 'display_name')) || !isset($user->{$key})) { continue; } $val = 'user_url' == $key ? get_user_link($user->ID) : $user->{$key}; if (('user_email' != $key || 'user_email' == $key && bb_current_user_can('edit_users')) && $val && 'http://' != $val) { echo "\t<dt>{$label[1]}</dt>\n"; $val = make_clickable($val); $attributes = array(); if (isset($label[2]) && !empty($label[2])) { if (preg_match("#^<a#i", $val)) { $val = preg_replace("#^<a#i", '<a class="' . esc_attr($label[2]) . '"', $val); } else { $val = '<span class="' . esc_attr($label[2]) . '">' . $val . '</span>'; } } echo "\t<dd>" . $val . "</dd>\n"; } } } echo "</dl>\n"; }
} if (function_exists('timezone_transitions_get')) { $timezone_object = new DateTimeZone($timezone_string); $found_transition = false; foreach (timezone_transitions_get($timezone_object) as $timezone_transition) { if ($timezone_transition['ts'] > time()) { $note = $timezone_transition['isdst'] ? __('Daylight savings time begins on <code>%s</code>') : __('Standard time begins on <code>%s</code>'); $_time_options['timezone_string']['note'][] = sprintf($note, bb_gmdate_i18n(bb_get_datetime_formatstring_i18n(), $timezone_transition['ts'], false)); break; } } } $time_options = array_merge($_time_options, $time_options); } else { // Tidy up the old style dropdown $time_options['gmt_offset']['note'] = array(1 => sprintf(__('<abbr title="Coordinated Universal Time">UTC</abbr> %s is <code>%s</code>'), $time_options['gmt_offset']['options'][$gmt_offset], bb_datetime_format_i18n(bb_current_time())), 2 => __('Unfortunately, you have to manually update this for Daylight Savings Time.')); if ($gmt_offset) { $time_options['gmt_offset']['note'][0] = sprintf(__('<abbr title="Coordinated Universal Time">UTC</abbr> time is <code>%s</code>'), bb_gmdate_i18n(bb_get_datetime_formatstring_i18n(), bb_current_time(), true)); ksort($time_options['gmt_offset']['note']); } foreach ($time_options['gmt_offset']['options'] as $_key => $_value) { $time_options['gmt_offset']['options'][$_key] = sprintf(__('UTC %s'), $_value); } } $bb_admin_body_class = ' bb-admin-settings'; bb_get_admin_header(); ?> <div class="wrap"> <h2><?php
foreach ($relevant as $topic) { $bb_post = bb_get_first_post($topic); ?> <li<?php alt_class('relevant'); ?> > <a class="result" href="<?php post_link(); ?> "><?php echo bb_show_topic_context($q, get_topic_title()); ?> </a> <span class="freshness"><?php printf(__('By <a href="%1$s">%2$s</a> on %3$s'), get_user_profile_link($topic->topic_poster), get_topic_author(), bb_datetime_format_i18n(get_topic_start_time(array('format' => 'timestamp')))); ?> </span> <p><?php echo bb_show_context($q, $bb_post->post_text); ?> </p> </li> <?php } ?> </ol> </div> <?php } ?>
<?php foreach ($relevant as $bb_post) { ?> <li><h4><a href="<?php post_link(); ?> "><?php topic_title($bb_post->topic_id); ?> </a></h4> <p><?php echo bb_show_context($q, $bb_post->post_text); ?> </p> <p><small>Отправлено <?php echo bb_datetime_format_i18n(bb_get_post_time(array('format' => 'timestamp'))); ?> </small></p> </li> <?php } ?> </ol> <?php } ?> <?php if ($q && !$recent && !$relevant) { ?> <p>Нет результатов.</p>
<?php foreach ($relevant as $bb_post) { ?> <li<?php alt_class('relevant'); ?> > <a href="<?php post_link(); ?> "><?php topic_title($bb_post->topic_id); ?> </a> <span class="freshness"><?php printf(__('Posted %s'), bb_datetime_format_i18n(bb_get_post_time(array('format' => 'timestamp')))); ?> </span> <p><?php post_text(); ?> </p> </li> <?php } ?> </ol> </div> <?php } ?>