当前位置: 首页>>代码示例>>PHP>>正文


PHP Utils::forum_number_format方法代码示例

本文整理汇总了PHP中FeatherBB\Core\Utils::forum_number_format方法的典型用法代码示例。如果您正苦于以下问题:PHP Utils::forum_number_format方法的具体用法?PHP Utils::forum_number_format怎么用?PHP Utils::forum_number_format使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FeatherBB\Core\Utils的用法示例。


在下文中一共展示了Utils::forum_number_format方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: check_errors_before_edit

 public function check_errors_before_edit($can_edit_subject, $errors)
 {
     $errors = $this->hook->fire('check_errors_before_edit_start', $errors);
     // If it's a topic it must contain a subject
     if ($can_edit_subject) {
         $subject = Utils::trim($this->request->post('req_subject'));
         if ($this->config['o_censoring'] == '1') {
             $censored_subject = Utils::trim(Utils::censor($subject));
         }
         if ($subject == '') {
             $errors[] = __('No subject');
         } elseif ($this->config['o_censoring'] == '1' && $censored_subject == '') {
             $errors[] = __('No subject after censoring');
         } elseif (Utils::strlen($subject) > 70) {
             $errors[] = __('Too long subject');
         } elseif ($this->config['p_subject_all_caps'] == '0' && Utils::is_all_uppercase($subject) && !$this->user->is_admmod) {
             $errors[] = __('All caps subject');
         }
     }
     // Clean up message from POST
     $message = Utils::linebreaks(Utils::trim($this->request->post('req_message')));
     // Here we use strlen() not Utils::strlen() as we want to limit the post to FEATHER_MAX_POSTSIZE bytes, not characters
     if (strlen($message) > $this->feather->forum_env['FEATHER_MAX_POSTSIZE']) {
         $errors[] = sprintf(__('Too long message'), Utils::forum_number_format($this->feather->forum_env['FEATHER_MAX_POSTSIZE']));
     } elseif ($this->config['p_message_all_caps'] == '0' && Utils::is_all_uppercase($message) && !$this->user->is_admmod) {
         $errors[] = __('All caps message');
     }
     // Validate BBCode syntax
     if ($this->config['p_message_bbcode'] == '1') {
         $message = $this->feather->parser->preparse_bbcode($message, $errors);
     }
     if (empty($errors)) {
         if ($message == '') {
             $errors[] = __('No message');
         } elseif ($this->config['o_censoring'] == '1') {
             // Censor message to see if that causes problems
             $censored_message = Utils::trim(Utils::censor($message));
             if ($censored_message == '') {
                 $errors[] = __('No message after censoring');
             }
         }
     }
     $errors = $this->hook->fire('check_errors_before_edit', $errors);
     return $errors;
 }
开发者ID:bohwaz,项目名称:featherbb,代码行数:45,代码来源:Edit.php

