本文整理汇总了PHP中mobile_core::usergroupIconId方法的典型用法代码示例。如果您正苦于以下问题:PHP mobile_core::usergroupIconId方法的具体用法?PHP mobile_core::usergroupIconId怎么用?PHP mobile_core::usergroupIconId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mobile_core
的用法示例。
在下文中一共展示了mobile_core::usergroupIconId方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: output
function output()
{
global $_G;
$data = $GLOBALS['space'];
$data['groupiconid'] = mobile_core::usergroupIconId($data['groupid']);
if ($data['group']['type'] == 'member' && $data['group']['groupcreditslower'] != 999999999) {
$data['upgradecredit'] = $data['group']['creditslower'] - $data['credits'];
$data['upgradeprogress'] = 100 - ceil($data['upgradecredit'] / ($data['group']['creditslower'] - $data['group']['creditshigher']) * 100);
$data['upgradeprogress'] = max($data['upgradeprogress'], 2);
}
unset($data['password'], $data['email'], $data['regip'], $data['lastip'], $data['regip_loc'], $data['lastip_loc']);
$variable = array('space' => $data, 'extcredits' => $_G['setting']['extcredits'], 'wsq' => array('wsq_apicredit' => getuserprofile('extcredits' . $_G['wechat']['setting']['wsq_apicredit'])));
mobile_core::result(mobile_core::variable($variable));
}
示例2: array
if ($_img) {
$_G['forum_threadlist'][$k]['cover'] = array('w' => $_img[0], 'h' => $_img[1]);
}
}
$_G['forum_threadlist'][$k]['reply'] = array();
$key = C::t('#mobile#mobile_wsq_threadlist')->fetch($thread['tid']);
if ($key['svalue']) {
$_G['forum_threadlist'][$k]['reply'] = dunserialize($key['svalue']);
}
$_G['forum_threadlist'][$k]['dateline'] = strip_tags($thread['dateline']);
$_G['forum_threadlist'][$k]['lastpost'] = strip_tags($thread['lastpost']);
$_G['forum_threadlist'][$k]['avatar'] = avatar($thread['authorid'], 'small', true);
$userids[] = $thread['authorid'];
}
foreach (C::t('common_member')->fetch_all($userids) as $user) {
$groupiconIds[$user['uid']] = mobile_core::usergroupIconId($user['groupid']);
}
if ($_G['uid']) {
$memberrecommends = array();
$query = DB::query('SELECT * FROM %t WHERE recommenduid=%d AND tid IN (%n)', array('forum_memberrecommend', $_G['uid'], $tids));
while ($memberrecommend = DB::fetch($query)) {
$memberrecommends[$memberrecommend['tid']] = 1;
}
foreach ($_G['forum_threadlist'] as $k => $thread) {
$_G['forum_threadlist'][$k]['recommend'] = isset($memberrecommends[$thread['icontid']]) ? 1 : 0;
}
}
foreach ($GLOBALS['sublist'] as $k => $sublist) {
if ($sublist['icon']) {
$icon = preg_match('/src="(.+?)"/', $sublist['icon'], $r) ? $r[1] : '';
if (!preg_match('/^http:\\//', $icon)) {
示例3: output
function output()
{
global $_G, $thread;
if ($GLOBALS['hiddenreplies']) {
foreach ($GLOBALS['postlist'] as $k => $post) {
if (!$post['first'] && $_G['uid'] != $post['authorid'] && $_G['uid'] != $_G['forum_thread']['authorid'] && !$_G['forum']['ismoderator']) {
$GLOBALS['postlist'][$k]['message'] = lang('plugin/mobile', 'mobile_post_author_visible');
$GLOBALS['postlist'][$k]['attachments'] = array();
}
}
}
$_G['thread']['lastpost'] = dgmdate($_G['thread']['lastpost']);
$_G['thread']['ordertype'] = $GLOBALS['ordertype'];
$_G['thread']['recommend'] = $_G['uid'] && C::t('forum_memberrecommend')->fetch_by_recommenduid_tid($_G['uid'], $_G['tid']) ? 1 : 0;
if (!empty($_GET['viewpid'])) {
$GLOBALS['postlist'][$_GET['viewpid']] = $GLOBALS['post'];
}
if ($GLOBALS['rushreply']) {
$_G['thread']['rushreply'] = $GLOBALS['rushreply'];
$_G['thread']['rushresult'] = $GLOBALS['rushresult'];
}
foreach ($GLOBALS['comments'] as $pid => $comments) {
$comments = mobile_core::getvalues($comments, array('/^\\d+$/'), array('id', 'tid', 'pid', 'author', 'authorid', 'dateline', 'comment', 'avatar'));
foreach ($comments as $k => $c) {
$comments[$k]['avatar'] = avatar($c['authorid'], 'small', true);
$comments[$k]['dateline'] = dgmdate($c['dateline'], 'u');
}
$GLOBALS['comments'][$pid] = $comments;
}
$variable = array('thread' => $_G['thread'], 'fid' => $_G['fid'], 'postlist' => array_values(mobile_core::getvalues($GLOBALS['postlist'], array('/^\\d+$/'), array('pid', 'tid', 'author', 'first', 'dbdateline', 'dateline', 'username', 'adminid', 'memberstatus', 'authorid', 'username', 'groupid', 'memberstatus', 'status', 'message', 'number', 'memberstatus', 'groupid', 'attachment', 'attachments', 'attachlist', 'imagelist', 'anonymous', 'position', 'rewardfloor', 'replycredit'))), 'allowpostcomment' => $_G['setting']['allowpostcomment'], 'comments' => $GLOBALS['comments'], 'commentcount' => $GLOBALS['commentcount'], 'ppp' => $_G['ppp'], 'setting_rewriterule' => $_G['setting']['rewriterule'], 'setting_rewritestatus' => $_G['setting']['rewritestatus'], 'forum_threadpay' => $_G['forum_threadpay'], 'cache_custominfo_postno' => $_G['cache']['custominfo']['postno']);
if (!empty($GLOBALS['threadsortshow'])) {
$optionlist = array();
foreach ($GLOBALS['threadsortshow']['optionlist'] as $key => $val) {
$val['optionid'] = $key;
$optionlist[] = $val;
}
if (!empty($optionlist)) {
$GLOBALS['threadsortshow']['optionlist'] = $optionlist;
$GLOBALS['threadsortshow']['threadsortname'] = $_G['forum']['threadsorts']['types'][$thread['sortid']];
}
}
$threadsortshow = mobile_core::getvalues($GLOBALS['threadsortshow'], array('/^(?!typetemplate).*$/'));
if (!empty($threadsortshow)) {
$variable['threadsortshow'] = $threadsortshow;
}
foreach ($variable['postlist'] as $k => $post) {
if (!$_G['forum']['ismoderator'] && $_G['setting']['bannedmessages'] & 1 && ($post['authorid'] && !$post['username'] || $_G['thread']['digest'] == 0 && ($post['groupid'] == 4 || $post['groupid'] == 5 || $post['memberstatus'] == '-1'))) {
$message = lang('forum/template', 'message_banned');
} elseif (!$_G['forum']['ismoderator'] && $post['status'] & 1) {
$message = lang('forum/template', 'message_single_banned');
} elseif ($GLOBALS['needhiddenreply']) {
$message = lang('forum/template', 'message_ishidden_hiddenreplies');
} elseif ($post['first'] && $_G['forum_threadpay']) {
$message = lang('forum/template', 'pay_threads') . ' ' . $GLOBALS['thread']['price'] . ' ' . $_G['setting']['extcredits'][$_G['setting']['creditstransextra'][1]]['unit'] . $_G['setting']['extcredits'][$_G['setting']['creditstransextra'][1]]['title'];
} elseif ($_G['forum_discuzcode']['passwordlock']) {
$message = lang('forum/template', 'message_password_exists');
} else {
$message = '';
}
if ($message) {
$variable['postlist'][$k]['message'] = $message;
}
if ($post['anonymous'] && !$_G['forum']['ismoderator']) {
$variable['postlist'][$k]['username'] = $variable['postlist'][$k]['author'] = $_G['setting']['anonymoustext'];
$variable['postlist'][$k]['adminid'] = $variable['postlist'][$k]['groupid'] = $variable['postlist'][$k]['authorid'] = 0;
if ($post['first']) {
$variable['thread']['authorid'] = 0;
}
}
if (strpos($variable['postlist'][$k]['message'], '[/tthread]') !== FALSE) {
$matches = array();
preg_match('/\\[tthread=(.+?),(.+?)\\](.*?)\\[\\/tthread\\]/', $variable['postlist'][$k]['message'], $matches);
$variable['postlist'][$k]['message'] = preg_replace('/\\[tthread=(.+?)\\](.*?)\\[\\/tthread\\]/', lang('plugin/qqconnect', 'connect_tthread_message', array('username' => $matches[1], 'nick' => $matches[2])), $variable['postlist'][$k]['message']);
}
$variable['postlist'][$k]['message'] = preg_replace("/<a\\shref=\"([^\"]+?)\"\\starget=\"_blank\">\\[viewimg\\]<\\/a>/is", "<img src=\"\\1\" />", $variable['postlist'][$k]['message']);
$variable['postlist'][$k]['message'] = mobile_api::_findimg($variable['postlist'][$k]['message']);
if ($GLOBALS['aimgs'][$post['pid']]) {
$imagelist = array();
foreach ($GLOBALS['aimgs'][$post['pid']] as $aid) {
$extra = '';
$url = mobile_api::_parseimg('', $GLOBALS['postlist'][$post['pid']]['attachments'][$aid]['url'] . $GLOBALS['postlist'][$post['pid']]['attachments'][$aid]['attachment'], '');
if ($GLOBALS['postlist'][$post['pid']]['attachments'][$aid]['thumb']) {
$extra = 'file="' . $url . '" ';
$url .= '.thumb.jpg';
}
$extra .= 'attach="' . $post['pid'] . '" ';
if (strexists($variable['postlist'][$k]['message'], '[attach]' . $aid . '[/attach]')) {
$variable['postlist'][$k]['message'] = str_replace('[attach]' . $aid . '[/attach]', mobile_image($url, $extra), $variable['postlist'][$k]['message']);
unset($variable['postlist'][$k]['attachments'][$aid]);
} elseif (!in_array($aid, $_G['forum_attachtags'][$post['pid']])) {
$imagelist[] = $aid;
}
}
$variable['postlist'][$k]['imagelist'] = $imagelist;
}
$variable['postlist'][$k]['message'] = preg_replace("/\\[attach\\]\\d+\\[\\/attach\\]/i", '', $variable['postlist'][$k]['message']);
$variable['postlist'][$k]['message'] = preg_replace('/( ){2,}/', '', $variable['postlist'][$k]['message']);
$variable['postlist'][$k]['dateline'] = strip_tags($post['dateline']);
$variable['postlist'][$k]['groupiconid'] = mobile_core::usergroupIconId($post['groupid']);
}
//.........这里部分代码省略.........