/**
  * @see	\wcf\page\IPage::assignVariables()
  */
 public function assignVariables()
 {
     parent::assignVariables();
     $lastEventTime = $this->eventList->getLastEventTime();
     // removes orphaned and non-accessable events
     UserActivityEventHandler::validateEvents($this->eventList);
     DashboardHandler::getInstance()->loadBoxes('com.woltlab.wcf.user.MembersListPage', $this);
     WCF::getTPL()->assign(array('eventList' => $this->eventList, 'lastEventTime' => $lastEventTime, 'sidebarCollapsed' => UserCollapsibleContentHandler::getInstance()->isCollapsed('com.woltlab.wcf.collapsibleSidebar', 'com.woltlab.wcf.user.MembersListPage'), 'sidebarName' => 'com.woltlab.wcf.user.MembersListPage', 'allowSpidersToIndexThisPage' => true));
 }
Exemple #2
0
<?php

\wcf\system\dashboard\DashboardHandler::setDefaultValues('com.woltlab.wcf.user.MembersListPage', array('de.joshsboard.jcoins.richestUser' => 1));
Exemple #3
0
 /**
  * @see	\wcf\page\IPage::assignVariables()
  */
 public function assignVariables()
 {
     parent::assignVariables();
     DashboardHandler::getInstance()->loadBoxes('com.woltlab.wcf.user.MembersListPage', $this);
     WCF::getTPL()->assign(array('sidebarCollapsed' => UserCollapsibleContentHandler::getInstance()->isCollapsed('com.woltlab.wcf.collapsibleSidebar', 'com.woltlab.wcf.user.MembersListPage'), 'sidebarName' => 'com.woltlab.wcf.user.MembersListPage', 'allowSpidersToIndexThisPage' => true));
 }
<?php

use wcf\data\category\CategoryEditor;
use wcf\data\object\type\ObjectTypeCache;
use wcf\system\dashboard\DashboardHandler;
use wcf\system\WCF;
/**
 * @author Alexander Merz
 * @copyright 2014 Incendium Community
 * @license    GNU Lesser General Public License <http://www.gnu.org/licenses/lgpl-3.0.txt>
 */
