aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/textformatter
diff options
context:
space:
mode:
authorJoshyPHP <s9e.dev@gmail.com>2015-04-28 02:40:33 +0200
committerJoshyPHP <s9e.dev@gmail.com>2015-04-28 02:40:33 +0200
commit102b6c2df377759de8b17f3fe6fa7366fb7385dd (patch)
treeb78efd32cccec3eb4d80ae124d8525ee48653139 /phpBB/phpbb/textformatter
parent6870293a9e197236f5a669a814011edf5741c20b (diff)
downloadforums-102b6c2df377759de8b17f3fe6fa7366fb7385dd.tar
forums-102b6c2df377759de8b17f3fe6fa7366fb7385dd.tar.gz
forums-102b6c2df377759de8b17f3fe6fa7366fb7385dd.tar.bz2
forums-102b6c2df377759de8b17f3fe6fa7366fb7385dd.tar.xz
forums-102b6c2df377759de8b17f3fe6fa7366fb7385dd.zip
[ticket/10922] Added support for body and subject in email BBCode
PHPBB3-10922
Diffstat (limited to 'phpBB/phpbb/textformatter')
-rw-r--r--phpBB/phpbb/textformatter/s9e/factory.php15
1 files changed, 13 insertions, 2 deletions
diff --git a/phpBB/phpbb/textformatter/s9e/factory.php b/phpBB/phpbb/textformatter/s9e/factory.php
index 9576abe1f0..a1bd43e40e 100644
--- a/phpBB/phpbb/textformatter/s9e/factory.php
+++ b/phpBB/phpbb/textformatter/s9e/factory.php
@@ -68,7 +68,7 @@ class factory implements \phpbb\textformatter\cache_interface
'b' => '[B]{TEXT}[/B]',
'code' => '[CODE]{TEXT}[/CODE]',
'color' => '[COLOR={COLOR}]{TEXT}[/COLOR]',
- 'email' => '[EMAIL={EMAIL;useContent}]{TEXT}[/EMAIL]',
+ 'email' => '[EMAIL={EMAIL;useContent} subject={TEXT;optional;postFilter=urlencode} body={TEXT;optional;postFilter=urlencode}]{TEXT}[/EMAIL]',
'flash' => '[FLASH={NUMBER1},{NUMBER2} width={NUMBER1;postFilter=#flashwidth} height={NUMBER2;postFilter=#flashheight} url={URL;useContent} /]',
'i' => '[I]{TEXT}[/I]',
'img' => '[IMG src={IMAGEURL;useContent}]',
@@ -97,7 +97,18 @@ class factory implements \phpbb\textformatter\cache_interface
'img' => '<img src="{IMAGEURL}" alt="{L_IMAGE}"/>',
'size' => '<span style="font-size: {FONTSIZE}%; line-height: normal"><xsl:apply-templates/></span>',
'color' => '<span style="color: {COLOR}"><xsl:apply-templates/></span>',
- 'email' => '<a href="mailto:{EMAIL}"><xsl:apply-templates/></a>',
+ 'email' => '<a>
+ <xsl:attribute name="href">
+ <xsl:text>mailto:</xsl:text>
+ <xsl:value-of select="@email"/>
+ <xsl:if test="@subject or @body">
+ <xsl:text>?</xsl:text>
+ <xsl:if test="@subject">subject=<xsl:value-of select="@subject"/></xsl:if>
+ <xsl:if test="@body"><xsl:if test="@subject">&amp;</xsl:if>body=<xsl:value-of select="@body"/></xsl:if>
+ </xsl:if>
+ </xsl:attribute>
+ <xsl:apply-templates/>
+ </a>',
);
/**