當前位置: 首頁>>代碼示例>>PHP>>正文


PHP IPSMember::isIgnorable方法代碼示例

本文整理匯總了PHP中IPSMember::isIgnorable方法的典型用法代碼示例。如果您正苦於以下問題:PHP IPSMember::isIgnorable方法的具體用法?PHP IPSMember::isIgnorable怎麽用?PHP IPSMember::isIgnorable使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在IPSMember的用法示例。


在下文中一共展示了IPSMember::isIgnorable方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: fetchTopicParticipants

 /**
  * Fetch the topic participants
  *
  * @access	public
  * @param	int			Topic ID
  * @param	boolean		Load and parse member data (TRUE for yes, FALSE for no)
  * @return	array 		Array of member data indexed by member ID
  */
 public function fetchTopicParticipants($topicID, $parseThem = FALSE)
 {
     //-----------------------------------------
     // INIT
     //-----------------------------------------
     $memberData = array();
     $remapData = array();
     //-----------------------------------------
     // Grab 'em
     //-----------------------------------------
     $this->DB->build(array('select' => '*', 'from' => 'message_topic_user_map', 'where' => 'map_topic_id=' . intval($topicID)));
     $this->DB->execute();
     while ($row = $this->DB->fetch()) {
         $remapData[$row['map_user_id']] = $row;
     }
     if (!count($remapData)) {
         return array();
     }
     /* Parse 'em? */
     if ($parseThem === TRUE) {
         /* Grab member data */
         $memberData = IPSMember::load(array_keys($remapData), 'all');
         foreach ($memberData as $id => $data) {
             $data['_canBeBlocked'] = IPSMember::isIgnorable($data['member_group_id'], $data['mgroup_others']);
             $memberData[$id] = IPSMember::buildDisplayData($data, array('__all__' => 1));
             $memberData[$id] = array_merge($memberData[$id], $remapData[$id]);
         }
         $remapData = $memberData;
     }
     return $remapData;
 }
開發者ID:dalandis,項目名稱:Visualization-of-Cell-Phone-Locations,代碼行數:39,代碼來源:messengerFunctions.php

