mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/13713] Move mention template to default templates
PHPBB3-13713
This commit is contained in:
parent
99fe591088
commit
2fe0a2ffd9
2 changed files with 24 additions and 27 deletions
|
@ -114,13 +114,13 @@ class factory implements \phpbb\textformatter\cache_interface
|
||||||
* @var array Default templates, taken from bbcode::bbcode_tpl()
|
* @var array Default templates, taken from bbcode::bbcode_tpl()
|
||||||
*/
|
*/
|
||||||
protected $default_templates = array(
|
protected $default_templates = array(
|
||||||
'b' => '<span style="font-weight: bold"><xsl:apply-templates/></span>',
|
'b' => '<span style="font-weight: bold"><xsl:apply-templates/></span>',
|
||||||
'i' => '<span style="font-style: italic"><xsl:apply-templates/></span>',
|
'i' => '<span style="font-style: italic"><xsl:apply-templates/></span>',
|
||||||
'u' => '<span style="text-decoration: underline"><xsl:apply-templates/></span>',
|
'u' => '<span style="text-decoration: underline"><xsl:apply-templates/></span>',
|
||||||
'img' => '<img src="{IMAGEURL}" class="postimage" alt="{L_IMAGE}"/>',
|
'img' => '<img src="{IMAGEURL}" class="postimage" alt="{L_IMAGE}"/>',
|
||||||
'size' => '<span><xsl:attribute name="style"><xsl:text>font-size: </xsl:text><xsl:value-of select="substring(@size, 1, 4)"/><xsl:text>%; line-height: normal</xsl:text></xsl:attribute><xsl:apply-templates/></span>',
|
'size' => '<span><xsl:attribute name="style"><xsl:text>font-size: </xsl:text><xsl:value-of select="substring(@size, 1, 4)"/><xsl:text>%; line-height: normal</xsl:text></xsl:attribute><xsl:apply-templates/></span>',
|
||||||
'color' => '<span style="color: {COLOR}"><xsl:apply-templates/></span>',
|
'color' => '<span style="color: {COLOR}"><xsl:apply-templates/></span>',
|
||||||
'email' => '<a>
|
'email' => '<a>
|
||||||
<xsl:attribute name="href">
|
<xsl:attribute name="href">
|
||||||
<xsl:text>mailto:</xsl:text>
|
<xsl:text>mailto:</xsl:text>
|
||||||
<xsl:value-of select="@email"/>
|
<xsl:value-of select="@email"/>
|
||||||
|
@ -132,6 +132,23 @@ class factory implements \phpbb\textformatter\cache_interface
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:apply-templates/>
|
<xsl:apply-templates/>
|
||||||
</a>',
|
</a>',
|
||||||
|
'mention' => '<xsl:text>@</xsl:text>
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="@profile_url">
|
||||||
|
<a class="mention">
|
||||||
|
<xsl:attribute name="href"><xsl:value-of select="@profile_url"/></xsl:attribute>
|
||||||
|
<xsl:if test="@color">
|
||||||
|
<xsl:attribute name="style">color: #<xsl:value-of select="@color"/>;</xsl:attribute>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:apply-templates/>
|
||||||
|
</a>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<span class="mention">
|
||||||
|
<xsl:apply-templates/>
|
||||||
|
</span>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>',
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -8,26 +8,6 @@
|
||||||
<!-- BEGIN listitem --><li><!-- END listitem -->
|
<!-- BEGIN listitem --><li><!-- END listitem -->
|
||||||
<!-- BEGIN listitem_close --></li><!-- END listitem_close -->
|
<!-- BEGIN listitem_close --></li><!-- END listitem_close -->
|
||||||
|
|
||||||
<!-- BEGIN mention -->
|
|
||||||
<xsl:text>@</xsl:text>
|
|
||||||
<xsl:choose>
|
|
||||||
<xsl:when test="@profile_url">
|
|
||||||
<a class="mention">
|
|
||||||
<xsl:attribute name="href"><xsl:value-of select="@profile_url"/></xsl:attribute>
|
|
||||||
<xsl:if test="@color">
|
|
||||||
<xsl:attribute name="style">color: #<xsl:value-of select="@color"/>;</xsl:attribute>
|
|
||||||
</xsl:if>
|
|
||||||
<xsl:apply-templates/>
|
|
||||||
</a>
|
|
||||||
</xsl:when>
|
|
||||||
<xsl:otherwise>
|
|
||||||
<span class="mention">
|
|
||||||
<xsl:apply-templates/>
|
|
||||||
</span>
|
|
||||||
</xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
<!-- END mention -->
|
|
||||||
|
|
||||||
<!-- BEGIN quote_username_open --><blockquote><div><cite>{USERNAME} {L_WROTE}{L_COLON}</cite><!-- END quote_username_open -->
|
<!-- BEGIN quote_username_open --><blockquote><div><cite>{USERNAME} {L_WROTE}{L_COLON}</cite><!-- END quote_username_open -->
|
||||||
<!-- BEGIN quote_open --><blockquote class="uncited"><div><!-- END quote_open -->
|
<!-- BEGIN quote_open --><blockquote class="uncited"><div><!-- END quote_open -->
|
||||||
<!-- BEGIN quote_close --></div></blockquote><!-- END quote_close -->
|
<!-- BEGIN quote_close --></div></blockquote><!-- END quote_close -->
|
||||||
|
|
Loading…
Add table
Reference in a new issue