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


PHP IPSMember::getFromMemberCache方法代碼示例

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


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

示例1: __f__f9ff587963c28431eafbee59e188371c

 function __f__f9ff587963c28431eafbee59e188371c($id = null)
 {
     $_ips___x_retval = '';
     $__iteratorCount = 0;
     foreach (array('facebook', 'twitter') as $service) {
         $prefs = is_array($prefs) ? $prefs : IPSMember::getFromMemberCache($this->memberData, 'postSocialPrefs');
         $__iteratorCount++;
         $_ips___x_retval .= "\n\t\t\t\t\t\t" . (IPSMember::canSocialShare($service) ? "<li class='ipsField ipsField_checkbox left' style='margin-right: 40px'>\n\t\t\t\t<input type=\"checkbox\" name=\"{$id}share_x_{$service}\" class=\"input_check _share_x_\" value=\"yes\" id='{$id}share_x_{$service}' " . (!empty($_REQUEST['share_' . $service]) || !empty($prefs[$service]) ? "checked='checked'" : "") . " /> &nbsp;&nbsp;\n\t\t\t\t<span class='' data-tooltip='" . sprintf($this->lang->words['gbl_post_to_x_tt'], UCFirst($service)) . "'>\n\t\t\t\t\t<label for='{$id}share_x_{$service}'> <img src=\"{$this->settings['public_dir']}style_extra/sharelinks/{$service}.png\" style='vertical-align:top' alt='' /> &nbsp; " . sprintf($this->lang->words['gbl_post_to_x'], UCFirst($service)) . "</label>\n\t\t\t\t</span>\n\t\t\t</li>" : "") . "\n\t\t\n";
     }
     $_ips___x_retval .= '';
     unset($__iteratorCount);
     return $_ips___x_retval;
 }
開發者ID:Advanture,項目名稱:Online-RolePlay,代碼行數:13,代碼來源:skin_global_other.php

示例2: fetchConversation