示例2: edit_essentials

 public function edit_essentials($id, $user)
 {
     $user_disp = array();
     $user_disp = Container::get('hooks')->fire('model.profile.edit_essentials_start', $user_disp, $id, $user);
     if (User::get()->is_admmod) {
         if (User::get()->g_id == ForumEnv::get('FEATHER_ADMIN') || User::get()->g_mod_rename_users == '1') {
             $user_disp['username_field'] = '<label class="required"><strong>' . __('Username') . ' <span>' . __('Required') . '</span></strong><br /><input type="text" name="req_username" value="' . Utils::escape($user['username']) . '" size="25" maxlength="25" /><br /></label>' . "\n";
         } else {
             $user_disp['username_field'] = '<p>' . sprintf(__('Username info'), Utils::escape($user['username'])) . '</p>' . "\n";
         }
         $user_disp['email_field'] = '<label class="required"><strong>' . __('Email') . ' <span>' . __('Required') . '</span></strong><br /><input type="text" name="req_email" value="' . Utils::escape($user['email']) . '" size="40" maxlength="80" /><br /></label><p><span class="email"><a href="' . Router::pathFor('email', ['id' => $id]) . '">' . __('Send email') . '</a></span></p>' . "\n";
     } else {
         $user_disp['username_field'] = '<p>' . __('Username') . ': ' . Utils::escape($user['username']) . '</p>' . "\n";
         if (ForumSettings::get('o_regs_verify') == '1') {
             $user_disp['email_field'] = '<p>' . sprintf(__('Email info'), Utils::escape($user['email']) . ' - <a href="' . Router::pathFor('profileAction', ['id' => $id, 'action' => 'change_email']) . '">' . __('Change email') . '</a>') . '</p>' . "\n";
         } else {
             $user_disp['email_field'] = '<label class="required"><strong>' . __('Email') . ' <span>' . __('Required') . '</span></strong><br /><input type="text" name="req_email" value="' . $user['email'] . '" size="40" maxlength="80" /><br /></label>' . "\n";
         }
     }
     $user_disp['posts_field'] = '';
     $posts_actions = array();
     if (User::get()->g_id == ForumEnv::get('FEATHER_ADMIN')) {
         $user_disp['posts_field'] .= '<label>' . __('Posts') . '<br /><input type="text" name="num_posts" value="' . $user['num_posts'] . '" size="8" maxlength="8" /><br /></label>';
     } elseif (ForumSettings::get('o_show_post_count') == '1' || User::get()->is_admmod) {
         $posts_actions[] = sprintf(__('Posts info'), Utils::forum_number_format($user['num_posts']));
     }
     if (User::get()->g_search == '1' || User::get()->g_id == ForumEnv::get('FEATHER_ADMIN')) {
         $posts_actions[] = '<a href="' . Router::pathFor('search') . '?action=show_user_topics&amp;user_id=' . $id . '">' . __('Show topics') . '</a>';
         $posts_actions[] = '<a href="' . Router::pathFor('search') . '?action=show_user_posts&amp;user_id=' . $id . '">' . __('Show posts') . '</a>';
         if (ForumSettings::get('o_topic_subscriptions') == '1') {
             $posts_actions[] = '<a href="' . Router::pathFor('search') . '?action=show_subscriptions&amp;user_id=' . $id . '">' . __('Show subscriptions') . '</a>';
         }
     }
     $user_disp['posts_field'] .= (!empty($posts_actions) ? '<p class="actions">' . implode(' - ', $posts_actions) . '</p>' : '') . "\n";
     $user_disp = Container::get('hooks')->fire('model.profile.edit_essentials', $user_disp);
     return $user_disp;
 }
开发者ID:featherbb,项目名称:featherbb,代码行数:37,代码来源:Profile.php

示例3:

				<input type="hidden" name="<?php 
echo $csrf_key;
?>
" value="<?php 
echo $csrf_token;
?>
">
				<div class="inform">
					<fieldset>
						<legend><?php 
_e('Move users subhead');
?>
</legend>
						<div class="infldset">
							<p><?php 
printf(__('Move users info'), Utils::escape($group_info['title']), Utils::forum_number_format($group_info['members']));
?>
</p>
							<label><?php 
_e('Move users label');
?>
							<select name="move_to_group">
								<?php 
echo $group_list_delete;
?>
							</select>
							<br /></label>
						</div>
					</fieldset>
				</div>
				<p class="buttons"><input type="submit" name="del_group" value="<?php 
开发者ID:bohwaz,项目名称:featherbb,代码行数:31,代码来源:delete_group.php

示例4:

                            <div>
                                <?php 
    echo $topic['subject_disp'] . "\n";
    ?>
                            </div>
                        </div>
                    </td>
                    <td class="tc2"><?php 
    echo !$topic['ghost_topic'] ? Utils::forum_number_format($topic['num_replies']) : '-';
    ?>
</td>
<?php 
    if (ForumSettings::get('o_topic_views') == '1') {
        ?>
                    <td class="tc3"><?php 
        echo !$topic['ghost_topic'] ? Utils::forum_number_format($topic['num_views']) : '-';
        ?>
</td>
<?php 
    }
    ?>
                    <td class="tcr"><?php 
    echo $topic['last_post_disp'];
    ?>
</td>
                    <td class="tcmod"><input type="checkbox" name="topics[<?php 
    echo $topic['id'];
    ?>
]" value="1" /></td>
                </tr>
            <?php 
