From 07643dde08a7cd3f5a556021643e64dd1d5e89f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Fri, 19 Feb 2016 15:27:57 +0100 Subject: Fix #1137: implemented Piwik --- src/Wallabag/CoreBundle/Command/InstallCommand.php | 15 +++++++++++++++ .../CoreBundle/DataFixtures/ORM/LoadSettingData.php | 15 +++++++++++++++ src/Wallabag/CoreBundle/Resources/views/base.html.twig | 1 + src/Wallabag/CoreBundle/Twig/WallabagPiwikExtension.php | 14 ++++++++++++++ 4 files changed, 45 insertions(+) create mode 100644 src/Wallabag/CoreBundle/Twig/WallabagPiwikExtension.php (limited to 'src/Wallabag/CoreBundle') diff --git a/src/Wallabag/CoreBundle/Command/InstallCommand.php b/src/Wallabag/CoreBundle/Command/InstallCommand.php index b3e20ceb..93520f9a 100644 --- a/src/Wallabag/CoreBundle/Command/InstallCommand.php +++ b/src/Wallabag/CoreBundle/Command/InstallCommand.php @@ -312,6 +312,21 @@ class InstallCommand extends ContainerAwareCommand 'value' => 'http://v2.wallabag.org', 'section' => 'misc', ], + [ + 'name' => 'piwik_enabled', + 'value' => '0', + 'section' => 'analytics', + ], + [ + 'name' => 'piwik_host', + 'value' => 'http://v2.wallabag.org', + 'section' => 'analytics', + ], + [ + 'name' => 'piwik_site_id', + 'value' => '1', + 'section' => 'analytics', + ], ]; foreach ($settings as $setting) { diff --git a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php index 5e89c2a9..10b60f30 100644 --- a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php +++ b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php @@ -110,6 +110,21 @@ class LoadSettingData extends AbstractFixture implements OrderedFixtureInterface 'value' => 'http://v2.wallabag.org', 'section' => 'misc', ], + [ + 'name' => 'piwik_enabled', + 'value' => '0', + 'section' => 'analytics', + ], + [ + 'name' => 'piwik_host', + 'value' => 'http://v2.wallabag.org', + 'section' => 'analytics', + ], + [ + 'name' => 'piwik_site_id', + 'value' => '1', + 'section' => 'analytics', + ], ]; foreach ($settings as $setting) { diff --git a/src/Wallabag/CoreBundle/Resources/views/base.html.twig b/src/Wallabag/CoreBundle/Resources/views/base.html.twig index 1742b4aa..8ca21728 100644 --- a/src/Wallabag/CoreBundle/Resources/views/base.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/base.html.twig @@ -71,5 +71,6 @@
You're trying wallabag v2, which is in alpha version. If you find a bug, please have a look to our issues list and open a new if necessary
+ {{ piwik() }} diff --git a/src/Wallabag/CoreBundle/Twig/WallabagPiwikExtension.php b/src/Wallabag/CoreBundle/Twig/WallabagPiwikExtension.php new file mode 100644 index 00000000..7725cd80 --- /dev/null +++ b/src/Wallabag/CoreBundle/Twig/WallabagPiwikExtension.php @@ -0,0 +1,14 @@ +get('piwik_host'), $craueConfig->get('piwik_site_id'), $craueConfig->get('piwik_enabled')); + } +} -- cgit v1.2.3