示例#1
0
 /**
  * @see	\wcf\page\IPage::readData()
  */
 public function readData()
 {
     parent::readData();
     // add breadcrumbs
     if (MODULE_MEMBERS_LIST) {
         WCF::getBreadcrumbs()->add(new Breadcrumb(WCF::getLanguage()->get('wcf.user.members'), LinkHandler::getInstance()->getLink('MembersList')));
     }
 }
 /**
  * @see	\wcf\page\AbstractPage::readData()
  */
 public function readData()
 {
     parent::readData();
     $this->notifications = UserNotificationHandler::getInstance()->getNotifications($this->sqlLimit, $this->sqlOffset, true);
 }
 /**
  * @see	wcf\page\IPage::readData()
  */
 public function readData()
 {
     MultipleLinkPage::readData();
     NEWSCore::getInstance()->setBreadcrumbs();
 }
示例#4
0
 /**
  * @see wcf\page\IPage::readData()
  */
 public function readData()
 {
     $this->validateSortOrder();
     $this->validateSortField();
     parent::readData();
 }
 /**
  * @see	\wcf\page\IPage::readData()
  */
 public function readData()
 {
     parent::readData();
     // cache message data
     $this->cacheMessageData();
     // get messages
     $this->readMessages();
     // set active menu item
     if (isset($this->searchData['selectedObjectTypes']) && count($this->searchData['selectedObjectTypes']) == 1) {
         $objectType = SearchEngine::getInstance()->getObjectType(reset($this->searchData['selectedObjectTypes']));
         if ($activeMenuItem = $objectType->getActiveMenuItem()) {
             PageMenu::getInstance()->setActiveMenuItem($activeMenuItem);
         }
     }
     // add breadcrumbs
     WCF::getBreadcrumbs()->add(new Breadcrumb(WCF::getLanguage()->get('wcf.search.title'), LinkHandler::getInstance()->getLink('Search')));
 }
示例#6
0
 /**
  * @see	\wcf\page\IPage::readData()
  */
 public function readData()
 {
     parent::readData();
     $this->categories = SmileyCache::getInstance()->getCategories();
 }
示例#7
0
 /**
  * @see	\wcf\page\IPage::readData()
  */
 public function readData()
 {
     parent::readData();
     $this->tagCloud = new TypedTagCloud($this->objectType->objectType);
 }
 /**
  * @see	wcf\page\IPage::readData()
  */
 public function readData()
 {
     MultipleLinkPage::readData();
     WCF::getBreadcrumbs()->add(new Breadcrumb(WCF::getLanguage()->get('cms.header.menu.news'), LinkHandler::getInstance()->getLink('NewsOverview', array('application' => 'cms'))));
 }
 /**
  * @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();
     // add breadcrumbs
     WCF::getBreadcrumbs()->add(new Breadcrumb(WCF::getLanguage()->get('wcf.conversation.conversations'), LinkHandler::getInstance()->getLink('ConversationList')));
     if ($this->conversation->isDraft) {
         WCF::getBreadcrumbs()->add(new Breadcrumb(WCF::getLanguage()->get('wcf.conversation.folder.draft'), LinkHandler::getInstance()->getLink('ConversationList', array('filter' => 'draft'))));
     }
     // update last visit time count
     if ($this->conversation->isNew() && $this->objectList->getMaxPostTime() > $this->conversation->lastVisitTime) {
         $visitTime = $this->objectList->getMaxPostTime();
         if ($visitTime == $this->conversation->lastPostTime) {
             $visitTime = TIME_NOW;
         }
         $conversationAction = new ConversationAction(array($this->conversation->getDecoratedObject()), 'markAsRead', array('visitTime' => $visitTime));
         $conversationAction->executeAction();
     }
     // get participants
     $this->participantList = new ConversationParticipantList($this->conversationID, WCF::getUser()->userID, $this->conversation->userID == WCF::getUser()->userID);
     $this->participantList->readObjects();
     // init quote objects
     $messageIDs = array();
     foreach ($this->objectList as $message) {
         $messageIDs[] = $message->messageID;
     }
     MessageQuoteManager::getInstance()->initObjects('com.woltlab.wcf.conversation.message', $messageIDs);
     // set attachment permissions
     if ($this->objectList->getAttachmentList() !== null) {
         $this->objectList->getAttachmentList()->setPermissions(array('canDownload' => true, 'canViewPreview' => true));
     }
     // get timeframe for modifications
     $this->objectList->rewind();
     $startTime = $this->objectList->current()->time;
     $count = count($this->objectList);
     if ($count == 1) {
         $endTime = $startTime;
     } else {
         $this->objectList->seek($count - 1);
         $endTime = $this->objectList->current()->time;
     }
     $this->objectList->rewind();
     // load modification log entries
     $this->modificationLogList = new ConversationLogModificationLogList();
     $this->modificationLogList->setConversation($this->conversation->getDecoratedObject());
     $this->modificationLogList->getConditionBuilder()->add("modification_log.time BETWEEN ? AND ?", array($startTime, $endTime));
     $this->modificationLogList->readObjects();
 }
 /**
  * @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');
         }
     }
 }