示例2: __f__880e7343856e0a3cb02c18f131a74bdb

 function __f__880e7343856e0a3cb02c18f131a74bdb($topic, $replies, $members, $jump = "")
 {
     $_ips___x_retval = '';
     $__iteratorCount = 0;
     foreach ($replies as $msg_id => $msg) {
         $__iteratorCount++;
         $_ips___x_retval .= "\r\n\t\t\t<a id='msg{$msg['msg_id']}'></a>\r\n\t\t\t<div class='post_block first hentry' id='post_id_{$msg['msg_id']}'>\r\n\t\t\t\t<div class='post_wrap'>\r\n\t\t\t\t\t" . ($members[$msg['msg_author_id']]['member_id'] ? "\r\n\t\t\t\t\t\t<h3 class='row2'>\r\n\t\t\t\t\t" : "\r\n\t\t\t\t\t\t<h3 class='guest row2'>\r\n\t\t\t\t\t") . "\r\n\t\t\t\t\t\t\t" . ($members[$msg['msg_author_id']]['member_id'] ? "\r\n\t\t\t\t\t\t\t\t<span class=\"author vcard\">" . (method_exists($this->registry->getClass('output')->getTemplate('global'), 'userHoverCard') ? $this->registry->getClass('output')->getTemplate('global')->userHoverCard($members[$msg['msg_author_id']]) : '') . "</span>\r\n\t\t\t\t\t\t\t" : "\r\n\t\t\t\t\t\t\t\t{$members[$msg['msg_author_id']]['members_display_name']}\r\n\t\t\t\t\t\t\t") . "\r\n\t\t\t\t\t\t\t" . ($msg['_ip_address'] != '' ? "<span class='ip right ipsType_small'>({$this->lang->words['ip']}:\r\n\t\t\t\t\t\t\t\t" . ($members[$msg['msg_author_id']]['g_access_cp'] ? "\r\n\t\t\t\t\t\t\t\t\t<em>{$this->lang->words['ip_private']}</em>\r\n\t\t\t\t\t\t\t\t" : "" . ($this->memberData['g_is_supmod'] ? "<a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&amp;module=modcp&amp;fromapp=members&amp;tab=iplookup&amp;ip={$msg['_ip_address']}", "public", ''), "", "") . "\" title='{$this->lang->words['find_info_about_ip']}'>{$msg['_ip_address']}</a>" : "{$msg['_ip_address']}") . "") . "\r\n\t\t\t\t\t\t\t\t)</span>" : "") . "\r\n\t\t\t\t\t\t</h3>\r\n\t\t\t\t\t<div class='author_info'>\r\n\t\t\t\t\t\t" . (method_exists($this->registry->getClass('output')->getTemplate('global'), 'userInfoPane') ? $this->registry->getClass('output')->getTemplate('global')->userInfoPane($members[$msg['msg_author_id']], $msg_id, array()) : '') . "\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class='post_body'>\r\n\t\t\t\t\t\t<p class='posted_info'>{$this->lang->words['pc_sent']} " . IPSText::htmlspecialchars($this->registry->getClass('class_localization')->getDate($msg['msg_date'], "long", 0)) . "</p>\r\n\t\t\t\t\t\t<div class='post entry-content'>\r\n\t\t\t\t\t\t\t{$msg['msg_post']}\r\n\t\t\t\t\t\t\t{$msg['attachmentHtml']}\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t" . (($this->memberData['view_sigs'] and $members[$msg['msg_author_id']]['signature']) ? "\r\n\t\t\t\t\t\t\t" . (method_exists($this->registry->getClass('output')->getTemplate('global'), 'signature_separator') ? $this->registry->getClass('output')->getTemplate('global')->signature_separator($members[$msg['msg_author_id']]['signature'], $msg['msg_author_id'], IPSMember::isIgnorable($members[$msg['msg_author_id']]['member_group_id'], $members[$msg['msg_author_id']]['mgroup_others'])) : '') . "\r\n\t\t\t\t\t\t" : "") . "\r\n\t\t\t\t\t\t<ul class='post_controls clearfix clear'>\r\n\t\t\t\t\t\t\t" . (($topic['_canReply'] and empty($topic['_everyoneElseHasLeft'])) ? "\r\n\t\t\t\t\t\t\t\t<li>\r\n\t\t\t\t\t\t\t\t\t<a class='ipsButton_secondary' href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("module=messaging&amp;section=send&amp;do=replyForm&amp;topicID={$topic['mt_id']}&amp;msgID={$msg['msg_id']}", "publicWithApp", ''), "", "") . "\" title=\"{$this->lang->words['tt_reply_to_post']}\">{$this->lang->words['pc_reply']}</a>\r\n\t\t\t\t\t\t\t\t</li>\r\n\t\t\t\t\t\t\t" : "") . "\r\n\t\t\t\t\t\t\t" . (($topic['_canReport'] and $this->memberData['member_id']) ? "\r\n\t\t\t\t\t\t\t\t<li class='report'>\r\n\t\t\t\t\t\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&amp;module=reports&amp;rcom=messages&amp;topicID={$this->request['topicID']}&amp;st={$this->request['st']}&amp;msg={$msg['msg_id']}", "public", ''), "", "") . "'>{$this->lang->words['pc_report']}</a>\r\n\t\t\t\t\t\t\t\t</li>\r\n\t\t\t\t\t\t\t" : "") . "\r\n\t\t\t\t\t\t\t" . ($msg['_canEdit'] === TRUE ? "\r\n\t\t\t\t\t\t\t\t<li class='post_edit' id='edit_post_{$msg['msg_id']}'>\r\n\t\t\t\t\t\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("module=messaging&amp;section=send&amp;do=editMessage&amp;topicID={$topic['mt_id']}&amp;msgID={$msg['msg_id']}", "publicWithApp", ''), "", "") . "' title='{$this->lang->words['edit_this_post']}'>{$this->lang->words['pc_edit']}</a>\r\n\t\t\t\t\t\t\t\t</li>\r\n\t\t\t\t\t\t\t" : "") . "\r\n\t\t\t\t\t\t\t" . ($msg['_canDelete'] === TRUE && $msg['msg_is_first_post'] != 1 ? "\r\n\t\t\t\t\t\t\t\t<li class='post_del' id='del_post_{$msg['msg_id']}'>\r\n\t\t\t\t\t\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("module=messaging&amp;section=send&amp;do=deleteReply&amp;topicID={$topic['mt_id']}&amp;msgID={$msg['msg_id']}&amp;authKey={$this->member->form_hash}", "publicWithApp", ''), "", "") . "' title='{$this->lang->words['delete_this_post']}' class='delete_post'>{$this->lang->words['pc_delete']}</a>\r\n\t\t\t\t\t\t\t\t</li>\r\n\t\t\t\t\t\t\t" : "") . "\r\n\t\t\t\t\t\t</ul>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\r\n";
     }
     $_ips___x_retval .= '';
     unset($__iteratorCount);
     return $_ips___x_retval;
 }
