Verzeichnisstruktur phpBB-3.2.0
- Veröffentlicht
- 06.01.2017
So funktioniert es
|
Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück |
Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
Configurator.php
001 <?php
002
003 /*
004 * @package s9e\TextFormatter
005 * @copyright Copyright (c) 2010-2016 The s9e Authors
006 * @license http://www.opensource.org/licenses/mit-license.php The MIT License
007 */
008 namespace s9e\TextFormatter\Plugins\Litedown;
009 use s9e\TextFormatter\Plugins\ConfiguratorBase;
010 class Configurator extends ConfiguratorBase
011 {
012 public $decodeHtmlEntities = \false;
013 protected $tags = array(
014 'C' => '<code><xsl:apply-templates /></code>',
015 'CODE' => array(
016 'attributes' => array(
017 'lang' => array(
018 'filterChain' => array('#simpletext'),
019 'required' => \false
020 )
021 ),
022 'template' =>
023 '<pre>
024 <code>
025 <xsl:if test="@lang">
026 <xsl:attribute name="class">
027 <xsl:text>language-</xsl:text>
028 <xsl:value-of select="@lang"/>
029 </xsl:attribute>
030 </xsl:if>
031 <xsl:apply-templates />
032 </code>
033 </pre>'
034 ),
035 'DEL' => '<del><xsl:apply-templates/></del>',
036 'EM' => '<em><xsl:apply-templates/></em>',
037 'H1' => '<h1><xsl:apply-templates/></h1>',
038 'H2' => '<h2><xsl:apply-templates/></h2>',
039 'H3' => '<h3><xsl:apply-templates/></h3>',
040 'H4' => '<h4><xsl:apply-templates/></h4>',
041 'H5' => '<h5><xsl:apply-templates/></h5>',
042 'H6' => '<h6><xsl:apply-templates/></h6>',
043 'HR' => '<hr/>',
044 'IMG' => array(
045 'attributes' => array(
046 'alt' => array('required' => \false),
047 'src' => array('filterChain' => array('#url')),
048 'title' => array('required' => \false)
049 ),
050 'template' => '<img src="{@src}"><xsl:copy-of select="@alt"/><xsl:copy-of select="@title"/></img>'
051 ),
052 'LI' => '<li><xsl:apply-templates/></li>',
053 'LIST' => array(
054 'attributes' => array(
055 'start' => array(
056 'filterChain' => array('#uint'),
057 'required' => \false
058 ),
059 'type' => array(
060 'filterChain' => array('#simpletext'),
061 'required' => \false
062 )
063 ),
064 'template' =>
065 '<xsl:choose>
066 <xsl:when test="not(@type)">
067 <ul><xsl:apply-templates/></ul>
068 </xsl:when>
069 <xsl:otherwise>
070 <ol><xsl:copy-of select="@start"/><xsl:apply-templates/></ol>
071 </xsl:otherwise>
072 </xsl:choose>'
073 ),
074 'QUOTE' => '<blockquote><xsl:apply-templates/></blockquote>',
075 'STRONG' => '<strong><xsl:apply-templates/></strong>',
076 'SUP' => '<sup><xsl:apply-templates/></sup>',
077 'URL' => array(
078 'attributes' => array(
079 'title' => array(
080 'required' => \false
081 ),
082 'url' => array(
083 'filterChain' => array('#url')
084 )
085 ),
086 'template' => '<a href="{@url}"><xsl:copy-of select="@title"/><xsl:apply-templates/></a>'
087 )
088 );
089 protected function setUp()
090 {
091 $this->configurator->rulesGenerator->append('ManageParagraphs');
092 foreach ($this->tags as $tagName => $tagConfig)
093 {
094 if (isset($this->configurator->tags[$tagName]))
095 continue;
096 if (\is_string($tagConfig))
097 $tagConfig = array('template' => $tagConfig);
098 if (isset($tagConfig['attributes']))
099 {
100 foreach ($tagConfig['attributes'] as &$attributeConfig)
101 if (isset($attributeConfig['filterChain']))
102 {
103 foreach ($attributeConfig['filterChain'] as &$filter)
104 if (\is_string($filter) && $filter[0] === '#')
105 $filter = $this->configurator->attributeFilters[$filter];
106 unset($filter);
107 }
108 unset($attributeConfig);
109 }
110 $this->configurator->tags->add($tagName, $tagConfig);
111 }
112 }
113 public function asConfig()
114 {
115 return array('decodeHtmlEntities' => (bool) $this->decodeHtmlEntities);
116 }
117 public function getJSHints()
118 {
119 return array('LITEDOWN_DECODE_HTML_ENTITIES' => (int) $this->decodeHtmlEntities);
120 }
121 }