// set default values for dashboard boxes
DashboardHandler::setDefaultValues('com.woltlab.filebase.NewsOverviewPage', array('de.incendium.cms.news.tagCloud' => 1, 'de.incendium.cms.news.latestNews' => 2, 'de.incendium.cms.news.mostLikedNews' => 3, 'de.incendium.cms.news.featuredNews' => 4));
// add default category
CategoryEditor::create(array('objectTypeID' => ObjectTypeCache::getInstance()->getObjectTypeIDByName('com.woltlab.wcf.category', 'de.incendium.cms.news.category'), 'title' => 'Default Category', 'description' => 'This is a Default Category', 'time' => TIME_NOW));
 public function assignVariables()
 {
     parent::assignVariables();
     DashboardHandler::getInstance()->loadBoxes('de.codequake.cms.news.news', $this);
     WCF::getTPL()->assign(array('newsID' => $this->newsID, 'news' => $this->news, 'likeData' => MODULE_LIKE && $this->commentList ? $this->commentList->getLikeData() : array(), 'newsLikeData' => $this->likeData, 'commentCanAdd' => WCF::getUser()->userID && WCF::getSession()->getPermission('user.cms.news.canAddComment'), 'commentList' => $this->commentList, 'commentObjectTypeID' => $this->commentObjectTypeID, 'tags' => $this->tags, 'lastCommentTime' => $this->commentList ? $this->commentList->getMinCommentTime() : 0, 'attachmentList' => $this->news->getAttachments(), 'allowSpidersToIndexThisPage' => true, 'sidebarCollapsed' => UserCollapsibleContentHandler::getInstance()->isCollapsed('com.woltlab.wcf.collapsibleSidebar', 'de.codequake.cms.news.news'), 'sidebarName' => 'de.codequake.cms.news.news'));
 }
 public function assignVariables()
 {
     parent::assignVariables();
     DashboardHandler::getInstance()->loadBoxes('de.codequake.cms.news.newsList', $this);
     WCF::getTPL()->assign(array('category' => $this->category, 'categoryID' => $this->categoryID, 'controller' => 'NewsList', 'allowSpidersToIndexThisPage' => true, 'sidebarCollapsed' => UserCollapsibleContentHandler::getInstance()->isCollapsed('com.woltlab.wcf.collapsibleSidebar', 'de.codequake.cms.news.newsList'), 'sidebarName' => 'de.codequake.cms.news.newsList', 'categoryList' => $this->categoryList));
 }
 /**
  * @see	\wcf\data\ISortableAction::updatePosition()
  */
 public function updatePosition()
 {
     // remove previous settings
     $conditions = new PreparedStatementConditionBuilder();
     $conditions->add("objectTypeID = ?", array($this->objectType->objectTypeID));
     if (!empty($this->boxes)) {
         $conditions->add("boxID IN (?)", array(array_keys($this->boxes)));
     }
     $sql = "DELETE FROM\twcf" . WCF_N . "_dashboard_option\n\t\t\t" . $conditions;
     $statement = WCF::getDB()->prepareStatement($sql);
     $statement->execute($conditions->getParameters());
     // update settings
     if (!empty($this->boxStructure)) {
         $sql = "INSERT INTO\twcf" . WCF_N . "_dashboard_option\n\t\t\t\t\t\t(objectTypeID, boxID, showOrder)\n\t\t\t\tVALUES\t\t(?, ?, ?)";
         $statement = WCF::getDB()->prepareStatement($sql);
         WCF::getDB()->beginTransaction();
         foreach ($this->boxStructure as $index => $boxID) {
             $showOrder = $index + 1;
             $statement->execute(array($this->objectType->objectTypeID, $boxID, $showOrder));
         }
         WCF::getDB()->commitTransaction();
     }
     // reset cache
     DashboardHandler::clearCache();
 }
 /**
  * @see	\wcf\page\IPage::assignVariables()
  */
 public function assignVariables()
 {
     parent::assignVariables();
     DashboardHandler::getInstance()->loadBoxes('com.woltlab.wcf.user.MembersListPage', $this);
     WCF::getTPL()->assign(array('letters' => str_split(self::$availableLetters), 'letter' => $this->letter, 'searchID' => $this->searchID, 'sidebarCollapsed' => UserCollapsibleContentHandler::getInstance()->isCollapsed('com.woltlab.wcf.collapsibleSidebar', 'com.woltlab.wcf.user.MembersListPage'), 'sidebarName' => 'com.woltlab.wcf.user.MembersListPage', 'allowSpidersToIndexThisPage' => true));
     if (count($this->objectList) === 0) {
         @header('HTTP/1.0 404 Not Found');
     }
 }
 /**
  * @see	\wcf\page\IPage::assignVariables()
  */
 public function assignVariables()
 {
     parent::assignVariables();
     // configuration for dashboard boxes
     DashboardHandler::getInstance()->loadBoxes('de.voolia.news.NewsOverviewPage', $this);
     WCF::getTPL()->assign(array('letters' => str_split(self::$availableLetters), 'letter' => $this->letter, 'stats' => $this->stats, 'categoryID' => $this->categoryID, 'category' => $this->category, 'categoryList' => $this->categoryList, 'sidebarCollapsed' => UserCollapsibleContentHandler::getInstance()->isCollapsed('com.woltlab.wcf.collapsibleSidebar', 'de.voolia.news.NewsOverviewPage'), 'sidebarName' => 'de.voolia.news.NewsOverviewPage', 'usersOnlineList' => $this->usersOnlineList, 'statistics' => $this->statistics, 'user' => $this->user, 'userID' => $this->userID, 'allowSpidersToIndexThisPage' => true));
 }
 /**
  * @see	\wcf\page\IPage::assignVariables()
  */
 public function assignVariables()
 {
     parent::assignVariables();
     DashboardHandler::getInstance()->loadBoxes('com.woltlab.wcf.user.MembersListPage', $this);
     WCF::getTPL()->assign(array('username' => $this->username, 'optionTree' => $this->optionTree, 'sidebarCollapsed' => UserCollapsibleContentHandler::getInstance()->isCollapsed('com.woltlab.wcf.collapsibleSidebar', 'com.woltlab.wcf.user.MembersListPage'), 'sidebarName' => 'com.woltlab.wcf.user.MembersListPage'));
 }
<?php

use wcf\data\category\CategoryEditor;
use wcf\data\object\type\ObjectTypeCache;
use wcf\system\dashboard\DashboardHandler;
use wcf\system\WCF;
/**
 * @author	Pascal Bade
 * @copyright	2012-2013 voolia.de
 * @license	Creative Commons CC-BY-ND <http://creativecommons.org/licenses/by-nd/3.0/deed.de>
 * @package	de.voolia.news
 */
