/** * @see \wcf\page\IPage::readData() */ public function readData() { parent::readData(); // categories $categoryTree = new NewsCategoryNodeTree($this->objectTypeName); $this->categoryList = $categoryTree->getIterator(); $this->categoryList->setMaxDepth(0); // stats $this->stats = NewsStatsCacheBuilder::getInstance()->getData(); $this->stats['categories'] = count(CategoryHandler::getInstance()->getCategories($this->objectTypeName)); $this->stats['comments'] = count(CommentHandler::getInstance()->getObjectType('de.incendium.cms.news.comment')); // users online list if (MODULE_USERS_ONLINE && CMS_NEWS_ENABLE_USERS_ONLINE_LIST) { $this->usersOnlineList = new UsersOnlineList(); $this->usersOnlineList->readStats(); $this->usersOnlineList->getConditionBuilder()->add('session.userID IS NOT NULL'); $this->usersOnlineList->readObjects(); } // add breadcrumbs WCF::getBreadcrumbs()->add(new Breadcrumb(WCF::getLanguage()->get('cms.header.menu.news'), LinkHandler::getInstance()->getLink('NewsOverview', array('application' => 'cms')))); if ($this->category !== null) { foreach ($this->category->getParentCategories() as $parentCategory) { WCF::getBreadcrumbs()->add($parentCategory->getBreadcrumb()); } } }
/** * * @see wcf\page\IPage::readData() */ public function readData() { parent::readData(); $categoryTree = new LinklistCategoryNodeTree('de.incendium.linklist.category'); $this->categoryList = $categoryTree->getIterator(); $this->categoryList->setMaxDepth(0); // add breadcrumbs LINKLISTCore::getInstance()->setLocation($this->category->getParentCategories()); }
/** * @see \wcf\page\IPage::readData() */ public function readData() { parent::readData(); // get categories $categoryTree = new FilebaseCategoryNodeTree('de.incendium.filebase.category'); $this->categoryList = $categoryTree->getIterator(); $this->categoryList->setMaxDepth(0); // add breadcrumbs FILEBASECore::getInstance()->setLocation($this->category->getParentCategories()); }
/** * @see \wcf\page\IPage::readData() */ public function readData() { parent::readData(); // categories $categoryTree = new NewsCategoryNodeTree($this->objectTypeName); $this->categoryList = $categoryTree->getIterator(); $this->categoryList->setMaxDepth(0); // stats $this->stats = NewsStatsCacheBuilder::getInstance()->getData(); $this->stats['categories'] = count(CategoryHandler::getInstance()->getCategories($this->objectTypeName)); $this->stats['comments'] = count(CommentHandler::getInstance()->getObjectType('de.voolia.news.comment')); // users online list if (MODULE_USERS_ONLINE && NEWS_INDEX_ENABLE_USERS_ONLINE_LIST) { $this->usersOnlineList = new UsersOnlineList(); $this->usersOnlineList->readStats(); $this->usersOnlineList->getConditionBuilder()->add('session.userID IS NOT NULL'); $this->usersOnlineList->readObjects(); } // add breadcrumbs NEWSCore::getInstance()->setBreadcrumbs($this->category !== null ? $this->category->getParentCategories() : array()); }
/** * @see \wcf\page\IPage::readData() */ public function readData() { parent::readData(); // news stats $this->stats = NewsStatsCacheBuilder::getInstance()->getData(); $this->stats['categories'] = count(CategoryHandler::getInstance()->getCategories('de.voolia.news.category')); // categories $categoryTree = new NewsCategoryNodeTree('de.voolia.news.category'); $this->categoryList = $categoryTree->getIterator(); $this->categoryList->setMaxDepth(0); // users online list if (MODULE_USERS_ONLINE && NEWS_INDEX_ENABLE_USERS_ONLINE_LIST) { $this->usersOnlineList = new UsersOnlineList(); $this->usersOnlineList->readStats(); $this->usersOnlineList->getConditionBuilder()->add('session.userID IS NOT NULL'); $this->usersOnlineList->readObjects(); } // add breadcrumbs if ($this->category !== null) { NEWSCore::getInstance()->setBreadcrumbs($this->category->getParentCategories()); } else { if (PageMenu::getInstance()->getLandingPage()->menuItem == 'news.header.menu.news') { // remove default breadcrumb entry and set current page as 'website' WCF::getBreadcrumbs()->remove(0); // meta tags MetaTagHandler::getInstance()->addTag('og:url', 'og:url', LinkHandler::getInstance()->getLink('NewsOverview', array('application' => 'news')), true); MetaTagHandler::getInstance()->addTag('og:type', 'og:type', 'website', true); MetaTagHandler::getInstance()->addTag('og:title', 'og:title', WCF::getLanguage()->get(PAGE_TITLE), true); MetaTagHandler::getInstance()->addTag('og:description', 'og:description', WCF::getLanguage()->get(PAGE_DESCRIPTION), true); MetaTagHandler::getInstance()->addTag('generator', 'generator', 'voolia News-System'); } } }