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&amp;module=global&amp;section=reputation&amp;do=add_rating&amp;app_rate={$data['app']}&amp;type={$data['type']}&amp;type_id={$data['primaryId']}&amp;rating=1&amp;secure_key={$this->member->form_hash}&amp;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&amp;module=global&amp;section=reputation&amp;do=add_rating&amp;app_rate={$data['app']}&amp;type={$data['type']}&amp;type_id={$data['primaryId']}&amp;rating=-1&amp;secure_key={$this->member->form_hash}&amp;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&amp;module=global&amp;section=reputation&amp;do=add_rating&amp;app_rate={$data['app']}&amp;type={$data['type']}&amp;type_id={$data['primaryId']}&amp;rating=1&amp;secure_key={$this->member->form_hash}&amp;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&amp;module=global&amp;section=reputation&amp;do=add_rating&amp;app_rate={$data['app']}&amp;type={$data['type']}&amp;type_id={$data['primaryId']}&amp;rating=-1&amp;secure_key={$this->member->form_hash}&amp;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;
 }
 function repButtons($member, $data = array())
 {
     $IPBHTML = "";
     if (IPSLib::locationHasHooks('skin_global_other', $this->_funcHooks['repButtons'])) {
         $count_8e591a6dcb26abac222befba44cac8db = is_array($this->functionData['repButtons']) ? count($this->functionData['repButtons']) : 0;
         $this->functionData['repButtons'][$count_8e591a6dcb26abac222befba44cac8db]['member'] = $member;
         $this->functionData['repButtons'][$count_8e591a6dcb26abac222befba44cac8db]['data'] = $data;
     }
     $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' ? "<ul class='ipsList_inline post_rep'>\n\t\t\t\t<li " . (IPSMember::canRepUp($data, $member) === false ? "style=\"display:none\"" : "") . " >\n\t\t\t\t\t<a class='ipsLikeButton ipsLikeButton_enabled rep_up' href='{$this->settings['base_url']}app=core&amp;module=global&amp;section=reputation&amp;do=add_rating&amp;app_rate={$data['app']}&amp;type={$data['type']}&amp;type_id={$data['primaryId']}&amp;rating=1&amp;secure_key={$this->member->form_hash}&amp;post_return={$data['primaryId']}' title='{$this->lang->words['reputation_up']}'>{$this->lang->words['like_this']}</a>\n\t\t\t\t</li>\n\t\t\t\t<li " . (IPSMember::canRepDown($data, $member) === false ? "style=\"display:none\"" : "") . " >\n\t\t\t\t\t<a class='ipsLikeButton ipsLikeButton_disabled rep_down'  href='{$this->settings['base_url']}app=core&amp;module=global&amp;section=reputation&amp;do=add_rating&amp;app_rate={$data['app']}&amp;type={$data['type']}&amp;type_id={$data['primaryId']}&amp;rating=-1&amp;secure_key={$this->member->form_hash}&amp;post_return={$data['primaryId']}' title='{$this->lang->words['reputation_down']}'>{$this->lang->words['unlike_this']}</a>\n\t\t\t\t</li>\n\t\t\t</ul>" : "<ul class='ipsList_inline post_rep'>\n\t\t\t\t" . (IPSMember::canGiveRep($data, $member) !== false ? "<li " . (IPSMember::canRepUp($data, $member) === false ? "style=\"display:none\"" : "") . ">\n\t\t\t\t\t\t<a href='{$this->settings['base_url']}app=core&amp;module=global&amp;section=reputation&amp;do=add_rating&amp;app_rate={$data['app']}&amp;type={$data['type']}&amp;type_id={$data['primaryId']}&amp;rating=1&amp;secure_key={$this->member->form_hash}&amp;post_return={$data['primaryId']}' class='rep_up' title='{$this->lang->words['reputation_up']}'>" . $this->registry->getClass('output')->getReplacement("rep_up") . "</a>\n\t\t\t\t\t</li>\n\t\t\t\t\t<li " . (IPSMember::canRepDown($data, $member) === false ? "style=\"display:none\"" : "") . ">\n\t\t\t\t\t\t<a href='{$this->settings['base_url']}app=core&amp;module=global&amp;section=reputation&amp;do=add_rating&amp;app_rate={$data['app']}&amp;type={$data['type']}&amp;type_id={$data['primaryId']}&amp;rating=-1&amp;secure_key={$this->member->form_hash}&amp;post_return={$data['primaryId']}' class='rep_down' title='{$this->lang->words['reputation_down']}'>" . $this->registry->getClass('output')->getReplacement("rep_down") . "</a>\n\t\t\t\t\t</li>" : "") . "\n\t\t\t</ul>") . "" : "") . "" : "") . "";
     return $IPBHTML;
 }
Example #3
0
 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&amp;module=global&amp;section=reputation&amp;do=add_rating&amp;app_rate={$data['app']}&amp;type={$data['type']}&amp;type_id={$data['primaryId']}&amp;rating=1&amp;secure_key={$this->member->form_hash}&amp;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&amp;module=global&amp;section=reputation&amp;do=add_rating&amp;app_rate={$data['app']}&amp;type={$data['type']}&amp;type_id={$data['primaryId']}&amp;rating=1&amp;secure_key={$this->member->form_hash}&amp;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&amp;module=global&amp;section=reputation&amp;do=add_rating&amp;app_rate={$data['app']}&amp;type={$data['type']}&amp;type_id={$data['primaryId']}&amp;rating=-1&amp;secure_key={$this->member->form_hash}&amp;post_return={$data['primaryId']}]]></repDownURL>\n\t\t" : "") . "") . "" : "") . "";
     return $IPBHTML;
 }