// set default news category
CategoryEditor::create(array('objectTypeID' => ObjectTypeCache::getInstance()->getObjectTypeIDByName('com.woltlab.wcf.category', 'de.voolia.news.category'), 'title' => 'Default Category', 'description' => 'Description for Default Category', 'time' => TIME_NOW));
// enable the news-bbcode by default
$sql = "UPDATE\twcf" . WCF_N . "_user_group_option_value\n        SET\toptionValue = CONCAT(REPLACE(optionValue, ',news', ''), ',news')\n        WHERE\toptionID IN (\n                \tSELECT\toptionID\n\t\t\tFROM\twcf" . WCF_N . "_user_group_option\n\t\t\tWHERE\toptionName LIKE '%.allowedBBCodes'\n\t\t)";
$statement = WCF::getDB()->prepareStatement($sql);
$statement->execute();
// set default page title
if (!defined('PAGE_TITLE') || !PAGE_TITLE) {
    $sql = "UPDATE\twcf" . WCF_N . "_option\n\t\tSET\toptionValue = ?\n\t\tWHERE\toptionName = ?";
    $statement = WCF::getDB()->prepareStatement($sql);
    $statement->execute(array('News-System', 'page_title'));
}
DashboardHandler::setDefaultValues('de.voolia.news.NewsOverviewPage', array('de.voolia.news.tagCloud' => 1));
DashboardHandler::setDefaultValues('de.voolia.news.NewsArchivePage', array('de.voolia.news.tagCloud' => 1));
// set install date
$sql = "UPDATE\twcf" . WCF_N . "_option\n\tSET\toptionValue = ?\n\tWHERE\toptionName = ?";
$statement = WCF::getDB()->prepareStatement($sql);
$statement->execute(array(TIME_NOW, 'news_install_date'));
Exemple #12
0
<?php

use wcf\data\user\UserEditor;
use wcf\data\user\UserProfileAction;
use wcf\system\dashboard\DashboardHandler;
use wcf\system\WCF;
// set dashboard default values
DashboardHandler::setDefaultValues('com.woltlab.wcf.user.DashboardPage', array('com.woltlab.wcf.user.recentActivity' => 1, 'com.woltlab.wcf.user.registerButton' => 1, 'com.woltlab.wcf.user.signedInAs' => 2, 'com.woltlab.wcf.user.statsSidebar' => 3));
DashboardHandler::setDefaultValues('com.woltlab.wcf.user.MembersListPage', array('com.woltlab.wcf.user.newestMembers' => 1, 'com.woltlab.wcf.user.mostActiveMembers' => 2));
// update administrator user rank and user online marking
$editor = new UserEditor(WCF::getUser());
$action = new UserProfileAction(array($editor), 'updateUserRank');
$action->executeAction();
$action = new UserProfileAction(array($editor), 'updateUserOnlineMarking');
$action->executeAction();
<?php

use wcf\data\user\group\UserGroup;
use wcf\system\dashboard\DashboardHandler;
use wcf\system\WCF;
/**
 * @author		Markus Zhang <*****@*****.**>
 * @copyright	2014 Markus Zhang
 * @license		GNU Lesser General Public License <http://www.gnu.org/licenses/lgpl.html>
 */
$package = $this->installation->getPackage();
DashboardHandler::setDefaultValues('info.codingcorner.ict.ProjectListPage', array('com.woltlab.wcf.user.registerButton' => 1, 'com.woltlab.wcf.user.newestMembers' => 2));
$sql = "UPDATE\twcf" . WCF_N . "_option\n\tSET\toptionValue = ?\n\tWHERE\toptionName = ?";
$statement = WCF::getDB()->prepareStatement($sql);
$statement->execute(array(TIME_NOW, 'ict_install_date'));
if (!defined('PAGE_TITLE') || !PAGE_TITLE) {
    $sql = "UPDATE\twcf" . WCF_N . "_option\n\t\tSET\toptionValue = ?\n\t\tWHERE\toptionName = ?";
    $statement = WCF::getDB()->prepareStatement($sql);
    $statement->execute(array('Icy Tracker ' . $package->packageVersion, 'page_title'));
}
 /**
  * @see	\wcf\page\AbstractPage::assignVariables()
  */
 public function assignVariables()
 {
     parent::assignVariables();
     MessageQuoteManager::getInstance()->assignVariables();
     // configuration for dashboard boxes
     DashboardHandler::getInstance()->loadBoxes('de.voolia.news.NewsPage', $this);
     WCF::getTPL()->assign(array('allowSpidersToIndexThisPage' => true, 'attachmentList' => $this->news->getAttachments(), 'commentCanAdd' => WCF::getSession()->getPermission('user.news.canWriteComment'), 'commentList' => $this->commentList, 'commentObjectTypeID' => $this->objectTypeID, 'lastCommentTime' => $this->commentList->getMinCommentTime(), 'likeData' => MODULE_LIKE ? $this->commentList->getLikeData() : array(), 'news' => $this->news, 'newsLikeData' => $this->newsLikeData, 'sidebarCollapsed' => UserCollapsibleContentHandler::getInstance()->isCollapsed('com.woltlab.wcf.collapsibleSidebar', 'de.voolia.news.NewsPage'), 'sidebarName' => 'de.voolia.news.NewsPage', 'tags' => $this->tags, 'moreNewsList' => $this->moreNewsList));
 }