From 6400371ff93782d25cdbd50aa224c70145b3890a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Thu, 10 Jul 2014 13:17:04 +0200 Subject: I removed my previous commit. We have to create a new branch for that. --- inc/poche/Poche.class.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'inc/poche/Poche.class.php') diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index e8c32024..09a9f5ff 100755 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -232,6 +232,14 @@ class Poche $this->tpl = new Twig_Environment($loaderChain, $twigParams); $this->tpl->addExtension(new Twig_Extensions_Extension_I18n()); + + # filter to display domain name of an url + $filter = new Twig_SimpleFilter('getDomain', 'Tools::getDomain'); + $this->tpl->addFilter($filter); + + # filter for reading time + $filter = new Twig_SimpleFilter('getReadingTime', 'Tools::getReadingTime'); + $this->tpl->addFilter($filter); } public function createNewUser() { -- cgit v1.2.3