开发者ID:featherbb,项目名称:featherbb,代码行数:31,代码来源:moderator_forum.php

示例5:

                                <div>
                                    <?php 
    echo $topic['subject_formatted'] . "\n";
    ?>
                                </div>
                            </div>
                        </td>
                        <td class="tc2"><?php 
    echo is_null($topic['moved_to']) ? Utils::forum_number_format($topic['num_replies']) : '-';
    ?>
</td>
    <?php 
    if (ForumSettings::get('o_topic_views') == '1') {
        ?>
                    <td class="tc3"><?php 
        echo is_null($topic['moved_to']) ? Utils::forum_number_format($topic['num_views']) : '-';
        ?>
</td>
    <?php 
    }
    ?>
                    <td class="tcr"><?php 
    echo $topic['last_post_formatted'];
    ?>
</td>
                    </tr>
            <?php 
}
if (empty($forum_data)) {
    ?>
                    <tr class="rowodd inone">
开发者ID:featherbb,项目名称:featherbb,代码行数:31,代码来源:forum.php

示例6: printf

if ($feather->forum_settings['o_signatures'] == '1') {
    ?>
				<div class="inform">
				<fieldset>
					<legend><?php 
    _e('Signature legend');
    ?>
</legend>
					<div class="infldset">
						<p><?php 
    _e('Signature info');
    ?>
</p>
						<div class="txtarea">
							<label><?php 
    printf(__('Sig max size'), Utils::forum_number_format($feather->forum_settings['p_sig_length']), $feather->forum_settings['p_sig_lines']);
    ?>
<br />
							<textarea name="signature" rows="4" cols="65"><?php 
    echo Utils::escape($user['signature']);
    ?>
</textarea><br /></label>
						</div>
						<ul class="bblinks">
							<li><span><a href="<?php 
    echo $feather->urlFor('help') . '#bbcode';
    ?>
" onclick="window.open(this.href); return false;"><?php 
    _e('BBCode');
    ?>
</a> <?php 
开发者ID:bohwaz,项目名称:featherbb,代码行数:31,代码来源:section_personality.php

示例7: header

    header('Expires: ' . gmdate('D, d M Y H:i:s') . ' GMT');
    header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
    header('Pragma: public');
    echo sprintf(__('Guests online'), Utils::forum_number_format($num_guests)) . '<br />' . "\n";
    if ($action == 'online_full' && !empty($users)) {
        echo sprintf(__('Users online'), implode(', ', $users)) . '<br />' . "\n";
    } else {
        echo sprintf(__('Users online'), Utils::forum_number_format($num_users)) . '<br />' . "\n";
    }
    exit;
} elseif ($action == 'stats') {
    if (!Container::get('cache')->isCached('users_info')) {
        Container::get('cache')->store('users_info', Cache::get_users_info());
    }
    $stats = Container::get('cache')->retrieve('users_info');
    $stats_query = \DB::for_table('forums')->select_expr('SUM(num_topics)', 'total_topics')->select_expr('SUM(num_posts)', 'total_posts')->find_one();
    $stats['total_topics'] = intval($stats_query['total_topics']);
    $stats['total_posts'] = intval($stats_query['total_posts']);
    // Send the Content-type header in case the web server is setup to send something else
    header('Content-type: text/html; charset=utf-8');
    header('Expires: ' . gmdate('D, d M Y H:i:s') . ' GMT');
    header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
    header('Pragma: public');
    echo sprintf(__('No of users'), Utils::forum_number_format($stats['total_users'])) . '<br />' . "\n";
    echo sprintf(__('Newest user'), User::get()->g_view_users == '1' ? '<a href="' . Url::get('user/' . $stats['last_user']['id'] . '/') . '">' . Utils::escape($stats['last_user']['username']) . '</a>' : Utils::escape($stats['last_user']['username'])) . '<br />' . "\n";
    echo sprintf(__('No of topics'), Utils::forum_number_format($stats['total_topics'])) . '<br />' . "\n";
    echo sprintf(__('No of posts'), Utils::forum_number_format($stats['total_posts'])) . '<br />' . "\n";
    exit;
}
// If we end up here, the script was called with some wacky parameters
exit(__('Bad request'));
开发者ID:featherbb,项目名称:featherbb,代码行数:31,代码来源:extern.php

示例8: printf

_e('User info');
?>
</strong></dt>
				<dd><span><?php 
printf(__('Newest user'), $stats['newest_user']);
?>
</span></dd>
				<?php 
if ($feather->forum_settings['o_users_online'] == 1) {
    ?>
				<dd><span><?php 
    printf(__('Users online'), '<strong>' . Utils::forum_number_format($online['num_users']) . '</strong>');
    ?>
</span></dd>
				<dd><span><?php 
    printf(__('Guests online'), '<strong>' . Utils::forum_number_format($online['num_guests']) . '</strong>');
    ?>
</span></dd>
				<?php 
}
?>
			</dl>
			<?php 
if ($feather->forum_settings['o_users_online'] == 1) {
    if ($online['num_users'] > 0) {
        echo "\t\t\t" . '<dl id="onlinelist" class="clearb">' . "\n\t\t\t\t" . '<dt><strong>' . __('Online') . ' </strong></dt>' . "\t\t\t\t" . implode(',</dd> ', $online['users']) . '</dd>' . "\n\t\t\t" . '</dl>' . "\n";
    } else {
        echo "\t\t\t" . '<div class="clearer"></div>' . "\n";
    }
}
?>
开发者ID:bohwaz,项目名称:featherbb,代码行数:31,代码来源:index.php

示例9:

?>
</a></span></span></h2>
<div class="box">
	<div class="inbox">
		<div class="postbody">
			<div class="postleft">
				<dl>
					<dt><?php 
echo $cur_search['pposter_disp'];
?>
</dt>
<?php 
if ($cur_search['pid'] == $cur_search['first_post_id']) {
    ?>
						<dd><span><?php 
    _e('Replies') . ' ' . Utils::forum_number_format($cur_search['num_replies']);
    ?>
</span></dd>
<?php 
}
?>
					<dd><div class="<?php 
echo $cur_search['icon_type'];
?>
"><div class="nosize"><?php 
echo $cur_search['icon_text'];
?>
</div></div></dd>
				</dl>
			</div>
			<div class="postright">
开发者ID:bohwaz,项目名称:featherbb,代码行数:31,代码来源:posts.php

示例10:

">
                <div class="nosize"><?php 
    echo Utils::forum_number_format($search['topic_count'] + $search['start_from']);
    ?>
</div>
            </div>
            <div class="tclcon">
                <div>
                    <?php 
    echo $search['subject'] . "\n";
    ?>
                </div>
            </div>
        </td>
        <td class="tc2"><?php 
    echo $search['forum'];
    ?>
</td>
        <td class="tc3"><?php 
    echo Utils::forum_number_format($search['num_replies']);
    ?>
</td>
        <td class="tcr"><?php 
    echo '<a href="' . Router::pathFor('viewPost', ['pid' => $search['last_post_id']]) . '#p' . $search['last_post_id'] . '">' . Utils::format_time($search['last_post']) . '</a> <span class="byuser">' . __('by') . ' ' . Utils::escape($search['last_poster']);
    ?>
</span></td>
    </tr>

    <?php 
}
Container::get('hooks')->fire('view.search.topics.end');
开发者ID:featherbb,项目名称:featherbb,代码行数:31,代码来源:topics.php