//.........這裏部分代碼省略.........
             /* Format Message */
             $msg['msg_post'] = $this->_formatMessageForDisplay($msg['msg_post'], $msg);
             /* Member missing? */
             if (!isset($memberData[$msg['msg_author_id']])) {
                 if (!$msg['msg_author_id']) {
                     $memberData[0] = array();
                 } else {
                     $missingMembers[$msg['msg_author_id']] = $msg['msg_author_id'];
                 }
             } else {
                 if (!empty($memberData[$msg['msg_author_id']]['signature'])) {
                     if (!$this->memberData['view_sigs'] || $msg['msg_author_id'] && $this->memberData['member_id'] && !empty($this->member->ignored_users[$msg['msg_author_id']]['ignore_signatures'])) {
                         $memberData[$msg['msg_author_id']]['signature'] = '';
                     }
                 }
             }
             $replyData[$msg['msg_id']] = $msg;
         }
     }
     /* Members who've deleted a closed conversation? */
     if (count($missingMembers)) {
         $_members = IPSMember::load(array_keys($missingMembers), 'all');
         foreach ($_members as $id => $data) {
             $data['_canBeBlocked'] = IPSMember::isIgnorable($memberData[$topicData['mt_starter_id']]['member_group_id'], $memberData[$topicData['mt_starter_id']]['mgroup_others'], 'pm');
             $data['map_user_active'] = 0;
             $memberData[$data['member_id']] = IPSMember::buildDisplayData($data, array('__all__' => 1));
         }
     }
     /* Update reading member's read time */
     $this->DB->update('message_topic_user_map', array('map_read_time' => time(), 'map_has_unread' => 0), 'map_user_id=' . intval($readingMemberData['member_id']) . ' AND map_topic_id=' . $topicID);
     /* Reduce the number of 'new' messages */
     $_newMsgs = intval($this->getPersonalTopicsCount($readingMemberID, 'new'));
     if ($memberData[$readingMemberID]['map_has_unread']) {
         $lastReset = intval(IPSMember::getFromMemberCache($memberData[$readingMemberID], 'msgAlertReset'));
         $msgAlertCount = intval($this->getPersonalTopicsCount($readingMemberID, 'new', $lastReset));
         $_pc = $this->rebuildFolderCount($readingMemberID, array('new' => $_newMsgs), TRUE);
         IPSMember::save($readingMemberID, array('core' => array('msg_count_new' => $msgAlertCount, 'msg_show_notification' => 0)));
         /* is this us? */
         if ($readingMemberID == $this->memberData['member_id']) {
             /* Reset folder data */
             $this->_dirData = $this->explodeFolderData($_pc);
             /* Reset global new count */
             $this->memberData['msg_count_new'] = $msgAlertCount;
         }
     }
     /* Clean up topic title */
     $topicData['mt_title'] = str_replace('[attachmentid=', '&#91;attachmentid=', $topicData['mt_title']);
     /* Flag externals as read */
     $this->_flagAsReadForExternals(array($topicID));
     /* Ensure our read time is updated */
     $memberData[$readingMemberID]['map_read_time'] = time();
     /* Do we  have a deleted user? */
     if (isset($memberData[0]) and $memberData[0]['member_id'] == 0) {
         $memberData[0] = IPSMember::buildDisplayData(IPSMember::setUpGuest($this->lang->words['deleted_user']), array('__all__' => 1));
     }
     //-----------------------------------------
     // Attachments?
     //-----------------------------------------
     if ($topicData['mt_hasattach']) {
         //-----------------------------------------
         // INIT. Yes it is
         //-----------------------------------------
         $postHTML = array();
         //-----------------------------------------
         // Separate out post content
         //-----------------------------------------
開發者ID:Advanture,項目名稱:Online-RolePlay,代碼行數:67,代碼來源:messengerFunctions.php

示例3: viewNewContent

 /**
  * View new posts since your last visit
  *
  * @return	@e void
  */
 public function viewNewContent()
 {
     IPSSearchRegistry::set('in.search_app', $this->request['search_app']);
     /* Fetch member cache to see if we have a value set */
     $vncPrefs = IPSMember::getFromMemberCache($this->memberData, 'vncPrefs');
     /* Guests */
     if (!$this->memberData['member_id'] and (!$this->request['period'] or $this->request['period'] == 'unread')) {
         $this->request['period'] = 'today';
     }
     /* In period */
     if ($vncPrefs === null or !isset($vncPrefs[IPSSearchRegistry::get('in.search_app')]['view']) or !empty($this->request['period']) and isset($this->request['change'])) {
         $vncPrefs[IPSSearchRegistry::get('in.search_app')]['view'] = !empty($this->request['period']) ? $this->request['period'] : $this->settings['default_vnc_method'];
     }
     /* Follow filter enabled */
     if ($vncPrefs === null or !isset($vncPrefs[IPSSearchRegistry::get('in.search_app')]['view']) or isset($this->request['followedItemsOnly'])) {
         $vncPrefs[IPSSearchRegistry::get('in.search_app')]['vncFollowFilter'] = !empty($this->request['followedItemsOnly']) ? 1 : 0;
     }
     /* User mode */
     if ($vncPrefs === null or !isset($vncPrefs[IPSSearchRegistry::get('in.search_app')]['view']) or isset($this->request['userMode'])) {
         $vncPrefs[IPSSearchRegistry::get('in.search_app')]['userMode'] = !empty($this->request['userMode']) ? $this->request['userMode'] : '';
     }
     /* Set filters up */
     IPSSearchRegistry::set('forums.vncForumFilters', $vncPrefs['forums']['vnc_forum_filter']);
     IPSSearchRegistry::set('in.period', $vncPrefs[IPSSearchRegistry::get('in.search_app')]['view']);
     IPSSearchRegistry::set('in.vncFollowFilterOn', $vncPrefs[IPSSearchRegistry::get('in.search_app')]['vncFollowFilter']);
     IPSSearchRegistry::set('in.userMode', $vncPrefs[IPSSearchRegistry::get('in.search_app')]['userMode']);
     /* Update member cache */
     if (isset($this->request['period']) and isset($this->request['change'])) {
         IPSMember::setToMemberCache($this->memberData, array('vncPrefs' => $vncPrefs));
     }
     IPSDebug::addMessage(var_export($vncPrefs, true));
     IPSDebug::addMessage('Using: ' . IPSSearchRegistry::get('in.period'));
     /* Can we do this? */
     if (IPSLib::appIsSearchable(IPSSearchRegistry::get('in.search_app'), 'vnc') || IPSLib::appIsSearchable(IPSSearchRegistry::get('in.search_app'), 'active')) {
         /* Can't do a specific unread search, so */
         if (IPSSearchRegistry::get('in.period') == 'unread' && !IPSLib::appIsSearchable(IPSSearchRegistry::get('in.search_app'), 'vncWithUnreadContent')) {
             IPSSearchRegistry::set('in.period', 'lastvisit');
         }
         /* Perform the search */
         $this->searchController->viewNewContent();
         /* Get count */
         $count = $this->searchController->getResultCount();
         /* Get results which will be array of IDs */
         $results = $this->searchController->getResultSet();
         /* Get templates to use */
         $template = $this->searchController->fetchTemplates();
         /* Fetch sort details */
         $sortDropDown = $this->searchController->fetchSortDropDown();
         /* Fetch sort details */
         $sortIn = $this->searchController->fetchSortIn();
         /* Reset for template */
         $this->_resetRequestParameters();
         if (IPSSearchRegistry::get('in.start') > 0 and !count($results)) {
             $new_url = 'app=core&amp;module=search&amp;do=viewNewContent&amp;period=' . IPSSearchRegistry::get('in.period') . '&amp;userMode=' . IPSSearchRegistry::get('in.userMode') . '&amp;search_app=' . IPSSearchRegistry::get('in.search_app') . '&amp;sid=' . $this->request['_sid'];
             $new_url .= '&amp;st=' . (IPSSearchRegistry::get('in.start') - IPSSearchRegistry::get('opt.search_per_page')) . '&amp;search_app_filters[' . IPSSearchRegistry::get('in.search_app') . '][searchInKey]=' . $this->request['search_app_filters'][IPSSearchRegistry::get('in.search_app')]['searchInKey'];
             $this->registry->output->silentRedirect($this->settings['base_url'] . $new_url);
         }
         /* Parse result set */
         $results = $this->registry->output->getTemplate($template['group'])->{$template}['template']($results, IPSSearchRegistry::get('opt.searchType') == 'titles' || IPSSearchRegistry::get('opt.noPostPreview') ? 1 : 0);
         /* Build pagination */
         $links = $this->registry->output->generatePagination(array('totalItems' => $count, 'itemsPerPage' => IPSSearchRegistry::get('opt.search_per_page'), 'currentStartValue' => IPSSearchRegistry::get('in.start'), 'baseUrl' => 'app=core&amp;module=search&amp;do=viewNewContent&amp;period=' . IPSSearchRegistry::get('in.period') . '&amp;userMode=' . IPSSearchRegistry::get('in.userMode') . '&amp;search_app=' . IPSSearchRegistry::get('in.search_app') . '&amp;sid=' . $this->request['_sid'] . $this->_returnSearchAppFilters()));
         /* Showing */
         $showing = array('start' => IPSSearchRegistry::get('in.start') + 1, 'end' => IPSSearchRegistry::get('in.start') + IPSSearchRegistry::get('opt.search_per_page') > $count ? $count : IPSSearchRegistry::get('in.start') + IPSSearchRegistry::get('opt.search_per_page'));
     } else {
         $count = 0;
         $results = array();
     }
     /* Add Debug message */
     IPSDebug::addMessage("View New Content Matches: " . $count);
     /* Check for sortIn */
     if (count($sortIn) && !$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']) {
         $this->request['search_app_filters'][$this->request['search_app']]['searchInKey'] = $sortIn[0][0];
     }
     /* Output */
     $this->title = $this->lang->words['new_posts_title'];
     $this->registry->output->addNavigation($this->lang->words['new_posts_title'], '');
     $this->output .= $this->registry->output->getTemplate('search')->newContentView($results, $links, $count, $sortDropDown, $sortIn, IPSSearchRegistry::get('set.resultCutToDate'));
 }
開發者ID:mover5,項目名稱:imobackup,代碼行數:83,代碼來源:search.php

示例4: showForm

 /**
  * Show the form to configure VNC forum filters
  *
  * @return	@e void
  */
 public function showForm()
 {
     $_data = $this->_getData();
     $vncPrefs = IPSMember::getFromMemberCache($this->memberData, 'vncPrefs');
     $fFP = $vncPrefs == null ? null : (empty($vncPrefs['forums']['vnc_forum_filter']) ? null : $vncPrefs['forums']['vnc_forum_filter']);
     $this->returnHtml($this->registry->output->getTemplate('search')->forumsVncFilters($_data, $fFP));
 }
開發者ID:mover5,項目名稱:imobackup,代碼行數:12,代碼來源:search.php


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