mirror of
https://github.com/wallabag/wallabag.git
synced 2025-01-09 00:15:27 +00:00
Merge pull request #1702 from wallabag/v2-piwik
Added Piwik implementation
This commit is contained in:
commit
12b5a8cea1
7 changed files with 48 additions and 1 deletions
|
@ -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,12 @@ services:
|
|||
tags:
|
||||
- { name: twig.extension }
|
||||
|
||||
wallabag.twig_piwik_extension:
|
||||
class: PiwikTwigExtension\PiwikTwigExtension
|
||||
public: false
|
||||
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,9 @@
|
|||
<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>
|
||||
|
||||
{% if craue_setting('piwik_enabled') %}
|
||||
{{ piwik(craue_setting('piwik_host'), craue_setting('piwik_site_id')) }}
|
||||
{% endif %}
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in a new issue