diff options
| author | Tristan Darricau <tristan.darricau@sensiolabs.com> | 2015-07-07 09:46:36 +0200 |
|---|---|---|
| committer | Tristan Darricau <tristan.darricau@sensiolabs.com> | 2015-07-07 09:46:36 +0200 |
| commit | d54aa190f1f955fe33342c939520c0155a860010 (patch) | |
| tree | e256042bbfb5f6d21080044331d50507d34bab2f /phpBB/phpbb/textformatter/s9e/factory.php | |
| parent | ca5d4fd31031a47cc3a485457473b82660b84ed1 (diff) | |
| parent | 9d364aee4a739d0a8c8b745449940a37d81c9abf (diff) | |
| download | forums-d54aa190f1f955fe33342c939520c0155a860010.tar forums-d54aa190f1f955fe33342c939520c0155a860010.tar.gz forums-d54aa190f1f955fe33342c939520c0155a860010.tar.bz2 forums-d54aa190f1f955fe33342c939520c0155a860010.tar.xz forums-d54aa190f1f955fe33342c939520c0155a860010.zip | |
Merge pull request #3623 from s9e/ticket/10620
[ticket/10620] Quote improvements
Diffstat (limited to 'phpBB/phpbb/textformatter/s9e/factory.php')
| -rw-r--r-- | phpBB/phpbb/textformatter/s9e/factory.php | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/phpBB/phpbb/textformatter/s9e/factory.php b/phpBB/phpbb/textformatter/s9e/factory.php index 7ad728e6cc..2f6498197f 100644 --- a/phpBB/phpbb/textformatter/s9e/factory.php +++ b/phpBB/phpbb/textformatter/s9e/factory.php @@ -77,7 +77,12 @@ class factory implements \phpbb\textformatter\cache_interface 'quote' => "[QUOTE author={TEXT1;optional} + post_id={UINT;optional} + post_url={URL;optional;postFilter=#false} + profile_url={URL;optional;postFilter=#false} + time={UINT;optional} url={URL;optional} + user_id={UINT;optional} author={PARSE=/^\\[url=(?'url'.*?)](?'author'.*)\\[\\/url]$/i} author={PARSE=/^\\[url](?'author'(?'url'.*?))\\[\\/url]$/i} author={PARSE=/(?'url'https?:\\/\\/[^[\\]]+)/i} @@ -471,24 +476,11 @@ class factory implements \phpbb\textformatter\cache_interface $templates['li'] = $fragments['listitem'] . '<xsl:apply-templates/>' . $fragments['listitem_close']; - $fragments['quote_username_open'] = str_replace( - '{USERNAME}', - '<xsl:choose> - <xsl:when test="@url">' . str_replace('{DESCRIPTION}', '{USERNAME}', $fragments['url']) . '</xsl:when> - <xsl:otherwise>{USERNAME}</xsl:otherwise> - </xsl:choose>', - $fragments['quote_username_open'] - ); - - $templates['quote'] = - '<xsl:choose> - <xsl:when test="@author"> - ' . $fragments['quote_username_open'] . '<xsl:apply-templates/>' . $fragments['quote_close'] . ' - </xsl:when> - <xsl:otherwise> - ' . $fragments['quote_open'] . '<xsl:apply-templates/>' . $fragments['quote_close'] . ' - </xsl:otherwise> - </xsl:choose>'; + // Replace the regular quote template with the extended quote template if available + if (isset($fragments['quote_extended'])) + { + $templates['quote'] = $fragments['quote_extended']; + } // The [attachment] BBCode uses the inline_attachment template to output a comment that // is post-processed by parse_attachments() |
