mirror of
https://github.com/wallabag/wallabag.git
synced 2024-12-15 09:57:41 +01:00
Fix #1137: implemented Piwik
This commit is contained in:
parent
fa64d86110
commit
07643dde08
@ -22,3 +22,6 @@ export: "export"
|
||||
import: "import"
|
||||
misc: "misc"
|
||||
modify_settings: "apply"
|
||||
piwik_host: Host of your website in Piwik
|
||||
piwik_site_id: ID of your website in Piwik
|
||||
piwik_enabled: Enable Piwik
|
||||
|
@ -22,3 +22,6 @@ export: "export"
|
||||
import: "import"
|
||||
misc: "divers"
|
||||
modify_settings: "appliquer"
|
||||
piwik_host: URL de votre site dans Piwik
|
||||
piwik_site_id: ID de votre site dans Piwik
|
||||
piwik_enabled: Activer Piwik
|
||||
|
@ -19,6 +19,14 @@ services:
|
||||
tags:
|
||||
- { name: twig.extension }
|
||||
|
||||
wallabag.twig_piwik_extension:
|
||||
class: Wallabag\CoreBundle\Twig\WallabagPiwikExtension
|
||||
public: false
|
||||
arguments:
|
||||
- "@craue_config"
|
||||
tags:
|
||||
- { name: twig.extension }
|
||||
|
||||
wallabag.locale_listener:
|
||||
class: Wallabag\CoreBundle\EventListener\LocaleListener
|
||||
arguments: ["%kernel.default_locale%"]
|
||||
|
@ -64,7 +64,8 @@
|
||||
"guzzlehttp/guzzle": "^5.2.0",
|
||||
"doctrine/doctrine-migrations-bundle": "^1.0",
|
||||
"paragonie/random_compat": "~1.0",
|
||||
"craue/config-bundle": "~1.4"
|
||||
"craue/config-bundle": "~1.4",
|
||||
"mnapoli/piwik-twig-extension": "^1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/doctrine-fixtures-bundle": "~2.2",
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -71,5 +71,6 @@
|
||||
<div id="warning_message">
|
||||
You're trying wallabag v2, which is in alpha version. If you find a bug, please have a look to <a href="https://github.com/wallabag/wallabag/issues">our issues list</a> and <a href="https://github.com/wallabag/wallabag/issues/new">open a new if necessary</a>
|
||||
</div>
|
||||
{{ piwik() }}
|
||||
</body>
|
||||
</html>
|
||||
|
14
src/Wallabag/CoreBundle/Twig/WallabagPiwikExtension.php
Normal file
14
src/Wallabag/CoreBundle/Twig/WallabagPiwikExtension.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace Wallabag\CoreBundle\Twig;
|
||||
|
||||
use Craue\ConfigBundle\Util\Config;
|
||||
use PiwikTwigExtension\PiwikTwigExtension;
|
||||
|
||||
class WallabagPiwikExtension extends PiwikTwigExtension
|
||||
{
|
||||
public function __construct(Config $craueConfig)
|
||||
{
|
||||
parent::__construct($craueConfig->get('piwik_host'), $craueConfig->get('piwik_site_id'), $craueConfig->get('piwik_enabled'));
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user