示例11: printf

    ?>
<br />
                        <?php 
    printf(__('Environment data acc') . "\n", $php_accelerator);
    ?>
                    </dd>
                    <dt><?php 
    _e('Database label');
    ?>
</dt>
                    <dd>
<?php 
    if (isset($total_records) && isset($total_size)) {
        ?>
                        <?php 
        printf(__('Database data rows') . "\n", Utils::forum_number_format($total_records));
        ?>
                        <br /><?php 
        printf(__('Database data size') . "\n", $total_size);
    }
    ?>
                    </dd>
<?php 
}
?>
                </dl>
            </div>
        </div>
    </div>
    <div class="clearer"></div>
</div>
开发者ID:featherbb,项目名称:featherbb,代码行数:31,代码来源:statistics.php

示例12:

                    <div class="infldset">
                        <input type="hidden" name="form_sent" value="1" />
                        <input type="hidden" name="MAX_FILE_SIZE" value="<?php 
echo ForumSettings::get('o_avatars_size');
?>
" />
                        <label class="required"><strong><?php 
_e('File');
?>
 <span><?php 
_e('Required');
?>
</span></strong><br /><input name="req_file" type="file" size="40" /><br /></label>
                        <p><?php 
_e('Avatar desc');
echo ' ' . ForumSettings::get('o_avatars_width') . ' x ' . ForumSettings::get('o_avatars_height') . ' ' . __('pixels') . ' ' . __('and') . ' ' . Utils::forum_number_format(ForumSettings::get('o_avatars_size')) . ' ' . __('bytes') . ' (' . Utils::file_size(ForumSettings::get('o_avatars_size')) . ').';
?>
</p>
                    </div>
                </fieldset>
            </div>
            <p class="buttons"><input type="submit" name="upload" value="<?php 
