/** * Builds the where portion of a search string * * @param string $search_term The string to use in the search * @return string */ protected function _buildWhereStatement($search_term) { /* INI */ $where_clause = array(); if ($search_term) { switch (IPSSearchRegistry::get('opt.searchType')) { case 'both': default: $where_clause[] = "(title LIKE '%{$search_term}%' OR text LIKE '%{$search_term}%' OR description LIKE '%{$search_term}%')"; break; case 'titles': $where_clause[] = "title LIKE '%{$search_term}%'"; break; case 'content': $where_clause[] = "(text LIKE '%{$search_term}%' OR description LIKE '%{$search_term}%')"; break; } } /* Add in AND where conditions */ if (isset($this->whereConditions['AND']) && count($this->whereConditions['AND'])) { $where_clause = array_merge($where_clause, $this->whereConditions['AND']); } /* ADD in OR where conditions */ if (isset($this->whereConditions['OR']) && count($this->whereConditions['OR'])) { $where_clause[] = '( ' . implode(' OR ', $this->whereConditions['OR']) . ' )'; } /* Build and return the string */ return implode(" AND ", $where_clause); }
/** * Formats the forum search result for display * * @param array $search_row Array of data * @return mixed Formatted content, ready for display, or array containing a $sub section flag, and content */ public function formatContent($data) { return array(ipsRegistry::getClass('output')->getTemplate('search')->helpSearchResult($data, IPSSearchRegistry::get('opt.searchType') == 'titles' ? true : false), 0); }
function userPostsView($results, $pagination, $total, $member, $limited = 0, $wasLimited = false, $beginTime = 0, $sortIn = null, $sortDropDown = array()) { $IPBHTML = ""; if (IPSLib::locationHasHooks('skin_search', $this->_funcHooks['userPostsView'])) { $count_56b045587b253ddb2cfa1273ee5d326f = is_array($this->functionData['userPostsView']) ? count($this->functionData['userPostsView']) : 0; $this->functionData['userPostsView'][$count_56b045587b253ddb2cfa1273ee5d326f]['results'] = $results; $this->functionData['userPostsView'][$count_56b045587b253ddb2cfa1273ee5d326f]['pagination'] = $pagination; $this->functionData['userPostsView'][$count_56b045587b253ddb2cfa1273ee5d326f]['total'] = $total; $this->functionData['userPostsView'][$count_56b045587b253ddb2cfa1273ee5d326f]['member'] = $member; $this->functionData['userPostsView'][$count_56b045587b253ddb2cfa1273ee5d326f]['limited'] = $limited; $this->functionData['userPostsView'][$count_56b045587b253ddb2cfa1273ee5d326f]['wasLimited'] = $wasLimited; $this->functionData['userPostsView'][$count_56b045587b253ddb2cfa1273ee5d326f]['beginTime'] = $beginTime; $this->functionData['userPostsView'][$count_56b045587b253ddb2cfa1273ee5d326f]['sortIn'] = $sortIn; $this->functionData['userPostsView'][$count_56b045587b253ddb2cfa1273ee5d326f]['sortDropDown'] = $sortDropDown; } $datecut = $this->settings['search_ucontent_days'] ? $this->registry->class_localization->getDate(time() - 86400 * intval($this->settings['search_ucontent_days']), 'joined') : 0; $IPBHTML .= "<h2 class='ipsType_pagetitle'>" . sprintf($this->lang->words['s_participation_title'], $member['members_display_name']) . "</h2>\n<input type='hidden' name=\"usedInJsLater\" id=\"urlString\" value=\"" . base64_encode($this->registry->output->buildUrl("app=core&module=search&do=user_activity&search_app={$this->request['search_app']}&mid={$this->request['mid']}&userMode={$this->request['userMode']}&sid={$this->request['_sid']}", "public")) . "\" />\n" . ($total ? "<p class='ipsType_pagedesc'>\n\t\t\t" . sprintf($this->lang->words['s_participation_msg'], $total, $member['members_display_name']) . "" . ($datecut ? "\n\t\t\t\t<span class='desc lighter'>" . sprintf($this->lang->words['s_participation_range'], $datecut) . "</span>\n\t\t\t" : "") . "\n\t\t</p>\n\t<br />" : "") . "\n<div class='ipsLayout ipsLayout_withleft clearfix'>\n\t<div class='ipsLayout_left'>\n\t\t<div class='ipsBox'>\n\t\t\t<div class='ipsBox_container ipsSideMenu'>\n\t\t\t\t<h4>{$this->lang->words['filter_by_app']}</h4>\n\t\t\t\t<ul>\n\t\t\t\t\t" . (IPSLib::appIsSearchable('forums', 'usercontent') ? "<li " . ($this->request['search_app'] == 'forums' ? "class='active'" : "") . "><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=user_activity&search_app=forums&mid={$this->request['mid']}&userMode={$this->request['userMode']}&sid={$this->request['_sid']}", "public", ''), "", "") . "'>" . IPSLib::getAppTitle('forums') . "</a></li>" : "") . "" . (IPSLib::appIsSearchable('members', 'usercontent') ? "<li " . ($this->request['search_app'] == 'members' ? "class='active'" : "") . "><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=user_activity&search_app=members&mid={$this->request['mid']}&userMode={$this->request['userMode']}&sid={$this->request['_sid']}", "public", ''), "", "") . "'>" . IPSLib::getAppTitle('members') . "</a></li>" : "") . "" . (IPSLib::appIsSearchable('core', 'usercontent') ? "<li " . ($this->request['search_app'] == 'core' ? "class='active'" : "") . "><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=user_activity&search_app=core&mid={$this->request['mid']}&userMode={$this->request['userMode']}&sid={$this->request['_sid']}", "public", ''), "", "") . "'>" . IPSLib::getAppTitle('core') . "</a></li>" : "") . "" . $this->__f__e31017b74a41d4b4cb2b4384d3fd5612($results, $pagination, $total, $member, $limited, $wasLimited, $beginTime, $sortIn, $sortDropDown) . "\t\t\t\t</ul>\n\t\t\t\t\n\t\t\t\t" . ($this->request['search_app'] == 'forums' ? "<h4>{$this->lang->words['userposts_morefilters']}</h4>\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<li " . ($this->request['userMode'] == 'all' ? "class='active'" : "") . "><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=user_activity&search_app={$this->request['search_app']}&mid={$this->request['mid']}&sid={$this->request['_sid']}&search_app_filters[{$this->request['search_app']}][searchInKey]={$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}&userMode=all", "public", ''), "", "") . "'>{$this->lang->words['viewall_opt_dd']}</a></li>\n\t\t\t\t\t\t<li " . ($this->request['userMode'] == 'title' ? "class='active'" : "") . "><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=user_activity&search_app={$this->request['search_app']}&mid={$this->request['mid']}&sid={$this->request['_sid']}&search_app_filters[{$this->request['search_app']}][searchInKey]={$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}&userMode=title", "public", ''), "", "") . "'>{$this->lang->words['viewallt_opt_dd']}</a></li>\n\t\t\t\t\t\t<li " . ($this->request['userMode'] == 'content' ? "class='active'" : "") . "><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=user_activity&search_app={$this->request['search_app']}&mid={$this->request['mid']}&sid={$this->request['_sid']}&search_app_filters[{$this->request['search_app']}][searchInKey]={$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}&userMode=content", "public", ''), "", "") . "'>{$this->lang->words['viewallp_opt_dd']}</a></li>\n\t\t\t\t\t</ul>" : "") . "" . ((is_array($sortIn) and count($sortIn)) ? "\n\t\t\t\t\t<h4>{$this->lang->words['filter_by_type']}</h4>\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t" . $this->__f__f1a57e68aab5c9fe25c8e35dda3b1fa0($results, $pagination, $total, $member, $limited, $wasLimited, $beginTime, $sortIn, $sortDropDown) . "\t\t\t\t\t</ul>\n\t\t\t\t" : "") . "\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<div class='ipsLayout_content'>\n\t\t" . ($pagination ? "\n\t\t\t<div class='topic_controls'>\n\t\t\t\t{$pagination}\n\t\t\t</div>\n\t\t\t<br />\n\t\t" : "") . "\n\t\t<div class='maintitle ipsFilterbar'>\n\t\t\t" . ($this->memberData['g_is_supmod'] == 1 && IPSSearchRegistry::get('config.can_moderate_results') ? "\n\t\t\t\t<span class='right'>\n\t\t\t\t\t<input type='checkbox' id='tmod_all' class='input_check' title='{$this->lang->words['search_select_all']}' value='1' />\n\t\t\t\t</span>\n\t\t\t" : "") . "\n\t\t\t" . ((IPSSearchRegistry::get('config.contentTypes') and is_array(IPSSearchRegistry::get('config.contentTypes'))) ? "" . (count($sortDropDown) ? "<span class='ipsType_small'>{$this->lang->words['sort_by']}</span> \n\t\t\t\t\t" . (count($sortDropDown) <= 4 ? "\n\t\t\t\t\t\t<ul class='ipsList_inline ipsType_smaller' style='display: inline'>\n\t\t\t\t\t\t\t" . $this->__f__b9a558a6743e0a615bc9fcdb24e031c8($results, $pagination, $total, $member, $limited, $wasLimited, $beginTime, $sortIn, $sortDropDown) . "\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t \n\t\t\t\t\t" : "\n\t\t\t\t\t\t<ul class='ipsList_inline ipsType_smaller' style='display: inline'>\n\t\t\t\t\t\t\t<li class='active'>\n\t\t\t\t\t\t\t\t<a href='#' id='search_sort' class='ipbmenu'>{$sortDropDown[$this->request['search_app_filters'][$this->request['search_app']][$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']]['sortKey']]} <span class='submenu_indicator'></span> </a>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t \n\t\t\t\t\t") . "" : "") . "\n\t\t\t\t<span class='ipsType_small'>{$this->lang->words['order']}</span> \n\t\t\t\t<ul class='ipsList_inline ipsType_smaller' style='display: inline'>\n\t\t\t\t\t<li " . ($this->request['search_app_filters'][$this->request['search_app']][$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']]['sortDir'] == 0 ? "class='active'" : "") . ">\n\t\t\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=user_activity&sid={$this->request['_sid']}&mid={$this->request['mid']}&userMode={$this->request['userMode']}&search_app={$this->request['search_app']}&search_app_filters[{$this->request['search_app']}][searchInKey]={$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}&search_app_filters[{$this->request['search_app']}][{$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}][sortKey]={$this->request['search_app_filters'][$this->request['search_app']][$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']]['sortKey']}&search_app_filters[{$this->request['search_app']}][{$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}][sortDir]=0", "public", ''), "", "") . "'>{$this->lang->words['s_search_type_o_0']}</a>\n\t\t\t\t\t</li>\n\t\t\t\t\t<li " . ($this->request['search_app_filters'][$this->request['search_app']][$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']]['sortDir'] == 1 ? "class='active'" : "") . ">\n\t\t\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=user_activity&sid={$this->request['_sid']}&mid={$this->request['mid']}&userMode={$this->request['userMode']}&search_app={$this->request['search_app']}&search_app_filters[{$this->request['search_app']}][searchInKey]={$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}&search_app_filters[{$this->request['search_app']}][{$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}][sortKey]={$this->request['search_app_filters'][$this->request['search_app']][$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']]['sortKey']}&search_app_filters[{$this->request['search_app']}][{$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}][sortDir]=1", "public", ''), "", "") . "'>{$this->lang->words['s_search_type_o_1']}</a>\n\t\t\t\t\t</li>\n\t\t\t\t</ul>" : "" . (count($sortDropDown) ? "<span class='ipsType_small'>{$this->lang->words['sort_by']}</span> \n\t\t\t\t\t" . (count($sortDropDown) <= 4 ? "\n\t\t\t\t\t\t<ul class='ipsList_inline ipsType_smaller' style='display: inline'>\n\t\t\t\t\t\t\t" . $this->__f__081ffe618f334d2a090efd42d90dc8b2($results, $pagination, $total, $member, $limited, $wasLimited, $beginTime, $sortIn, $sortDropDown) . "\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t \n\t\t\t\t\t" : "\n\t\t\t\t\t\t<ul class='ipsList_inline ipsType_smaller' style='display: inline'>\n\t\t\t\t\t\t\t<li class='active'>\n\t\t\t\t\t\t\t\t<a href='#' id='search_sort' class='ipbmenu'>{$sortDropDown[$this->request['search_app_filters'][$this->request['search_app']]['sortKey']]} <span class='submenu_indicator'></span> </a>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t \n\t\t\t\t\t") . "" : "") . "\n\t\t\t\t<span class='ipsType_small'>{$this->lang->words['order']}</span> \n\t\t\t\t<ul class='ipsList_inline ipsType_smaller' style='display: inline'>\n\t\t\t\t\t<li " . ($this->request['search_app_filters'][$this->request['search_app']]['sortDir'] == 0 ? "class='active'" : "") . ">\n\t\t\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=user_activity&sid={$this->request['_sid']}&mid={$this->request['mid']}&userMode={$this->request['userMode']}&search_app={$this->request['search_app']}&search_app_filters[{$this->request['search_app']}][searchInKey]={$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}&search_app_filters[{$this->request['search_app']}][sortKey]={$this->request['search_app_filters'][$this->request['search_app']]['sortKey']}&search_app_filters[{$this->request['search_app']}][sortDir]=0", "public", ''), "", "") . "'>{$this->lang->words['s_search_type_o_0']}</a>\n\t\t\t\t\t</li>\n\t\t\t\t\t<li " . ($this->request['search_app_filters'][$this->request['search_app']]['sortDir'] == 1 ? "class='active'" : "") . ">\n\t\t\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=user_activity&sid={$this->request['_sid']}&mid={$this->request['mid']}&userMode={$this->request['userMode']}&search_app={$this->request['search_app']}&search_app_filters[{$this->request['search_app']}][searchInKey]={$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}&search_app_filters[{$this->request['search_app']}][sortKey]={$this->request['search_app_filters'][$this->request['search_app']]['sortKey']}&search_app_filters[{$this->request['search_app']}][sortDir]=1", "public", ''), "", "") . "'>{$this->lang->words['s_search_type_o_1']}</a>\n\t\t\t\t\t</li>\n\t\t\t\t</ul>") . "\n\t\t</div>\n\t\t" . (count($sortDropDown) && count($sortDropDown) >= 5 ? "<!-- The menu for changing the sort field -->\n\t\t\t<ul id='search_sort_menucontent' class='ipbmenu_content with_checks' style='display: none'>\n\t\t\t\t" . ((IPSSearchRegistry::get('config.contentTypes') and is_array(IPSSearchRegistry::get('config.contentTypes'))) ? "" . $this->__f__9df977cad39319e502ce2afd6ca9b272($results, $pagination, $total, $member, $limited, $wasLimited, $beginTime, $sortIn, $sortDropDown) . "\t\t\t\t" : "" . $this->__f__e8ef461db2bec64997b987ff27f01bb3($results, $pagination, $total, $member, $limited, $wasLimited, $beginTime, $sortIn, $sortDropDown) . "\t\t\t\t") . "\n\t\t\t</ul>" : "") . "\n\t\t<div>\n\t\t\t" . ($total ? "\n\t\t\t\t{$results}\n\t\t\t\t<br />\n\t\t\t\t{$pagination}\n\t\t\t" : "\n\t\t\t\t<p class='no_messages'>{$this->lang->words['user_posts_none']}</p>\n\t\t\t") . "\n\t\t</div>\n\t</div>\n</div>"; return $IPBHTML; }
/** * Reassigns fields in a generic way for results output * * @param array $r * @return array */ public function genericizeResults($r) { if (IPSSearchRegistry::get('members.searchInKey') == 'comments') { $r['app'] = 'members'; $r['content'] = $r['comment_content']; $r['content_title'] = $r['member_display_name_owner']; $r['updated'] = $r['comment_date']; $r['type_2'] = 'comment_id'; $r['type_id_2'] = $r['comment_id']; $r['misc'] = serialize(array('members_display_name' => $r['members_display_name'], 'pp_thumb_photo' => $r['pp_thumb_photo'], 'pp_thumb_width' => $r['pp_thumb_width'], 'pp_thumb_height' => $r['pp_thumb_height'])); } else { $r['app'] = 'members'; $r['content'] = $r['signature'] . ' ' . $r['pp_about_me']; $r['content_title'] = $r['members_display_name']; $r['updated'] = time(); $r['type_2'] = 'profile_view'; $r['type_id_2'] = $r['member_id']; $r['misc'] = serialize(array('pp_thumb_photo' => $r['pp_thumb_photo'], 'pp_thumb_width' => $r['pp_thumb_width'], 'pp_thumb_height' => $r['pp_thumb_height'])); } return $r; }
/** * Post process VNC tids * @param array tid => array( tid,forum_id) * @return array cleaned tids */ public function postProcessVncTids($rtids, $limit = array(), $maxHit = 1000) { $fCache = array('marked' => array(), 'lastStamp' => array()); $tids = array(); if (!is_array($rtids) or !count($rtids)) { return array(); } foreach ($rtids as $tid => $data) { if (!isset($fCache['canView'][$data['forum_id']])) { $read = $this->registry->permissions->check('view', $this->getForumById($data['forum_id'])); $view = $this->forumsCheckAccess($data['forum_id'], 0, 'forum', array(), true); $fCache['canView'][$data['forum_id']] = $read && $view ? true : false; } /* Permission to view? */ if (!$fCache['canView'][$data['forum_id']]) { continue; } if (IPSSearchRegistry::get('in.period') == 'unread') { /* Avoid repeated calls to classItemMarking */ if (!isset($fCache['marked'][$data['forum_id']])) { $fCache['marked'][$data['forum_id']] = intval($this->registry->classItemMarking->fetchTimeLastMarked(array('forumID' => $data['forum_id'], 'itemLastUpdate' => $data['last_post']), 'forums')); } /* May as well cache this too */ if (!isset($fCache['lastStamp'][$data['forum_id']])) { $_f = $this->getForumById($data['forum_id']); $fCache['lastStamp'][$data['forum_id']] = intval($_f['last_post']); } $lastStamp = isset($fCache['lastStamp'][$data['forum_id']]) ? $fCache['lastStamp'][$data['forum_id']] : 0; $lastRead = isset($fCache['marked'][$data['forum_id']]) ? $fCache['marked'][$data['forum_id']] : 0; /* Lets get jiggy, etc */ if ($lastStamp && $lastStamp <= $lastRead) { continue; } else { if (!$this->registry->classItemMarking->isRead(array('forumID' => $data['forum_id'], 'itemID' => $tid, 'itemLastUpdate' => $data['last_post']), 'forums')) { $tids[$tid] = $tid; } } } else { $tids[$tid] = $tid; } } /* Count what's left */ $count = count($tids); /* Simulate limit */ if (isset($limit[0])) { $tids = array_slice($tids, intval($limit[0]), intval($limit[1])); } /* return */ return array('count' => $count, 'tids' => $tids); }
/** * Remap standard columns (Apps can override ) * * @param string $column sql table column for this condition * @return string column * @return @e void */ public function remapColumn($column) { $column = $column == 'member_id' ? IPSSearchRegistry::get('opt.searchTitleOnly') ? 't.starter_id' : 'p.' . $this->table['author_id'] : $column; $column = $column == 'content_title' ? 't.title' : $column; $column = $column == 'type_id' ? 't.forum_id' : $column; return $column; }
/** * Builds the where portion of a search string * * @param string $search_term The string to use in the search * @return string */ protected function _buildWhereStatement($search_term) { //----------------------------------------- // Init //----------------------------------------- $where_clause = array(); //----------------------------------------- // Search term //----------------------------------------- if ($search_term) { $search_term = str_replace('"', '"', $search_term); switch (IPSSearchRegistry::get('opt.searchType')) { case 'both': default: $where_clause[] = '(' . $this->DB->buildSearchStatement('c.event_title', $search_term, true, false, ipsRegistry::$settings['use_fulltext']) . ' OR ' . $this->DB->buildSearchStatement('c.event_content', $search_term, true, false, ipsRegistry::$settings['use_fulltext']) . ')'; break; case 'titles': $where_clause[] = $this->DB->buildSearchStatement('c.event_title', $search_term, true, false, ipsRegistry::$settings['use_fulltext']); break; case 'content': $where_clause[] = $this->DB->buildSearchStatement('c.event_content', $search_term, true, false, ipsRegistry::$settings['use_fulltext']); break; } } //----------------------------------------- // Date restriction //----------------------------------------- if ($this->search_begin_timestamp && $this->search_end_timestamp) { $where_clause[] = $this->DB->buildBetween($this->DB->buildUnixTimestamp("c.event_start_date"), $this->search_begin_timestamp, $this->search_end_timestamp); } else { if ($this->search_begin_timestamp) { $where_clause[] = $this->DB->buildUnixTimestamp("c.event_start_date") . " > {$this->search_begin_timestamp}"; } if ($this->search_end_timestamp) { $where_clause[] = $this->DB->buildUnixTimestamp("c.event_start_date") . " < {$this->search_end_timestamp}"; } } //----------------------------------------- // Other conditions //----------------------------------------- if (isset($this->whereConditions['AND']) && count($this->whereConditions['AND'])) { $where_clause = array_merge($where_clause, $this->whereConditions['AND']); } if (isset($this->whereConditions['OR']) && count($this->whereConditions['OR'])) { $where_clause[] = '( ' . implode(' OR ', $this->whereConditions['OR']) . ' )'; } //----------------------------------------- // Permissions //----------------------------------------- if (!$this->memberData['g_is_supmod']) { $where_clause[] = 'c.event_approved=1'; } else { $where_clause[] = 'c.event_approved IN (0,1)'; } $where_clause[] = "c.event_calendar_id IN(" . (count($this->calendars) ? implode(',', $this->calendars) : 0) . ")"; $where_clause[] = "((c.event_private=1 AND c.event_member_id=" . $this->memberData['member_id'] . ") OR (c.event_private=0 AND " . $this->DB->buildRegexp("c.event_perms", $this->member->perm_id_array) . "))"; //----------------------------------------- // Return //----------------------------------------- return implode(" AND ", $where_clause); }
/** * Parse common search results * * @access private * @param array $r Search result * @return array $html Blocks of HTML */ public function parseAndFetchHtmlBlocks($rows) { /* Forum stuff */ $sub = false; $isVnc = false; $search_term = IPSSearchRegistry::get('in.clean_search_term'); $results = array(); /* loop and process */ if (is_array($rows) and count($rows)) { foreach ($rows as $id => $r) { /* If basic search, strip the content - process only if we have content though */ if ($r['content']) { IPSText::getTextClass('bbcode')->parse_bbcode = 0; IPSText::getTextClass('bbcode')->strip_quotes = 1; IPSText::getTextClass('bbcode')->parsing_section = 'topics'; IPSText::getTextClass('bbcode')->parsing_mgroup = $r['member_group_id']; IPSText::getTextClass('bbcode')->parsing_mgroup_others = $r['mgroup_others']; $r['content'] = strip_tags(IPSText::getTextClass('bbcode')->stripAllTags($r['content'])); $r['content'] = str_replace(array('<br>', '<br />'), '', $r['content']); $r['content'] = trim(str_replace(array("\n\n\n", "\n\n"), "\n", str_replace("\r", '', $r['content']))); /* Highlight */ $r['content'] = IPSText::searchHighlight($this->searchTruncate($r['content'], $search_term), $search_term); } /* Format title */ $r['content_title'] = IPSText::searchHighlight($r['content_title'], $search_term); /* Format content */ list($html, $sub) = $this->formatContent($r); $results[$id] = array('html' => $html, 'app' => $r['app'], 'type' => $r['type'], 'sub' => $sub, '_followData' => !empty($r['_followData']) ? $r['_followData'] : array()); } } return $results; }
/** * Reassigns fields in a generic way for results output * * @param array $r * @return array */ public function genericizeResults($r) { $r['app'] = 'forums'; $r['content'] = $r['post']; $r['content_title'] = $r['title']; $r['updated'] = $r['post_date']; $r['lastupdate'] = $r['last_post']; $r['type_2'] = 'topic'; $r['type_id_2'] = $r['tid']; $r['misc'] = $r['pid']; /* Fix up member display name */ if (empty($r['members_display_name'])) { $idField = 'author_id'; $nameField = 'author_name'; if (IPSSearchRegistry::get('set.returnType') == 'tids') { $idField = 'last_poster_id'; $nameField = 'last_poster_name'; } if (empty($r[$idField])) { $r['members_display_name'] = ipsRegistry::$settings['guest_name_pre'] . $r[$nameField] . ipsRegistry::$settings['guest_name_suf']; } } return $r; }
function userPostsView($results, $pagination, $total, $member, $limited = 0, $wasLimited = false, $beginTime = 0, $sortIn = null, $sortDropDown = array()) { $IPBHTML = ""; if (IPSLib::locationHasHooks('skin_search', $this->_funcHooks['userPostsView'])) { $count_e31425e2e9988d643a769b3337cf36c2 = is_array($this->functionData['userPostsView']) ? count($this->functionData['userPostsView']) : 0; $this->functionData['userPostsView'][$count_e31425e2e9988d643a769b3337cf36c2]['results'] = $results; $this->functionData['userPostsView'][$count_e31425e2e9988d643a769b3337cf36c2]['pagination'] = $pagination; $this->functionData['userPostsView'][$count_e31425e2e9988d643a769b3337cf36c2]['total'] = $total; $this->functionData['userPostsView'][$count_e31425e2e9988d643a769b3337cf36c2]['member'] = $member; $this->functionData['userPostsView'][$count_e31425e2e9988d643a769b3337cf36c2]['limited'] = $limited; $this->functionData['userPostsView'][$count_e31425e2e9988d643a769b3337cf36c2]['wasLimited'] = $wasLimited; $this->functionData['userPostsView'][$count_e31425e2e9988d643a769b3337cf36c2]['beginTime'] = $beginTime; $this->functionData['userPostsView'][$count_e31425e2e9988d643a769b3337cf36c2]['sortIn'] = $sortIn; $this->functionData['userPostsView'][$count_e31425e2e9988d643a769b3337cf36c2]['sortDropDown'] = $sortDropDown; } $datecut = $this->settings['search_ucontent_days'] ? $this->registry->class_localization->getDate(time() - 86400 * intval($this->settings['search_ucontent_days']), 'joined') : 0; $IPBHTML .= "<h2 class='ipsType_pagetitle'>" . sprintf($this->lang->words['s_participation_title'], $member['members_display_name']) . "</h2>\r\n<input type='hidden' name=\"usedInJsLater\" id=\"urlString\" value=\"" . base64_encode($this->registry->output->buildUrl("app=core&module=search&do=user_activity&search_app={$this->request['search_app']}&mid={$this->request['mid']}&userMode={$this->request['userMode']}&sid={$this->request['_sid']}", "public")) . "\" />\r\n" . ($total ? "<p class='ipsType_pagedesc'>\r\n\t\t\t" . sprintf($this->lang->words['s_participation_msg'], $total, $member['members_display_name']) . "" . ($datecut ? "\r\n\t\t\t\t<span class='desc lighter'>" . sprintf($this->lang->words['s_participation_range'], $datecut) . "</span>\r\n\t\t\t" : "") . "\r\n\t\t</p>\r\n\t<br />" : "") . "\r\n<div class='ipsLayout ipsLayout_withleft clearfix'>\r\n\t<div class='ipsLayout_left'>\r\n\t\t<div class='ipsBox'>\r\n\t\t\t<div class='ipsBox_container ipsSideMenu'>\r\n\t\t\t\t<h4>{$this->lang->words['filter_by_app']}</h4>\r\n\t\t\t\t<ul>\r\n\t\t\t\t\t" . (IPSLib::appIsSearchable('forums', 'usercontent') ? "<li " . ($this->request['search_app'] == 'forums' ? "class='active'" : "") . "><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=user_activity&search_app=forums&mid={$this->request['mid']}&userMode={$this->request['userMode']}&sid={$this->request['_sid']}", "public", ''), "", "") . "'>" . IPSLib::getAppTitle('forums') . "</a></li>" : "") . "" . (IPSLib::appIsSearchable('members', 'usercontent') ? "<li " . ($this->request['search_app'] == 'members' ? "class='active'" : "") . "><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=user_activity&search_app=members&mid={$this->request['mid']}&userMode={$this->request['userMode']}&sid={$this->request['_sid']}", "public", ''), "", "") . "'>" . IPSLib::getAppTitle('members') . "</a></li>" : "") . "" . (IPSLib::appIsSearchable('core', 'usercontent') ? "<li " . ($this->request['search_app'] == 'core' ? "class='active'" : "") . "><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=user_activity&search_app=core&mid={$this->request['mid']}&userMode={$this->request['userMode']}&sid={$this->request['_sid']}", "public", ''), "", "") . "'>" . IPSLib::getAppTitle('core') . "</a></li>" : "") . "" . $this->__f__1b17d9321ede53a439cd1e91c81cef8f($results, $pagination, $total, $member, $limited, $wasLimited, $beginTime, $sortIn, $sortDropDown) . "\t\t\t\t</ul>\r\n\t\t\t\t\r\n\t\t\t\t" . ($this->request['search_app'] == 'forums' ? "<h4>{$this->lang->words['userposts_morefilters']}</h4>\r\n\t\t\t\t\t<ul>\r\n\t\t\t\t\t\t<li " . ($this->request['userMode'] == 'all' ? "class='active'" : "") . "><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=user_activity&search_app={$this->request['search_app']}&mid={$this->request['mid']}&sid={$this->request['_sid']}&search_app_filters[{$this->request['search_app']}][searchInKey]={$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}&userMode=all", "public", ''), "", "") . "'>{$this->lang->words['viewall_opt_dd']}</a></li>\r\n\t\t\t\t\t\t<li " . ($this->request['userMode'] == 'title' ? "class='active'" : "") . "><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=user_activity&search_app={$this->request['search_app']}&mid={$this->request['mid']}&sid={$this->request['_sid']}&search_app_filters[{$this->request['search_app']}][searchInKey]={$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}&userMode=title", "public", ''), "", "") . "'>{$this->lang->words['viewallt_opt_dd']}</a></li>\r\n\t\t\t\t\t\t<li " . ($this->request['userMode'] == 'content' ? "class='active'" : "") . "><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=user_activity&search_app={$this->request['search_app']}&mid={$this->request['mid']}&sid={$this->request['_sid']}&search_app_filters[{$this->request['search_app']}][searchInKey]={$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}&userMode=content", "public", ''), "", "") . "'>{$this->lang->words['viewallp_opt_dd']}</a></li>\r\n\t\t\t\t\t</ul>" : "") . "" . ((is_array($sortIn) and count($sortIn)) ? "\r\n\t\t\t\t\t<h4>{$this->lang->words['filter_by_type']}</h4>\r\n\t\t\t\t\t<ul>\r\n\t\t\t\t\t\t" . $this->__f__8950e6f611f22aa1ef6dc74ead977440($results, $pagination, $total, $member, $limited, $wasLimited, $beginTime, $sortIn, $sortDropDown) . "\t\t\t\t\t</ul>\r\n\t\t\t\t" : "") . "\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n\t<div class='ipsLayout_content'>\r\n\t\t" . ($pagination ? "\r\n\t\t\t<div class='topic_controls'>\r\n\t\t\t\t{$pagination}\r\n\t\t\t</div>\r\n\t\t\t<br />\r\n\t\t" : "") . "\r\n\t\t<div class='maintitle ipsFilterbar'>\r\n\t\t\t" . ($this->memberData['g_is_supmod'] == 1 && IPSSearchRegistry::get('config.can_moderate_results') ? "\r\n\t\t\t\t<span class='right'>\r\n\t\t\t\t\t<input type='checkbox' id='tmod_all' class='input_check' title='{$this->lang->words['search_select_all']}' value='1' />\r\n\t\t\t\t</span>\r\n\t\t\t" : "") . "\r\n\t\t\t" . ((IPSSearchRegistry::get('config.contentTypes') and is_array(IPSSearchRegistry::get('config.contentTypes'))) ? "" . (count($sortDropDown) ? "<span class='ipsType_small'>{$this->lang->words['sort_by']}</span> \r\n\t\t\t\t\t" . (count($sortDropDown) <= 4 ? "\r\n\t\t\t\t\t\t<ul class='ipsList_inline ipsType_smaller' style='display: inline'>\r\n\t\t\t\t\t\t\t" . $this->__f__89fa1a55dc87e8622ddd6f1d28cd3863($results, $pagination, $total, $member, $limited, $wasLimited, $beginTime, $sortIn, $sortDropDown) . "\t\t\t\t\t\t</ul>\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t" : "\r\n\t\t\t\t\t\t<ul class='ipsList_inline ipsType_smaller' style='display: inline'>\r\n\t\t\t\t\t\t\t<li class='active'>\r\n\t\t\t\t\t\t\t\t<a href='#' id='search_sort' class='ipbmenu'>{$sortDropDown[$this->request['search_app_filters'][$this->request['search_app']][$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']]['sortKey']]} <span class='submenu_indicator'></span> </a>\r\n\t\t\t\t\t\t\t</li>\r\n\t\t\t\t\t\t</ul>\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t") . "" : "") . "\r\n\t\t\t\t<span class='ipsType_small'>{$this->lang->words['order']}</span> \r\n\t\t\t\t<ul class='ipsList_inline ipsType_smaller' style='display: inline'>\r\n\t\t\t\t\t<li " . ($this->request['search_app_filters'][$this->request['search_app']][$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']]['sortDir'] == 0 ? "class='active'" : "") . ">\r\n\t\t\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=user_activity&sid={$this->request['_sid']}&mid={$this->request['mid']}&userMode={$this->request['userMode']}&search_app={$this->request['search_app']}&search_app_filters[{$this->request['search_app']}][searchInKey]={$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}&search_app_filters[{$this->request['search_app']}][{$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}][sortKey]={$this->request['search_app_filters'][$this->request['search_app']][$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']]['sortKey']}&search_app_filters[{$this->request['search_app']}][{$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}][sortDir]=0", "public", ''), "", "") . "'>{$this->lang->words['s_search_type_o_0']}</a>\r\n\t\t\t\t\t</li>\r\n\t\t\t\t\t<li " . ($this->request['search_app_filters'][$this->request['search_app']][$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']]['sortDir'] == 1 ? "class='active'" : "") . ">\r\n\t\t\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=user_activity&sid={$this->request['_sid']}&mid={$this->request['mid']}&userMode={$this->request['userMode']}&search_app={$this->request['search_app']}&search_app_filters[{$this->request['search_app']}][searchInKey]={$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}&search_app_filters[{$this->request['search_app']}][{$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}][sortKey]={$this->request['search_app_filters'][$this->request['search_app']][$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']]['sortKey']}&search_app_filters[{$this->request['search_app']}][{$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}][sortDir]=1", "public", ''), "", "") . "'>{$this->lang->words['s_search_type_o_1']}</a>\r\n\t\t\t\t\t</li>\r\n\t\t\t\t</ul>" : "" . (count($sortDropDown) ? "<span class='ipsType_small'>{$this->lang->words['sort_by']}</span> \r\n\t\t\t\t\t" . (count($sortDropDown) <= 4 ? "\r\n\t\t\t\t\t\t<ul class='ipsList_inline ipsType_smaller' style='display: inline'>\r\n\t\t\t\t\t\t\t" . $this->__f__90191214bcc58f2210cdebf11d9fbb1a($results, $pagination, $total, $member, $limited, $wasLimited, $beginTime, $sortIn, $sortDropDown) . "\t\t\t\t\t\t</ul>\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t" : "\r\n\t\t\t\t\t\t<ul class='ipsList_inline ipsType_smaller' style='display: inline'>\r\n\t\t\t\t\t\t\t<li class='active'>\r\n\t\t\t\t\t\t\t\t<a href='#' id='search_sort' class='ipbmenu'>{$sortDropDown[$this->request['search_app_filters'][$this->request['search_app']]['sortKey']]} <span class='submenu_indicator'></span> </a>\r\n\t\t\t\t\t\t\t</li>\r\n\t\t\t\t\t\t</ul>\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t") . "" : "") . "\r\n\t\t\t\t<span class='ipsType_small'>{$this->lang->words['order']}</span> \r\n\t\t\t\t<ul class='ipsList_inline ipsType_smaller' style='display: inline'>\r\n\t\t\t\t\t<li " . ($this->request['search_app_filters'][$this->request['search_app']]['sortDir'] == 0 ? "class='active'" : "") . ">\r\n\t\t\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=user_activity&sid={$this->request['_sid']}&mid={$this->request['mid']}&userMode={$this->request['userMode']}&search_app={$this->request['search_app']}&search_app_filters[{$this->request['search_app']}][searchInKey]={$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}&search_app_filters[{$this->request['search_app']}][sortKey]={$this->request['search_app_filters'][$this->request['search_app']]['sortKey']}&search_app_filters[{$this->request['search_app']}][sortDir]=0", "public", ''), "", "") . "'>{$this->lang->words['s_search_type_o_0']}</a>\r\n\t\t\t\t\t</li>\r\n\t\t\t\t\t<li " . ($this->request['search_app_filters'][$this->request['search_app']]['sortDir'] == 1 ? "class='active'" : "") . ">\r\n\t\t\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=user_activity&sid={$this->request['_sid']}&mid={$this->request['mid']}&userMode={$this->request['userMode']}&search_app={$this->request['search_app']}&search_app_filters[{$this->request['search_app']}][searchInKey]={$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}&search_app_filters[{$this->request['search_app']}][sortKey]={$this->request['search_app_filters'][$this->request['search_app']]['sortKey']}&search_app_filters[{$this->request['search_app']}][sortDir]=1", "public", ''), "", "") . "'>{$this->lang->words['s_search_type_o_1']}</a>\r\n\t\t\t\t\t</li>\r\n\t\t\t\t</ul>") . "\r\n\t\t</div>\r\n\t\t" . (count($sortDropDown) && count($sortDropDown) >= 5 ? "<!-- The menu for changing the sort field -->\r\n\t\t\t<ul id='search_sort_menucontent' class='ipbmenu_content with_checks' style='display: none'>\r\n\t\t\t\t" . ((IPSSearchRegistry::get('config.contentTypes') and is_array(IPSSearchRegistry::get('config.contentTypes'))) ? "" . $this->__f__26c2a382713ff87344e91e576fcde0a9($results, $pagination, $total, $member, $limited, $wasLimited, $beginTime, $sortIn, $sortDropDown) . "\t\t\t\t" : "" . $this->__f__6cfa2da867a794f27f0a6da4538c0b28($results, $pagination, $total, $member, $limited, $wasLimited, $beginTime, $sortIn, $sortDropDown) . "\t\t\t\t") . "\r\n\t\t\t</ul>" : "") . "\r\n\t\t<div>\r\n\t\t\t" . ($total ? "\r\n\t\t\t\t{$results}\r\n\t\t\t\t<br />\r\n\t\t\t\t{$pagination}\r\n\t\t\t" : "\r\n\t\t\t\t<p class='no_messages'>{$this->lang->words['user_posts_none']}</p>\r\n\t\t\t") . "\r\n\t\t</div>\r\n\t</div>\r\n</div>"; return $IPBHTML; }
/** * Perform the search * Populates $this->_count and $this->_results * * @return nothin' */ public function viewNewContent() { IPSSearchRegistry::set('opt.searchTitleOnly', true); IPSSearchRegistry::set('in.period_in_seconds', false); /* Hard fix mobile app users to VNC based on ACP default VNC method */ if ($this->member->isMobileApp) { IPSSearchRegistry::set('in.period', $this->settings['default_vnc_method']); } /* Do we have a period? */ switch (IPSSearchRegistry::get('in.period')) { case 'today': default: $date = 86400; // 24 hours break; case 'week': $date = 604800; // 1 week break; case 'weeks': $date = 1209600; // 2 weeks break; case 'month': $date = 2592000; // 30 days break; case 'months': $date = 15552000; // 6 months break; case 'year': $date = 31536000; // 365 days break; case 'lastvisit': $date = time() - intval($this->memberData['last_visit']); break; case 'unread': $date = false; break; } /* Set date up */ IPSSearchRegistry::set('in.period_in_seconds', $date); /* Run the search */ $results = $this->SEARCH->viewNewContent(); /* Set data */ $this->_count = intval($results['count']); $this->_results = $this->_rawResults = $results['resultSet']; /* Now format results */ if (count($this->_results)) { $this->_results = $this->_rawResults = $this->FORMAT->processResults($this->_results); /* Now generate HTML */ $this->_results = $this->FORMAT->parseAndFetchHtmlBlocks($this->_results); } }
/** * Remap standard columns (Apps can override ) * * @param string $column sql table column for this condition * @return string column * @return @e void */ public function remapColumn($column) { if (IPSSearchRegistry::get('members.searchInKey') == 'comments') { $column = $column == 'member_id' ? 'status_author_id' : ''; } return $column; }
/** * Return the output for the followed content results * * @param array $results Array of results to show * @param array $followData Meta data from follow/like system * @return @e string */ public function parseFollowedContentOutput($results, $followData) { /* Events? */ if (IPSSearchRegistry::get('in.followContentType') == 'events') { if (count($results)) { $_results = array(); $this->DB->build(array('select' => "c.*", 'from' => array('cal_events' => 'c'), 'where' => 'c.event_id IN(' . implode(',', $results) . ')', 'order' => 'c.event_start_date DESC', 'add_join' => array(array('select' => 'i.*', 'from' => array('permission_index' => 'i'), 'where' => "i.perm_type='calendar' AND i.perm_type_id=c.event_calendar_id", 'type' => 'left'), array('select' => 'mem.*', 'from' => array('members' => 'mem'), 'where' => "mem.member_id=c.event_member_id", 'type' => 'left')))); $this->DB->execute(); while ($r = $this->DB->fetch()) { $_results[$r['event_id']] = $this->genericizeResults($r); } /* Merge in follow data */ foreach ($followData as $_follow) { $_results[$_follow['like_rel_id']]['_followData'] = $_follow; } } return $this->registry->output->getTemplate('calendar')->calEventFollowedWrapper($this->parseAndFetchHtmlBlocks($_results)); } else { $calendars = array(); $member_ids = array(); if (count($results)) { /* Load calendars cache */ $_calCache = $this->cache->getCache('calendars'); /* Get calendar data */ foreach ($results as $result) { $calendars[$result] = $_calCache[$result]; } /* Merge in follow data */ foreach ($followData as $_follow) { $calendars[$_follow['like_rel_id']]['_followData'] = $_follow; } } return $this->registry->output->getTemplate('calendar')->followedContentCalendars($calendars); } }
/** * Perform the search * @param array $tags * @param array $options */ public function run(array $tags, array $options) { $where = array(); $order = !empty($options['sortKey']) ? $options['sortKey'] : 'tg.tag_meta_id'; $dir = !empty($options['sortOrder']) ? $options['sortOrder'] : 'desc'; $return = array(); /* Format query */ if (isset($options['meta_parent_id']) && (is_numeric($options['meta_parent_id']) || count($options['meta_parent_id']))) { $where[] = is_array($options['meta_parent_id']) && count($options['meta_parent_id']) ? 'tg.tag_meta_parent_id IN (' . implode(',', IPSLib::cleanIntArray($options['meta_parent_id'])) . ')' : 'tg.tag_meta_parent_id=' . intval($options['meta_parent_id']); } if (isset($options['meta_id']) && (is_numeric($options['meta_id']) || count($options['meta_id']))) { $where[] = is_array($options['meta_id']) && count($options['meta_id']) ? 'tg.tag_meta_id IN (' . implode(',', IPSLib::cleanIntArray($options['meta_id'])) . ')' : 'tg.tag_meta_id=' . intval($options['meta_id']); } if (isset($options['meta_app'])) { $where[] = is_array($options['meta_app']) && count($options['meta_app']) ? 'tg.tag_meta_app IN (\'' . implode("','", $options['meta_app']) . '\')' : 'tg.tag_meta_app=\'' . $options['meta_app'] . '\''; } if (isset($options['meta_area'])) { $where[] = is_array($options['meta_area']) && count($options['meta_area']) ? 'tg.tag_meta_area IN (\'' . implode("','", $options['meta_area']) . '\')' : 'tg.tag_meta_area=\'' . $options['meta_area'] . '\''; } if (!empty($options['not_meta_id'])) { $where[] = is_array($options['not_meta_id']) && count($options['not_meta_id']) ? 'tg.tag_meta_id NOT IN (' . implode(",", $options['not_meta_id']) . ')' : 'tg.tag_meta_id !=' . intval($options['not_meta_id']); } if (isset($tags)) { if (isset($options['match']) and $options['match'] == 'loose') { $_tags = is_array($tags) ? $tags : array($tags); $_t = array(); foreach ($_tags as $text) { $_t[] = ' tg.tag_text LIKE \'%' . $this->DB->addSlashes($text) . '%\''; } if (count($_t)) { $where[] = implode(" OR ", $_t); } } else { if (is_array($tags)) { $_t = $tags; $tags = array(); foreach ($_t as $t) { $tags[] = $this->DB->addSlashes($t); } } $where[] = is_array($tags) ? 'tg.tag_text IN (\'' . implode("','", $tags) . '\')' : 'tg.tag_text=\'' . $this->DB->addSlashes($tags) . '\''; } } $prefix = ips_DBRegistry::getPrefix(); /* Did we add in perm check? */ if (!empty($options['isViewable'])) { if ($options['joins']) { $select = array(); $join = ''; foreach ($options['joins'] as $j) { foreach ($j['from'] as $name => $ref) { $select[] = $j['select']; $join .= ' LEFT JOIN ' . $prefix . $name . ' ' . $ref; if ($j['where']) { $join .= ' ON (' . $j['where'] . ')'; } } } } if (count($select)) { $_select = ',' . implode(',', $select); } $options['limit'] = $options['limit'] > 0 && $options['limit'] < 5000 ? $options['limit'] : 250; /* we need to make an exception if filtering by date */ if (class_exists('IPSSearchRegistry') && (IPSSearchRegistry::get('in.search_date_start') || IPSSearchRegistry::get('in.search_date_end'))) { $options['limit'] = 10000000000.0; } $this->DB->allow_sub_select = true; $this->DB->query('SELECT tg.* ' . $_select . ' FROM ' . $prefix . 'core_tags tg ' . $join . ' WHERE ' . implode(' AND ', $where) . ' AND tg.tag_aai_lookup IN (' . 'SELECT tag_perm_aai_lookup FROM ' . $prefix . 'core_tags_perms WHERE ' . $this->DB->buildWherePermission($this->member->perm_id_array, 'tag_perm_text') . ' AND tag_perm_visible=1 ' . ') ORDER BY ' . $order . ' ' . $dir . ' LIMIT 0,' . $options['limit']); $this->DB->execute(); } else { if (is_array($options['joins'])) { $db = array('select' => 'tg.*', 'from' => array('core_tags' => 'tg'), 'where' => implode(' AND ', $where), 'add_join' => array($options['joins']), 'order' => $order . ' ' . $dir); } else { $db = array('select' => 'tg.*', 'from' => 'core_tags tg', 'where' => implode(' AND ', $where), 'order' => $order . ' ' . $dir); } if (!empty($options['limit']) || !empty($options['offset'])) { $db['limit'] = array(intval($options['offset']), intval($options['limit'])); } /* Fetch */ $this->DB->build($db); $this->DB->execute(); } /* Fetch data */ while ($row = $this->DB->fetch()) { $return[$row['tag_id']] = $row; } return $return; }
/** * Returns an array used in the searchplugin's setCondition method * * @param array $data Array of filters to apply * @return array Array with column, operator, and value keys, for use in the setCondition call */ public function buildFilterSQL($data) { /* INIT */ $return = array(); /* Set up some defaults */ IPSSearchRegistry::set('opt.noPostPreview', true); if (!IPSSearchRegistry::get('opt.searchType')) { IPSSearchRegistry::set('opt.searchType', 'both'); } if (isset($data) && is_array($data) && count($data)) { foreach ($data as $field => $_data) { /* CONTENT ONLY */ if ($field == 'noPreview' and $_data == 0) { IPSSearchRegistry::set('opt.noPostPreview', false); } /* POST COUNT */ if ($field == 'pCount' and intval($_data) > 0) { IPSSearchRegistry::set('opt.pCount', intval($_data)); } /* TOPIC VIEWS */ if ($field == 'pViews' and intval($_data) > 0) { IPSSearchRegistry::set('opt.pViews', intval($_data)); } } return $return; } else { return array(); } }
/** * Resets params for template */ protected function _resetRequestParameters() { $this->request['period'] = IPSSearchRegistry::get('in.period'); $this->request['real_period'] = IPSSearchRegistry::get('in.real_period'); $this->request['search_app'] = IPSSearchRegistry::get('in.search_app'); $this->request['vncFollowFilterOn'] = IPSSearchRegistry::get('in.vncFollowFilterOn'); $this->request['followedItemsOnly'] = IPSSearchRegistry::get('in.vncFollowFilterOn'); $this->request['userMode'] = IPSSearchRegistry::get('in.userMode'); }
/** * Perform the search * Populates $this->_count and $this->_results * * @access public * @return nothin' */ public function viewUserContent($member) { $app = IPSSearchRegistry::get('in.search_app'); IPSSearchRegistry::set('in.search_sort_by', 'date'); IPSSearchRegistry::set('in.search_sort_order', 'desc'); IPSSearchRegistry::set('opt.searchTitleOnly', IPSSearchRegistry::get('in.view_by_title')); IPSSearchRegistry::set('opt.noPostPreview', IPSSearchRegistry::get('in.view_by_title')); /* Set the member_id */ $this->setCondition('member_id', '=', $member['member_id']); /* Cut by date for efficiency? */ if ($this->settings['search_ucontent_days']) { $begin = ($member['last_post'] ? $member['last_post'] : time()) - 86400 * intval($this->settings['search_ucontent_days']); $this->setDateRange($begin, time()); } return $this->search(); }
function userPostsView($results, $pagination, $total, $member, $limited = 0, $wasLimited = false, $beginTime = 0, $sortIn = null, $sortDropDown = array()) { $IPBHTML = ""; if (IPSLib::locationHasHooks('skin_search', $this->_funcHooks['userPostsView'])) { $count_d54d5e8f51cc9513842711649cf00916 = is_array($this->functionData['userPostsView']) ? count($this->functionData['userPostsView']) : 0; $this->functionData['userPostsView'][$count_d54d5e8f51cc9513842711649cf00916]['results'] = $results; $this->functionData['userPostsView'][$count_d54d5e8f51cc9513842711649cf00916]['pagination'] = $pagination; $this->functionData['userPostsView'][$count_d54d5e8f51cc9513842711649cf00916]['total'] = $total; $this->functionData['userPostsView'][$count_d54d5e8f51cc9513842711649cf00916]['member'] = $member; $this->functionData['userPostsView'][$count_d54d5e8f51cc9513842711649cf00916]['limited'] = $limited; $this->functionData['userPostsView'][$count_d54d5e8f51cc9513842711649cf00916]['wasLimited'] = $wasLimited; $this->functionData['userPostsView'][$count_d54d5e8f51cc9513842711649cf00916]['beginTime'] = $beginTime; $this->functionData['userPostsView'][$count_d54d5e8f51cc9513842711649cf00916]['sortIn'] = $sortIn; $this->functionData['userPostsView'][$count_d54d5e8f51cc9513842711649cf00916]['sortDropDown'] = $sortDropDown; } $datecut = $this->settings['search_ucontent_days'] ? $this->registry->class_localization->getDate(time() - 86400 * intval($this->settings['search_ucontent_days']), 'joined') : 0; $IPBHTML .= "<h2 class='ipsType_pagetitle'>" . sprintf($this->lang->words['s_participation_title'], $member['members_display_name']) . "</h2>\r\n<input type='hidden' name=\"usedInJsLater\" id=\"urlString\" value=\"" . base64_encode($this->registry->output->buildUrl("app=core&module=search&do=user_activity&search_app={$this->request['search_app']}&mid={$this->request['mid']}&userMode={$this->request['userMode']}&sid={$this->request['_sid']}", "public")) . "\" />\r\n" . ($total ? "<p class='ipsType_pagedesc'>\r\n\t\t\t" . sprintf($this->lang->words['s_participation_msg'], $total, $member['members_display_name']) . "" . ($datecut ? "\r\n\t\t\t\t<span class='desc lighter'>" . sprintf($this->lang->words['s_participation_range'], $datecut) . "</span>\r\n\t\t\t" : "") . "\r\n\t\t</p>\r\n\t<br />" : "") . "\r\n<div class='ipsLayout ipsLayout_withleft clearfix'>\r\n\t<div class='ipsLayout_left'>\r\n\t\t<div class='ipsBox'>\r\n\t\t\t<div class='ipsBox_container ipsSideMenu'>\r\n\t\t\t\t<h4>{$this->lang->words['filter_by_app']}</h4>\r\n\t\t\t\t<ul>\r\n\t\t\t\t\t" . (IPSLib::appIsSearchable('forums', 'usercontent') ? "<li " . ($this->request['search_app'] == 'forums' ? "class='active'" : "") . "><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=user_activity&search_app=forums&mid={$this->request['mid']}&userMode={$this->request['userMode']}&sid={$this->request['_sid']}", "public", ''), "", "") . "'>" . IPSLib::getAppTitle('forums') . "</a></li>" : "") . "" . (IPSLib::appIsSearchable('members', 'usercontent') ? "<li " . ($this->request['search_app'] == 'members' ? "class='active'" : "") . "><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=user_activity&search_app=members&mid={$this->request['mid']}&userMode={$this->request['userMode']}&sid={$this->request['_sid']}", "public", ''), "", "") . "'>" . IPSLib::getAppTitle('members') . "</a></li>" : "") . "" . (IPSLib::appIsSearchable('core', 'usercontent') ? "<li " . ($this->request['search_app'] == 'core' ? "class='active'" : "") . "><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=user_activity&search_app=core&mid={$this->request['mid']}&userMode={$this->request['userMode']}&sid={$this->request['_sid']}", "public", ''), "", "") . "'>" . IPSLib::getAppTitle('core') . "</a></li>" : "") . "" . $this->__f__ec17275a92b09cb6a84ab01e97231b64($results, $pagination, $total, $member, $limited, $wasLimited, $beginTime, $sortIn, $sortDropDown) . "\t\t\t\t</ul>\r\n\t\t\t\t\r\n\t\t\t\t" . ($this->request['search_app'] == 'forums' ? "<h4>{$this->lang->words['userposts_morefilters']}</h4>\r\n\t\t\t\t\t<ul>\r\n\t\t\t\t\t\t<li " . ($this->request['userMode'] == 'all' ? "class='active'" : "") . "><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=user_activity&search_app={$this->request['search_app']}&mid={$this->request['mid']}&sid={$this->request['_sid']}&search_app_filters[{$this->request['search_app']}][searchInKey]={$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}&userMode=all", "public", ''), "", "") . "'>{$this->lang->words['viewall_opt_dd']}</a></li>\r\n\t\t\t\t\t\t<li " . ($this->request['userMode'] == 'title' ? "class='active'" : "") . "><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=user_activity&search_app={$this->request['search_app']}&mid={$this->request['mid']}&sid={$this->request['_sid']}&search_app_filters[{$this->request['search_app']}][searchInKey]={$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}&userMode=title", "public", ''), "", "") . "'>{$this->lang->words['viewallt_opt_dd']}</a></li>\r\n\t\t\t\t\t\t<li " . ($this->request['userMode'] == 'content' ? "class='active'" : "") . "><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=user_activity&search_app={$this->request['search_app']}&mid={$this->request['mid']}&sid={$this->request['_sid']}&search_app_filters[{$this->request['search_app']}][searchInKey]={$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}&userMode=content", "public", ''), "", "") . "'>{$this->lang->words['viewallp_opt_dd']}</a></li>\r\n\t\t\t\t\t</ul>" : "") . "" . ((is_array($sortIn) and count($sortIn)) ? "\r\n\t\t\t\t\t<h4>{$this->lang->words['filter_by_type']}</h4>\r\n\t\t\t\t\t<ul>\r\n\t\t\t\t\t\t" . $this->__f__5db3c93132f819a9b5d7ee647ca06135($results, $pagination, $total, $member, $limited, $wasLimited, $beginTime, $sortIn, $sortDropDown) . "\t\t\t\t\t</ul>\r\n\t\t\t\t" : "") . "\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n\t<div class='ipsLayout_content'>\r\n\t\t" . ($pagination ? "\r\n\t\t\t<div class='topic_controls'>\r\n\t\t\t\t{$pagination}\r\n\t\t\t</div>\r\n\t\t\t<br />\r\n\t\t" : "") . "\r\n\t\t<div class='maintitle ipsFilterbar'>\r\n\t\t\t" . ($this->memberData['g_is_supmod'] == 1 && IPSSearchRegistry::get('config.can_moderate_results') ? "\r\n\t\t\t\t<span class='right'>\r\n\t\t\t\t\t<input type='checkbox' id='tmod_all' class='input_check' title='{$this->lang->words['search_select_all']}' value='1' />\r\n\t\t\t\t</span>\r\n\t\t\t" : "") . "\r\n\t\t\t" . ((IPSSearchRegistry::get('config.contentTypes') and is_array(IPSSearchRegistry::get('config.contentTypes'))) ? "" . (count($sortDropDown) ? "<span class='ipsType_small'>{$this->lang->words['sort_by']}</span> \r\n\t\t\t\t\t" . (count($sortDropDown) <= 4 ? "\r\n\t\t\t\t\t\t<ul class='ipsList_inline ipsType_smaller' style='display: inline'>\r\n\t\t\t\t\t\t\t" . $this->__f__1145136b2a8990baf1b93e6e92f31f0c($results, $pagination, $total, $member, $limited, $wasLimited, $beginTime, $sortIn, $sortDropDown) . "\t\t\t\t\t\t</ul>\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t" : "\r\n\t\t\t\t\t\t<ul class='ipsList_inline ipsType_smaller' style='display: inline'>\r\n\t\t\t\t\t\t\t<li class='active'>\r\n\t\t\t\t\t\t\t\t<a href='#' id='search_sort' class='ipbmenu'>{$sortDropDown[$this->request['search_app_filters'][$this->request['search_app']][$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']]['sortKey']]} <span class='submenu_indicator'></span> </a>\r\n\t\t\t\t\t\t\t</li>\r\n\t\t\t\t\t\t</ul>\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t") . "" : "") . "\r\n\t\t\t\t<span class='ipsType_small'>{$this->lang->words['order']}</span> \r\n\t\t\t\t<ul class='ipsList_inline ipsType_smaller' style='display: inline'>\r\n\t\t\t\t\t<li " . ($this->request['search_app_filters'][$this->request['search_app']][$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']]['sortDir'] == 0 ? "class='active'" : "") . ">\r\n\t\t\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=user_activity&sid={$this->request['_sid']}&mid={$this->request['mid']}&userMode={$this->request['userMode']}&search_app={$this->request['search_app']}&search_app_filters[{$this->request['search_app']}][searchInKey]={$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}&search_app_filters[{$this->request['search_app']}][{$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}][sortKey]={$this->request['search_app_filters'][$this->request['search_app']][$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']]['sortKey']}&search_app_filters[{$this->request['search_app']}][{$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}][sortDir]=0", "public", ''), "", "") . "'>{$this->lang->words['s_search_type_o_0']}</a>\r\n\t\t\t\t\t</li>\r\n\t\t\t\t\t<li " . ($this->request['search_app_filters'][$this->request['search_app']][$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']]['sortDir'] == 1 ? "class='active'" : "") . ">\r\n\t\t\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=user_activity&sid={$this->request['_sid']}&mid={$this->request['mid']}&userMode={$this->request['userMode']}&search_app={$this->request['search_app']}&search_app_filters[{$this->request['search_app']}][searchInKey]={$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}&search_app_filters[{$this->request['search_app']}][{$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}][sortKey]={$this->request['search_app_filters'][$this->request['search_app']][$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']]['sortKey']}&search_app_filters[{$this->request['search_app']}][{$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}][sortDir]=1", "public", ''), "", "") . "'>{$this->lang->words['s_search_type_o_1']}</a>\r\n\t\t\t\t\t</li>\r\n\t\t\t\t</ul>" : "" . (count($sortDropDown) ? "<span class='ipsType_small'>{$this->lang->words['sort_by']}</span> \r\n\t\t\t\t\t" . (count($sortDropDown) <= 4 ? "\r\n\t\t\t\t\t\t<ul class='ipsList_inline ipsType_smaller' style='display: inline'>\r\n\t\t\t\t\t\t\t" . $this->__f__d342d49c33d769959f9e7c1885fae986($results, $pagination, $total, $member, $limited, $wasLimited, $beginTime, $sortIn, $sortDropDown) . "\t\t\t\t\t\t</ul>\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t" : "\r\n\t\t\t\t\t\t<ul class='ipsList_inline ipsType_smaller' style='display: inline'>\r\n\t\t\t\t\t\t\t<li class='active'>\r\n\t\t\t\t\t\t\t\t<a href='#' id='search_sort' class='ipbmenu'>{$sortDropDown[$this->request['search_app_filters'][$this->request['search_app']]['sortKey']]} <span class='submenu_indicator'></span> </a>\r\n\t\t\t\t\t\t\t</li>\r\n\t\t\t\t\t\t</ul>\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t") . "" : "") . "\r\n\t\t\t\t<span class='ipsType_small'>{$this->lang->words['order']}</span> \r\n\t\t\t\t<ul class='ipsList_inline ipsType_smaller' style='display: inline'>\r\n\t\t\t\t\t<li " . ($this->request['search_app_filters'][$this->request['search_app']]['sortDir'] == 0 ? "class='active'" : "") . ">\r\n\t\t\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=user_activity&sid={$this->request['_sid']}&mid={$this->request['mid']}&userMode={$this->request['userMode']}&search_app={$this->request['search_app']}&search_app_filters[{$this->request['search_app']}][searchInKey]={$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}&search_app_filters[{$this->request['search_app']}][sortKey]={$this->request['search_app_filters'][$this->request['search_app']]['sortKey']}&search_app_filters[{$this->request['search_app']}][sortDir]=0", "public", ''), "", "") . "'>{$this->lang->words['s_search_type_o_0']}</a>\r\n\t\t\t\t\t</li>\r\n\t\t\t\t\t<li " . ($this->request['search_app_filters'][$this->request['search_app']]['sortDir'] == 1 ? "class='active'" : "") . ">\r\n\t\t\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=user_activity&sid={$this->request['_sid']}&mid={$this->request['mid']}&userMode={$this->request['userMode']}&search_app={$this->request['search_app']}&search_app_filters[{$this->request['search_app']}][searchInKey]={$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}&search_app_filters[{$this->request['search_app']}][sortKey]={$this->request['search_app_filters'][$this->request['search_app']]['sortKey']}&search_app_filters[{$this->request['search_app']}][sortDir]=1", "public", ''), "", "") . "'>{$this->lang->words['s_search_type_o_1']}</a>\r\n\t\t\t\t\t</li>\r\n\t\t\t\t</ul>") . "\r\n\t\t</div>\r\n\t\t" . (count($sortDropDown) && count($sortDropDown) >= 5 ? "<!-- The menu for changing the sort field -->\r\n\t\t\t<ul id='search_sort_menucontent' class='ipbmenu_content with_checks' style='display: none'>\r\n\t\t\t\t" . ((IPSSearchRegistry::get('config.contentTypes') and is_array(IPSSearchRegistry::get('config.contentTypes'))) ? "" . $this->__f__cde6dde1cb3687ba329402c11ec7da90($results, $pagination, $total, $member, $limited, $wasLimited, $beginTime, $sortIn, $sortDropDown) . "\t\t\t\t" : "" . $this->__f__2a6ee401387d5c02b1032e7eb86401d1($results, $pagination, $total, $member, $limited, $wasLimited, $beginTime, $sortIn, $sortDropDown) . "\t\t\t\t") . "\r\n\t\t\t</ul>" : "") . "\r\n\t\t<div>\r\n\t\t\t" . ($total ? "\r\n\t\t\t\t{$results}\r\n\t\t\t\t<br />\r\n\t\t\t\t{$pagination}\r\n\t\t\t" : "\r\n\t\t\t\t<p class='no_messages'>{$this->lang->words['user_posts_none']}</p>\r\n\t\t\t") . "\r\n\t\t</div>\r\n\t</div>\r\n</div>"; return $IPBHTML; }
function newContentView($results, $pagination, $total, $sortDropDown, $sortIn, $dateCutSet = 0) { $IPBHTML = ""; if (IPSLib::locationHasHooks('skin_search', $this->_funcHooks['newContentView'])) { $count_9cebb2034f4a5b284fff2d1bb7e8674a = is_array($this->functionData['newContentView']) ? count($this->functionData['newContentView']) : 0; $this->functionData['newContentView'][$count_9cebb2034f4a5b284fff2d1bb7e8674a]['results'] = $results; $this->functionData['newContentView'][$count_9cebb2034f4a5b284fff2d1bb7e8674a]['pagination'] = $pagination; $this->functionData['newContentView'][$count_9cebb2034f4a5b284fff2d1bb7e8674a]['total'] = $total; $this->functionData['newContentView'][$count_9cebb2034f4a5b284fff2d1bb7e8674a]['sortDropDown'] = $sortDropDown; $this->functionData['newContentView'][$count_9cebb2034f4a5b284fff2d1bb7e8674a]['sortIn'] = $sortIn; $this->functionData['newContentView'][$count_9cebb2034f4a5b284fff2d1bb7e8674a]['dateCutSet'] = $dateCutSet; } $i = 2; if (is_array($sortIn) and count($sortIn)) { $i++; } if (IPSLib::appIsSearchable($this->request['search_app'], 'vncWithFollowFilter') and $this->memberData['member_id']) { $i++; } switch ($i) { case 3: $classname = 'three_'; break; case 4: $classname = 'four_'; break; default: $classname = 'two_'; break; } $IPBHTML .= "" . $this->registry->getClass('output')->addJSModule("search", "0") . "\n<input type='hidden' name=\"usedInJsLater\" id=\"urlString\" value=\"" . base64_encode($this->registry->output->buildUrl("app=core&module=search&do=viewNewContent&search_app={$this->request['search_app']}&sid={$this->request['_sid']}", "public")) . "\" />\n<h2>{$this->lang->words['new_content']}</h2>\t\n<div class='ipsFilterBar {$classname}filters clearfix' id='vnc_filters'>\n\t<ul>\n\t\t<li id='filter_app' class='filter'><a href='#'>{$this->lang->words['short_filter_by_app']}</a></li>\n\t\t" . ((is_array($sortIn) and count($sortIn)) ? "\n\t\t\t<li id='filter_section' class='filter'><a href='#'>{$this->lang->words['short_filter_by_section']}</a></li>\n\t\t" : "") . "\n\t\t<li id='filter_time' class='filter'><a href='#'>{$this->lang->words['short_filter_by_time']}</a></li>\n\t\t" . ((IPSLib::appIsSearchable($this->request['search_app'], 'vncWithFollowFilter') and $this->memberData['member_id']) ? "\n\t\t\t<li id='filter_other' class='filter'><a href='#'>{$this->lang->words['short_filter_by_other']}</a></li>\n\t\t" : "") . "\n\t</ul>\n</div>\n<div class='ipsFilterPane' id='filter_app_pane' style='display: none'>\n\t<a href='#' class='ipsFilterPane_close'><span>×</span></a>\n\t<div>\n\t\t<h4>{$this->lang->words['mobile_filter_by_app']}</h4>\n\t\t<ul>\n\t\t\t" . (IPSLib::appIsSearchable('forums', 'vnc') || IPSLib::appIsSearchable('forums', 'active') ? "<li " . ($this->request['search_app'] == 'forums' ? "class='active'" : "") . "><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=viewNewContent&search_app=forums&sid={$this->request['_sid']}&search_app_filters[{$this->request['search_app']}][searchInKey]={$this->request[$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']]}&period={$this->request['period']}&userMode={$this->request['userMode']}&followedItemsOnly={$this->request['followedItemsOnly']}", "public", ''), "", "") . "'>" . IPSLib::getAppTitle('forums') . "</a></li>" : "") . "" . (IPSLib::appIsSearchable('members', 'vnc') || IPSLib::appIsSearchable('members', 'active') ? "<li " . ($this->request['search_app'] == 'members' ? "class='active'" : "") . "><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=viewNewContent&search_app=members&sid={$this->request['_sid']}&search_app_filters[{$this->request['search_app']}][searchInKey]={$this->request[$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']]}&period={$this->request['period']}&userMode={$this->request['userMode']}&followedItemsOnly={$this->request['followedItemsOnly']}", "public", ''), "", "") . "'>" . IPSLib::getAppTitle('members') . "</a></li>" : "") . "" . (IPSLib::appIsSearchable('core', 'vnc') || IPSLib::appIsSearchable('core', 'active') ? "<li " . ($this->request['search_app'] == 'core' ? "class='active'" : "") . "><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=viewNewContent&search_app=core&sid={$this->request['_sid']}&search_app_filters[{$this->request['search_app']}][searchInKey]={$this->request[$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']]}&period={$this->request['period']}&userMode={$this->request['userMode']}&followedItemsOnly={$this->request['followedItemsOnly']}", "public", ''), "", "") . "'>" . IPSLib::getAppTitle('core') . "</a></li>" : "") . "" . $this->__f__cce9c5a027b81152216f0a92e9529b6c($results, $pagination, $total, $sortDropDown, $sortIn, $dateCutSet) . "\t\t</ul>\n\t</div>\n</div>\n" . ((is_array($sortIn) and count($sortIn)) ? "\n\t<div class='ipsFilterPane' id='filter_section_pane' style='display: none'>\n\t\t<a href='#' class='ipsFilterPane_close'><span>×</span></a>\n\t\t<div>\n\t\t\t<h4>{$this->lang->words['mobile_filter_by_section']}</h4>\n\t\t\t<ul>\n\t\t\t\t" . $this->__f__1e1a05b892726a838c93317eb54fbadd($results, $pagination, $total, $sortDropDown, $sortIn, $dateCutSet) . "\t\t\t</ul>\t\t\n\t\t</div>\n\t</div>\n" : "") . "\n<div class='ipsFilterPane' id='filter_time_pane' style='display: none'>\n\t<a href='#' class='ipsFilterPane_close'><span>×</span></a>\n\t<div>\n\t\t<h4>{$this->lang->words['mobile_filter_by_time']}</h4>\n\t\t<ul>\n\t\t\t" . ($this->memberData['member_id'] ? "" . (IPSLib::appIsSearchable(IPSSearchRegistry::get('in.search_app'), 'vncWithUnreadContent') ? "<li " . ($this->request['period'] == 'unread' ? "class='active'" : "") . ">\n\t\t\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=viewNewContent&search_app={$this->request['search_app']}&sid={$this->request['_sid']}&change=1&search_app_filters[{$this->request['search_app']}][searchInKey]={$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}&period=unread&userMode={$this->request['userMode']}&followedItemsOnly={$this->request['followedItemsOnly']}", "public", ''), "", "") . "'>{$this->lang->words['filter_not_read']}</a>\n\t\t\t\t\t</li>" : "") . "\n\t\t\t\t<li " . ($this->request['period'] == 'lastvisit' ? "class='active'" : "") . ">\n\t\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=viewNewContent&search_app={$this->request['search_app']}&sid={$this->request['_sid']}&change=1&search_app_filters[{$this->request['search_app']}][searchInKey]={$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}&period=lastvisit&userMode={$this->request['userMode']}&followedItemsOnly={$this->request['followedItemsOnly']}", "public", ''), "", "") . "'>{$this->lang->words['filter_new_visit']}</a>\n\t\t\t\t</li>" : "") . "\n\t\t\t<li " . ($this->request['period'] == 'today' ? "class='active'" : "") . ">\n\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=viewNewContent&search_app={$this->request['search_app']}&sid={$this->request['_sid']}&change=1&search_app_filters[{$this->request['search_app']}][searchInKey]={$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}&period=today&userMode={$this->request['userMode']}&followedItemsOnly={$this->request['followedItemsOnly']}", "public", ''), "", "") . "'>{$this->lang->words['actperiod_today']}</a>\n\t\t\t</li>\n\t\t\t<li " . ($this->request['period'] == 'week' ? "class='active'" : "") . ">\n\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=viewNewContent&search_app={$this->request['search_app']}&sid={$this->request['_sid']}&change=1&search_app_filters[{$this->request['search_app']}][searchInKey]={$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}&period=week&userMode={$this->request['userMode']}&followedItemsOnly={$this->request['followedItemsOnly']}", "public", ''), "", "") . "'>{$this->lang->words['actperiod_week']}</a>\n\t\t\t</li>\n\t\t\t<li " . ($this->request['period'] == 'weeks' ? "class='active'" : "") . ">\n\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=viewNewContent&search_app={$this->request['search_app']}&sid={$this->request['_sid']}&change=1&search_app_filters[{$this->request['search_app']}][searchInKey]={$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}&period=weeks&userMode={$this->request['userMode']}&followedItemsOnly={$this->request['followedItemsOnly']}", "public", ''), "", "") . "'>{$this->lang->words['actperiod_weeks']}</a>\n\t\t\t</li>\n\t\t\t<li " . ($this->request['period'] == 'month' ? "class='active'" : "") . ">\n\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=viewNewContent&search_app={$this->request['search_app']}&sid={$this->request['_sid']}&change=1&search_app_filters[{$this->request['search_app']}][searchInKey]={$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}&period=month&userMode={$this->request['userMode']}&followedItemsOnly={$this->request['followedItemsOnly']}", "public", ''), "", "") . "'>{$this->lang->words['actperiod_month']}</a>\n\t\t\t</li>\n\t\t\t<li " . ($this->request['period'] == 'months' ? "class='active'" : "") . ">\n\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=viewNewContent&search_app={$this->request['search_app']}&sid={$this->request['_sid']}&change=1&search_app_filters[{$this->request['search_app']}][searchInKey]={$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}&period=months&userMode={$this->request['userMode']}&followedItemsOnly={$this->request['followedItemsOnly']}", "public", ''), "", "") . "'>{$this->lang->words['actperiod_months']}</a>\n\t\t\t</li>\n\t\t\t<li " . ($this->request['period'] == 'year' ? "class='active'" : "") . ">\n\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=viewNewContent&search_app={$this->request['search_app']}&sid={$this->request['_sid']}&change=1&search_app_filters[{$this->request['search_app']}][searchInKey]={$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}&period=year&userMode={$this->request['userMode']}&followedItemsOnly={$this->request['followedItemsOnly']}", "public", ''), "", "") . "'>{$this->lang->words['actperiod_year']}</a>\n\t\t\t</li>\n\t\t</ul>\n\t</div>\n</div>\n<div class='ipsFilterPane' id='filter_other_pane' style='display: none'>\n\t<a href='#' class='ipsFilterPane_close'><span>×</span></a>\n\t<div>\n\t\t<h4>{$this->lang->words['mobile_filter_by_other']}</h4>\n\t\t<ul>\n\t\t\t" . ($this->request['followedItemsOnly'] ? "\n\t\t\t\t<li class=\"active\">\n\t\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=viewNewContent&search_app={$this->request['search_app']}&sid={$this->request['_sid']}&change=1&search_app_filters[{$this->request['search_app']}][searchInKey]={$this->request[$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']]}&period={$this->request['period']}&userMode={$this->request['userMode']}&followedItemsOnly=0", "public", ''), "", "") . "'>{$this->lang->words['filter_i_follow']}</a>\n\t\t\t\t</li>\n\t\t\t" : "\n\t\t\t\t<li>\n\t\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=viewNewContent&search_app={$this->request['search_app']}&sid={$this->request['_sid']}&change=1&search_app_filters[{$this->request['search_app']}][searchInKey]={$this->request[$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']]}&period={$this->request['period']}&userMode={$this->request['userMode']}&followedItemsOnly=1", "public", ''), "", "") . "'>{$this->lang->words['filter_i_follow']}</a>\n\t\t\t\t</li>\n\t\t\t") . "\n\t\t\t<li " . ($this->request['userMode'] == 'all' ? "class='active'" : "") . "><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=viewNewContent&search_app={$this->request['search_app']}&sid={$this->request['_sid']}&change=1&search_app_filters[{$this->request['search_app']}][searchInKey]={$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}&period={$this->request['period']}&followedItemsOnly={$this->request['followedItemsOnly']}&userMode=" . ($this->request['userMode'] != 'all' ? "all" : "") . "", "public", ''), "", "") . "'>{$this->lang->words['vnc_topics_and_posts']}</a></li>\n\t\t\t<li " . ($this->request['userMode'] == 'title' ? "class='active'" : "") . "><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=viewNewContent&search_app={$this->request['search_app']}&sid={$this->request['_sid']}&change=1&search_app_filters[{$this->request['search_app']}][searchInKey]={$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}&period={$this->request['period']}&followedItemsOnly={$this->request['followedItemsOnly']}&userMode=" . ($this->request['userMode'] != 'title' ? "title" : "") . "", "public", ''), "", "") . "'>{$this->lang->words['vnc_topics_only']}</a></li>\n\t\t\t<!--" . ($this->request['search_app'] == 'forums' ? "<li " . (IPSSearchRegistry::get('forums.vncForumFilters') != null ? "class='active'" : "") . "><a href='' id='vncForumFilter'>{$this->lang->words['vnc_filter_by_forum']}</a></li>" : "") . "-->\n\t\t</ul>\n\t</div>\n</div>\n\t\t\n" . ($total ? "<div class='master_list'>\n\t\t{$results}\n\t</div>\n\t" . ($pagination ? "\n\t\t<div class='controls'>\n\t\t\t<div class='buttons'>\n\t\t\t\t{$pagination}\n\t\t\t</div>\n\t\t</div>\n\t" : "") . "" : "\n\t<p class='no_messages'>{$this->lang->words['new_content_none']}</p>\n") . "\n<script type='text/javascript'>\n\t\$('vnc_filters').on(\"click\", \"li.filter\", mobileFilter);\n\t\$('ipboard_body').on(\"click\", \".ipsFilterPane_close\", closePane);\n</script>"; return $IPBHTML; }
function userPostsView($results, $pagination, $total, $member, $limited = 0, $wasLimited = false, $beginTime = 0, $sortIn = null, $sortDropDown = array()) { $IPBHTML = ""; if (IPSLib::locationHasHooks('skin_search', $this->_funcHooks['userPostsView'])) { $count_af8c17a1a6d84ce1ec762993aeaa5560 = is_array($this->functionData['userPostsView']) ? count($this->functionData['userPostsView']) : 0; $this->functionData['userPostsView'][$count_af8c17a1a6d84ce1ec762993aeaa5560]['results'] = $results; $this->functionData['userPostsView'][$count_af8c17a1a6d84ce1ec762993aeaa5560]['pagination'] = $pagination; $this->functionData['userPostsView'][$count_af8c17a1a6d84ce1ec762993aeaa5560]['total'] = $total; $this->functionData['userPostsView'][$count_af8c17a1a6d84ce1ec762993aeaa5560]['member'] = $member; $this->functionData['userPostsView'][$count_af8c17a1a6d84ce1ec762993aeaa5560]['limited'] = $limited; $this->functionData['userPostsView'][$count_af8c17a1a6d84ce1ec762993aeaa5560]['wasLimited'] = $wasLimited; $this->functionData['userPostsView'][$count_af8c17a1a6d84ce1ec762993aeaa5560]['beginTime'] = $beginTime; $this->functionData['userPostsView'][$count_af8c17a1a6d84ce1ec762993aeaa5560]['sortIn'] = $sortIn; $this->functionData['userPostsView'][$count_af8c17a1a6d84ce1ec762993aeaa5560]['sortDropDown'] = $sortDropDown; } $datecut = $this->settings['search_ucontent_days'] ? $this->registry->class_localization->getDate(time() - 86400 * intval($this->settings['search_ucontent_days']), 'joined') : 0; $IPBHTML .= "<div class='ipbfs_titlebox'>\n<h2 class='ipsType_pagetitle'>" . sprintf($this->lang->words['s_participation_title'], $member['members_display_name']) . "</h2>\n<input type='hidden' name=\"usedInJsLater\" id=\"urlString\" value=\"" . base64_encode($this->registry->output->buildUrl("app=core&module=search&do=user_activity&search_app={$this->request['search_app']}&mid={$this->request['mid']}&userMode={$this->request['userMode']}&sid={$this->request['_sid']}", "public")) . "\" />\n" . ($total ? "<p class='ipsType_pagedesc'>\n\t\t\t" . sprintf($this->lang->words['s_participation_msg'], $total, $member['members_display_name']) . "" . ($datecut ? "\n\t\t\t\t<span class='desc lighter'>" . sprintf($this->lang->words['s_participation_range'], $datecut) . "</span>\n\t\t\t" : "") . "\n\t\t</p>" : "") . "\n</div><br />\n<div class='ipsLayout ipsLayout_withleft clearfix'>\n\t<div class='ipsLayout_left'>\n\t\t<div class='ipsBox'>\n\t\t\t<div class='ipsBox_container ipsSideMenu'>\n\t\t\t\t<h4>{$this->lang->words['filter_by_app']}</h4>\n\t\t\t\t<ul>\n\t\t\t\t\t" . (IPSLib::appIsSearchable('forums', 'usercontent') ? "<li " . ($this->request['search_app'] == 'forums' ? "class='active'" : "") . "><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=user_activity&search_app=forums&mid={$this->request['mid']}&userMode={$this->request['userMode']}&sid={$this->request['_sid']}", "public", ''), "", "") . "'>" . IPSLib::getAppTitle('forums') . "</a></li>" : "") . "" . (IPSLib::appIsSearchable('members', 'usercontent') ? "<li " . ($this->request['search_app'] == 'members' ? "class='active'" : "") . "><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=user_activity&search_app=members&mid={$this->request['mid']}&userMode={$this->request['userMode']}&sid={$this->request['_sid']}", "public", ''), "", "") . "'>" . IPSLib::getAppTitle('members') . "</a></li>" : "") . "" . (IPSLib::appIsSearchable('core', 'usercontent') ? "<li " . ($this->request['search_app'] == 'core' ? "class='active'" : "") . "><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=user_activity&search_app=core&mid={$this->request['mid']}&userMode={$this->request['userMode']}&sid={$this->request['_sid']}", "public", ''), "", "") . "'>" . IPSLib::getAppTitle('core') . "</a></li>" : "") . "" . $this->__f__2ecb82d9d4c202ef21072a4e4deaa3f6($results, $pagination, $total, $member, $limited, $wasLimited, $beginTime, $sortIn, $sortDropDown) . "\t\t\t\t</ul>\n\t\t\t\t\n\t\t\t\t" . ($this->request['search_app'] == 'forums' ? "<h4>{$this->lang->words['userposts_morefilters']}</h4>\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<li " . ($this->request['userMode'] == 'all' ? "class='active'" : "") . "><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=user_activity&search_app={$this->request['search_app']}&mid={$this->request['mid']}&sid={$this->request['_sid']}&search_app_filters[{$this->request['search_app']}][searchInKey]={$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}&userMode=all", "public", ''), "", "") . "'>{$this->lang->words['viewall_opt_dd']}</a></li>\n\t\t\t\t\t\t<li " . ($this->request['userMode'] == 'title' ? "class='active'" : "") . "><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=user_activity&search_app={$this->request['search_app']}&mid={$this->request['mid']}&sid={$this->request['_sid']}&search_app_filters[{$this->request['search_app']}][searchInKey]={$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}&userMode=title", "public", ''), "", "") . "'>{$this->lang->words['viewallt_opt_dd']}</a></li>\n\t\t\t\t\t\t<li " . ($this->request['userMode'] == 'content' ? "class='active'" : "") . "><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=user_activity&search_app={$this->request['search_app']}&mid={$this->request['mid']}&sid={$this->request['_sid']}&search_app_filters[{$this->request['search_app']}][searchInKey]={$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}&userMode=content", "public", ''), "", "") . "'>{$this->lang->words['viewallp_opt_dd']}</a></li>\n\t\t\t\t\t</ul>" : "") . "" . ((is_array($sortIn) and count($sortIn)) ? "\n\t\t\t\t\t<h4>{$this->lang->words['filter_by_type']}</h4>\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t" . $this->__f__4e071255a5116a6aecbc97999862973d($results, $pagination, $total, $member, $limited, $wasLimited, $beginTime, $sortIn, $sortDropDown) . "\t\t\t\t\t</ul>\n\t\t\t\t" : "") . "\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<div class='ipsLayout_content'>\n\t\t" . ($pagination ? "\n\t\t\t<div class='topic_controls'>\n\t\t\t\t{$pagination}\n\t\t\t</div>\n\t\t\t<br />\n\t\t" : "") . "" . $this->registry->getClass('output')->getReplacement("header_start") . "<div class='maintitle ipsFilterbar'>\n " . ($this->memberData['g_is_supmod'] == 1 && IPSSearchRegistry::get('config.can_moderate_results') ? "\n <span class='right'>\n <input type='checkbox' id='tmod_all' class='input_check' title='{$this->lang->words['search_select_all']}' value='1' />\n </span>\n " : "") . "\n\t\t\t" . ((IPSSearchRegistry::get('config.contentTypes') and is_array(IPSSearchRegistry::get('config.contentTypes'))) ? "" . (count($sortDropDown) ? "<span class='ipsType_small'>{$this->lang->words['sort_by']}</span> \n\t\t\t\t\t" . (count($sortDropDown) <= 4 ? "\n\t\t\t\t\t\t<ul class='ipsList_inline ipsType_smaller' style='display: inline'>\n\t\t\t\t\t\t\t" . $this->__f__b7419a4e9004225d24422647a5280fc2($results, $pagination, $total, $member, $limited, $wasLimited, $beginTime, $sortIn, $sortDropDown) . "\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t \n\t\t\t\t\t" : "\n\t\t\t\t\t\t<ul class='ipsList_inline ipsType_smaller' style='display: inline'>\n\t\t\t\t\t\t\t<li class='active'>\n\t\t\t\t\t\t\t\t<a href='#' id='search_sort' class='ipbmenu'>{$sortDropDown[$this->request['search_app_filters'][$this->request['search_app']][$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']]['sortKey']]} <span class='submenu_indicator'></span> </a>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t \n\t\t\t\t\t") . "" : "") . "\n\t\t\t\t<span class='ipsType_small'>{$this->lang->words['order']}</span> \n\t\t\t\t<ul class='ipsList_inline ipsType_smaller' style='display: inline'>\n\t\t\t\t\t<li " . ($this->request['search_app_filters'][$this->request['search_app']][$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']]['sortDir'] == 0 ? "class='active'" : "") . ">\n\t\t\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=user_activity&sid={$this->request['_sid']}&mid={$this->request['mid']}&userMode={$this->request['userMode']}&search_app={$this->request['search_app']}&search_app_filters[{$this->request['search_app']}][searchInKey]={$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}&search_app_filters[{$this->request['search_app']}][{$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}][sortKey]={$this->request['search_app_filters'][$this->request['search_app']][$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']]['sortKey']}&search_app_filters[{$this->request['search_app']}][{$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}][sortDir]=0", "public", ''), "", "") . "'>{$this->lang->words['s_search_type_o_0']}</a>\n\t\t\t\t\t</li>\n\t\t\t\t\t<li " . ($this->request['search_app_filters'][$this->request['search_app']][$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']]['sortDir'] == 1 ? "class='active'" : "") . ">\n\t\t\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=user_activity&sid={$this->request['_sid']}&mid={$this->request['mid']}&userMode={$this->request['userMode']}&search_app={$this->request['search_app']}&search_app_filters[{$this->request['search_app']}][searchInKey]={$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}&search_app_filters[{$this->request['search_app']}][{$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}][sortKey]={$this->request['search_app_filters'][$this->request['search_app']][$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']]['sortKey']}&search_app_filters[{$this->request['search_app']}][{$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}][sortDir]=1", "public", ''), "", "") . "'>{$this->lang->words['s_search_type_o_1']}</a>\n\t\t\t\t\t</li>\n\t\t\t\t</ul>" : "" . (count($sortDropDown) ? "<span class='ipsType_small'>{$this->lang->words['sort_by']}</span> \n\t\t\t\t\t" . (count($sortDropDown) <= 4 ? "\n\t\t\t\t\t\t<ul class='ipsList_inline ipsType_smaller' style='display: inline'>\n\t\t\t\t\t\t\t" . $this->__f__d56ad4bcf6177f483e63895704da71cb($results, $pagination, $total, $member, $limited, $wasLimited, $beginTime, $sortIn, $sortDropDown) . "\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t \n\t\t\t\t\t" : "\n\t\t\t\t\t\t<ul class='ipsList_inline ipsType_smaller' style='display: inline'>\n\t\t\t\t\t\t\t<li class='active'>\n\t\t\t\t\t\t\t\t<a href='#' id='search_sort' class='ipbmenu'>{$sortDropDown[$this->request['search_app_filters'][$this->request['search_app']]['sortKey']]} <span class='submenu_indicator'></span> </a>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t \n\t\t\t\t\t") . "" : "") . "\n\t\t\t\t<span class='ipsType_small'>{$this->lang->words['order']}</span> \n\t\t\t\t<ul class='ipsList_inline ipsType_smaller' style='display: inline'>\n\t\t\t\t\t<li " . ($this->request['search_app_filters'][$this->request['search_app']]['sortDir'] == 0 ? "class='active'" : "") . ">\n\t\t\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=user_activity&sid={$this->request['_sid']}&mid={$this->request['mid']}&userMode={$this->request['userMode']}&search_app={$this->request['search_app']}&search_app_filters[{$this->request['search_app']}][searchInKey]={$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}&search_app_filters[{$this->request['search_app']}][sortKey]={$this->request['search_app_filters'][$this->request['search_app']]['sortKey']}&search_app_filters[{$this->request['search_app']}][sortDir]=0", "public", ''), "", "") . "'>{$this->lang->words['s_search_type_o_0']}</a>\n\t\t\t\t\t</li>\n\t\t\t\t\t<li " . ($this->request['search_app_filters'][$this->request['search_app']]['sortDir'] == 1 ? "class='active'" : "") . ">\n\t\t\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=user_activity&sid={$this->request['_sid']}&mid={$this->request['mid']}&userMode={$this->request['userMode']}&search_app={$this->request['search_app']}&search_app_filters[{$this->request['search_app']}][searchInKey]={$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}&search_app_filters[{$this->request['search_app']}][sortKey]={$this->request['search_app_filters'][$this->request['search_app']]['sortKey']}&search_app_filters[{$this->request['search_app']}][sortDir]=1", "public", ''), "", "") . "'>{$this->lang->words['s_search_type_o_1']}</a>\n\t\t\t\t\t</li>\n\t\t\t\t</ul>") . "\n\t\t</div>" . $this->registry->getClass('output')->getReplacement("header_end") . "" . (count($sortDropDown) && count($sortDropDown) >= 5 ? "<!-- The menu for changing the sort field -->\n\t\t\t<ul id='search_sort_menucontent' class='ipbmenu_content with_checks' style='display: none'>\n\t\t\t\t" . ((IPSSearchRegistry::get('config.contentTypes') and is_array(IPSSearchRegistry::get('config.contentTypes'))) ? "" . $this->__f__dc3c0bd502da5ddde588858ad6eae8b8($results, $pagination, $total, $member, $limited, $wasLimited, $beginTime, $sortIn, $sortDropDown) . "\t\t\t\t" : "" . $this->__f__70e29a44ee816e1345054fe210f8b17b($results, $pagination, $total, $member, $limited, $wasLimited, $beginTime, $sortIn, $sortDropDown) . "\t\t\t\t") . "\n\t\t\t</ul>" : "") . "\n\t\t<div class='row1'>\n\t\t\t" . ($total ? "\n\t\t\t\t{$results}\n\t\t\t" : "\n\t\t\t\t<p class='no_messages'>{$this->lang->words['user_posts_none']}</p>\n\t\t\t") . "\n\t\t</div>\n" . $this->registry->getClass('output')->getReplacement("box_end") . "\n\n" . ($total ? "<div class='topic_controls'>{$pagination}</div>" : "") . "\n\n\t</div>\n</div>"; return $IPBHTML; }