Skip to content

Commit

Permalink
[ticket/15921] Use twemoji
Browse files Browse the repository at this point in the history
PHPBB3-15921
  • Loading branch information
marc1706 committed Dec 26, 2018
1 parent ce90a21 commit 4bf4853
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions phpBB/docs/CREDITS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,6 @@ Text_Diff-0.2.1 http://pear.php.net/package/Text_Diff
MIT licenced:
Symfony2 (c) 2004-2011 Fabien Potencier, https://symfony.com/
Cookie Consent (c) 2015 Silktide Ltd, https://cookieconsent.insites.com

Emoji by:
Twemoji (c) 2018 Twitter, Inc, https://twemoji.twitter.com/
1 change: 1 addition & 0 deletions phpBB/phpbb/textformatter/s9e/factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ function ($m)

// Load the Emoji plugin and modify its tag's template to obey viewsmilies
$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="$S_VIEWSMILIES">' . str_replace('class="emoji"', 'class="emoji smilies"', $tag->template) . '</xsl:when><xsl:otherwise><xsl:value-of select="."/></xsl:otherwise></xsl:choose>';

/**
Expand Down

0 comments on commit 4bf4853

Please sign in to comment.