diff --git a/serendipity_event_google_analytics/serendipity_event_google_analytics.php b/serendipity_event_google_analytics/serendipity_event_google_analytics.php index c27596733..d30a18098 100644 --- a/serendipity_event_google_analytics/serendipity_event_google_analytics.php +++ b/serendipity_event_google_analytics/serendipity_event_google_analytics.php @@ -8,6 +8,7 @@ class serendipity_event_google_analytics extends serendipity_event { var $title = PLUGIN_EVENT_GOOGLE_ANALYTICS_NAME; + protected $markup_elements = array(); // Docs: // - Install Google Tag Manager for web pages: https://developers.google.com/tag-platform/tag-manager/web @@ -154,7 +155,7 @@ function gtag() { !$markupDisabledConfig && !$markupDisabledPost) { $element = $element['element']; $eventData[$element] = preg_replace_callback( - "#]*)>#isUm", + "#]*)>#isUm", array($this, 'analytics_tracker_callback'), $eventData[$element] ); @@ -162,21 +163,32 @@ function gtag() { } return true; - default : + default: return false; } // end switch ($event) { } + /** + * matches: + * 0 = entire regexp match + * 1 = anything between "" + */ function analytics_tracker_callback($matches) { - $parsed_url = parse_url($matches[3].$matches[4]); + $parsed_url = parse_url($matches[2].$matches[3]); + + // Skip tracking for local URLs without scheme, or unknown scheme. if (!isset($parsed_url["scheme"])) - return; + return $matches[0]; if (!in_array($parsed_url["scheme"], array("http", "https"))) - return; + return $matches[0]; + // Note: Assume, there is no second onclick-event in substr($matches[0], 2) return 'add('name', PLUGIN_USERPROFILES_NAME); $propbag->add('description', PLUGIN_USERPROFILES_NAME_DESC); - $propbag->add('author', "Falk Döring"); + $propbag->add('author', "Falk D�ring"); $propbag->add('stackable', false); $propbag->add('version', '1.2.2'); $propbag->add('configuration', array('title', 'show_groups', 'show_users')); diff --git a/serendipity_event_userprofiles/serendipity_plugin_userprofiles_birthdays.php b/serendipity_event_userprofiles/serendipity_plugin_userprofiles_birthdays.php index 4ef348843..f894547ff 100644 --- a/serendipity_event_userprofiles/serendipity_plugin_userprofiles_birthdays.php +++ b/serendipity_event_userprofiles/serendipity_plugin_userprofiles_birthdays.php @@ -8,6 +8,7 @@ @serendipity_plugin_api::load_language(dirname(__FILE__)); class serendipity_plugin_userprofiles_birthdays extends serendipity_plugin { + protected $dependencies = array(); function introspect(&$propbag) { $propbag->add('name', PLUGIN_USERPROFILES_BIRTHDAYSNAME);