_e('Upload');
?>
" /> <a href="javascript:history.go(-1)"><?php 
_e('Go back');
?>
</a></p>
        </form>
    </div>
</div>
开发者ID:featherbb,项目名称:featherbb,代码行数:31,代码来源:upload_avatar.php

示例13: printf

if (ForumSettings::get('o_signatures') == '1') {
    ?>
                <div class="inform">
                <fieldset>
                    <legend><?php 
    _e('Signature legend');
    ?>
</legend>
                    <div class="infldset">
                        <p><?php 
    _e('Signature info');
    ?>
</p>
                        <div class="txtarea">
                            <label><?php 
    printf(__('Sig max size'), Utils::forum_number_format(ForumSettings::get('p_sig_length')), ForumSettings::get('p_sig_lines'));
    ?>
<br />
                            <textarea name="signature" rows="4" cols="65"><?php 
    echo Utils::escape($user['signature']);
    ?>
</textarea><br /></label>
                        </div>
                        <ul class="bblinks">
                            <li><span><a href="<?php 
    echo Router::pathFor('help') . '#bbcode';
    ?>
" onclick="window.open(this.href); return false;"><?php 
    _e('BBCode');
    ?>
</a> <?php 
开发者ID:featherbb,项目名称:featherbb,代码行数:31,代码来源:section_personality.php

示例14: print_posts

 public function print_posts($topic_id, $start_from, $cur_topic, $is_admmod)
 {
     $post_data = array();
     $post_data = Container::get('hooks')->fire('model.topic.print_posts_start', $post_data, $topic_id, $start_from, $cur_topic, $is_admmod);
     $post_count = 0;
     // Keep track of post numbers
     // Retrieve a list of post IDs, LIMIT is (really) expensive so we only fetch the IDs here then later fetch the remaining data
     $result = DB::for_table('posts')->select('id')->where('topic_id', $topic_id)->order_by('id')->limit(User::get()->disp_topics)->offset($start_from);
     $result = Container::get('hooks')->fireDB('model.topic.print_posts_ids_query', $result);
     $result = $result->find_many();
     $post_ids = array();
     foreach ($result as $cur_post_id) {
         $post_ids[] = $cur_post_id['id'];
     }
     if (empty($post_ids)) {
         throw new Error('The post table and topic table seem to be out of sync!', 500);
     }
     // Retrieve the posts (and their respective poster/online status)
     $result['select'] = array('u.email', 'u.title', 'u.url', 'u.location', 'u.signature', 'u.email_setting', 'u.num_posts', 'u.registered', 'u.admin_note', 'p.id', 'username' => 'p.poster', 'p.poster_id', 'p.poster_ip', 'p.poster_email', 'p.message', 'p.hide_smilies', 'p.posted', 'p.edited', 'p.edited_by', 'g.g_id', 'g.g_user_title', 'g.g_promote_next_group', 'is_online' => 'o.user_id');
     $result = DB::for_table('posts')->table_alias('p')->select_many($result['select'])->inner_join('users', array('u.id', '=', 'p.poster_id'), 'u')->inner_join('groups', array('g.g_id', '=', 'u.group_id'), 'g')->raw_join('LEFT OUTER JOIN ' . ForumSettings::get('db_prefix') . 'online', "o.user_id!=1 AND o.idle=0 AND o.user_id=u.id", 'o')->where_in('p.id', $post_ids)->order_by('p.id');
     $result = Container::get('hooks')->fireDB('model.topic.print_posts_query', $result);
     $result = $result->find_array();
     foreach ($result as $cur_post) {
         $post_count++;
         $cur_post['user_avatar'] = '';
         $cur_post['user_info'] = array();
         $cur_post['user_contacts'] = array();
         $cur_post['post_actions'] = array();
         $cur_post['is_online_formatted'] = '';
         $cur_post['signature_formatted'] = '';
         // If the poster is a registered user
         if ($cur_post['poster_id'] > 1) {
             if (User::get()->g_view_users == '1') {
                 $cur_post['username_formatted'] = '<a href="' . Url::base() . '/user/' . $cur_post['poster_id'] . '/">' . Utils::escape($cur_post['username']) . '</a>';
             } else {
                 $cur_post['username_formatted'] = Utils::escape($cur_post['username']);
             }
             $cur_post['user_title_formatted'] = Utils::get_title($cur_post);
             if (ForumSettings::get('o_censoring') == '1') {
                 $cur_post['user_title_formatted'] = Utils::censor($cur_post['user_title_formatted']);
             }
             // Format the online indicator
             $cur_post['is_online_formatted'] = $cur_post['is_online'] == $cur_post['poster_id'] ? '<strong>' . __('Online') . '</strong>' : '<span>' . __('Offline') . '</span>';
             if (ForumSettings::get('o_avatars') == '1' && User::get()->show_avatars != '0') {
                 if (isset($avatar_cache[$cur_post['poster_id']])) {
                     $cur_post['user_avatar'] = $avatar_cache[$cur_post['poster_id']];
                 } else {
                     $cur_post['user_avatar'] = $avatar_cache[$cur_post['poster_id']] = Utils::generate_avatar_markup($cur_post['poster_id']);
                 }
             }
             // We only show location, register date, post count and the contact links if "Show user info" is enabled
             if (ForumSettings::get('o_show_user_info') == '1') {
                 if ($cur_post['location'] != '') {
                     if (ForumSettings::get('o_censoring') == '1') {
                         $cur_post['location'] = Utils::censor($cur_post['location']);
                     }
                     $cur_post['user_info'][] = '<dd><span>' . __('From') . ' ' . Utils::escape($cur_post['location']) . '</span></dd>';
                 }
                 $cur_post['user_info'][] = '<dd><span>' . __('Registered topic') . ' ' . Utils::format_time($cur_post['registered'], true) . '</span></dd>';
                 if (ForumSettings::get('o_show_post_count') == '1' || User::get()->is_admmod) {
                     $cur_post['user_info'][] = '<dd><span>' . __('Posts topic') . ' ' . Utils::forum_number_format($cur_post['num_posts']) . '</span></dd>';
                 }
                 // Now let's deal with the contact links (Email and URL)
                 if (($cur_post['email_setting'] == '0' && !User::get()->is_guest || User::get()->is_admmod) && User::get()->g_send_email == '1') {
                     $cur_post['user_contacts'][] = '<span class="email"><a href="mailto:' . Utils::escape($cur_post['email']) . '">' . __('Email') . '</a></span>';
                 } elseif ($cur_post['email_setting'] == '1' && !User::get()->is_guest && User::get()->g_send_email == '1') {
                     $cur_post['user_contacts'][] = '<span class="email"><a href="' . Router::pathFor('email', ['id' => $cur_post['poster_id']]) . '">' . __('Email') . '</a></span>';
                 }
                 if ($cur_post['url'] != '') {
                     if (ForumSettings::get('o_censoring') == '1') {
                         $cur_post['url'] = Utils::censor($cur_post['url']);
                     }
                     $cur_post['user_contacts'][] = '<span class="website"><a href="' . Utils::escape($cur_post['url']) . '" rel="nofollow">' . __('Website') . '</a></span>';
                 }
             }
             if (User::get()->g_id == ForumEnv::get('FEATHER_ADMIN') || User::get()->g_moderator == '1' && User::get()->g_mod_promote_users == '1') {
                 if ($cur_post['g_promote_next_group']) {
                     $cur_post['user_info'][] = '<dd><span><a href="' . Url::base() . '/user/' . $cur_post['poster_id'] . '/action/promote/pid/' . $cur_post['id'] . '">' . __('Promote user') . '</a></span></dd>';
                 }
             }
             if (User::get()->is_admmod) {
                 $cur_post['user_info'][] = '<dd><span><a href="' . Router::pathFor('getPostHost', ['pid' => $cur_post['id']]) . '" title="' . Utils::escape($cur_post['poster_ip']) . '">' . __('IP address logged') . '</a></span></dd>';
                 if ($cur_post['admin_note'] != '') {
                     $cur_post['user_info'][] = '<dd><span>' . __('Note') . ' <strong>' . Utils::escape($cur_post['admin_note']) . '</strong></span></dd>';
                 }
             }
         } else {
             $cur_post['username_formatted'] = Utils::escape($cur_post['username']);
             $cur_post['user_title_formatted'] = Utils::get_title($cur_post);
             if (User::get()->is_admmod) {
                 $cur_post['user_info'][] = '<dd><span><a href="' . Router::pathFor('getPostHost', ['pid' => $cur_post['id']]) . '" title="' . Utils::escape($cur_post['poster_ip']) . '">' . __('IP address logged') . '</a></span></dd>';
             }
             if (ForumSettings::get('o_show_user_info') == '1' && $cur_post['poster_email'] != '' && !User::get()->is_guest && User::get()->g_send_email == '1') {
                 $cur_post['user_contacts'][] = '<span class="email"><a href="mailto:' . Utils::escape($cur_post['poster_email']) . '">' . __('Email') . '</a></span>';
             }
         }
         // Generation post action array (quote, edit, delete etc.)
         if (!$is_admmod) {
             if (!User::get()->is_guest) {
                 $cur_post['post_actions'][] = '<li class="postreport"><span><a href="' . Router::pathFor('report', ['id' => $cur_post['id']]) . '">' . __('Report') . '</a></span></li>';
//.........这里部分代码省略.........
开发者ID:featherbb,项目名称:featherbb,代码行数:101,代码来源:Topic.php

示例15:

            echo '<a href="' . Router::pathFor('userProfile', ['id' => $info['user_data'][$cur_poster['poster_id']]['id']]) . '">' . Utils::escape($info['user_data'][$cur_poster['poster_id']]['username']) . '</a>';
            ?>
</td>
                    <td class="tc2"><a href="mailto:<?php 
            echo Utils::escape($info['user_data'][$cur_poster['poster_id']]['email']);
            ?>
"><?php 
            echo Utils::escape($info['user_data'][$cur_poster['poster_id']]['email']);
            ?>
</a></td>
                    <td class="tc3"><?php 
            echo Utils::get_title($info['user_data'][$cur_poster['poster_id']]);
            ?>
</td>
                    <td class="tc4"><?php 
            echo Utils::forum_number_format($info['user_data'][$cur_poster['poster_id']]['num_posts']);
            ?>
</td>
                    <td class="tc5"><?php 
            echo $info['user_data'][$cur_poster['poster_id']]['admin_note'] != '' ? Utils::escape($info['user_data'][$cur_poster['poster_id']]['admin_note']) : '&#160;';
            ?>
</td>
                    <td class="tcr"><?php 
            echo '<a href="' . Router::pathFor('usersIpStats', ['id' => $info['user_data'][$cur_poster['poster_id']]['id']]) . '">' . __('Results view IP link') . '</a> | <a href="' . Router::pathFor('search') . '?action=show_user_posts&amp;user_id=' . $info['user_data'][$cur_poster['poster_id']]['id'] . '">' . __('Results show posts link') . '</a>';
            ?>
</td>
                </tr>
<?php 
        } else {
            ?>
                <tr>
开发者ID:featherbb,项目名称:featherbb,代码行数:31,代码来源:show_users.php


注:本文中的FeatherBB\Core\Utils::forum_number_format方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。