本文整理匯總了PHP中Model_Ad::getAdListAllHome方法的典型用法代碼示例。如果您正苦於以下問題:PHP Model_Ad::getAdListAllHome方法的具體用法?PHP Model_Ad::getAdListAllHome怎麽用?PHP Model_Ad::getAdListAllHome使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Model_Ad
的用法示例。
在下文中一共展示了Model_Ad::getAdListAllHome方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: indexAction
public function indexAction()
{
$this->_helper->layout()->setLayout('home');
$this->view->suggestIP = $this->_helper->getLocationGeoIP->suggest();
//check if user is locked
$locked = $this->_helper->checkLockedUser->check();
if ($locked == 1) {
$this->_redirect('/' . $this->view->lang . '/auth/logout');
}
//if user is logged the redir to proper location, if not stand on not logged home view (index)
$auth = Zend_Auth::getInstance();
if ($auth->hasIdentity()) {
$this->_redirect('/' . $this->view->lang . '/woeid/' . $this->location . '/give');
}
//check if request is / redir to /lang
$langIndex = $this->getRequest()->getParam('language');
if ($langIndex == null) {
//add meta robots to not index the page without language param but allow follow-crawl all the rest
//$this->view->metaRobots = 'noindex,follow';
//force redirect with language
$this->_redirect('/es', array('code' => 301));
} else {
$this->view->metaRobots = 'index,follow';
}
//add link rel canonical , better seo
$this->view->canonicalUrl = 'http://' . $_SERVER['HTTP_HOST'] . '/' . $this->lang;
$modelAd = new Model_Ad();
$this->view->allGives = $modelAd->getAdListAllHome(1, null);
$this->view->rankingWoeid = $modelAd->getRankingWoeid($limit = 40);
$this->view->rankingUsers = $modelAd->getRankingUsers($limit = 80);
//add meta description to head
$this->view->metaDescription = $this->view->translate('nolotiro.org is a website where you can give away things you no longer want or no longer need to pick them up other people who may serve or be of much use.');
}