/**
  * @see	\wcf\system\dashboard\box\IDashboardBox::init()
  */
 public function init(DashboardBox $box, IPage $page)
 {
     parent::init($box, $page);
     if (WCF::getUser()->userID && MODULE_PAID_SUBSCRIPTION) {
         // get available subscriptions
         $this->subscriptions = PaidSubscriptionCacheBuilder::getInstance()->getData();
         // get purchased subscriptions
         $userSubscriptionList = new PaidSubscriptionUserList();
         $userSubscriptionList->getConditionBuilder()->add('userID = ?', array(WCF::getUser()->userID));
         $userSubscriptionList->getConditionBuilder()->add('isActive = ?', array(1));
         $userSubscriptionList->readObjects();
         // remove purchased subscriptions
         foreach ($userSubscriptionList as $userSubscription) {
             if (isset($this->subscriptions[$userSubscription->subscriptionID])) {
                 $userSubscription->setSubscription($this->subscriptions[$userSubscription->subscriptionID]);
                 unset($this->subscriptions[$userSubscription->subscriptionID]);
             }
         }
         // remove excluded subscriptions
         foreach ($userSubscriptionList as $userSubscription) {
             if ($userSubscription->getSubscription()->excludedSubscriptionIDs) {
                 foreach (explode(',', $userSubscription->getSubscription()->excludedSubscriptionIDs) as $subscriptionID) {
                     if (isset($this->subscriptions[$subscriptionID])) {
                         unset($this->subscriptions[$subscriptionID]);
                     }
                 }
             }
         }
     }
     $this->fetched();
 }
 public function init(DashboardBox $box, IPage $page)
 {
     parent::init($box, $page);
     $this->latestNews = new LatestNewsList();
     $this->latestNews->sqlLimit = CMS_NEWS_LATEST_LIMIT;
     $this->latestNews->readObjects();
 }
 /**
  * @see	\wcf\system\dashboard\box\IDashboardBox::init()
  */
 public function init(DashboardBox $box, IPage $page)
 {
     parent::init($box, $page);
     // get current date
     $currentDay = DateUtil::format(null, 'm-d');
     $date = explode('-', DateUtil::format(null, 'Y-n-j'));
     // get user ids
     $userIDs = UserBirthdayCache::getInstance()->getBirthdays($date[1], $date[2]);
     $userIDs = array_intersect($userIDs, WCF::getUserProfileHandler()->getFollowingUsers());
     if (!empty($userIDs)) {
         $userProfileList = new UserProfileList();
         $userProfileList->setObjectIDs($userIDs);
         $userProfileList->readObjects();
         $i = 0;
         foreach ($userProfileList as $userProfile) {
             if ($i == 10) {
                 break;
             }
             if (!$userProfile->isProtected() && substr($userProfile->birthday, 5) == $currentDay) {
                 $this->userProfiles[] = $userProfile;
                 $i++;
             }
         }
     }
     $this->fetched();
 }
 /**
  * @see	\wcf\system\dashboard\box\IDashboardBox::init()
  */
 public function init(DashboardBox $box, IPage $page)
 {
     parent::init($box, $page);
     // get current date
     $currentDay = DateUtil::format(null, 'm-d');
     $date = explode('-', DateUtil::format(null, 'Y-n-j'));
     // get user ids
     $userIDs = UserBirthdayCache::getInstance()->getBirthdays($date[1], $date[2]);
     if (!empty($userIDs)) {
         $userOptions = UserOptionCacheBuilder::getInstance()->getData(array(), 'options');
         if (isset($userOptions['birthday'])) {
             $birthdayUserOption = $userOptions['birthday'];
             $userProfileList = new UserProfileList();
             $userProfileList->setObjectIDs($userIDs);
             $userProfileList->readObjects();
             $i = 0;
             foreach ($userProfileList as $userProfile) {
                 if ($i == 10) {
                     break;
                 }
                 $birthdayUserOption->setUser($userProfile->getDecoratedObject());
                 if (!$userProfile->isProtected() && $birthdayUserOption->isVisible() && substr($userProfile->birthday, 5) == $currentDay) {
                     $this->userProfiles[] = $userProfile;
                     $i++;
                 }
             }
         }
     }
     $this->fetched();
 }
 /**
  * @see	\wcf\system\dashboard\box\IDashboardBox::init()
  */
 public function init(DashboardBox $box, IPage $page)
 {
     parent::init($box, $page);
     $this->vooliaNewsList = new AccessibleNewsList();
     $this->vooliaNewsList->getConditionBuilder()->add("news.isArchived = ?", array(0));
     $this->vooliaNewsList->sqlLimit = NEWS_DASHBOARD_SIDEBAR_ENTRIES;
     $this->vooliaNewsList->readObjects();
     $this->fetched();
 }
 /**
  * @see	\wcf\system\dashboard\box\IDashboardBox::init()
  */
 public function init(DashboardBox $box, IPage $page)
 {
     parent::init($box, $page);
     $this->pageList = new PageList();
     $this->pageList->sqlLimit = CMS_DASHBOARD_SIDEBAR_ENTRIES;
     $this->pageList->sqlOrderBy = 'page.creationTime DESC';
     $this->pageList->readObjects();
     $this->fetched();
 }
 /**
  * @see	\wcf\system\dashboard\box\IDashboardBox::init()
  */
 public function init(DashboardBox $box, IPage $page)
 {
     parent::init($box, $page);
     $this->member = new UserProfileList();
     $this->member->sqlOrderBy = 'user_table.jCoinsBalance DESC';
     $this->member->sqlLimit = JCOINS_DASHBOARD_SIDEBAR_RICHEST_NUM;
     $this->member->readObjects();
     $this->fetched();
 }
 /**
  * @see	\wcf\system\dashboard\box\IDashboardBox::init()
  */
 public function init(DashboardBox $box, IPage $page)
 {
     parent::init($box, $page);
     $this->entryList = new AccessibleEntryList();
     $this->entryList->getConditionBuilder()->add("news_entry.isFeatured = ?", array(1));
     $this->entryList->getConditionBuilder()->add("news_entry.isArchived = ?", array(0));
     $this->entryList->sqlLimit = CMS_DASHBOARD_SIDEBAR_NEWSENTRIES;
     $this->entryList->readObjects();
     $this->fetched();
 }
 /**
  * @see	\wcf\system\dashboard\box\IDashboardBox::init()
  */
 public function init(DashboardBox $box, IPage $page)
 {
     parent::init($box, $page);
     $this->pageList = new PageList();
     $this->pageList->getConditionBuilder()->add('page.clicks > 0');
     $this->pageList->sqlLimit = CMS_DASHBOARD_SIDEBAR_ENTRIES;
     $this->pageList->sqlOrderBy = 'page.clicks DESC';
     $this->pageList->readObjects();
     $this->fetched();
 }
 /**
  * @see	\wcf\system\dashboard\box\IDashboardBox::init()
  */
 public function init(DashboardBox $box, IPage $page)
 {
     parent::init($box, $page);
     if (MODULE_USERS_ONLINE) {
         $this->usersOnlineList = new UsersOnlineList();
         $this->usersOnlineList->getConditionBuilder()->add('session.userID IN (SELECT userID FROM wcf' . WCF_N . '_user_to_group WHERE groupID IN (SELECT groupID FROM wcf' . WCF_N . '_user_group WHERE showOnTeamPage = ?))', array(1));
         $this->usersOnlineList->readObjects();
     }
     $this->fetched();
 }
 /**
  * @see	\wcf\system\dashboard\box\IDashboardBox::init()
  */
 public function init(DashboardBox $box, IPage $page)
 {
     parent::init($box, $page);
     $this->eventList = new ViewableUserActivityEventList();
     $this->eventList->sqlLimit = RECENT_ACTIVITY_SIDEBAR_ITEMS;
     $this->eventList->readObjects();
     // removes orphaned and non-accessable events
     UserActivityEventHandler::validateEvents($this->eventList);
     $this->fetched();
 }
 /**
  * @see	\wcf\system\dashboard\box\IDashboardBox::init()
  */
 public function init(DashboardBox $box, IPage $page)
 {
     parent::init($box, $page);
     if (MODULE_USERS_ONLINE && WCF::getSession()->getPermission('user.profile.canViewUsersOnlineList') && count(WCF::getUserProfileHandler()->getFollowingUsers())) {
         $this->usersOnlineList = new UsersOnlineList();
         $this->usersOnlineList->getConditionBuilder()->add('session.userID IN (?)', array(WCF::getUserProfileHandler()->getFollowingUsers()));
         $this->usersOnlineList->sqlLimit = 10;
         $this->usersOnlineList->readObjects();
     }
     $this->fetched();
 }
 /**
  * @see	\wcf\system\dashboard\box\IDashboardBox::init()
  */
 public function init(DashboardBox $box, IPage $page)
 {
     parent::init($box, $page);
     if (MODULE_TAGGING && WCF::getSession()->getPermission('user.tag.canViewTag') && WCF::getSession()->getPermission('user.news.canReadEntry')) {
         $languageIDs = array();
         if (LanguageFactory::getInstance()->multilingualismEnabled()) {
             $languageIDs = WCF::getUser()->getLanguageIDs();
         }
         $this->tagCloud = new TypedTagCloud('de.incendium.cms.news.entry', $languageIDs);
     }
     $this->fetched();
 }
 /**
  * @see	\wcf\system\dashboard\box\IDashboardBox::init()
  */
 public function init(DashboardBox $box, IPage $page)
 {
     parent::init($box, $page);
     if (MODULE_USERS_ONLINE && WCF::getSession()->getPermission('user.profile.canViewUsersOnlineList')) {
         $this->usersOnlineList = new UsersOnlineList();
         $this->usersOnlineList->readStats();
         $this->usersOnlineList->checkRecord();
         $this->usersOnlineList->getConditionBuilder()->add('session.userID IS NOT NULL');
         $this->usersOnlineList->readObjects();
     }
     $this->fetched();
 }
 /**
  * @see	\wcf\system\dashboard\box\IDashboardBox::init()
  */
 public function init(DashboardBox $box, IPage $page)
 {
     parent::init($box, $page);
     if (MODULE_TAGGING) {
         $languageIDs = array();
         if (LanguageFactory::getInstance()->multilingualismEnabled()) {
             $languageIDs = WCF::getUser()->getLanguageIDs();
         }
         // get tag cloud for news entries
         $this->tagCloud = new TypedTagCloud('de.voolia.news.entry', $languageIDs);
     }
     $this->fetched();
 }
 /**
  * @see	\wcf\system\dashboard\box\AbstractDashboardBoxContent::init()
  */
 public function init(DashboardBox $box, IPage $page)
 {
     parent::init($box, $page);
     // get ids
     $mostActiveMemberIDs = MostActiveMembersCacheBuilder::getInstance()->getData();
     if (!empty($mostActiveMemberIDs)) {
         // get profile data
         $this->userProfileList = new UserProfileList();
         $this->userProfileList->sqlOrderBy = 'user_table.activityPoints DESC';
         $this->userProfileList->setObjectIDs($mostActiveMemberIDs);
         $this->userProfileList->readObjects();
     }
     $this->fetched();
 }
 /**
  * @see	\wcf\system\dashboard\box\IDashboardBox::init()
  */
 public function init(DashboardBox $box, IPage $page)
 {
     parent::init($box, $page);
     $this->stats = UserStatsCacheBuilder::getInstance()->getData();
     $this->fetched();
 }