From 3b5cf772638337a3ad818743e3bfb225da37352b Mon Sep 17 00:00:00 2001 From: Pascal Querner Date: Fri, 1 Jun 2018 11:35:34 +0200 Subject: [PATCH] PHP5.3 compatibility --- .../views/admin/de/matomo_lang.php | 4 +- .../views/admin/en/matomo_lang.php | 4 +- copy_this/modules/bla/matomo/metadata.php | 98 +++++++++---------- 3 files changed, 53 insertions(+), 53 deletions(-) diff --git a/copy_this/modules/bla/matomo/application/views/admin/de/matomo_lang.php b/copy_this/modules/bla/matomo/application/views/admin/de/matomo_lang.php index 3504c14..e624ec9 100644 --- a/copy_this/modules/bla/matomo/application/views/admin/de/matomo_lang.php +++ b/copy_this/modules/bla/matomo/application/views/admin/de/matomo_lang.php @@ -33,7 +33,7 @@ $css = ''; -$aLang = [ +$aLang = array( 'charset' => 'UTF-8', 'SHOP_MODULE_GROUP_blaMatomo_Main' => $css . 'Matomo Konfiguration', 'SHOP_MODULE_blaMatomo_debug' => 'Debug Modus (zeigt für Shop-Admins Matomo Tracking Variablen im Template an)', @@ -71,4 +71,4 @@ 'SHOP_MODULE_GROUP_blaMatomo_Params' => 'Zusätzliches Parametermapping', 'SHOP_MODULE_blaMatomo_aParamMapVisit' => '

Parameter Mapping für visit-scope benutzerdefinierte Variablen

Hierüber können pro Zeile ein URL Parameter in Matomos visit-scope benutzerdefinierten Variablen gespeichert werden. (leer lassen wenn nicht benötigt)

Konfiguration: parameter => index|Bezeichnung
foo => 4|Parameter 1
foo2 => 5|Parameter2

Bei einem Aufruf von "http://www.shop.tld/index.php?foo=bar" wird in Matomo in die benutzerdefinierte Variable mit dem Index 4 und dem Namen "Parameter 1" der Wert "bar" gespeichert.
Achtung ein visit-scope Index wird auch schon für das Zahlungsart-Tracking verwendet!

', 'SHOP_MODULE_blaMatomo_aParamMapPage' => '

Parameter Mapping für page-scope benutzerdefinierte Variablen

Hierüber können pro Zeile ein URL Parameter in Matomos page-scope benutzerdefinierten Variablen gespeichert werden. (leer lassen wenn nicht benötigt)
Funktionsweise wie beim visit-scope Parameter-Mapping.
Achtung ein page-scope Index wird auch schon für das Newsletter-Tracking verwendet!
' -]; +); diff --git a/copy_this/modules/bla/matomo/application/views/admin/en/matomo_lang.php b/copy_this/modules/bla/matomo/application/views/admin/en/matomo_lang.php index 343ff1b..2787d99 100644 --- a/copy_this/modules/bla/matomo/application/views/admin/en/matomo_lang.php +++ b/copy_this/modules/bla/matomo/application/views/admin/en/matomo_lang.php @@ -31,7 +31,7 @@ // RESOURCE IDENTITFIER = STRING // ------------------------------- $css = ''; -$aLang = [ +$aLang = array( 'charset' => 'UTF-8', 'SHOP_MODULE_GROUP_blaMatomo_Main' => $css . 'Matomo Configuration', 'SHOP_MODULE_blaMatomo_debug' => 'Debug Mode (display Matomo Tracking variables in template for shop admins)', @@ -68,4 +68,4 @@ 'SHOP_MODULE_GROUP_blaMatomo_Params' => 'Additional parameter mapping', 'SHOP_MODULE_blaMatomo_aParamMapVisit' => '

Parameter mapping for visit-scope custom variables

You can define addition URL parameters that will get stored in Matomo\'s visit-scope custom variable. (let it empty if you do not need this feature)

Configuration: parameter => index|Label
foo => 4|Parameter 1
foo2 => 5|Parameter2

On a request like "http://www.shop.tld/index.php?foo=bar" Matomo will store in the custom variable with the the index 4 and the label "Parameter 1" the value "bar".
Caution one visit-scope index is already used for payment method tracking!

', 'SHOP_MODULE_blaMatomo_aParamMapPage' => '

Parameter mapping for page-scope custom variables

You can define additional URL parameters that will get stored in Matomo\'s page-scope custom variable. (let it empty if you do not need this feature)
See visit-scope parameter mapping for instructions.
Caution one page-scope index is already used for the newsletter registration tracking!
' -]; +); diff --git a/copy_this/modules/bla/matomo/metadata.php b/copy_this/modules/bla/matomo/metadata.php index 34c48dd..c4b8606 100644 --- a/copy_this/modules/bla/matomo/metadata.php +++ b/copy_this/modules/bla/matomo/metadata.php @@ -26,79 +26,79 @@ * @license GPLv3 * * changelog: - * + * * --- 2018-02-16 :: version 2.3 * + piwik in matomo umbenannt * + kurzes timeout für standorterkennung, damit es keine Probleme gibt, wenn matomo server unerreichbar ist. - * + * * --- 2016-10-23 :: version 2.2.3 * + Standorterkennung über IP * * --- 2016-09-07 :: version 2.2.2 * + fehlendes pushPageView ergänzt * + newsletter goal: fehlende ] hinzugefügt - * + * */ $sMetadataVersion = '1.1'; $oLang = oxRegistry::getLang(); -$aModule = [ +$aModule = array( 'id' => 'matomo', 'title' => 'bestlife Matomo Analytics (ehemals Piwik)', - 'description' => [ + 'description' => array( 'en' => 'Add Matomo (formerly Piwik) tracking codes to your online shop.
You need a matomo installation to use this module.', 'de' => 'Fügt Matomo (ehemals Piwik) Tracking Codes in Ihren online Shops ein.
Sie benötigen eine matomo Installation, um dieses Modul zu nutzen.' - ], + ), 'thumbnail' => '../bestlife.png', 'version' => '2.3.0 2018-2-16', 'author' => ' bestlife AG', 'email' => 'oxid@bestlife.ag', 'url' => 'https://github.com/vanilla-thunder/oxid-module-bla-matomo', - 'extend' => [ + 'extend' => array( 'oxviewconfig' => 'bla/matomo/application/extend/oxviewconfig_matomo' - ], - 'blocks' => [ - ['template' => 'layout/base.tpl', 'block' => 'base_style', 'file' => '/application/views/blocks/matomo.tpl'], - ['template' => 'layout/base.tpl', 'block' => 'base_js', 'file' => '/application/views/blocks/matomo-content-tracking.tpl'] - ], - 'settings' => [ - ['group' => 'blaMatomo_Main', 'name' => 'blaMatomo_debug', 'type' => 'bool', 'value' => true], - ['group' => 'blaMatomo_Main', 'name' => 'blaMatomo_sUrl', 'type' => 'str', 'value' => ''], - ['group' => 'blaMatomo_Main', 'name' => 'blaMatomo_sToken', 'type' => 'str', 'value' => ''], - ['group' => 'blaMatomo_Main', 'name' => 'blaMatomo_iPageid', 'type' => 'str', 'value' => ''], - ['group' => 'blaMatomo_Main', 'name' => 'blaMatomo_iNewsgoalid', 'type' => 'str', 'value' => '0'], - ['group' => 'blaMatomo_Main', 'name' => 'blaMatomo_iMaxCustVar', 'type' => 'str', 'value' => '5'], - ['group' => 'blaMatomo_Main', 'name' => 'blaMatomo_iCustindexNewsletter', 'type' => 'str', 'value' => '0'], - ['group' => 'blaMatomo_Main', 'name' => 'blaMatomo_iCustindexPayment', 'type' => 'str', 'value' => '0'], - ['group' => 'blaMatomo_Main', 'name' => 'blaMatomo_blUseUserID', 'type' => 'bool', 'value' => false], - ['group' => 'blaMatomo_Main', 'name' => 'blaMatomo_blFirstReferrerConv', 'type' => 'bool', 'value' => false], - ['group' => 'blaMatomo_Main', 'name' => 'blaMatomo_blEnableJSErrorTrackin', 'type' => 'bool', 'value' => false], - ['group' => 'blaMatomo_CustomVars', 'name' => 'blaMatomo_sCustomvarNewsletter', 'type' => 'str', 'value' => $oLang->translateString('SHOP_MODULE_blaMatomo_CUSTOM_NEWSLETTER')], - ['group' => 'blaMatomo_CustomVars', 'name' => 'blaMatomo_sCustomvarPayment', 'type' => 'str', 'value' => $oLang->translateString('SHOP_MODULE_blaMatomo_CUSTOM_PAYMENT')], - ['group' => 'blaMatomo_CustomVars', 'name' => 'blaMatomo_sNewsletterAccount', 'type' => 'str', 'value' => $oLang->translateString('SHOP_MODULE_blaMatomo_NEWSLETTER_ACCOUNT')], - ['group' => 'blaMatomo_CustomVars', 'name' => 'blaMatomo_sNewsletterAccountOn', 'type' => 'str', 'value' => $oLang->translateString('SHOP_MODULE_blaMatomo_NEWSLETTER_ACCOUNT_ON')], - ['group' => 'blaMatomo_CustomVars', 'name' => 'blaMatomo_sNewsletterAccountOff', 'type' => 'str', 'value' => $oLang->translateString('SHOP_MODULE_blaMatomo_NEWSLETTER_ACCOUNT_OFF')], - ['group' => 'blaMatomo_CustomVars', 'name' => 'blaMatomo_sNewsletterViewed', 'type' => 'str', 'value' => $oLang->translateString('SHOP_MODULE_blaMatomo_NEWSLETTER_VIEWED')], - ['group' => 'blaMatomo_CustomVars', 'name' => 'blaMatomo_sNewsletterOrdered', 'type' => 'str', 'value' => $oLang->translateString('SHOP_MODULE_blaMatomo_NEWSLETTER_ORDERED')], - ['group' => 'blaMatomo_CustomVars', 'name' => 'blaMatomo_sNewsletterActivated', 'type' => 'str', 'value' => $oLang->translateString('SHOP_MODULE_blaMatomo_NEWSLETTER_ACTIVATED')], - ['group' => 'blaMatomo_CustomVars', 'name' => 'blaMatomo_sNewsletterCanceled', 'type' => 'str', 'value' => $oLang->translateString('SHOP_MODULE_blaMatomo_NEWSLETTER_CANCELED')], - ['group' => 'blaMatomo_Params', 'name' => 'blaMatomo_aParamMapVisit', 'type' => 'aarr', 'value' => null], - ['group' => 'blaMatomo_Params', 'name' => 'blaMatomo_aParamMapPage', 'type' => 'aarr', 'value' => null], + ), + 'blocks' => array( + array('template' => 'layout/base.tpl', 'block' => 'base_style', 'file' => '/application/views/blocks/matomo.tpl'), + array('template' => 'layout/base.tpl', 'block' => 'base_js', 'file' => '/application/views/blocks/matomo-content-tracking.tpl') + ), + 'settings' => array( + array('group' => 'blaMatomo_Main', 'name' => 'blaMatomo_debug', 'type' => 'bool', 'value' => TRUE), + array('group' => 'blaMatomo_Main', 'name' => 'blaMatomo_sUrl', 'type' => 'str', 'value' => ''), + array('group' => 'blaMatomo_Main', 'name' => 'blaMatomo_sToken', 'type' => 'str', 'value' => ''), + array('group' => 'blaMatomo_Main', 'name' => 'blaMatomo_iPageid', 'type' => 'str', 'value' => ''), + array('group' => 'blaMatomo_Main', 'name' => 'blaMatomo_iNewsgoalid', 'type' => 'str', 'value' => '0'), + array('group' => 'blaMatomo_Main', 'name' => 'blaMatomo_iMaxCustVar', 'type' => 'str', 'value' => '5'), + array('group' => 'blaMatomo_Main', 'name' => 'blaMatomo_iCustindexNewsletter', 'type' => 'str', 'value' => '0'), + array('group' => 'blaMatomo_Main', 'name' => 'blaMatomo_iCustindexPayment', 'type' => 'str', 'value' => '0'), + array('group' => 'blaMatomo_Main', 'name' => 'blaMatomo_blUseUserID', 'type' => 'bool', 'value' => FALSE), + array('group' => 'blaMatomo_Main', 'name' => 'blaMatomo_blFirstReferrerConv', 'type' => 'bool', 'value' => FALSE), + array('group' => 'blaMatomo_Main', 'name' => 'blaMatomo_blEnableJSErrorTrackin', 'type' => 'bool', 'value' => FALSE), + array('group' => 'blaMatomo_CustomVars', 'name' => 'blaMatomo_sCustomvarNewsletter', 'type' => 'str', 'value' => $oLang->translateString('SHOP_MODULE_blaMatomo_CUSTOM_NEWSLETTER')), + array('group' => 'blaMatomo_CustomVars', 'name' => 'blaMatomo_sCustomvarPayment', 'type' => 'str', 'value' => $oLang->translateString('SHOP_MODULE_blaMatomo_CUSTOM_PAYMENT')), + array('group' => 'blaMatomo_CustomVars', 'name' => 'blaMatomo_sNewsletterAccount', 'type' => 'str', 'value' => $oLang->translateString('SHOP_MODULE_blaMatomo_NEWSLETTER_ACCOUNT')), + array('group' => 'blaMatomo_CustomVars', 'name' => 'blaMatomo_sNewsletterAccountOn', 'type' => 'str', 'value' => $oLang->translateString('SHOP_MODULE_blaMatomo_NEWSLETTER_ACCOUNT_ON')), + array('group' => 'blaMatomo_CustomVars', 'name' => 'blaMatomo_sNewsletterAccountOff', 'type' => 'str', 'value' => $oLang->translateString('SHOP_MODULE_blaMatomo_NEWSLETTER_ACCOUNT_OFF')), + array('group' => 'blaMatomo_CustomVars', 'name' => 'blaMatomo_sNewsletterViewed', 'type' => 'str', 'value' => $oLang->translateString('SHOP_MODULE_blaMatomo_NEWSLETTER_VIEWED')), + array('group' => 'blaMatomo_CustomVars', 'name' => 'blaMatomo_sNewsletterOrdered', 'type' => 'str', 'value' => $oLang->translateString('SHOP_MODULE_blaMatomo_NEWSLETTER_ORDERED')), + array('group' => 'blaMatomo_CustomVars', 'name' => 'blaMatomo_sNewsletterActivated', 'type' => 'str', 'value' => $oLang->translateString('SHOP_MODULE_blaMatomo_NEWSLETTER_ACTIVATED')), + array('group' => 'blaMatomo_CustomVars', 'name' => 'blaMatomo_sNewsletterCanceled', 'type' => 'str', 'value' => $oLang->translateString('SHOP_MODULE_blaMatomo_NEWSLETTER_CANCELED')), + array('group' => 'blaMatomo_Params', 'name' => 'blaMatomo_aParamMapVisit', 'type' => 'aarr', 'value' => NULL), + array('group' => 'blaMatomo_Params', 'name' => 'blaMatomo_aParamMapPage', 'type' => 'aarr', 'value' => NULL), - ['group' => 'blaMatomo_contentTracking', 'name' => 'blaMatomo_ct_enable', 'type' => 'bool', 'value' => false], + array('group' => 'blaMatomo_contentTracking', 'name' => 'blaMatomo_ct_enable', 'type' => 'bool', 'value' => FALSE), - ['group' => 'blaMatomo_contentTracking', 'name' => 'blaMatomo_ct_flexprev', 'type' => 'str', 'value' => '.flex-prev'], - ['group' => 'blaMatomo_contentTracking', 'name' => 'blaMatomo_ct_flexnext', 'type' => 'str', 'value' => '.flex-next'], + array('group' => 'blaMatomo_contentTracking', 'name' => 'blaMatomo_ct_flexprev', 'type' => 'str', 'value' => '.flex-prev'), + array('group' => 'blaMatomo_contentTracking', 'name' => 'blaMatomo_ct_flexnext', 'type' => 'str', 'value' => '.flex-next'), - ['group' => 'blaMatomo_contentTracking', 'name' => 'blaMatomo_ct_zoom1', 'type' => 'str', 'value' => '#zoom1'], - ['group' => 'blaMatomo_contentTracking', 'name' => 'blaMatomo_ct_pic1', 'type' => 'str', 'value' => '#morePics_1'], - ['group' => 'blaMatomo_contentTracking', 'name' => 'blaMatomo_ct_pic2', 'type' => 'str', 'value' => '#morePics_2'], - ['group' => 'blaMatomo_contentTracking', 'name' => 'blaMatomo_ct_pic3', 'type' => 'str', 'value' => '#morePics_3'], - ['group' => 'blaMatomo_contentTracking', 'name' => 'blaMatomo_ct_pic4', 'type' => 'str', 'value' => '#morePics_4'], - ['group' => 'blaMatomo_contentTracking', 'name' => 'blaMatomo_ct_description', 'type' => 'str', 'value' => 'a[href="#description"]'], - ['group' => 'blaMatomo_contentTracking', 'name' => 'blaMatomo_ct_pricealarm', 'type' => 'str', 'value' => 'a[href="#pricealarm"]'], - ['group' => 'blaMatomo_contentTracking', 'name' => 'blaMatomo_ct_tags', 'type' => 'str', 'value' => 'a[href="#tags"]'], - ['group' => 'blaMatomo_contentTracking', 'name' => 'blaMatomo_ct_productFbComments', 'type' => 'str', 'value' => 'a[href="#productFbComments"]'], - ] -]; \ No newline at end of file + array('group' => 'blaMatomo_contentTracking', 'name' => 'blaMatomo_ct_zoom1', 'type' => 'str', 'value' => '#zoom1'), + array('group' => 'blaMatomo_contentTracking', 'name' => 'blaMatomo_ct_pic1', 'type' => 'str', 'value' => '#morePics_1'), + array('group' => 'blaMatomo_contentTracking', 'name' => 'blaMatomo_ct_pic2', 'type' => 'str', 'value' => '#morePics_2'), + array('group' => 'blaMatomo_contentTracking', 'name' => 'blaMatomo_ct_pic3', 'type' => 'str', 'value' => '#morePics_3'), + array('group' => 'blaMatomo_contentTracking', 'name' => 'blaMatomo_ct_pic4', 'type' => 'str', 'value' => '#morePics_4'), + array('group' => 'blaMatomo_contentTracking', 'name' => 'blaMatomo_ct_description', 'type' => 'str', 'value' => 'a[href="#description"]'), + array('group' => 'blaMatomo_contentTracking', 'name' => 'blaMatomo_ct_pricealarm', 'type' => 'str', 'value' => 'a[href="#pricealarm"]'), + array('group' => 'blaMatomo_contentTracking', 'name' => 'blaMatomo_ct_tags', 'type' => 'str', 'value' => 'a[href="#tags"]'), + array('group' => 'blaMatomo_contentTracking', 'name' => 'blaMatomo_ct_productFbComments', 'type' => 'str', 'value' => 'a[href="#productFbComments"]'), + ) +); \ No newline at end of file