mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
Merge branch '3.2.x'
This commit is contained in:
commit
5ff0e4ec7d
3 changed files with 10 additions and 3 deletions
|
@ -348,10 +348,10 @@ class factory implements \phpbb\textformatter\cache_interface
|
||||||
$configurator->registeredVars['max_img_width'] = 0;
|
$configurator->registeredVars['max_img_width'] = 0;
|
||||||
|
|
||||||
// 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
|
||||||
$configurator->Emoji->setImageSize(18);
|
$configurator->Emoji->omitImageSize();
|
||||||
$configurator->Emoji->useSVG();
|
$configurator->Emoji->useSVG();
|
||||||
$tag = $configurator->Emoji->getTag();
|
$tag = $configurator->Emoji->getTag();
|
||||||
$tag->template = '<xsl:choose><xsl:when test="$S_VIEWSMILIES">' . str_replace('class="emoji"', 'class="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>';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Modify the s9e\TextFormatter configurator after the default settings are set
|
* Modify the s9e\TextFormatter configurator after the default settings are set
|
||||||
|
|
|
@ -1047,6 +1047,13 @@ ul.linklist:after,
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.emoji {
|
||||||
|
min-height: 18px;
|
||||||
|
min-width: 18px;
|
||||||
|
height: 1em;
|
||||||
|
width: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
.smilies {
|
.smilies {
|
||||||
vertical-align: text-bottom;
|
vertical-align: text-bottom;
|
||||||
}
|
}
|
||||||
|
|
|
@ -298,7 +298,7 @@ class phpbb_textformatter_s9e_default_formatting_test extends phpbb_test_case
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
"Emoji: \xF0\x9F\x98\x80",
|
"Emoji: \xF0\x9F\x98\x80",
|
||||||
'Emoji: <img alt="' . "\xF0\x9F\x98\x80" . '" class="smilies" draggable="false" width="18" height="18" src="//cdn.jsdelivr.net/emojione/assets/svg/1f600.svg">'
|
'Emoji: <img alt="' . "\xF0\x9F\x98\x80" . '" class="emoji smilies" draggable="false" src="//cdn.jsdelivr.net/emojione/assets/svg/1f600.svg">'
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
"Emoji: \xF0\x9F\x98\x80",
|
"Emoji: \xF0\x9F\x98\x80",
|
||||||
|
|
Loading…
Add table
Reference in a new issue