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


PHP Model_Ad::getRankingUsers方法代碼示例

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


在下文中一共展示了Model_Ad::getRankingUsers方法的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.');
 }
開發者ID:Arteaga2k,項目名稱:nolotiro,代碼行數:33,代碼來源:IndexController.php


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