本文整理汇总了PHP中Board::getBoardSelect方法的典型用法代码示例。如果您正苦于以下问题:PHP Board::getBoardSelect方法的具体用法?PHP Board::getBoardSelect怎么用?PHP Board::getBoardSelect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Board
的用法示例。
在下文中一共展示了Board::getBoardSelect方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: validate
/**
* @see OptionType::validate()
*/
public function validate($optionData, $newValue)
{
$options = Board::getBoardSelect(array(), true);
if (is_array($newValue)) {
foreach ($newValue as $key => $value) {
if (!isset($options[$value])) {
return false;
}
}
}
return true;
}
示例2: getFormElement
/**
* @see OptionType::getFormElement()
*/
public function getFormElement(&$optionData)
{
if (!isset($optionData['optionValue'])) {
if (isset($optionData['defaultValue'])) {
$optionData['optionValue'] = $optionData['defaultValue'];
} else {
$optionData['optionValue'] = false;
}
}
// get options
$options = Board::getBoardSelect(array(), true);
WCF::getTPL()->assign(array('optionData' => $optionData, 'options' => $options));
return WCF::getTPL()->fetch('optionTypeSelect');
}
示例3: readBoardOptions
/**
* Gets a list of available parent boards.
*/
protected function readBoardOptions()
{
$this->boardOptions = Board::getBoardSelect(array(), true, true);
}
示例4: readData
/**
* @see Page::readData()
*/
public function readData()
{
parent::readData();
// boards
$this->boardOptions = Board::getBoardSelect(array(), true, true);
// language
$this->languages = Language::getAvailableContentLanguages();
foreach ($this->languages as $languageID => $language) {
$this->languages[$languageID] = WCF::getLanguage()->get('wcf.global.language.' . $language['languageCode']);
}
StringUtil::sort($this->languages);
}
示例5: readData
/**
* @see Page::readData()
*/
public function readData()
{
parent::readData();
if (!count($_POST)) {
// default values
$this->username = WCF::getSession()->username;
if (!$this->subscription && WCF::getUser()->enableSubscription) {
$this->subscription = 1;
}
}
$this->boardOptions = Board::getBoardSelect(array('canViewBoard'), true, true);
}
示例6: assignVariables
/**
* @see Page::assignVariables()
*/
public function assignVariables()
{
parent::assignVariables();
WCF::getTPL()->assign(array('permissions' => $this->board->getModeratorPermissions(), 'selfLink' => 'index.php?page=Board&boardID=' . $this->boardID . SID_ARG_2ND_NOT_ENCODED, 'daysPrune' => $this->daysPrune, 'markedPosts' => $this->markedPosts, 'markedThreads' => $this->markedThreads, 'board' => $this->board, 'boardID' => $this->boardID, 'prefix' => $this->prefix, 'boardQuickJumpOptions' => Board::getBoardSelect(), 'status' => $this->status, 'boardModerators' => $this->boardModerators, 'normalThreads' => $this->threadList != null ? $this->threadList->threads : null, 'topThreads' => $this->threadList != null ? $this->threadList->topThreads : null, 'newTopThreads' => $this->threadList != null ? $this->threadList->newTopThreads : 0, 'newNormalThreads' => $this->threadList != null ? $this->threadList->newThreads : 0, 'topThreadsStatus' => $this->topThreadsStatus, 'normalThreadsStatus' => $this->normalThreadsStatus, 'allowSpidersToIndexThisPage' => true, 'defaultSortField' => $this->defaultSortField, 'defaultSortOrder' => $this->defaultSortOrder, 'defaultDaysPrune' => $this->defaultDaysPrune, 'languageID' => $this->languageID, 'contentLanguages' => Language::getContentLanguages(), 'enableRating' => $this->enableRating, 'tags' => $this->tags, 'tagID' => $this->tagID, 'tag' => $this->tag));
if (WCF::getSession()->spiderID) {
if ($this->threadList != null && $this->threadList->maxLastPostTime) {
@header('Last-Modified: ' . gmdate('D, d M Y H:i:s', $this->threadList->maxLastPostTime) . ' GMT');
}
}
}
示例7: readData
/**
* @see Page::readData()
*/
public function readData()
{
parent::readData();
// boards
$this->boardOptions = Board::getBoardSelect(array(), true, true);
}
示例8: assignVariables
/**
* @see Page::assignVariables()
*/
public function assignVariables()
{
parent::assignVariables();
WCF::getTPL()->assign(array('permissions' => $this->board->getModeratorPermissions(), 'markedPosts' => $this->markedPosts, 'markedThreads' => $this->markedThreads, 'board' => $this->board, 'thread' => $this->thread, 'threadID' => $this->threadID, 'postID' => $this->postID, 'boardQuickJumpOptions' => Board::getBoardSelect(), 'similarThreads' => $this->similarThreads, 'showAvatar' => !WCF::getUser()->userID || WCF::getUser()->showAvatar, 'highlight' => $this->highlight, 'quotes' => $this->quotes, 'posts' => $this->postList->posts, 'polls' => $this->postList->polls, 'sidebarFactory' => $this->sidebarFactory, 'attachments' => $this->postList->attachments, 'allowSpidersToIndexThisPage' => true, 'enableRating' => $this->enableRating, 'tags' => $this->tags, 'sortOrder' => $this->sortOrder));
if (WCF::getSession()->spiderID) {
@header('Last-Modified: ' . gmdate('D, d M Y H:i:s', $this->thread->lastPostTime) . ' GMT');
}
}
示例9: show
/**
* Shows post specific form elements in the global search form.
*/
public function show($form = null)
{
// get unsearchable boards
require_once WBB_DIR . 'lib/data/board/Board.class.php';
$boards = WCF::getCache()->get('board', 'boards');
$unsearchableBoardIDArray = array();
foreach ($boards as $board) {
if (!$board->searchable) {
$unsearchableBoardIDArray[] = $board->boardID;
}
}
// get existing values
if ($form !== null && isset($form->searchData['additionalData']['post'])) {
$this->boardIDs = $form->searchData['additionalData']['post']['boardIDs'];
$this->findAttachments = $form->searchData['additionalData']['post']['findAttachments'];
$this->findPolls = $form->searchData['additionalData']['post']['findPolls'];
}
WCF::getTPL()->assign(array('boardOptions' => Board::getBoardSelect(array('canViewBoard', 'canEnterBoard', 'canReadThread'), true, false, $unsearchableBoardIDArray), 'boardIDs' => $this->boardIDs, 'threadID' => $this->threadID, 'selectAllBoards' => count($this->boardIDs) == 0 || $this->boardIDs[0] == '*', 'findAttachments' => $this->findAttachments, 'findPolls' => $this->findPolls, 'findThreads' => $this->findThreads, 'findUserThreads' => $this->findUserThreads));
}
示例10: getPrefBoards
public function getPrefBoards()
{
if (!self::wbbExists()) {
return array();
}
$ret = array();
require_once WBB_DIR . '/lib/data/board/Board.class.php';
$boardSelect = Board::getBoardSelect(array(), true, true);
$sql = "SELECT boardID, title" . "\n FROM wbb" . WBB_N . "_board" . "\n WHERE prefixes IS NULL" . "\n OR prefixes = ''";
$result = WCF::getDB()->sendQuery($sql);
while ($row = WCF::getDB()->fetchArray($result)) {
if (isset($boardSelect[$row['boardID']])) {
unset($boardSelect[$row['boardID']]);
}
}
foreach ($boardSelect as $k => $v) {
$ret[$k] = $v;
}
return $ret;
}