--- /dev/null
+<?php
+namespace wcf\system\html\input\node;
+use wcf\system\html\node\AbstractHtmlNode;
+
+/**
+ * Default implementation for html input nodes.
+ *
+ * @author Alexander Ebert
+ * @copyright 2001-2016 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package WoltLabSuite\Core\System\Html\Input\Node
+ * @since 3.0
+ */
+abstract class AbstractHtmlInputNode extends AbstractHtmlNode implements IHtmlInputNode {}
<?php
namespace wcf\system\html\input\node;
-use wcf\system\html\node\AbstractHtmlNode;
use wcf\system\html\node\AbstractHtmlNodeProcessor;
use wcf\util\DOMUtil;
use wcf\util\JSON;
/**
- * Proccesses `<img>` to handle embedded attachments.
+ * Processes `<img>` to handle embedded attachments.
*
* @author Alexander Ebert
* @copyright 2001-2016 WoltLab GmbH
* @package WoltLabSuite\Core\System\Html\Input\Node
* @since 3.0
*/
-class HtmlInputNodeImg extends AbstractHtmlNode {
+class HtmlInputNodeImg extends AbstractHtmlInputNode {
/**
* @inheritDoc
*/
*/
protected $embeddedContent = [];
+ /**
+ * @inheritDoc
+ */
+ protected $nodeInterface = IHtmlInputNode::class;
+
/**
* @inheritDoc
*/
<?php
namespace wcf\system\html\input\node;
-use wcf\system\html\node\AbstractHtmlNode;
use wcf\system\html\node\AbstractHtmlNodeProcessor;
/**
- * Proccesses `<woltlab-mention>`.
+ * Processes `<woltlab-mention>`.
*
* @author Alexander Ebert
* @copyright 2001-2016 WoltLab GmbH
* @package WoltLabSuite\Core\System\Html\Input\Node
* @since 3.0
*/
-class HtmlInputNodeWoltlabMention extends AbstractHtmlNode {
+class HtmlInputNodeWoltlabMention extends AbstractHtmlInputNode {
/**
* @inheritDoc
*/
<?php
namespace wcf\system\html\input\node;
use wcf\system\html\metacode\converter\IMetacodeConverter;
-use wcf\system\html\node\AbstractHtmlNode;
use wcf\system\html\node\AbstractHtmlNodeProcessor;
use wcf\util\DOMUtil;
/**
- * Proccesses `<woltlab-metacode>` and converts them if appropriate.
+ * Processes `<woltlab-metacode>` and converts them if appropriate.
*
* @author Alexander Ebert
* @copyright 2001-2016 WoltLab GmbH
* @package WoltLabSuite\Core\System\Html\Input\Node
* @since 3.0
*/
-class HtmlInputNodeWoltlabMetacode extends AbstractHtmlNode {
+class HtmlInputNodeWoltlabMetacode extends AbstractHtmlInputNode {
/**
* static mapping of attribute-less metacodes that map to
* an exact HTML tag without the need of further processing
<?php
namespace wcf\system\html\input\node;
use wcf\system\bbcode\HtmlBBCodeParser;
-use wcf\system\html\node\AbstractHtmlNode;
use wcf\system\html\node\AbstractHtmlNodeProcessor;
use wcf\util\DOMUtil;
* @package WoltLabSuite\Core\System\Html\Input\Node
* @since 3.0
*/
-class HtmlInputNodeWoltlabMetacodeMarker extends AbstractHtmlNode {
+class HtmlInputNodeWoltlabMetacodeMarker extends AbstractHtmlInputNode {
/**
* list of bbcodes that represent block elements
* @var string[]
*/
protected $htmlProcessor;
+ /**
+ * required interface for html nodes
+ * @var string
+ */
+ protected $nodeInterface = '';
+
/**
* storage for node replacements
* @var array
return $newElement;
}
+ /**
+ * Replaces an element with plain text.
+ *
+ * @param \DOMElement $element target element
+ * @param string $text text used to replace target element
+ */
+ public function replaceElementWithText(\DOMElement $element, $text) {
+ $textNode = $element->ownerDocument->createTextNode($text);
+ $element->parentNode->insertBefore($textNode, $element);
+ $element->parentNode->removeChild($element);
+ }
+
/**
* Removes an element but preserves child nodes by moving them into
* its original position.
* @param IHtmlNode $htmlNode html node processor
*/
protected function invokeHtmlNode(IHtmlNode $htmlNode) {
+ if (!($htmlNode instanceof $this->nodeInterface)) {
+ throw new \InvalidArgumentException("Node '" . get_class($htmlNode) . "' does not implement the interface '" . $this->nodeInterface . "'.");
+ }
+
$tagName = $htmlNode->getTagName();
if (empty($tagName)) {
throw new \UnexpectedValueException("Missing tag name for " . get_class($htmlNode));
*/
protected $htmlOutputNodeProcessor;
+ /**
+ * desired output type
+ * @var string
+ */
+ protected $outputType = 'text/html';
+
/**
* @inheritDoc
*/
public function process($html, $objectType, $objectID) {
$this->setContext($objectType, $objectID);
+ $this->getHtmlOutputNodeProcessor()->setOutputType($this->outputType);
$this->getHtmlOutputNodeProcessor()->load($this, $html);
$this->getHtmlOutputNodeProcessor()->process();
}
+ /**
+ * Sets the desired output type.
+ *
+ * @param string $outputType desired output type
+ * @throws \InvalidArgumentException
+ */
+ public function setOutputType($outputType) {
+ if (!in_array($outputType, ['text/html', 'text/simplified-html', 'text/plain'])) {
+ throw new \InvalidArgumentException("Expected 'text/html', 'text/simplified-html' or 'text/plain', but received '" . $outputType . "'");
+ }
+
+ $this->outputType = $outputType;
+ }
+
/**
* @inheritDoc
*/
--- /dev/null
+<?php
+namespace wcf\system\html\output\node;
+use wcf\system\html\node\AbstractHtmlNode;
+
+/**
+ * Default implementation for html output nodes.
+ *
+ * @author Alexander Ebert
+ * @copyright 2001-2016 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package WoltLabSuite\Core\System\Html\Output\Node
+ * @since 3.0
+ */
+abstract class AbstractHtmlOutputNode extends AbstractHtmlNode implements IHtmlOutputNode {
+ /**
+ * desired output type
+ * @var string
+ */
+ protected $outputType = 'text/html';
+
+ /**
+ * @inheritDoc
+ */
+ public function setOutputType($outputType) {
+ $this->outputType = $outputType;
+ }
+}
<?php
namespace wcf\system\html\output\node;
use wcf\system\application\ApplicationHandler;
-use wcf\system\html\node\AbstractHtmlNode;
use wcf\system\html\node\AbstractHtmlNodeProcessor;
use wcf\system\message\embedded\object\MessageEmbeddedObjectManager;
use wcf\system\request\RouteHandler;
use wcf\system\WCF;
+use wcf\util\DOMUtil;
use wcf\util\StringUtil;
/**
* @package WoltLabSuite\Core\System\Html\Output\Node
* @since 3.0
*/
-class HtmlOutputNodeBlockquote extends AbstractHtmlNode {
+class HtmlOutputNodeBlockquote extends AbstractHtmlOutputNode {
/**
* @inheritDoc
*/
public function process(array $elements, AbstractHtmlNodeProcessor $htmlNodeProcessor) {
/** @var \DOMElement $element */
foreach ($elements as $element) {
- $nodeIdentifier = StringUtil::getRandomID();
- $htmlNodeProcessor->addNodeData($this, $nodeIdentifier, [
- 'author' => ($element->hasAttribute('data-author')) ? $element->getAttribute('data-author') : '',
- 'url' => ($element->hasAttribute('data-url')) ? $element->getAttribute('data-url') : ''
- ]);
-
- $htmlNodeProcessor->renameTag($element, 'wcfNode-' . $nodeIdentifier);
+ switch ($this->outputType) {
+ case 'text/html':
+ $nodeIdentifier = StringUtil::getRandomID();
+ $htmlNodeProcessor->addNodeData($this, $nodeIdentifier, [
+ 'author' => $element->getAttribute('data-author'),
+ 'url' => $element->getAttribute('data-url')
+ ]);
+
+ $htmlNodeProcessor->renameTag($element, 'wcfNode-' . $nodeIdentifier);
+ break;
+
+ case 'text/simplified-html':
+ case 'text/plain':
+ // check if this quote is within another
+ if (DOMUtil::hasParent($element, 'blockquote')) {
+ DOMUtil::removeNode($element);
+ }
+ else {
+ $htmlNodeProcessor->replaceElementWithText(
+ $element,
+ WCF::getLanguage()->getDynamicVariable('wcf.bbcode.quote.simplified', ['cite' => $element->getAttribute('data-author')])."\n"
+ );
+ }
+ break;
+ }
}
}
use wcf\system\bbcode\highlighter\SqlHighlighter;
use wcf\system\bbcode\highlighter\TexHighlighter;
use wcf\system\bbcode\highlighter\XmlHighlighter;
-use wcf\system\html\node\AbstractHtmlNode;
use wcf\system\html\node\AbstractHtmlNodeProcessor;
use wcf\system\Regex;
use wcf\system\WCF;
* @package WoltLabSuite\Core\System\Html\Output\Node
* @since 3.0
*/
-class HtmlOutputNodePre extends AbstractHtmlNode {
+class HtmlOutputNodePre extends AbstractHtmlOutputNode {
/**
* @inheritDoc
*/
public function process(array $elements, AbstractHtmlNodeProcessor $htmlNodeProcessor) {
/** @var \DOMElement $element */
foreach ($elements as $element) {
- $nodeIdentifier = StringUtil::getRandomID();
- $htmlNodeProcessor->addNodeData($this, $nodeIdentifier, [
- 'content' => $element->textContent,
- 'file' => ($element->hasAttribute('data-file')) ? $element->getAttribute('data-file') : '',
- 'highlighter' => ($element->hasAttribute('data-highlighter')) ? $element->getAttribute('data-highlighter') : '',
- 'line' => ($element->hasAttribute('data-line')) ? $element->getAttribute('data-line') : 1
- ]);
-
- $htmlNodeProcessor->renameTag($element, 'wcfNode-' . $nodeIdentifier);
+ switch ($this->outputType) {
+ case 'text/html':
+ $nodeIdentifier = StringUtil::getRandomID();
+ $htmlNodeProcessor->addNodeData($this, $nodeIdentifier, [
+ 'content' => $element->textContent,
+ 'file' => ($element->hasAttribute('data-file')) ? $element->getAttribute('data-file') : '',
+ 'highlighter' => ($element->hasAttribute('data-highlighter')) ? $element->getAttribute('data-highlighter') : '',
+ 'line' => ($element->hasAttribute('data-line')) ? $element->getAttribute('data-line') : 1
+ ]);
+
+ $htmlNodeProcessor->renameTag($element, 'wcfNode-' . $nodeIdentifier);
+ break;
+
+ case 'text/simplified-html':
+ case 'text/plain':
+ return WCF::getLanguage()->getDynamicVariable('wcf.bbcode.code.simplified', ['lines' => substr_count($element->nodeValue, "\n") + 1]);
+ break;
+ }
}
}
<?php
namespace wcf\system\html\output\node;
use wcf\system\html\node\AbstractHtmlNodeProcessor;
+use wcf\system\html\node\IHtmlNode;
/**
* Processes a HTML string and renders the final output for display.
* @since 3.0
*/
class HtmlOutputNodeProcessor extends AbstractHtmlNodeProcessor {
+ /**
+ * @inheritDoc
+ */
+ protected $nodeInterface = IHtmlOutputNode::class;
+
+ /**
+ * desired output type
+ * @var string
+ */
+ protected $outputType = 'text/html';
+
+ /**
+ * Sets the desired output type.
+ *
+ * @param string $outputType desired output type
+ */
+ public function setOutputType($outputType) {
+ $this->outputType = $outputType;
+ }
+
/**
* @inheritDoc
*/
// dynamic node handlers
$this->invokeNodeHandlers('wcf\system\html\output\node\HtmlOutputNode', ['woltlab-metacode']);
}
+
+ /**
+ * @inheritDoc
+ */
+ protected function invokeHtmlNode(IHtmlNode $htmlNode) {
+ /** @var IHtmlOutputNode $htmlNode */
+ $htmlNode->setOutputType($this->outputType);
+
+ parent::invokeHtmlNode($htmlNode);
+ }
}
<?php
namespace wcf\system\html\output\node;
-use wcf\system\html\node\AbstractHtmlNode;
use wcf\system\html\node\AbstractHtmlNodeProcessor;
use wcf\util\StringUtil;
* @package WoltLabSuite\Core\System\Html\Output\Node
* @since 3.0
*/
-class HtmlOutputNodeWoltlabColor extends AbstractHtmlNode {
+class HtmlOutputNodeWoltlabColor extends AbstractHtmlOutputNode {
/**
* @inheritDoc
*/
* @inheritDoc
*/
public function process(array $elements, AbstractHtmlNodeProcessor $htmlNodeProcessor) {
- /** @var \DOMElement $element */
- foreach ($elements as $element) {
- // parse color
- if (preg_match('~^woltlab-color-(?P<color>[A-F0-9]{6})$~', $element->getAttribute('class'), $matches)) {
- $nodeIdentifier = StringUtil::getRandomID();
- $htmlNodeProcessor->addNodeData($this, $nodeIdentifier, [
- 'color' => $matches['color']
- ]);
-
- $htmlNodeProcessor->renameTag($element, 'wcfNode-' . $nodeIdentifier);
+ if ($this->outputType === 'text/html' || $this->outputType === 'text/simplified-html') {
+ /** @var \DOMElement $element */
+ foreach ($elements as $element) {
+ // parse color
+ if (preg_match('~^woltlab-color-(?P<color>[A-F0-9]{6})$~', $element->getAttribute('class'), $matches)) {
+ $nodeIdentifier = StringUtil::getRandomID();
+ $htmlNodeProcessor->addNodeData($this, $nodeIdentifier, ['color' => $matches['color']]);
+
+ $htmlNodeProcessor->renameTag($element, 'wcfNode-' . $nodeIdentifier);
+ }
}
}
}
namespace wcf\system\html\output\node;
use wcf\data\user\UserProfile;
use wcf\system\cache\runtime\UserProfileRuntimeCache;
-use wcf\system\html\node\AbstractHtmlNode;
use wcf\system\html\node\AbstractHtmlNodeProcessor;
use wcf\system\WCF;
use wcf\util\DOMUtil;
* @package WoltLabSuite\Core\System\Html\Output\Node
* @since 3.0
*/
-class HtmlOutputNodeWoltlabMention extends AbstractHtmlNode {
+class HtmlOutputNodeWoltlabMention extends AbstractHtmlOutputNode {
/**
* @inheritDoc
*/
* @inheritDoc
*/
public function process(array $elements, AbstractHtmlNodeProcessor $htmlNodeProcessor) {
- $this->userProfiles = [];
-
- $userIds = [];
- /** @var \DOMElement $element */
- foreach ($elements as $element) {
- $userId = ($element->hasAttribute('data-user-id')) ? intval($element->getAttribute('data-user-id')) : 0;
- $username = ($element->hasAttribute('data-username')) ? StringUtil::trim($element->getAttribute('data-username')) : '';
+ if ($this->outputType === 'text/html' || $this->outputType === 'text/simplified-html') {
+ $this->userProfiles = [];
- if ($userId === 0 || $username === '') {
- DOMUtil::removeNode($element);
- continue;
+ $userIds = [];
+ /** @var \DOMElement $element */
+ foreach ($elements as $element) {
+ $userId = intval($element->getAttribute('data-user-id'));
+ $username = StringUtil::trim($element->getAttribute('data-username'));
+
+ if ($userId === 0 || $username === '') {
+ DOMUtil::removeNode($element);
+ continue;
+ }
+
+ $userIds[] = $userId;
+ $nodeIdentifier = StringUtil::getRandomID();
+ $htmlNodeProcessor->addNodeData($this, $nodeIdentifier, ['userId' => $userId, 'username' => $username]);
+
+ $htmlNodeProcessor->renameTag($element, 'wcfNode-' . $nodeIdentifier);
}
- $userIds[] = $userId;
- $nodeIdentifier = StringUtil::getRandomID();
- $htmlNodeProcessor->addNodeData($this, $nodeIdentifier, [
- 'userId' => $userId,
- 'username' => $username
- ]);
-
- $htmlNodeProcessor->renameTag($element, 'wcfNode-' . $nodeIdentifier);
+ if (!empty($userIds)) {
+ $this->userProfiles = UserProfileRuntimeCache::getInstance()->getObjects($userIds);
+ }
}
-
- if (!empty($userIds)) {
- $this->userProfiles = UserProfileRuntimeCache::getInstance()->getObjects($userIds);
+ else if ($this->outputType === 'text/plain') {
+ /** @var \DOMElement $element */
+ foreach ($elements as $element) {
+ $htmlNodeProcessor->replaceElementWithText($element, '@' . $element->getAttribute('data-username'));
+ }
}
}
<?php
namespace wcf\system\html\output\node;
use wcf\system\bbcode\HtmlBBCodeParser;
-use wcf\system\html\node\AbstractHtmlNode;
use wcf\system\html\node\AbstractHtmlNodeProcessor;
use wcf\util\StringUtil;
* @package WoltLabSuite\Core\System\Html\Output\Node
* @since 3.0
*/
-class HtmlOutputNodeWoltlabMetacode extends AbstractHtmlNode {
+class HtmlOutputNodeWoltlabMetacode extends AbstractHtmlOutputNode {
/**
* @inheritDoc
*/
* @inheritDoc
*/
public function replaceTag(array $data) {
+ HtmlBBCodeParser::getInstance()->setOutputType($this->outputType);
+
return HtmlBBCodeParser::getInstance()->getHtmlOutput($data['name'], $data['attributes']);
}
}
<?php
namespace wcf\system\html\output\node;
-use wcf\system\html\node\AbstractHtmlNode;
use wcf\system\html\node\AbstractHtmlNodeProcessor;
use wcf\util\StringUtil;
* @package WoltLabSuite\Core\System\Html\Output\Node
* @since 3.0
*/
-class HtmlOutputNodeWoltlabSize extends AbstractHtmlNode {
+class HtmlOutputNodeWoltlabSize extends AbstractHtmlOutputNode {
/**
* @inheritDoc
*/
* @inheritDoc
*/
public function process(array $elements, AbstractHtmlNodeProcessor $htmlNodeProcessor) {
- /** @var \DOMElement $element */
- foreach ($elements as $element) {
- // parse color
- if (preg_match('~^woltlab-size-(?P<size>[0-9]{1,2})$~', $element->getAttribute('class'), $matches)) {
- $nodeIdentifier = StringUtil::getRandomID();
- $htmlNodeProcessor->addNodeData($this, $nodeIdentifier, [
- 'size' => $matches['size']
- ]);
-
- $htmlNodeProcessor->renameTag($element, 'wcfNode-' . $nodeIdentifier);
+ if ($this->outputType === 'text/html' || $this->outputType === 'text/simplified-html') {
+ /** @var \DOMElement $element */
+ foreach ($elements as $element) {
+ // parse color
+ if (preg_match('~^woltlab-size-(?P<size>[0-9]{1,2})$~', $element->getAttribute('class'), $matches)) {
+ $nodeIdentifier = StringUtil::getRandomID();
+ $htmlNodeProcessor->addNodeData($this, $nodeIdentifier, ['size' => $matches['size']]);
+
+ $htmlNodeProcessor->renameTag($element, 'wcfNode-' . $nodeIdentifier);
+ }
}
}
}
<?php
namespace wcf\system\html\output\node;
-use wcf\system\html\node\AbstractHtmlNode;
use wcf\system\html\node\AbstractHtmlNodeProcessor;
use wcf\system\WCF;
+use wcf\util\DOMUtil;
use wcf\util\StringUtil;
/**
* @package WoltLabSuite\Core\System\Html\Output\Node
* @since 3.0
*/
-class HtmlOutputNodeWoltlabSpoiler extends AbstractHtmlNode {
+class HtmlOutputNodeWoltlabSpoiler extends AbstractHtmlOutputNode {
/**
* @inheritDoc
*/
* @inheritDoc
*/
public function process(array $elements, AbstractHtmlNodeProcessor $htmlNodeProcessor) {
- /** @var \DOMElement $element */
- foreach ($elements as $element) {
- $nodeIdentifier = StringUtil::getRandomID();
- $htmlNodeProcessor->addNodeData($this, $nodeIdentifier, [
- 'label' => ($element->hasAttribute('data-label')) ? $element->getAttribute('data-label') : ''
- ]);
-
- $htmlNodeProcessor->renameTag($element, 'wcfNode-' . $nodeIdentifier);
+ if ($this->outputType === 'text/html' || $this->outputType === 'text/simplified-html') {
+ /** @var \DOMElement $element */
+ foreach ($elements as $element) {
+ $nodeIdentifier = StringUtil::getRandomID();
+ $htmlNodeProcessor->addNodeData($this, $nodeIdentifier, ['label' => $element->getAttribute('data-label')]);
+
+ $htmlNodeProcessor->renameTag($element, 'wcfNode-' . $nodeIdentifier);
+ }
+ }
+ else if ($this->outputType === 'text/plain') {
+ /** @var \DOMElement $element */
+ foreach ($elements as $element) {
+ DOMUtil::removeNode($element);
+ }
}
}
* @package WoltLabSuite\Core\System\Html\Output\Node
* @since 3.0
*/
-interface IHtmlOutputNode extends IHtmlNode {}
+interface IHtmlOutputNode extends IHtmlNode {
+ /**
+ * Sets the desired output type.
+ *
+ * @param string $outputType desired output type
+ */
+ public function setOutputType($outputType);
+}
throw new \RuntimeException("Unable to determine relative node position.");
}
+ /**
+ * Returns true if there is at least one parent with the provided tag name.
+ *
+ * @param \DOMElement $element start element
+ * @param string $tagName tag name to match
+ * @return boolean true if there is at least one parent with the provided tag name
+ */
+ public static function hasParent(\DOMElement $element, $tagName) {
+ while ($element = $element->parentNode) {
+ if ($element->nodeName === $tagName) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
/**
* Inserts given DOM node after the reference node.
*
<item name="wcf.bbcode.code.php.title"><![CDATA[PHP]]></item>
<item name="wcf.bbcode.code.plain.title"><![CDATA[Code]]></item>
<item name="wcf.bbcode.code.sql.title"><![CDATA[SQL]]></item>
- <item name="wcf.bbcode.code.text"><![CDATA[{@$highlighterTitle} ({#$lines} Zeile{if $lines != 1}n{/if})]]></item>
<item name="wcf.bbcode.code.python.title"><![CDATA[Python]]></item>
<item name="wcf.bbcode.code.tex.title"><![CDATA[TeX]]></item>
<item name="wcf.bbcode.code.tpl.title"><![CDATA[Smarty]]></item>
<item name="wcf.bbcode.code.xml.title"><![CDATA[XML]]></item>
+ <item name="wcf.bbcode.code.simplified"><![CDATA[(Quelltext, {#$lines} Zeile{if $lines != 1}n{/if})]]></item>
<item name="wcf.bbcode.image.source"><![CDATA[Bild-Link]]></item>
<item name="wcf.bbcode.quote.delete"><![CDATA[Zitat löschen]]></item>
<item name="wcf.bbcode.quote.edit"><![CDATA[Zitat bearbeiten]]></item>
<item name="wcf.bbcode.quote.title"><![CDATA[{@$quoteAuthor} schrieb:]]></item>
<item name="wcf.bbcode.quote.title.clickToSet"><![CDATA[(Klicken um eine Quelle anzugeben)]]></item>
<item name="wcf.bbcode.quote.title.javascript"><![CDATA[{literal}{$quoteAuthor} schrieb:{/literal}]]></item>
- <item name="wcf.bbcode.quote.text"><![CDATA[Zitat{if $cite} von {@$cite}{/if}: „{@$content}“]]></item>
+ <item name="wcf.bbcode.quote.simplified"><![CDATA[(Zitat{if $cite} von {$cite}{/if})]]></item>
<item name="wcf.bbcode.spoiler.hide"><![CDATA[Spoiler ausblenden]]></item>
<item name="wcf.bbcode.spoiler.show"><![CDATA[Spoiler anzeigen]]></item>
<item name="wcf.bbcode.spoiler.text"><![CDATA[(Versteckter Text)]]></item>
<item name="wcf.bbcode.code.python.title"><![CDATA[Python]]></item>
<item name="wcf.bbcode.code.sql.title"><![CDATA[SQL]]></item>
<item name="wcf.bbcode.code.tex.title"><![CDATA[TeX]]></item>
- <item name="wcf.bbcode.code.text"><![CDATA[{@$highlighterTitle} ({#$lines} line{if $lines != 1}s{/if})]]></item>
<item name="wcf.bbcode.code.tpl.title"><![CDATA[Smarty]]></item>
<item name="wcf.bbcode.code.xml.title"><![CDATA[XML]]></item>
+ <item name="wcf.bbcode.code.simplified"><![CDATA[(Code, {#$lines} line{if $lines != 1}s{/if})]]></item>
<item name="wcf.bbcode.image.source"><![CDATA[Image Link]]></item>
<item name="wcf.bbcode.quote.delete"><![CDATA[Delete Quote]]></item>
<item name="wcf.bbcode.quote.edit"><![CDATA[Edit Quote]]></item>
<item name="wcf.bbcode.quote.title"><![CDATA[{@$quoteAuthor} wrote:]]></item>
<item name="wcf.bbcode.quote.title.clickToSet"><![CDATA[(Click to set source)]]></item>
<item name="wcf.bbcode.quote.title.javascript"><![CDATA[{literal}{$quoteAuthor} wrote:{/literal}]]></item>
- <item name="wcf.bbcode.quote.text"><![CDATA[Quote{if $cite} from {@$cite}{/if}: “{@$content}”]]></item>
+ <item name="wcf.bbcode.quote.simplified"><![CDATA[(Quote{if $cite} from {$cite}{/if})]]></item>
<item name="wcf.bbcode.spoiler.hide"><![CDATA[Hide Spoiler]]></item>
<item name="wcf.bbcode.spoiler.show"><![CDATA[Display Spoiler]]></item>
<item name="wcf.bbcode.spoiler.text"><![CDATA[(Hidden Content)]]></item>