/** * @see \wcf\page\IPage::readData() */ public function readData() { parent::readData(); $categoryTree = new NewsPictureCategoryNodeTree('de.voolia.news.picture.category'); $this->categoryList = $categoryTree->getIterator(); $this->categoryList->setMaxDepth(0); }
/** * @see \wcf\page\IPage::readData() */ public function readData() { parent::readData(); if (!$this->categoryID) { return; } // categories $categoryTree = new NewsPictureCategoryNodeTree('de.voolia.news.picture.category'); $this->categoryList = $categoryTree->getIterator(); $this->categoryList->setMaxDepth(0); // pictures $categoryIDs = array($this->categoryID); foreach ($this->category->getChildCategories() as $childCategory) { $categoryIDs[] = $childCategory->categoryID; } $this->pictureList = new GroupedNewsPictureList(); $this->pictureList->getConditionBuilder()->add('news_picture.categoryID IN (?)', array($categoryIDs)); $this->pictureList->readObjects(); }
/** * @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(); // categories $categoryTree = new NewsCategoryNodeTree('de.incendium.cms.news.category'); $this->categoryList = $categoryTree->getIterator(); $this->categoryList->setMaxDepth(0); // 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 if ($this->category !== null) { WCF::getBreadcrumbs()->add(new Breadcrumb(WCF::getLanguage()->get('cms.header.menu.news'), LinkHandler::getInstance()->getLink('NewsOverview', array('application' => 'cms')))); foreach ($this->category->getParentCategories() as $parentCategory) { WCF::getBreadcrumbs()->add($parentCategory->getBreadcrumb()); } } }
/** * @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'); } } }