本文整理汇总了PHP中BxTemplVotingView::getVotedItems方法的典型用法代码示例。如果您正苦于以下问题:PHP BxTemplVotingView::getVotedItems方法的具体用法?PHP BxTemplVotingView::getVotedItems怎么用?PHP BxTemplVotingView::getVotedItems使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BxTemplVotingView
的用法示例。
在下文中一共展示了BxTemplVotingView::getVotedItems方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: BxSitesSearchResult
//.........这里部分代码省略.........
case 'popular':
$this->aCurrent['sorting'] = 'popular';
$this->aCurrent['title'] = _t('_bx_sites_caption_browse_popular');
$this->sSitesBrowseUrl = 'browse/popular';
break;
case 'search':
if ($sValue) {
$this->aCurrent['restriction']['keyword'] = array('value' => $sValue, 'field' => '', 'operator' => 'against');
}
$this->aCurrent['title'] = _t('_bx_sites_caption_search_results') . ' ' . $sValue;
$this->sSitesBrowseUrl = 'browse/search/' . $sValue;
unset($this->aCurrent['rss']);
break;
case 'admin':
$this->aCurrent['join'] = array('profile' => array('type' => 'left', 'table' => 'Profiles', 'mainField' => 'ownerid', 'onField' => 'ID', 'joinFields' => array('Role')));
$this->aCurrent['restriction'] = array('admin' => array('value' => '3', 'field' => 'Role', 'operator' => '=', 'table' => 'Profiles'));
$this->aCurrent['title'] = _t('_bx_sites_caption_browse_admin');
$this->sSitesBrowseUrl = 'browse/admin';
break;
case 'users':
$this->aCurrent['join'] = array('profile' => array('type' => 'left', 'table' => 'Profiles', 'mainField' => 'ownerid', 'onField' => 'ID', 'joinFields' => array('Role')));
$this->aCurrent['restriction']['role'] = array('value' => '3', 'field' => 'Role', 'operator' => '<>', 'table' => 'Profiles');
$this->aCurrent['title'] = _t('_bx_sites_caption_browse_profile');
$this->sSitesBrowseUrl = 'browse/profile';
break;
case 'calendar':
$this->aCurrent['restriction']['calendar-min'] = array('value' => "UNIX_TIMESTAMP('{$sValue}-{$sValue2}-{$sValue3} 00:00:00')", 'field' => 'date', 'operator' => '>=', 'no_quote_value' => true);
$this->aCurrent['restriction']['calendar-max'] = array('value' => "UNIX_TIMESTAMP('{$sValue}-{$sValue2}-{$sValue3} 23:59:59')", 'field' => 'date', 'operator' => '<=', 'no_quote_value' => true);
$this->sSitesBrowseUrl = "browse/calendar/{$sValue}/{$sValue2}/{$sValue3}";
$this->aCurrent['title'] = _t('_bx_sites_caption_browse_by_day') . getLocaleDate(strtotime("{$sValue}-{$sValue2}-{$sValue3}"), BX_DOL_LOCALE_DATE_SHORT);
$GLOBALS['oTopMenu']->setCustomSubHeader($this->aCurrent['title']);
break;
case 'hon_rate':
$ip = getVisitorIP();
$aVotedItems = $oVotingView->getVotedItems($ip);
$aList = array();
$sPrefix = $oVotingView->_aSystem['row_prefix'] . 'id';
foreach ($aVotedItems as $iKey => $aVal) {
$aList[$iKey] = $aVal[$sPrefix];
}
$this->aCurrent['restriction']['public']['value'] = BX_DOL_PG_ALL;
$this->aCurrent['paginate']['perPage'] = 1;
$this->aCurrent['sorting'] = 'rand';
$this->aCurrent['restriction']['id'] = array('value' => $aList, 'field' => 'id', 'operator' => 'not in');
break;
case 'hon_prev_rate':
$this->aCurrent['join']['rateTrack'] = array('type' => 'inner', 'table' => 'bx_sites_rating_track', 'mainField' => 'id', 'onField' => 'sites_id', 'joinFields' => array('sites_ip', 'sites_date'));
$this->aCurrent['paginate']['perPage'] = 1;
$this->aCurrent['sorting'] = 'sites_date';
$sIp = getVisitorIP();
$this->aCurrent['restriction']['ip'] = array('value' => $sIp, 'field' => 'sites_ip', 'table' => 'bx_sites_rating_track', 'operator' => '=');
break;
case 'index':
$this->sSitesBrowseUrl = 'index';
$this->sSitesBrowseAll = 'browse/all';
$this->aCurrent['paginate']['perPage'] = 3;
$this->aCurrent['restriction']['public']['value'] = BX_DOL_PG_ALL;
break;
case 'profile':
if ($sValue) {
$iProfileId = $this->_oMain->_oDb->getProfileIdByNickName(process_db_input($sValue));
if ($iProfileId) {
$this->aCurrent['restriction']['owner'] = array('value' => $iProfileId, 'field' => 'ownerid', 'operator' => '=');
$this->sSitesBrowseUrl = 'profile/' . $sValue;
$this->sSitesBrowseAll = 'browse/user/' . $sValue;
$this->aCurrent['paginate']['perPage'] = 3;
$this->aCurrent['restriction']['public']['value'] = BX_DOL_PG_ALL;
} else {
$this->isError = true;
}
} else {
$this->isError = true;
}
break;
case 'home':
$this->sSitesBrowseUrl = 'browse/home';
$this->sSitesBrowseAll = 'browse/all';
$this->aCurrent['paginate']['perPage'] = 5;
$this->aCurrent['restriction']['public']['value'] = BX_DOL_PG_ALL;
break;
case '':
$this->sSitesBrowseUrl = 'browse/';
$this->aCurrent['title'] = _t('_bx_sites');
unset($this->aCurrent['rss']);
break;
default:
$this->isError = true;
}
if (!$this->isError) {
if (isset($this->aCurrent['rss'])) {
$this->aCurrent['rss']['link'] = BX_DOL_URL_ROOT . $this->_oMain->_oConfig->getBaseUri() . $this->sSitesBrowseUrl;
}
if (bx_get('rss') !== false && bx_get('rss')) {
$this->aCurrent['ownFields'][] = 'description';
$this->aCurrent['ownFields'][] = 'date';
$this->aCurrent['paginate']['perPage'] = $this->_oMain->_oDb->getParam('bx_sites_max_rss_num');
}
}
parent::BxTemplSearchResult();
}