diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 2eafa7b..900365d 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -14,7 +14,6 @@ This is a list of people who have contributed to Sakura and also a list of the l ## Libraries - [Twig](http://twig.sensiolabs.org/) -- [Parsedown](http://parsedown.org/) - [PHPMailer](https://github.com/PHPMailer/PHPMailer) - [PayPal API](https://paypal.com/) - [jBBCode](http://jbbcode.com/) diff --git a/libraries/BBcodeDefinitions/User.php b/libraries/BBcodeDefinitions/User.php new file mode 100644 index 0000000..6fb052e --- /dev/null +++ b/libraries/BBcodeDefinitions/User.php @@ -0,0 +1,35 @@ +setTagName("user"); + $this->setUseOption(false); + $this->setParseContent(false); + } + + public function asHtml(ElementNode $el) + { + $content = ""; + + foreach ($el->getChildren() as $child) { + $content .= \Sakura\Utils::cleanString($child->getAsText(), true); + } + + $user = \Sakura\User::construct($content); + $urls = new \Sakura\Urls(); + + return '' . $user->username . ''; + } +} diff --git a/libraries/User.php b/libraries/User.php index 4356d9d..9f1d2cf 100644 --- a/libraries/User.php +++ b/libraries/User.php @@ -186,7 +186,7 @@ class User $diff = date_diff($birthday, $now); // Return the difference in years - return $diff->format('%Y'); + return (int) $diff->format('%Y'); } // Otherwise just return the birthday value diff --git a/sakura.php b/sakura.php index 23e268b..881f6e9 100644 --- a/sakura.php +++ b/sakura.php @@ -8,7 +8,7 @@ namespace Sakura; // Define Sakura version -define('SAKURA_VERSION', '20160120'); +define('SAKURA_VERSION', '20160122'); define('SAKURA_VLABEL', 'Amethyst'); define('SAKURA_COLOUR', '#9966CC'); diff --git a/templates/yuuno/forum/viewtopic.twig b/templates/yuuno/forum/viewtopic.twig index 1e4b956..538a1b0 100644 --- a/templates/yuuno/forum/viewtopic.twig +++ b/templates/yuuno/forum/viewtopic.twig @@ -118,7 +118,7 @@ {{ post.subject|slice(0, 50) }}{% if post.subject|length > 50 %}...{% endif %}