diff --git a/src/config/config.example.php b/src/config/config.example.php index f2cbfbd..eb5e18d 100644 --- a/src/config/config.example.php +++ b/src/config/config.example.php @@ -37,4 +37,10 @@ define('DEBUG_ENABLED', false); * Set list of file extentions that should be disallowed in links * see https://github.com/piwik/github-issues-mirror/issues/5 */ -define('FORBIDDEN_EXTENSIONS', ['swf', 'js', 'htm']); \ No newline at end of file +define('FORBIDDEN_EXTENSIONS', ['swf', 'js', 'htm']); + +/** + * If you want to enable piwik tracking enter the URL to your piwik instance and the ID of the website here + */ +define('PIWIK_URL', false); +define('PIWIK_ID', false); \ No newline at end of file diff --git a/src/public/index.php b/src/public/index.php index da04caf..fc9372b 100644 --- a/src/public/index.php +++ b/src/public/index.php @@ -36,11 +36,11 @@ $container['view'] = function ($container) { helpers\Twig::setDateFormat($twig); helpers\Twig::registerFilter($twig); - - $view->getEnvironment()->addGlobal('projectName', PROJECT_NAME); $view->getEnvironment()->addGlobal('githubOrganization', GITHUB_ORGANIZATION); $view->getEnvironment()->addGlobal('githubRepository', GITHUB_REPOSITORY); + $view->getEnvironment()->addGlobal('piwikURL', PIWIK_URL); + $view->getEnvironment()->addGlobal('piwikID', PIWIK_ID); return $view; }; diff --git a/src/templates/layout.twig b/src/templates/layout.twig index 51279ac..63d7539 100644 --- a/src/templates/layout.twig +++ b/src/templates/layout.twig @@ -17,13 +17,35 @@ {% block content %}{% endblock %} -
-
-
- Powered by GitHub Issue Mirror -
+
+
+
+ Powered by GitHub Issue Mirror
+
+ +{% if piwikURL and piwikID %} + + + +{% endif %} \ No newline at end of file