本文整理匯總了PHP中IPSMember::canGiveRep方法的典型用法代碼示例。如果您正苦於以下問題:PHP IPSMember::canGiveRep方法的具體用法?PHP IPSMember::canGiveRep怎麽用?PHP IPSMember::canGiveRep使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類IPSMember
的用法示例。
在下文中一共展示了IPSMember::canGiveRep方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: repButtons
function repButtons($member, $data = array())
{
$IPBHTML = "";
if (IPSLib::locationHasHooks('skin_global_other', $this->_funcHooks['repButtons'])) {
$count_fbe0dd9307850715511aba5ed44b249a = is_array($this->functionData['repButtons']) ? count($this->functionData['repButtons']) : 0;
$this->functionData['repButtons'][$count_fbe0dd9307850715511aba5ed44b249a]['member'] = $member;
$this->functionData['repButtons'][$count_fbe0dd9307850715511aba5ed44b249a]['data'] = $data;
}
// Apps can set the key empty to disable, but this will allow all apps to use the popup to show who repped
if (!isset($data['jsCallback'])) {
$data['jsCallback'] = "ipb.global.repPopUp( this, {$data['primaryId']}, '{$data['app']}', '{$data['type']}' );";
}
$repClickable = ($this->memberData['gbw_view_reps'] and $data['jsCallback']) ? 'onclick="' . $data['jsCallback'] . '"' : '';
$this->templateVars['repClickable'] = "";
$this->__default__templateVars['repClickable'] = "";
if ($this->memberData['gbw_view_reps']) {
$this->templateVars['repClickable'] = " clickable";
} else {
$this->templateVars['repClickable'] = $this->__default__templateVars['repClickable'];
}
$IPBHTML .= "" . ($this->settings['reputation_enabled'] ? "" . (!($this->settings['reputation_protected_groups'] && in_array($member['member_group_id'], explode(',', $this->settings['reputation_protected_groups']))) ? "" . ($this->settings['reputation_point_types'] == 'like' ? "<div class='ipsLikeBar right clearfix' id='{$data['domCountId']}'>\n <ul class='ipsList_inline'>\n " . ((!isset($data['hide_text']) or !$data['hide_text']) ? "<li id=\"{$data['domLikeStripId']}\" class='ipsLikeBar_info' " . (!$data['likeFormatted'] ? "style=\"display:none\"" : "") . ">\n {$data['likeFormatted']}\n </li>" : "") . "\n " . (IPSMember::canGiveRep($data, $member) !== false && $this->memberData['member_id'] ? "<li " . (IPSMember::canRepUp($data, $member) === false ? "style=\"display:none\"" : "") . ">\n <a class='ipsLikeButton ipsLikeButton_enabled rep_up' href='{$this->settings['base_url']}app=core&module=global&section=reputation&do=add_rating&app_rate={$data['app']}&type={$data['type']}&type_id={$data['primaryId']}&rating=1&secure_key={$this->member->form_hash}&post_return={$data['primaryId']}' title='{$this->lang->words['do_like_up']}'>{$this->lang->words['like_this']}</a>\n </li>\n <li " . (IPSMember::canRepDown($data, $member) === false ? "style=\"display:none\"" : "") . ">\n <a class='ipsLikeButton ipsLikeButton_disabled rep_down' href='{$this->settings['base_url']}app=core&module=global&section=reputation&do=add_rating&app_rate={$data['app']}&type={$data['type']}&type_id={$data['primaryId']}&rating=-1&secure_key={$this->member->form_hash}&post_return={$data['primaryId']}' title='{$this->lang->words['do_like_down']}'>{$this->lang->words['unlike_this']}</a>\n </li>" : "") . "\n </ul>\n </div>" : "<div class='rep_bar clearfix " . (!$data['position'] || $data['position'] == 'right' ? "right" : "") . "' id='{$data['domCountId']}'>\n \n " . (IPSMember::canGiveRep($data, $member) !== false && $this->memberData['member_id'] ? "\n<div class=\"orate-btns\">\n <span>\n <a href='{$this->settings['base_url']}app=core&module=global&section=reputation&do=add_rating&app_rate={$data['app']}&type={$data['type']}&type_id={$data['primaryId']}&rating=1&secure_key={$this->member->form_hash}&post_return={$data['primaryId']}' class='rep_up' title='{$this->lang->words['reputation_up']}' >" . $this->registry->getClass('output')->getReplacement("rep_up") . "</a>\n <a href='{$this->settings['base_url']}app=core&module=global&section=reputation&do=add_rating&app_rate={$data['app']}&type={$data['type']}&type_id={$data['primaryId']}&rating=-1&secure_key={$this->member->form_hash}&post_return={$data['primaryId']}' class='rep_down' title='{$this->lang->words['reputation_down']}' >" . $this->registry->getClass('output')->getReplacement("rep_down") . "</a>\n </span>\n </div>\n " : "") . "\n\n " . ($this->settings['reputation_point_types'] != 'like' ? "" . ($data['rep_points'] == 0 ? "\n <span class='reputation2 zero2 rep_show" . $this->templateVars["repClickable"] . "' title='{$this->lang->words['reputation']}' {$repClickable}>\n " : "") . "\n " . ($data['rep_points'] > 0 ? "\n <span class='reputation2 positive2 rep_show" . $this->templateVars["repClickable"] . "' title='{$this->lang->words['reputation']}' {$repClickable}>\n " : "") . "\n " . ($data['rep_points'] < 0 ? "\n <span class='reputation2 negative2 rep_show" . $this->templateVars["repClickable"] . "' title='{$this->lang->words['reputation']}' {$repClickable}>\n " : "") . "\n " . intval($data['rep_points']) . "\n </span>" : "") . "\n</div>") . "" : "") . "" : "") . "\n<script type='text/javascript'>\n ipb.global.registerReputation( '{$data['domCountId']}', { domLikeStripId: '{$data['domLikeStripId']}', app: '{$data['app']}', type: '{$data['type']}', typeid: '{$data['primaryId']}' }, parseInt('{$data['rep_points']}') );\n</script>";
return $IPBHTML;
}
示例2: repButtons
function repButtons($member, $data = array())
{
$IPBHTML = "";
if (IPSLib::locationHasHooks('skin_global_other', $this->_funcHooks['repButtons'])) {
$count_13530034eaab611754789dc47e2536e3 = is_array($this->functionData['repButtons']) ? count($this->functionData['repButtons']) : 0;
$this->functionData['repButtons'][$count_13530034eaab611754789dc47e2536e3]['member'] = $member;
$this->functionData['repButtons'][$count_13530034eaab611754789dc47e2536e3]['data'] = $data;
}
$IPBHTML .= "" . ((!($this->settings['reputation_protected_groups'] && in_array($member['member_group_id'], explode(',', $this->settings['reputation_protected_groups']))) and $this->memberData['member_id']) ? "" . ($this->settings['reputation_point_types'] == 'like' ? "" . (IPSMember::canGiveRep($data, $member) !== false ? "" . (IPSMember::canRepUp($data, $member) !== false ? "\n\t\t\t\t<likeURL><![CDATA[{$this->settings['base_url']}app=core&module=global&section=reputation&do=add_rating&app_rate={$data['app']}&type={$data['type']}&type_id={$data['primaryId']}&rating=1&secure_key={$this->member->form_hash}&post_return={$data['primaryId']}]]></likeURL>\n\t\t\t" : "") . "" : "") . "" : "" . (IPSMember::canGiveRep($data, $member) !== false ? "\n\t\t\t<repupURL><![CDATA[{$this->settings['base_url']}app=core&module=global&section=reputation&do=add_rating&app_rate={$data['app']}&type={$data['type']}&type_id={$data['primaryId']}&rating=1&secure_key={$this->member->form_hash}&post_return={$data['primaryId']}]]></repupURL>\n\t\t" : "") . "\n\t\t" . (IPSMember::canRepDown($data, $member) !== false ? "\n\t\t\t<repDownURL><![CDATA[{$this->settings['base_url']}app=core&module=global&section=reputation&do=add_rating&app_rate={$data['app']}&type={$data['type']}&type_id={$data['primaryId']}&rating=-1&secure_key={$this->member->form_hash}&post_return={$data['primaryId']}]]></repDownURL>\n\t\t" : "") . "") . "" : "") . "";
return $IPBHTML;
}