mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-09 16:05:00 +02:00
[ticket/15921] Use backward compatible template for emojis
PHPBB3-15921
This commit is contained in:
parent
c51859c0bd
commit
e9310c928e
@ -354,7 +354,14 @@ class factory implements \phpbb\textformatter\cache_interface
|
|||||||
|
|
||||||
// Load the Emoji plugin and modify its tag's template to obey viewsmilies
|
// Load the Emoji plugin and modify its tag's template to obey viewsmilies
|
||||||
$tag = $configurator->Emoji->getTag();
|
$tag = $configurator->Emoji->getTag();
|
||||||
$tag->template = '<img alt="{.}" class="emoji" draggable="false" src="//twemoji.maxcdn.com/2/svg/{@tseq}.svg"/>';
|
$tag->template = '<xsl:choose>
|
||||||
|
<xsl:when test="@tseq">
|
||||||
|
<img alt="{.}" class="emoji" draggable="false" src="//twemoji.maxcdn.com/2/svg/{@tseq}.svg"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<img alt="{.}" class="emoji" draggable="false" src="https://cdn.jsdelivr.net/gh/s9e/emoji-assets-twemoji@11.2/dist/svgz/{@seq}.svgz"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>';
|
||||||
$tag->template = '<xsl:choose><xsl:when test="$S_VIEWSMILIES">' . str_replace('class="emoji"', 'class="emoji smilies"', $tag->template) . '</xsl:when><xsl:otherwise><xsl:value-of select="."/></xsl:otherwise></xsl:choose>';
|
$tag->template = '<xsl:choose><xsl:when test="$S_VIEWSMILIES">' . str_replace('class="emoji"', 'class="emoji smilies"', $tag->template) . '</xsl:when><xsl:otherwise><xsl:value-of select="."/></xsl:otherwise></xsl:choose>';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user