public function init() { $initRes = parent::init(); $this->setLayout('frontend'); $this->addBlock('FOOTER_TOOLBAR', 'toolbar', 'block/toolbar'); $this->addBlock('CATEGORY_BOX', 'boxCategory', 'block/box/category'); $this->addBlock('ROOT_CATEGORIES', 'boxRootCategory', 'block/box/rootCategory'); $this->addBlock('DYNAMIC_CATEGORIES', 'dynamicCategoryMenu', 'block/box/dynamicCategory'); $this->addBlock('SALE_ITEMS', 'saleItems', 'block/box/saleItems'); $this->addBlock('NEWEST_PRODUCTS', 'newestProducts', 'block/box/newestProducts'); $this->addBlock('BESTSELLING_PRODUCTS', 'bestsellingProducts', 'block/box/bestsellingProducts'); $this->addBlock('BREADCRUMB', 'boxBreadCrumb', 'block/box/breadcrumb'); $this->addBlock('BREADCRUMB_TITLE', 'boxBreadCrumbTitle', 'block/box/breadcrumbTitle'); $this->addBlock('LANGUAGE', 'boxLanguageSelect', 'block/box/language'); $this->addBlock('CURRENCY', 'boxSwitchCurrency', 'block/box/currency'); $this->addBlock('CURRENCY_MENU', 'boxSwitchCurrencyMenu', 'block/box/currencyMenu'); $this->addBlock('CART', 'boxShoppingCart', 'block/box/shoppingCart'); $this->addBlock('SEARCH', 'boxSearch', 'block/box/search'); $this->addBlock('INFORMATION', 'boxInformationMenu', 'block/box/informationMenu'); $this->addBlock('NEWSLETTER', 'boxNewsletterSubscribe', 'block/box/newsletterSubscribe'); $this->addBlock('TRACKING', 'tracking', 'block/tracking'); $this->addBlock('NEWS', 'latestNews', 'block/box/latestNews'); $this->addBlock('QUICKNAV', 'blockQuickNav', 'block/box/quickNav'); $this->addBlock('COMPARE', array('compare', 'compareMenu')); $this->addBlock('MINI_CART', array('order', 'miniCart'), 'order/miniCartBlock'); $this->addBlock('QUICK_LOGIN', 'quickLogin', 'user/block/quickLoginBlock'); $this->application->logStat('Init FrontendController'); return $initRes; }
public function init() { $this->view->style = array("screen" => "login.css"); $this->_authCheckRequired = false; parent::init(); $this->_generateAuthAdapter(); }
public function init() { $this->view->title = 'Report Case'; $this->view->page = 'report'; $this->view->mycontroller = 'ReportController'; $this->view->language = 'th'; parent::init(); }
/** * Init * * @return null */ public function init() { parent::init(); $pluginDependencies = craft()->social_plugin->getPluginDependencies(); if (count($pluginDependencies) > 0) { $this->redirect('social/install'); } }
public function init() { $this->view->title = 'Settings'; $this->view->page = 'settings'; $this->view->mycontroller = 'SettingsController'; $this->view->language = 'th'; parent::init(); }
public function init() { $this->view->title = 'Privacy'; $this->view->page = 'terms'; $this->view->mycontroller = 'PrivacyController'; $this->view->language = 'th'; parent::init(); }
public function init() { $this->view->title = 'CONTACTS'; $this->view->page = 'contacts'; $this->view->mycontroller = 'ContactsController'; $this->view->language = 'th'; parent::init(); }
protected function init() { parent::init(); $this->set_title('Emeraldion Lodge'); $this->set_description(l('Personal website of Claudio Procida, hosting my projects and my blog')); $this->credentials = $this->get_credentials(); $this->before_filter('init_opengraph'); }
public function init() { $this->view->title = 'WHY PROTECT?'; $this->view->page = 'why'; $this->view->mycontroller = 'WhyController'; $this->view->language = 'th'; parent::init(); }
public function init() { $this->view->title = 'Sign in'; $this->view->page = 'signin'; $this->view->mycontroller = 'SigninController'; parent::init(); $this->network_api = Zend_Registry::get('network_api'); }
public function init() { $this->view->title = 'Magazine'; $this->view->page = 'magazine'; $this->view->mycontroller = 'MagazineController'; $this->view->language = 'th'; parent::init(); }
public function init() { $this->view->title = 'Terms & Conditions'; $this->view->page = 'terms'; $this->view->mycontroller = 'TermsController'; $this->view->language = 'th'; parent::init(); }
public function init() { parent::init(); if (Yii::app()->user->isGuest && trim($_SERVER['REQUEST_URI'], '/') != 'admin/login') { $this->redirect('/admin/login'); } $this->initTabs(); //$this->initAssets(); }
public function init() { $this->view->title = 'ARTICLES'; $this->view->page = 'articles'; $this->view->mycontroller = 'ArticlesController'; $this->view->language = 'th'; parent::init(); $this->network_api = Zend_Registry::get('network_api'); }
/** * 自动运行 */ public function init() { parent::init(); $this->model = new Model_Project(); // XSS过滤 if ($this->request->isPost()) { $_POST = array_map('xss', $_POST); } }
public function init() { $this->view->title = 'Index'; $this->view->page = 'index'; $this->view->mycontroller = 'IndexController'; $this->view->language = 'th'; parent::init(); $this->network_api = Zend_Registry::get('network_api'); }
public function init() { parent::init(); $clientScript = Yii::app()->clientScript; $clientScript->registerScriptFile("/js/bootstrapValidator.min.js", CClientScript::POS_BEGIN); $clientScript->registerCssFile("/css/bootstrapValidator.min.css", CClientScript::POS_BEGIN); //$this->info = Yii::app()->user->getState('info'); //$this->layout = '//layouts/main2'; }
function init() { parent::init(); $this->_setNeedsParams(array('topic')); $topics = $this->_getResults('_digg', 'getRandomStories'); $rightPanel['diggNews'] = $this->view->partial('common/_right_panel.phtml', array('name' => 'digg-news', 'news' => $topics)); $this->view->rightPanel = $rightPanel; $this->view->topics = $this->_getResults('_digg', 'getTopics'); }
public function init() { $this->setLayout('empty'); $this->addBlock('USER_MENU', 'boxUserMenu', 'block/backend/userMenu'); $this->addBlock('TRANSLATIONS', 'translations', 'block/backend/translations'); $this->addBlock('FOOTER_TOOLBAR', 'toolbar', 'block/backend/toolbar'); $this->getPendingModuleUpdateStats($this->application); return parent::init(); }
/** * 自动运行 */ public function init() { // 检测系统是否正常安装了 if (!file_exists(APPLICATION_PATH . '/Data/Logs/install.lock')) { $this->gotoUri('setup'); } // 初始化基类控制器 parent::init(); }
public function init() { parent::init(); // If request is Ajax, we disable the layout if ($this->_request->isXmlHttpRequest()) { $this->_helper->layout->disableLayout(); } else { $this->_helper->layout->setlayout('story_mapview'); } }
/** * Determines the assetPath for the controller from the module */ public function init() { $this->modulePathAlias = 'application.modules.' . $this->getModule()->name; $this->assetPathAlias = $this->modulePathAlias . '.assets'; // Set asset path if (file_exists(Yii::getPathOfAlias($this->assetPathAlias))) { $this->assetPath = Yii::app()->assetManager->getPublishedPathOfAlias('application.modules.' . $this->getModule()->name . '.assets'); } return parent::init(); }
/** * 自动运行 */ public function init() { parent::init(); $this->projectModel = new Model_Project(); $this->userModel = new Model_User(); $this->bugModel = new Model_Bug(); $this->profileModel = new Model_Profile(); // 当前登录UID,权限 $this->view->currentUid = $this->userid; $this->view->currentPriv = $this->priv; }
function init() { parent::init(); $this->view->title = "Baphled's Timeline"; $this->view->headTitle('Social'); $rightPanel['tweets-favs'] = $this->view->partial('common/_right_panel.phtml', array('name' => 'fav-tweets', 'tweets' => $this->view->favTweets)); $rightPanel['tweets'] = $this->view->partial('common/_right_panel.phtml', array('name' => 'tweets', 'tweets' => $this->view->friendTweets)); // @todo Messy need to cleanup $menu = array(array('link' => '/social/news', 'title' => 'News', 'text' => 'News'), array('link' => '/social/tweets/favourites', 'title' => 'Favourite Tweets', 'text' => 'Favourite Tweets'), array('link' => '/social/tweets/user', 'title' => 'Baphled Tweets', 'text' => 'Baphled Tweets'), array('link' => '/social/tweets/friends', 'title' => 'Followers Tweets', 'text' => 'Friends Tweets')); $this->view->subMenu = $menu; $this->view->rightPanel = $rightPanel; }
public function init() { parent::init(); $this->_checkUser(); $this->_checkSign(); $user = $this->session->getUser(); $client = $this->session->getClient(); $this->input['user'] = $user; $this->input['client'] = $client; $this->_checkPaymentParameters(); $this->input = array_merge($this->input, $this->_userInfo); }
public function init() { $this->subNav = ['index' => ['label' => 'Dashboard', 'url' => 'seo']]; if (craft()->userSession->isAdmin() || craft()->userSession->checkPermission('manageSitemap')) { $this->subNav['sitemap'] = ['label' => 'Sitemap', 'url' => 'seo/sitemap']; } if (craft()->userSession->isAdmin() || craft()->userSession->checkPermission('manageRedirects')) { $this->subNav['redirects'] = ['label' => 'Redirects', 'url' => 'seo/redirects']; } if (craft()->userSession->isAdmin()) { $this->subNav['settings'] = ['label' => 'Settings', 'url' => 'seo/settings']; } parent::init(); }
/** * Class constructor * */ public function init() { // Add Js $this->jsUrl = Yii::app()->theme->baseUrl . '/scripts'; // Add default page title which is the application name $this->pageTitle[] = Yii::t('global', Yii::app()->name); // By default we register the robots to 'all' // we wil override this when we need to Yii::app()->clientScript->registerMetaTag('all', 'robots'); // We add a meta 'language' tag based on the currently viewed language Yii::app()->clientScript->registerMetaTag(Yii::app()->language, 'language', 'content-language'); /* Run init */ parent::init(); }
function init() { parent::init(); $this->_setNeedsParams(array('milestone', 'tickets')); $this->view->title = 'Bug Tracking'; unset($this->view->rightPanel['tweets']); $milestones = array(); $projects = $this->_handleCacheResult('projectIssues', '_lighthouse', 'getProjects'); foreach ($projects as $project) { $name = str_replace('-', '_', $project->project->permalink); $projectInfo = $this->_handleCacheResult("milestones_{$name}", '_lighthouse', 'getMileStones', $project->project->permalink); $milestones[$project->project->permalink] = $projectInfo; } $this->view->rightPanel['milestones'] = $this->view->partial('common/_right_panel.phtml', array('name' => 'issues', 'issues' => $projects, 'milestones' => $milestones)); }
function init() { parent::init(); $this->navall = json_decode($this->redis->get('navall'), true); if ($this->navall == false) { $object = new catpathModel(); $this->navall = $object->catelist(); $this->redis->setex('navall', 36000, json_encode($this->navall)); } $this->numnavall = json_decode($this->redis->get('numnavall'), true); if ($this->numnavall == false) { $object = new catpathModel(); $this->numnavall = $object->numkeycat(); $this->redis->setex('numnavall', 36000, json_encode($this->numnavall)); } }
/** * Class constructor * */ public function init() { // Add default page title which is the application name $this->pageTitle[] = Yii::t('global', Yii::app()->name); $this->pageTitle[] = Yii::t('global', 'Admin'); // By default we register the robots to 'none' Yii::app()->clientScript->registerMetaTag('noindex, nofollow', 'robots'); // We add a meta 'language' tag based on the currently viewed language Yii::app()->clientScript->registerMetaTag(Yii::app()->language, 'language', 'content-language'); // Make sure we have access if (Yii::app()->user->role != 'admin' || !Yii::app()->user->checkAccess('op_acp_access')) { throw new CException(Yii::t('error', 'Sorry, You are not allowed to enter this section.')); } /* Run init */ parent::init(); }