{if $__wcf->getBBCodeHandler()->isAvailableBBCode('img')}
buttons.push('woltlabImage');
{/if}
-{if $__wcf->getBBCodeHandler()->isAvailableBBCode('table')}
- buttons.push('table');
-{/if}
+buttons.push('table');
buttons.push('wcfSeparator');
//<![CDATA[
$(function() {
new WCF.Action.Delete('wcf\\data\\bbcode\\BBCodeAction', '.jsBBCodeRow');
- new WCF.Action.Toggle('wcf\\data\\bbcode\\BBCodeAction', $('.jsBBCodeRow'));
});
//]]>
</script>
{foreach from=$objects item=bbcode}
<tr class="jsBBCodeRow">
<td class="columnIcon">
- <span class="icon icon16 fa-{if !$bbcode->isDisabled}check-{/if}square-o jsToggleButton jsTooltip pointer" title="{lang}wcf.global.button.{if $bbcode->isDisabled}enable{else}disable{/if}{/lang}" data-object-id="{@$bbcode->bbcodeID}"></span>
<a href="{link controller='BBCodeEdit' object=$bbcode}{/link}" title="{lang}wcf.global.button.edit{/lang}" class="jsTooltip"><span class="icon icon16 fa-pencil"></span></a>
{if $bbcode->canDelete()}
<span class="icon icon16 fa-times jsDeleteButton jsTooltip pointer" title="{lang}wcf.global.button.delete{/lang}" data-object-id="{@$bbcode->bbcodeID}" data-confirm-message-html="{lang __encode=true}wcf.acp.bbcode.delete.sure{/lang}"></span>
* @property-read string $wysiwygIcon
* @property-read string $buttonLabel
* @property-read integer $isSourceCode
- * @property-read integer $isDisabled
* @property-read integer $showButton
* @property-read integer $originIsSystem
*/
class BBCode extends ProcessibleDatabaseObject implements IRouteController {
+ /**
+ * list of attributes
+ * @var BBCodeAttribute[]
+ */
+ protected $attributes;
+
/**
* @inheritDoc
*/
*/
public function getAttributes() {
if ($this->attributes === null) {
- $this->data['attributes'] = BBCodeCache::getInstance()->getBBCodeAttributes($this->bbcodeTag);
+ $this->attributes = BBCodeCache::getInstance()->getBBCodeAttributes($this->bbcodeTag);
}
return $this->attributes;
}
+ /**
+ * Sets the attributes of this bbcode.
+ *
+ * @param BBCodeAttribute[] $attributes list of attributes
+ */
+ public function setAttributes(array $attributes) {
+ $this->attributes = $attributes;
+ }
+
/**
* @inheritDoc
*/
use wcf\data\user\group\UserGroup;
use wcf\data\user\group\UserGroupEditor;
use wcf\data\AbstractDatabaseObjectAction;
-use wcf\data\IToggleAction;
use wcf\system\database\util\PreparedStatementConditionBuilder;
use wcf\system\exception\PermissionDeniedException;
use wcf\system\WCF;
* @method BBCodeEditor[] getObjects()
* @method BBCodeEditor getSingleObject()
*/
-class BBCodeAction extends AbstractDatabaseObjectAction implements IToggleAction {
+class BBCodeAction extends AbstractDatabaseObjectAction {
/**
* @inheritDoc
*/
/**
* @inheritDoc
*/
- protected $requireACP = ['delete', 'toggle', 'update'];
+ protected $requireACP = ['delete', 'update'];
/**
* @inheritDoc
}
}
}
-
- /**
- * @inheritDoc
- */
- public function validateToggle() {
- parent::validateUpdate();
- }
-
- /**
- * @inheritDoc
- */
- public function toggle() {
- foreach ($this->getObjects() as $bbcode) {
- $bbcode->update([
- 'isDisabled' => $bbcode->isDisabled ? 0 : 1
- ]);
- }
- }
}
* @package WoltLabSuite\Core\Form
*/
abstract class MessageForm extends AbstractCaptchaForm {
- /**
- * name of the permission which contains the allowed BBCodes
- * @var string
- */
- public $allowedBBCodesPermission = 'user.message.allowedBBCodes';
-
/**
* attachment handler
* @var AttachmentHandler
*/
public $defaultSmilies = [];
+ /**
+ * name of the permission which contains the disallowed BBCodes
+ * @var string
+ */
+ public $disallowedBBCodesPermission = 'user.message.disallowedBBCodes';
+
/**
* enables multilingualism
* @var boolean
throw new UserInputException('text');
}
- // check text length
- if ($this->maxTextLength != 0 && mb_strlen($this->text) > $this->maxTextLength) {
- throw new UserInputException('text', 'tooLong');
+ if ($this->disallowedBBCodesPermission) {
+ BBCodeHandler::getInstance()->setDisallowedBBCodes(explode(',', WCF::getSession()->getPermission($this->disallowedBBCodesPermission)));
}
$this->htmlInputProcessor = new HtmlInputProcessor();
$this->htmlInputProcessor->process($this->text, $this->messageObjectType, 0);
- // TODO: add checks for disallowed bbcodes and stuff
- $this->htmlInputProcessor->validate();
+ // check text length
+ $message = $this->htmlInputProcessor->getTextContent();
+ if ($this->maxTextLength != 0 && mb_strlen($message) > $this->maxTextLength) {
+ throw new UserInputException('text', 'tooLong');
+ }
- /*if ($this->enableBBCodes && $this->allowedBBCodesPermission) {
- $disallowedBBCodes = BBCodeParser::getInstance()->validateBBCodes($this->text, ArrayUtil::trim(explode(',', WCF::getSession()->getPermission($this->allowedBBCodesPermission))));
- if (!empty($disallowedBBCodes)) {
- WCF::getTPL()->assign('disallowedBBCodes', $disallowedBBCodes);
- throw new UserInputException('text', 'disallowedBBCodes');
- }
- }*/
+ $disallowedBBCodes = $this->htmlInputProcessor->validate();
+ if (!empty($disallowedBBCodes)) {
+ WCF::getTPL()->assign('disallowedBBCodes', $disallowedBBCodes);
+ throw new UserInputException('text', 'disallowedBBCodes');
+ }
// search for censored words
if (ENABLE_CENSORSHIP) {
- $result = Censorship::getInstance()->test($this->text);
+ $result = Censorship::getInstance()->test($message);
if ($result) {
WCF::getTPL()->assign('censoredWords', $result);
throw new UserInputException('text', 'censoredWordsFound');
}
}
- if ($this->allowedBBCodesPermission) {
- BBCodeHandler::getInstance()->setAllowedBBCodes(explode(',', WCF::getSession()->getPermission($this->allowedBBCodesPermission)));
+ if ($this->disallowedBBCodesPermission) {
+ BBCodeHandler::getInstance()->setDisallowedBBCodes(explode(',', WCF::getSession()->getPermission($this->disallowedBBCodesPermission)));
}
}
'text' => $this->text,
'tmpHash' => $this->tmpHash
]);
-
- if ($this->allowedBBCodesPermission) {
- WCF::getTPL()->assign('allowedBBCodes', explode(',', ArrayUtil::trim(WCF::getSession()->getPermission($this->allowedBBCodesPermission))));
- }
}
}
* @package WoltLabSuite\Core\Form
*/
class SignatureEditForm extends MessageForm {
+ /**
+ * @inheritDoc
+ */
+ public $disallowedBBCodesPermission = 'user.signature.disallowedBBCodes';
+
/**
* @inheritDoc
*/
/**
* @inheritDoc
*/
- public $templateName = 'signatureEdit';
+ public $showSignatureSetting = false;
/**
* parsed signature cache
public $signatureCache;
/**
- * TODO: this is still missing
* @inheritDoc
*/
- public $allowedBBCodesPermission = 'user.signature.allowedBBCodes';
-
- /**
- * @inheritDoc
- */
- public $showSignatureSetting = false;
+ public $templateName = 'signatureEdit';
/**
* @inheritDoc
*/
class BBCodeHandler extends SingletonFactory {
/**
- * list of BBCodes allowed for usage
+ * list of BBCodes displayed as buttons
* @var BBCode[]
*/
- protected $allowedBBCodes = [];
+ protected $buttonBBCodes = [];
/**
- * list of BBCodes displayed as buttons
+ * list of BBCodes disallowed for usage
* @var BBCode[]
*/
- protected $buttonBBCodes = [];
+ protected $disallowedBBCodes = [];
/**
* list of BBCodes which contain raw code (disabled BBCode parsing)
* @return boolean
*/
public function isAvailableBBCode($bbCodeTag) {
- // TODO
- return true;
-
- $bbCode = BBCodeCache::getInstance()->getBBCodeByTag($bbCodeTag);
- if ($bbCode === null || $bbCode->isDisabled) {
- return false;
- }
-
- if (in_array('all', $this->allowedBBCodes)) {
- return true;
- }
- else if (in_array('none', $this->allowedBBCodes)) {
- return false;
- }
-
- return in_array($bbCodeTag, $this->allowedBBCodes);
+ return !in_array($bbCodeTag, $this->disallowedBBCodes);
}
/**
return $buttons;
}
+ /**
+ * @param string[] $bbcodes
+ * @deprecated 3.0 - please use setDisallowedBBCodes() instead
+ */
+ public function setAllowedBBCodes(array $bbcodes) {
+ throw new \RuntimeException("setAllowedBBCodes() is no longer supported, please use setDisallowedBBCodes() instead.");
+ }
+
/**
* Sets the allowed BBCodes.
*
* @param string[] $bbCodes
*/
- public function setAllowedBBCodes(array $bbCodes) {
- $this->allowedBBCodes = $bbCodes;
+ public function setDisallowedBBCodes(array $bbCodes) {
+ $this->disallowedBBCodes = $bbCodes;
}
/**
* @param string $text
* @param string[] $allowedBBCodes
* @return string[]
+ * @deprecated 3.0 - please use HtmlInputProcessor::validate() instead
*/
public function validateBBCodes($text, array $allowedBBCodes) {
- // if all BBCodes are allowed, return directly
- if (in_array('all', $allowedBBCodes)) {
- return [];
- }
-
- $this->setText($text);
- $this->buildTagArray(false);
- $this->buildXMLStructure();
-
- $usedDisallowedBBCodes = [];
- foreach ($this->tagArray as $tag) {
- if (!in_array($tag['name'], $allowedBBCodes) && !isset($usedDisallowedBBCodes[$tag['name']])) {
- $usedDisallowedBBCodes[$tag['name']] = $tag['name'];
- }
- }
-
- return $usedDisallowedBBCodes;
+ throw new \RuntimeException("validateBBCodes() is no longer supported, please use HtmlInputProcessor::validate() instead.");
}
/**
<?php
namespace wcf\system\cache\builder;
use wcf\data\bbcode\attribute\BBCodeAttribute;
-use wcf\data\bbcode\BBCode;
+use wcf\data\bbcode\BBCodeList;
use wcf\system\WCF;
/**
FROM wcf".WCF_N."_bbcode_attribute attribute
LEFT JOIN wcf".WCF_N."_bbcode bbcode
ON (bbcode.bbcodeID = attribute.bbcodeID)
- WHERE bbcode.isDisabled = 0
ORDER BY attribute.attributeNo";
$statement = WCF::getDB()->prepareStatement($sql);
$statement->execute();
}
// get bbcodes
- $sql = "SELECT *
- FROM wcf".WCF_N."_bbcode
- WHERE isDisabled = 0";
- $statement = WCF::getDB()->prepareStatement($sql);
- $statement->execute();
- while ($row = $statement->fetchArray()) {
- $row['attributes'] = (isset($attributes[$row['bbcodeTag']]) ? $attributes[$row['bbcodeTag']] : []);
- $data['bbcodes'][$row['bbcodeTag']] = new BBCode(null, $row);
+ $bbcodeList = new BBCodeList();
+ $bbcodeList->readObjects();
+ foreach ($bbcodeList as $bbcode) {
+ if (isset($attributes[$bbcode->bbcodeTag])) {
+ $bbcode->setAttributes($attributes[$bbcode->bbcodeTag]);
+ }
+
+ $data['bbcodes'][$bbcode->bbcodeTag] = $bbcode;
}
// get code highlighters
use wcf\system\html\input\filter\MessageHtmlInputFilter;
use wcf\system\html\input\node\HtmlInputNodeProcessor;
use wcf\system\html\AbstractHtmlProcessor;
+use wcf\system\WCF;
use wcf\util\StringUtil;
/**
$this->embeddedContent = $this->getHtmlInputNodeProcessor()->getEmbeddedContent();
}
+ /**
+ * Checks the input html for disallowed bbcodes and returns any matches.
+ *
+ * @return string[] list of matched disallowed bbcodes
+ */
public function validate() {
- // TODO
+ return $this->getHtmlInputNodeProcessor()->validate();
}
/**
return $this->getHtmlInputNodeProcessor()->getHtml();
}
+ /**
+ * Returns the raw text content of current document.
+ *
+ * @return string raw text content
+ */
+ public function getTextContent() {
+ return $this->getHtmlInputNodeProcessor()->getTextContent();
+ }
+
/**
* Returns the all embedded content data.
*
<?php
namespace wcf\system\html\input\node;
+use wcf\system\bbcode\BBCodeHandler;
use wcf\system\html\node\AbstractHtmlNodeProcessor;
use wcf\util\DOMUtil;
use wcf\util\JSON;
*/
protected $tagName = 'img';
+ /**
+ * @inheritDoc
+ */
+ public function isAllowed(AbstractHtmlNodeProcessor $nodeProcessor) {
+ return (BBCodeHandler::getInstance()->isAvailableBBCode('img')) ? [] : ['img'];
+ }
+
/**
* @inheritDoc
*/
<?php
namespace wcf\system\html\input\node;
+use wcf\system\bbcode\BBCodeHandler;
use wcf\system\event\EventHandler;
use wcf\system\html\node\AbstractHtmlNodeProcessor;
+use wcf\system\html\node\IHtmlNode;
+use wcf\util\StringUtil;
/**
* Processes HTML nodes and handles bbcodes.
EventHandler::getInstance()->fireAction($this, 'afterProcess');
}
+ /**
+ * Checks the input html for disallowed bbcodes and returns any matches.
+ *
+ * @return string[] list of matched disallowed bbcodes
+ */
+ public function validate() {
+ $result = [];
+
+ $this->invokeNodeHandlers('wcf\system\html\input\node\HtmlInputNode', [], function(IHtmlNode $nodeHandler) use (&$result) {
+ $disallowed = $nodeHandler->isAllowed($this);
+ if ($disallowed) {
+ $result[] = array_merge($result, $disallowed);
+ }
+ });
+
+ // handle custom nodes that have no dedicated handler
+ $customTags = [
+ 'color' => 'woltlab-color',
+ 'font' => 'woltlab-size',
+ 'size' => 'woltlab-size',
+ 'spoiler' => 'woltlab-spoiler'
+ ];
+
+ foreach ($customTags as $bbcode => $tagName) {
+ if (BBCodeHandler::getInstance()->isAvailableBBCode($bbcode)) {
+ continue;
+ }
+
+ if ($this->getDocument()->getElementsByTagName($tagName)->length) {
+ $result[] = $bbcode;
+ }
+ }
+
+ return $result;
+ }
+
+ /**
+ * Returns the raw text content of current document.
+ *
+ * @return string raw text content
+ */
+ public function getTextContent() {
+ return StringUtil::trim($this->getDocument()->getElementsByTagName('body')->item(0)->textContent);
+ }
+
/**
* Processes embedded content.
*/
use wcf\data\bbcode\media\provider\BBCodeMediaProvider;
use wcf\data\smiley\Smiley;
use wcf\data\smiley\SmileyCache;
+use wcf\system\bbcode\BBCodeHandler;
use wcf\system\bbcode\HtmlBBCodeParser;
use wcf\system\database\util\PreparedStatementConditionBuilder;
use wcf\system\WCF;
$users = $this->lookupUsernames($usernames);
}
+ $allowEmail = BBCodeHandler::getInstance()->isAvailableBBCode('email');
+ $allowMedia = BBCodeHandler::getInstance()->isAvailableBBCode('media');
+ $allowURL = BBCodeHandler::getInstance()->isAvailableBBCode('url');
+
for ($i = 0, $length = count($nodes); $i < $length; $i++) {
/** @var \DOMText $node */
$node = $nodes[$i];
$value = $this->parseMention($node, $value, $users);
}
- $value = $this->parseURL($node, $value);
+ if ($allowURL || $allowMedia) {
+ $value = $this->parseURL($node, $value, $allowURL, $allowMedia);
+ }
+
+ if ($allowEmail) {
+ $value = $this->parseEmail($node, $value);
+ }
$value = $this->parseSmiley($node, $value);
*
* @param \DOMText $text text node
* @param string $value node value
+ * @param boolean $allowURL url bbcode is allowed
+ * @param boolean $allowMedia media bbcode is allowed
* @return string modified node value with replacement placeholders
*/
- protected function parseURL(\DOMText $text, $value) {
+ protected function parseURL(\DOMText $text, $value, $allowURL, $allowMedia) {
static $urlPattern = '';
if ($urlPattern === '') {
$urlPattern = '~
)?~ix';
}
- return preg_replace_callback($urlPattern, function($matches) use ($text) {
+ return preg_replace_callback($urlPattern, function($matches) use ($text, $allowURL, $allowMedia) {
$link = $matches[0];
if (BBCodeMediaProvider::isMediaURL($link)) {
- $element = $this->htmlInputNodeProcessor->createMetacodeElement($text, 'media', [$link]);
+ if ($allowMedia) {
+ $element = $this->htmlInputNodeProcessor->createMetacodeElement($text, 'media', [$link]);
+ }
+ else {
+ return $matches[0];
+ }
}
else {
- $element = $text->ownerDocument->createElement('a');
- $element->setAttribute('href', $link);
- $element->textContent = $link;
+ if ($allowURL) {
+ $element = $text->ownerDocument->createElement('a');
+ $element->setAttribute('href', $link);
+ $element->textContent = $link;
+ }
+ else {
+ return $matches[0];
+ }
}
return $this->addReplacement($text, $element);
* @return string modified node value with replacement placeholders
*/
protected function parseEmail(\DOMText $text, $value) {
- if (mb_strpos($this->text, '@') === false) {
+ if (mb_strpos($value, '@') === false) {
return $value;
}
*/
protected $tagName = 'woltlab-mention';
+ /**
+ * @inheritDoc
+ */
+ public function isAllowed(AbstractHtmlNodeProcessor $htmlNodeProcessor) {
+ // mentions are always allowed
+ return [];
+ }
+
/**
* @inheritDoc
*/
<?php
namespace wcf\system\html\input\node;
+use wcf\system\bbcode\BBCodeHandler;
use wcf\system\html\metacode\converter\IMetacodeConverter;
use wcf\system\html\node\AbstractHtmlNodeProcessor;
use wcf\util\DOMUtil;
*/
protected $tagName = 'woltlab-metacode';
+ /**
+ * @inheritDoc
+ */
+ public function isAllowed(AbstractHtmlNodeProcessor $htmlNodeProcessor) {
+ $bbcodes = [];
+ /** @var \DOMElement $element */
+ foreach ($htmlNodeProcessor->getDocument()->getElementsByTagName($this->tagName) as $element) {
+ $bbcodes[] = $element->getAttribute('data-name');
+ }
+
+ $disallowedBBCodes = [];
+ foreach ($bbcodes as $bbcode) {
+ if (BBCodeHandler::getInstance()->isAvailableBBCode($bbcode)) {
+ continue;
+ }
+
+ $disallowedBBCodes[] = $bbcode;
+ }
+
+ return $disallowedBBCodes;
+ }
+
/**
* @inheritDoc
*/
$this->sourceElements = HtmlBBCodeParser::getInstance()->getSourceBBCodes();
}
+ /**
+ * @inheritDoc
+ */
+ public function isAllowed(AbstractHtmlNodeProcessor $htmlNodeProcessor) {
+ // metacode-marker isn't present at time of validation
+ return [];
+ }
+
/**
* @inheritDoc
*/
*
* @param string $classNamePattern full namespace pattern for class guessing
* @param string[] $skipTags list of tag names that should be ignored
+ * @param callable $callback optional callback
*/
- protected function invokeNodeHandlers($classNamePattern, array $skipTags = []) {
+ protected function invokeNodeHandlers($classNamePattern, array $skipTags = [], callable $callback = null) {
$skipTags = array_merge($skipTags, ['html', 'head', 'title', 'meta', 'body', 'link']);
$tags = [];
}, $tagName);
$className = $classNamePattern . ucfirst($tagName);
if (class_exists($className)) {
- $this->invokeHtmlNode(new $className);
+ if ($callback === null) {
+ $this->invokeHtmlNode(new $className);
+ }
+ else {
+ $callback(new $className);
+ }
}
}
}
*/
public function getTagName();
+ /**
+ * Checks for disallowed bbcodes, must return the offending bbcode on match.
+ *
+ * @param AbstractHtmlNodeProcessor $htmlNodeProcessor node processor instance
+ * @return string[] disallowed bbcodes on match or empty array
+ */
+ public function isAllowed(AbstractHtmlNodeProcessor $htmlNodeProcessor);
+
/**
* Processes the provided elements and marks them for replacement if applicable.
*
- * @param \DOMElement[] $elements static list of matched elements, does not change when removing elements
+ * @param \DOMElement[] $elements static list of matched elements, does not change when removing elements
* @param AbstractHtmlNodeProcessor $htmlNodeProcessor node processor instance
*/
public function process(array $elements, AbstractHtmlNodeProcessor $htmlNodeProcessor);
<?php
namespace wcf\system\html\output\node;
use wcf\system\html\node\AbstractHtmlNode;
+use wcf\system\html\node\AbstractHtmlNodeProcessor;
/**
* Default implementation for html output nodes.
*/
protected $outputType = 'text/html';
+ /**
+ * @inheritDoc
+ */
+ public function isAllowed(AbstractHtmlNodeProcessor $htmlNodeProcessor) {
+ // there is no validation for output nodes
+ return [];
+ }
+
/**
* @inheritDoc
*/
use wcf\data\IMessage;
use wcf\data\IMessageQuickReplyAction;
use wcf\data\IVisitableObjectAction;
+use wcf\system\bbcode\BBCodeHandler;
use wcf\system\bbcode\PreParser;
use wcf\system\event\EventHandler;
use wcf\system\exception\ParentClassException;
* @package WoltLabSuite\Core\System\Message
*/
class QuickReplyManager extends SingletonFactory {
- /**
- * list of allowed bbcodes
- * @var string[]
- */
- public $allowedBBodes = null;
-
/**
* container object
* @var \wcf\data\DatabaseObject
}
/**
- * Sets the allowed bbcodes.
+ * Sets the disallowed bbcodes.
*
- * @param string[] $allowedBBCodes
+ * @param string[] $disallowedBBCodes
*/
- public function setAllowedBBCodes(array $allowedBBCodes = null) {
- $this->allowedBBodes = $allowedBBCodes;
+ public function setDisallowedBBCodes(array $disallowedBBCodes) {
+ BBCodeHandler::getInstance()->setDisallowedBBCodes($disallowedBBCodes);
}
/**
* available BBCodes
* @var string[]
*/
- protected $bbCodes = null;
+ protected $bbCodes;
+
+ /**
+ * list of bbcode tags that are always available
+ * @var string[]
+ */
+ protected static $alwaysAvailable = ['align', 'attach', 'b', 'code', 'i', 'list', 'quote', 's', 'sub', 'sup', 'table', 'td', 'tr', 'tt', 'u', 'wsm', 'wsmg', 'wsp'];
/**
* @inheritDoc
$this->loadBBCodeSelection();
}
- if ($value == 'all') {
- $selectedBBCodes = $this->bbCodes;
- }
- else {
- $selectedBBCodes = explode(',', $value);
- }
-
WCF::getTPL()->assign([
'bbCodes' => $this->bbCodes,
'option' => $option,
- 'selectedBBCodes' => $selectedBBCodes
+ 'selectedBBCodes' => explode(',', $value)
]);
return WCF::getTPL()->fetch('bbCodeSelectOptionType');
*/
protected function loadBBCodeSelection() {
$this->bbCodes = array_keys(BBCodeCache::getInstance()->getBBCodes());
+ $this->bbCodes = array_diff($this->bbCodes, self::$alwaysAvailable);
+
asort($this->bbCodes);
}
$this->loadBBCodeSelection();
}
- if ($defaultValue == 'all') {
- $defaultValue = $this->bbCodes;
- }
- else if (empty($defaultValue) || $defaultValue == 'none') {
+ if (empty($defaultValue)) {
$defaultValue = [];
}
else {
$defaultValue = explode(',', StringUtil::unifyNewlines($defaultValue));
}
- if ($groupValue == 'all') {
- $groupValue = $this->bbCodes;
- }
- else if (empty($groupValue) || $groupValue == 'none') {
+
+ if (empty($groupValue)) {
$groupValue = [];
}
else {
* @inheritDoc
*/
public function compare($value1, $value2) {
+ // TODO: fix this
+
// handle special case where no allowed BBCodes have been set
if (empty($value1)) {
if (empty($value2)) {
<item name="wcf.acp.group.option.admin.content.smiley.canManageSmiley"><![CDATA[Kann Smileys verwalten]]></item>
<item name="wcf.acp.group.option.user.comment.floodControlTime"><![CDATA[Mindestzeit zwischen zwei Kommentaren]]></item>
<item name="wcf.acp.group.option.user.comment.floodControlTime.description"><![CDATA[Mindestzeit, die zwischen zwei hintereinander folgenden Kommentare oder Antworten vergehen muss. [Zeit in Sekunden, 0 für unbeschränkt]]]></item>
- <item name="wcf.acp.group.option.user.message.canUseSmilies"><![CDATA[Kann Smileys benutzen]]></item>
- <item name="wcf.acp.group.option.user.message.canUseHtml"><![CDATA[Kann HTML benutzen]]></item>
- <item name="wcf.acp.group.option.user.message.canUseBBCodes"><![CDATA[Kann BBCodes benutzen]]></item>
- <item name="wcf.acp.group.option.user.message.allowedBBCodes"><![CDATA[Erlaubte BBCodes]]></item>
- <item name="wcf.acp.group.option.user.message.allowedBBCodes.description"><![CDATA[Die hier ausgewählten BBCodes dürfen von Mitgliedern dieser Benutzergruppe verwendet werden.]]></item>
+ <item name="wcf.acp.group.option.user.message.disallowedBBCodes"><![CDATA[Nicht erlaubte BBCodes]]></item>
+ <item name="wcf.acp.group.option.user.message.disallowedBBCodes.description"><![CDATA[Die hier ausgewählten BBCodes dürfen von Mitgliedern dieser Benutzergruppe <em>nicht</em> verwendet werden.]]></item>
<item name="wcf.acp.group.option.admin.user.rank.canManageRank"><![CDATA[Kann Benutzerränge verwalten]]></item>
<item name="wcf.acp.group.option.admin.user.canEditActivityPoints"><![CDATA[Kann Aktivitätspunkte bearbeiten]]></item>
<item name="wcf.acp.group.option.admin.user.canViewInvisible"><![CDATA[Kann unsichtbare Benutzer sehen]]></item>
<item name="wcf.acp.group.option.user.profile.canViewMembersList"><![CDATA[Kann Mitglieder-Liste sehen]]></item>
<item name="wcf.acp.group.option.user.profile.canViewUserProfile"><![CDATA[Kann Benutzerprofile sehen]]></item>
<item name="wcf.acp.group.option.user.profile.canViewUsersOnlineList"><![CDATA[Kann Benutzer-Online-Listen sehen]]></item>
- <item name="wcf.acp.group.option.user.signature.canUseBBCodes"><![CDATA[Kann BBCodes in der Signatur verwenden]]></item>
- <item name="wcf.acp.group.option.user.signature.canUseHtml"><![CDATA[Kann HTML in der Signatur verwenden]]></item>
- <item name="wcf.acp.group.option.user.signature.canUseSmilies"><![CDATA[Kann Smileys in der Signatur verwenden]]></item>
- <item name="wcf.acp.group.option.user.signature.allowedBBCodes"><![CDATA[Erlaubte BBCodes]]></item>
- <item name="wcf.acp.group.option.user.signature.allowedBBCodes.description"><![CDATA[Die hier ausgewählten BBCodes dürfen von Mitgliedern dieser Benutzergruppe in ihrer Signatur verwendet werden.]]></item>
+ <item name="wcf.acp.group.option.user.signature.disallowedBBCodes"><![CDATA[Nicht erlaubte BBCodes]]></item>
+ <item name="wcf.acp.group.option.user.signature.disallowedBBCodes.description"><![CDATA[Die hier ausgewählten BBCodes dürfen von Mitgliedern dieser Benutzergruppe in ihrer Signatur <em>nicht</em> verwendet werden.]]></item>
<item name="wcf.acp.group.priority"><![CDATA[Priorisierung]]></item>
<item name="wcf.acp.group.priority.description"><![CDATA[Bestimmt u.a. die Reihenfolge auf der Team-Seite sowie die Auswahl von Benutzerrängen und „Wer ist online“-Darstellungen auf Basis der höchsten Priorität.]]></item>
<item name="wcf.acp.group.userOnlineMarking"><![CDATA[„Benutzer online“-Darstellung]]></item>
<item name="wcf.acp.group.option.admin.content.smiley.canManageSmiley"><![CDATA[Can manage smilies]]></item>
<item name="wcf.acp.group.option.user.comment.floodControlTime"><![CDATA[Delay for Comments]]></item>
<item name="wcf.acp.group.option.user.comment.floodControlTime.description"><![CDATA[Seconds required between creating two comments or replies. Use 0 to disable.]]></item>
- <item name="wcf.acp.group.option.user.message.canUseSmilies"><![CDATA[Can use smilies]]></item>
- <item name="wcf.acp.group.option.user.message.canUseHtml"><![CDATA[Can use HTML]]></item>
- <item name="wcf.acp.group.option.user.message.canUseBBCodes"><![CDATA[Can use BBCodes]]></item>
- <item name="wcf.acp.group.option.user.message.allowedBBCodes"><![CDATA[Allowed BBCodes]]></item>
- <item name="wcf.acp.group.option.user.message.allowedBBCodes.description"><![CDATA[All selected BBCodes can be used by the users of this user group.]]></item>
+ <item name="wcf.acp.group.option.user.message.disallowedBBCodes"><![CDATA[Disallowed BBCodes]]></item>
+ <item name="wcf.acp.group.option.user.message.disallowedBBCodes.description"><![CDATA[Selected BBCodes <em>cannot</em> be used by the users of this user group.]]></item>
<item name="wcf.acp.group.option.admin.user.rank.canManageRank"><![CDATA[Can manage user ranks]]></item>
<item name="wcf.acp.group.option.admin.user.canEditActivityPoints"><![CDATA[Can manage activity points]]></item>
<item name="wcf.acp.group.option.admin.user.canViewInvisible"><![CDATA[Can see invisible users]]></item>
<item name="wcf.acp.group.option.user.profile.canViewMembersList"><![CDATA[Can see members list]]></item>
<item name="wcf.acp.group.option.user.profile.canViewUserProfile"><![CDATA[Can see user profiles]]></item>
<item name="wcf.acp.group.option.user.profile.canViewUsersOnlineList"><![CDATA[Can see “Users Online” list]]></item>
- <item name="wcf.acp.group.option.user.signature.canUseBBCodes"><![CDATA[Can use BBCodes in signature]]></item>
- <item name="wcf.acp.group.option.user.signature.canUseHtml"><![CDATA[Can use HTML in signature]]></item>
- <item name="wcf.acp.group.option.user.signature.canUseSmilies"><![CDATA[Can use smilies in signature]]></item>
- <item name="wcf.acp.group.option.user.signature.allowedBBCodes"><![CDATA[Allowed BBCodes]]></item>
- <item name="wcf.acp.group.option.user.signature.allowedBBCodes.description"><![CDATA[All selected BBCodes can be used in the signature.]]></item>
+ <item name="wcf.acp.group.option.user.signature.disallowedBBCodes"><![CDATA[Disallowed BBCodes]]></item>
+ <item name="wcf.acp.group.option.user.signature.disallowedBBCodes.description"><![CDATA[Selected BBCodes <em>cannot</em> be used in the signature.]]></item>
<item name="wcf.acp.group.priority"><![CDATA[Priority]]></item>
<item name="wcf.acp.group.priority.description"><![CDATA[Determines the display order on the team page, user rank, and “Users Online” marking based on highest priority.]]></item>
<item name="wcf.acp.group.userOnlineMarking"><![CDATA[“Users Online” Marking]]></item>
buttonLabel VARCHAR(255) NOT NULL DEFAULT '',
isBlockElement TINYINT(1) NOT NULL DEFAULT 0,
isSourceCode TINYINT(1) NOT NULL DEFAULT 0,
- isDisabled TINYINT(1) NOT NULL DEFAULT 0,
showButton TINYINT(1) NOT NULL DEFAULT 0,
originIsSystem TINYINT(1) NOT NULL DEFAULT 0,
UNIQUE KEY bbcodeTag (bbcodeTag)