Skip to content

Commit

Permalink
* Matomo 4 compatibility
Browse files Browse the repository at this point in the history
* Fix spelling issue
  • Loading branch information
Zeichen32 committed Sep 9, 2020
1 parent 8f3101b commit 4bc8cae
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 18 deletions.
11 changes: 3 additions & 8 deletions .travis.yml
Expand Up @@ -3,9 +3,7 @@
language: php

php:
- 5.6
- 5.3.3
# - hhvm
- 7.2.5

services:
- redis-server
Expand All @@ -20,11 +18,8 @@ env:
- TEST_SUITE=PluginTests MYSQL_ADAPTER=PDO_MYSQL TEST_AGAINST_CORE=minimum_required_piwik

matrix:
exclude:
# execute latest stable tests only w/ PHP 5.5
- php: 5.3.3
env: TEST_SUITE=PluginTests MYSQL_ADAPTER=PDO_MYSQL TEST_AGAINST_CORE=minimum_required_piwik
- php: 5.4
exclude:
- php: 7.2.5
env: TEST_SUITE=PluginTests MYSQL_ADAPTER=PDO_MYSQL TEST_AGAINST_CORE=minimum_required_piwik

script: $PIWIK_ROOT_DIR/tests/travis/travis.sh
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,9 @@
## Changelog

### CustomOptOut 2.0.0
* Matomo 4 compatibility
* Fix spelling issue

### CustomOptOut 1.0.2, 1.0.3 (HotFix)
* (PR #53) CSS fix and libraries update
* Update [CodeMirror Editor](http://codemirror.net)
Expand Down
4 changes: 2 additions & 2 deletions SystemSettings.php
Expand Up @@ -11,7 +11,7 @@
use Piwik\Piwik;
use Piwik\Settings\FieldConfig;
use Piwik\Settings\Setting;

use Piwik\Settings\Plugin\SystemSettings as BaseSettings;
/**
* Defines Settings for CustomOptOut.
*
Expand All @@ -21,7 +21,7 @@
* $settings->metric->getValue();
*
*/
class SystemSettings extends \Piwik\Settings\Plugin\SystemSettings
class SystemSettings extends BaseSettings
{
/**
* @var Setting
Expand Down
4 changes: 2 additions & 2 deletions lang/en.json
Expand Up @@ -5,10 +5,10 @@
"EditorThemeOptionName" : "Editor Theme",
"EditorThemeDescription" : "Choose a theme for the editor.",
"DefaultCssStyles" : "Default Stylesheets",
"DefaultCssStylesDescription": "This css styles will be used if no page is selected.",
"DefaultCssStylesDescription": "This css style will be used if no page is selected.",
"DefaultCssFile": "Default Stylesheets file",
"DefaultCssFileDescription": "This css file will be used if no page is selected.",
"EnableJavascriptInjectionDescription": "Enable this option to show fields to enter javascript.",
"EnableJavascriptInjection": "Enable Javascript fields"
"EnableJavascriptInjection": "Enable Javascript fields"
}
}
6 changes: 3 additions & 3 deletions plugin.json
@@ -1,6 +1,6 @@
{
"name": "CustomOptOut",
"version": "1.0.3",
"version": "2.0.0",
"description": "Create your own opt-out iframe css styles",
"keywords": [
"Opt-Out",
Expand All @@ -10,8 +10,8 @@
"license": "GPL-3.0+",
"homepage": "https:\/\/www.zwei-entwickler.de",
"require": {
"piwik": ">=3.0.0-b1,<4.0.0-b1",
"php": ">=5.5.9"
"matomo": ">=4.0.0-b1,<5.0.0-b1",
"php": ">=7.2.5"
},
"donate": {
"paypal": "info@two-developers.com"
Expand Down
6 changes: 3 additions & 3 deletions templates/index.twig
Expand Up @@ -61,20 +61,20 @@
{% endif %}
<tr>
<td colspan="5">
{% set optOutUrl %}{% spaceless %}
{% set optOutUrl %}
{% if showOldLinks %}
{{ piwikUrl }}index.php?module=CustomOptOut&action=optOut&idsite={{ site.idsite|escape('url') }}&language={{ language }}
{% else %}
{{ piwikUrl }}index.php?module=CoreAdminHome&action=optOut&idsite={{ site.idsite|escape('url') }}&language={{ language }}
{% endif %}
{% endspaceless %}{% endset %}
{% endset %}
{% set iframeOptOut %}
<iframe style="border: 0; height: 200px; width: 600px;" src="{{ optOutUrl }}"></iframe>
{% endset %}

<code>{{ iframeOptOut|escape }}</code>
<br/>
{{ 'CoreAdminHome_OptOutExplanationBis'|translate("<a href='" ~ optOutUrl ~ "' target='_blank'>","</a>")|raw }}
{{ 'CoreAdminHome_OptOutExplanationIntro'|translate("<a href='" ~ optOutUrl ~ "' target='_blank'>","</a>")|raw }}
</td>
{% endfor %}
</table>
Expand Down

1 comment on commit 4bc8cae

@Findus23
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just FYI: If you still need that bit to be spaceless you can use {% apply spaceless %} as mentioned here: https://developer.matomo.org/guides/migrate-matomo-3-to-4

Please sign in to comment.