開發者ID:ConnorChristie,項目名稱:GrabViews,代碼行數:12,代碼來源:skin_messaging.php

示例3: parsePost


//.........這裏部分代碼省略.........
     $post['PermalinkUrlBit'] = '';
     /* Queued */
     if ($topicData['topic_firstpost'] == $post['pid'] and ($post['_isHidden'] or $topicData['_isHidden'])) {
         $post['queued'] = 1;
         $post['_isHidden'] = true;
     }
     if ($topicData['topic_queuedposts'] || $topicData['topic_deleted_posts']) {
         if ($topicData['topic_queuedposts'] && $topicData['Perms']['canQueuePosts']) {
             /* We have hidden data that is viewable */
             $post['PermalinkUrlBit'] = '&amp;p=' . $post['pid'];
         }
         if ($topicData['topic_deleted_posts'] && $post['_softDeleteSee']) {
             /* We have hidden data that is viewable */
             $post['PermalinkUrlBit'] = '&amp;p=' . $post['pid'];
         }
     }
     /* Edited stuff */
     $post['edit_by'] = "";
     if ($post['append_edit'] == 1 and $post['edit_time'] != "" and $post['edit_name'] != "") {
         $e_time = $this->registry->class_localization->getDate($post['edit_time'], 'LONG');
         $post['edit_by'] = sprintf($this->lang->words['edited_by'], $post['edit_name'], $e_time);
     }
     /* Now parse the post */
     if (!isset($post['cache_content']) or !$post['cache_content']) {
         $_NOW2 = IPSDebug::getMemoryDebugFlag();
         /* Grab the parser file */
         if ($this->_parser === null) {
             /* Load parser */
             $classToLoad = IPSLib::loadLibrary(IPS_ROOT_PATH . 'sources/classes/text/parser.php', 'classes_text_parser');
             $this->_parser = new $classToLoad();
         }
         /* set up parser */
         $this->_parser->set(array('memberData' => array('member_id' => $post['member_id'], 'member_group_id' => $post['member_group_id'], 'mgroup_others' => $post['mgroup_others']), 'parseBBCode' => $forumData['use_ibc'], 'parseHtml' => ($forumData['use_html'] and $poster['g_dohtml'] and $post['post_htmlstate']) ? 1 : 0, 'parseEmoticons' => $post['use_emo'], 'parseArea' => 'topics'));
         $post['post'] = $this->_parser->display($post['post']);
         IPSDebug::setMemoryDebugFlag("topics::parsePostRow - bbcode parse - Completed", $_NOW2);
         IPSContentCache::update($post['pid'], 'post', $post['post']);
     } else {
         $post['post'] = '<!--cached-' . gmdate('r', $post['cache_updated']) . '-->' . $post['cache_content'];
     }
     /* Buttons */
     $post['_can_delete'] = $post['pid'] != $topicData['topic_firstpost'] ? $this->canDeletePost($post) : FALSE;
     $post['_can_edit'] = $this->canEditPost($post);
     $post['_show_ip'] = $this->canSeeIp();
     $post['_canReply'] = $this->getReplyStatus() == 'reply' ? true : false;
     /* Signatures */
     $post['signature'] = "";
     if (!empty($poster['signature'])) {
         if ($post['use_sig'] == 1) {
             if (!$this->memberData['view_sigs'] || $poster['author_id'] && $this->memberData['member_id'] && !empty($this->member->ignored_users[$poster['author_id']]['ignore_signatures']) && IPSMember::isIgnorable($poster['member_group_id'], $poster['mgroup_others'])) {
                 $post['signature'] = '<!--signature.hidden.' . $post['pid'] . '-->';
             } else {
                 $post['signature'] = $this->registry->output->getTemplate('global')->signature_separator($poster['signature'], $poster['author_id'], IPSMember::isIgnorable($poster['member_group_id'], $poster['mgroup_others']));
             }
         }
     }
     $post['forum_id'] = $topicData['forum_id'];
     /* Reputation */
     if ($this->settings['reputation_enabled'] and !$this->isArchived($topicData)) {
         /* Load the class */
         if (!$this->registry->isClassLoaded('repCache')) {
             $classToLoad = IPSLib::loadLibrary(IPS_ROOT_PATH . 'sources/classes/class_reputation_cache.php', 'classReputationCache');
             $this->registry->setClass('repCache', new $classToLoad());
         }
         $this->memberData['_members_cache']['rep_filter'] = isset($this->memberData['_members_cache']['rep_filter']) ? $this->memberData['_members_cache']['rep_filter'] : '*';
         $post['pp_reputation_points'] = $post['pp_reputation_points'] ? $post['pp_reputation_points'] : 0;
         $post['has_given_rep'] = $post['has_given_rep'] ? $post['has_given_rep'] : 0;
         $post['rep_points'] = $this->registry->repCache->getRepPoints(array('app' => 'forums', 'type' => 'pid', 'type_id' => $post['pid'], 'rep_points' => $post['rep_points']));
         $post['_repignored'] = 0;
         if (!($this->settings['reputation_protected_groups'] && in_array($this->memberData['member_group_id'], explode(',', $this->settings['reputation_protected_groups']))) && $this->memberData['_members_cache']['rep_filter'] !== '*') {
             if ($this->settings['reputation_show_content'] && $post['rep_points'] < $this->memberData['_members_cache']['rep_filter'] && $this->settings['reputation_point_types'] != 'like') {
                 $post['_repignored'] = 1;
             }
         }
         if ($this->registry->repCache->isLikeMode()) {
             $post['like'] = $this->registry->repCache->getLikeFormatted(array('app' => 'forums', 'type' => 'pid', 'id' => $post['pid'], 'rep_like_cache' => $post['rep_like_cache']));
         }
     }
     /* Ignore stuff */
     $post['_ignored'] = 0;
     if ($post['author_id'] && isset($topicData['ignoredUsers']) && is_array($topicData['ignoredUsers']) && count($topicData['ignoredUsers'])) {
         if (in_array($post['author_id'], $topicData['ignoredUsers'])) {
             if (!strstr($this->settings['cannot_ignore_groups'], ',' . $post['member_group_id'] . ',')) {
                 $post['_ignored'] = 1;
             }
         }
     }
     /* AD Code */
     $post['_adCode'] = '';
     if ($this->registry->getClass('IPSAdCode')->userCanViewAds() && !$this->getTopicData('adCodeSet') && !IPS_IS_AJAX) {
         $post['_adCode'] = $this->registry->getClass('IPSAdCode')->getAdCode('ad_code_topic_view_code');
         if ($post['_adCode']) {
             $this->setTopicData('adCodeSet', true);
         }
     }
     /* Memory debug */
     IPSDebug::setMemoryDebugFlag("PID: " . $post['pid'] . " - Completed", $_NOW);
     /* Excerpt */
     $post['_excerpt'] = IPSText::truncate(str_replace(array('<br />', '<br>', "\n", '</p>', '<p>'), ' ', $post['post']), 500);
     return array('post' => $post, 'author' => $poster);
 }
開發者ID:ConnorChristie,項目名稱:GrabViews-Live,代碼行數:101,代碼來源:topics.php


注:本文中的IPSMember::isIgnorable方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。