diff --git a/serendipity_event_dsgvo_gpdr/cookieconsent.min.css b/serendipity_event_dsgvo_gdpr/cookieconsent.min.css similarity index 100% rename from serendipity_event_dsgvo_gpdr/cookieconsent.min.css rename to serendipity_event_dsgvo_gdpr/cookieconsent.min.css diff --git a/serendipity_event_dsgvo_gpdr/cookieconsent.min.js b/serendipity_event_dsgvo_gdpr/cookieconsent.min.js similarity index 100% rename from serendipity_event_dsgvo_gpdr/cookieconsent.min.js rename to serendipity_event_dsgvo_gdpr/cookieconsent.min.js diff --git a/serendipity_event_dsgvo_gpdr/lang_en.inc.php b/serendipity_event_dsgvo_gdpr/lang_en.inc.php similarity index 71% rename from serendipity_event_dsgvo_gpdr/lang_en.inc.php rename to serendipity_event_dsgvo_gdpr/lang_en.inc.php index 483eb4f5..dd8ffeb3 100644 --- a/serendipity_event_dsgvo_gpdr/lang_en.inc.php +++ b/serendipity_event_dsgvo_gdpr/lang_en.inc.php @@ -1,34 +1,34 @@ terms of usage / imprint for further details.'); -@define('PLUGIN_EVENT_DSGVO_GPDR_INFO', 'Information to your blog\'s GPDR relevance'); -@define('PLUGIN_EVENT_DSGVO_GPDR_INFO_DESC', 'Serendipity allows plugins to specify, which impact they have on your blog\'s usage and handling of sensible data. At this place, this data is automatically evaluted and printed here for your information. Please be sure to always have the recent versions of plugins. You yourself are legally responsible to disclose any used services to the visitor. If you use any functionality outside of core and plugin Serendipity (custom plugins, custom templates, snippets) that is relevant, be sure to include them in your privacy statement!'); +@define('PLUGIN_EVENT_DSGVO_GDPR_COMMENTFORM_TEXT', 'Text for comment consent'); +@define('PLUGIN_EVENT_DSGVO_GDPR_COMMENTFORM_TEXT_DESC', 'Enter the text here that is displayed to the user for accepting your terms of reference. Use %gdpr_url% as a placeholder for the URL.'); +@define('PLUGIN_EVENT_DSGVO_GDPR_COMMENTFORM_TEXT_DEFAULT', 'I agree that my data will be stored. Please review the terms of usage / imprint for further details.'); +@define('PLUGIN_EVENT_DSGVO_GDPR_INFO', 'Information to your blog\'s GDPR relevance'); +@define('PLUGIN_EVENT_DSGVO_GDPR_INFO_DESC', 'Serendipity allows plugins to specify, which impact they have on your blog\'s usage and handling of sensible data. At this place, this data is automatically evaluted and printed here for your information. Please be sure to always have the recent versions of plugins. You yourself are legally responsible to disclose any used services to the visitor. If you use any functionality outside of core and plugin Serendipity (custom plugins, custom templates, snippets) that is relevant, be sure to include them in your privacy statement!'); -@define('PLUGIN_EVENT_DSGVO_GPDR_SHOW_IN_FOOTER', 'Show privacy statement link in footer?'); -@define('PLUGIN_EVENT_DSGVO_GPDR_SHOW_IN_FOOTER_DESC', 'When enabled, a link to your privacy statement is included in the footer of your blog. You can adjust the displayed text. The placeholder %gpdr_url% can be used for that link.'); -@define('PLUGIN_EVENT_DSGVO_GPDR_SHOW_IN_FOOTER_TEXT', 'Privacy statement link text'); -@define('PLUGIN_EVENT_DSGVO_GPDR_SHOW_IN_FOOTER_TEXT_DESC', 'If the privacy statement link is enabled, enter the text you want to show up there'); -@define('PLUGIN_EVENT_DSGVO_GPDR_SHOW_IN_FOOTER_TEXT_DEFAULT', 'Privacy statement / Imprint'); +@define('PLUGIN_EVENT_DSGVO_GDPR_SHOW_IN_FOOTER', 'Show privacy statement link in footer?'); +@define('PLUGIN_EVENT_DSGVO_GDPR_SHOW_IN_FOOTER_DESC', 'When enabled, a link to your privacy statement is included in the footer of your blog. You can adjust the displayed text. The placeholder %gdpr_url% can be used for that link.'); +@define('PLUGIN_EVENT_DSGVO_GDPR_SHOW_IN_FOOTER_TEXT', 'Privacy statement link text'); +@define('PLUGIN_EVENT_DSGVO_GDPR_SHOW_IN_FOOTER_TEXT_DESC', 'If the privacy statement link is enabled, enter the text you want to show up there'); +@define('PLUGIN_EVENT_DSGVO_GDPR_SHOW_IN_FOOTER_TEXT_DEFAULT', 'Privacy statement / Imprint'); -@define('PLUGIN_EVENT_DSGVO_GPDR_COOKIE_MENU', 'CookieConsent'); -@define('PLUGIN_EVENT_DSGVO_GPDR_COOKIE_CONSENT', 'Enable CookieConsent by Insites?'); -@define('PLUGIN_EVENT_DSGVO_GPDR_COOKIE_CONSENT_DESC', 'If enabled, this displays a cookie banner in your blog. This uses the CookieConsent javascript library. It only supports the Cookie information compliance type. You can use the generator on https://cookieconsent.insites.com/download/ to create the actual code; be sure to ONLY paste the main script-Part here and NOT the link to the CSS and JavaScript, to ensure that no code is loaded of foreign servers but only from yours.'); -@define('PLUGIN_EVENT_DSGVO_GPDR_COOKIE_CONSENT_TEXT', 'CookieConsent Code'); -@define('PLUGIN_EVENT_DSGVO_GPDR_COOKIE_CONSENT_TEXT_DESC', 'This javascript is easy to read, you can adapt all colors and texts here. You can use %gpdr_url% as a placeholder for the link to your policy statement.'); -@define('PLUGIN_EVENT_DSGVO_GPDR_COOKIE_CONSENT_TEXT_DEFAULT', ' +@define('PLUGIN_EVENT_DSGVO_GDPR_COOKIE_MENU', 'CookieConsent'); +@define('PLUGIN_EVENT_DSGVO_GDPR_COOKIE_CONSENT', 'Enable CookieConsent by Insites?'); +@define('PLUGIN_EVENT_DSGVO_GDPR_COOKIE_CONSENT_DESC', 'If enabled, this displays a cookie banner in your blog. This uses the CookieConsent javascript library. It only supports the Cookie information compliance type. You can use the generator on https://cookieconsent.insites.com/download/ to create the actual code; be sure to ONLY paste the main script-Part here and NOT the link to the CSS and JavaScript, to ensure that no code is loaded of foreign servers but only from yours.'); +@define('PLUGIN_EVENT_DSGVO_GDPR_COOKIE_CONSENT_TEXT', 'CookieConsent Code'); +@define('PLUGIN_EVENT_DSGVO_GDPR_COOKIE_CONSENT_TEXT_DESC', 'This javascript is easy to read, you can adapt all colors and texts here. You can use %gdpr_url% as a placeholder for the link to your policy statement.'); +@define('PLUGIN_EVENT_DSGVO_GDPR_COOKIE_CONSENT_TEXT_DEFAULT', ' '); -@define('PLUGIN_EVENT_DSGVO_GPDR_COOKIE_CONSENT_PATH', 'CookieConsent javascript location'); -@define('PLUGIN_EVENT_DSGVO_GPDR_COOKIE_CONSENT_PATH_DESC', 'This plugin bundles the JS and CSS of the cookie consent site. You can refer to other directories here. Make sure the files are called cookieconsent.min.css and cookieconsent.min.js'); -@define('PLUGIN_EVENT_DSGVO_GPDR_COMMENTFORM_ERROR', 'You must accept the terms to leave a comment.'); -@define('PLUGIN_EVENT_DSGVO_GPDR_STATEMENT_ERROR', 'This blog has not yet created a privacy statement, it must be configured in the Plugin Configuration.'); +@define('PLUGIN_EVENT_DSGVO_GDPR_COOKIE_CONSENT_PATH', 'CookieConsent javascript location'); +@define('PLUGIN_EVENT_DSGVO_GDPR_COOKIE_CONSENT_PATH_DESC', 'This plugin bundles the JS and CSS of the cookie consent site. You can refer to other directories here. Make sure the files are called cookieconsent.min.css and cookieconsent.min.js'); +@define('PLUGIN_EVENT_DSGVO_GDPR_COMMENTFORM_ERROR', 'You must accept the terms to leave a comment.'); +@define('PLUGIN_EVENT_DSGVO_GDPR_STATEMENT_ERROR', 'This blog has not yet created a privacy statement, it must be configured in the Plugin Configuration.'); -@define('PLUGIN_EVENT_DSGVO_GPDR_SERENDIPITY_CORE', ' +@define('PLUGIN_EVENT_DSGVO_GDPR_SERENDIPITY_CORE', '

Serendipity Core

diff --git a/serendipity_event_dsgvo_gpdr/serendipity_event_dsgvo_gpdr.php b/serendipity_event_dsgvo_gdpr/serendipity_event_dsgvo_gdpr.php similarity index 84% rename from serendipity_event_dsgvo_gpdr/serendipity_event_dsgvo_gpdr.php rename to serendipity_event_dsgvo_gdpr/serendipity_event_dsgvo_gdpr.php index 6dde012f..3158768a 100644 --- a/serendipity_event_dsgvo_gpdr/serendipity_event_dsgvo_gpdr.php +++ b/serendipity_event_dsgvo_gdpr/serendipity_event_dsgvo_gdpr.php @@ -11,16 +11,16 @@ if (file_exists($probelang)) { include dirname(__FILE__) . '/lang_en.inc.php'; -class serendipity_event_dsgvo_gpdr extends serendipity_event +class serendipity_event_dsgvo_gdpr extends serendipity_event { - var $title = PLUGIN_EVENT_DSGVO_GPDR_NAME; + var $title = PLUGIN_EVENT_DSGVO_GDPR_NAME; function introspect(&$propbag) { global $serendipity; - $propbag->add('name', PLUGIN_EVENT_DSGVO_GPDR_NAME); - $propbag->add('description', PLUGIN_EVENT_DSGVO_GPDR_DESC); + $propbag->add('name', PLUGIN_EVENT_DSGVO_GDPR_NAME); + $propbag->add('description', PLUGIN_EVENT_DSGVO_GDPR_DESC); $propbag->add('stackable', false); $propbag->add('author', 'Serendipity Team'); $propbag->add('version', '1.0'); @@ -43,10 +43,10 @@ class serendipity_event_dsgvo_gpdr extends serendipity_event ) ); - $propbag->add('configuration', array('commentform_checkbox', 'commentform_text', 'gpdr_url', 'gpdr_info', 'gpdr_content', 'show_in_footer', 'show_in_footer_text', 'cookie_consent', 'cookie_consent_text', 'cookie_consent_path')); + $propbag->add('configuration', array('commentform_checkbox', 'commentform_text', 'gdpr_url', 'gdpr_info', 'gdpr_content', 'show_in_footer', 'show_in_footer_text', 'cookie_consent', 'cookie_consent_text', 'cookie_consent_path')); $propbag->add('config_groups', array( - PLUGIN_EVENT_DSGVO_GPDR_MENU => array('gpdr_url', 'gpdr_info', 'gpdr_content'), - PLUGIN_EVENT_DSGVO_GPDR_COOKIE_MENU => array('cookie_consent', 'cookie_consent_text', 'cookie_consent_path') + PLUGIN_EVENT_DSGVO_GDPR_MENU => array('gdpr_url', 'gdpr_info', 'gdpr_content'), + PLUGIN_EVENT_DSGVO_GDPR_COOKIE_MENU => array('cookie_consent', 'cookie_consent_text', 'cookie_consent_path') )); } @@ -59,74 +59,74 @@ class serendipity_event_dsgvo_gpdr extends serendipity_event global $serendipity; switch($name) { - case 'gpdr_url': + case 'gdpr_url': $propbag->add('type', 'string'); - $propbag->add('name', PLUGIN_EVENT_DSGVO_GPDR_URL); - $propbag->add('description', PLUGIN_EVENT_DSGVO_GPDR_URL_DESC); + $propbag->add('name', PLUGIN_EVENT_DSGVO_GDPR_URL); + $propbag->add('description', PLUGIN_EVENT_DSGVO_GDPR_URL_DESC); $propbag->add('default', ''); break; - case 'gpdr_content': + case 'gdpr_content': $propbag->add('type', 'html'); - $propbag->add('name', PLUGIN_EVENT_DSGVO_GPDR_STATEMENT); - $propbag->add('description', PLUGIN_EVENT_DSGVO_GPDR_STATEMENT_DESC); + $propbag->add('name', PLUGIN_EVENT_DSGVO_GDPR_STATEMENT); + $propbag->add('description', PLUGIN_EVENT_DSGVO_GDPR_STATEMENT_DESC); $propbag->add('default', ""); break; case 'commentform_text': $propbag->add('type', 'html'); - $propbag->add('name', PLUGIN_EVENT_DSGVO_GPDR_COMMENTFORM_TEXT); - $propbag->add('description', PLUGIN_EVENT_DSGVO_GPDR_COMMENTFORM_TEXT_DESC); - $propbag->add('default', PLUGIN_EVENT_DSGVO_GPDR_COMMENTFORM_TEXT_DEFAULT); + $propbag->add('name', PLUGIN_EVENT_DSGVO_GDPR_COMMENTFORM_TEXT); + $propbag->add('description', PLUGIN_EVENT_DSGVO_GDPR_COMMENTFORM_TEXT_DESC); + $propbag->add('default', PLUGIN_EVENT_DSGVO_GDPR_COMMENTFORM_TEXT_DEFAULT); break; case 'commentform_checkbox': $propbag->add('type','boolean'); - $propbag->add('name', PLUGIN_EVENT_DSGVO_GPDR_COMMENTFORM_CHECKBOX); - $propbag->add('description', PLUGIN_EVENT_DSGVO_GPDR_COMMENTFORM_CHECKBOX_DESC); + $propbag->add('name', PLUGIN_EVENT_DSGVO_GDPR_COMMENTFORM_CHECKBOX); + $propbag->add('description', PLUGIN_EVENT_DSGVO_GDPR_COMMENTFORM_CHECKBOX_DESC); $propbag->add('default', 'true'); break; case 'show_in_footer': $propbag->add('type','boolean'); - $propbag->add('name', PLUGIN_EVENT_DSGVO_GPDR_SHOW_IN_FOOTER); - $propbag->add('description', PLUGIN_EVENT_DSGVO_GPDR_SHOW_IN_FOOTER_DESC); + $propbag->add('name', PLUGIN_EVENT_DSGVO_GDPR_SHOW_IN_FOOTER); + $propbag->add('description', PLUGIN_EVENT_DSGVO_GDPR_SHOW_IN_FOOTER_DESC); $propbag->add('default', 'true'); break; case 'show_in_footer_text': $propbag->add('type', 'html'); - $propbag->add('name', PLUGIN_EVENT_DSGVO_GPDR_SHOW_IN_FOOTER_TEXT); - $propbag->add('description', PLUGIN_EVENT_DSGVO_GPDR_SHOW_IN_FOOTER_TEXT_DESC); - $propbag->add('default', PLUGIN_EVENT_DSGVO_GPDR_SHOW_IN_FOOTER_TEXT_DEFAULT); + $propbag->add('name', PLUGIN_EVENT_DSGVO_GDPR_SHOW_IN_FOOTER_TEXT); + $propbag->add('description', PLUGIN_EVENT_DSGVO_GDPR_SHOW_IN_FOOTER_TEXT_DESC); + $propbag->add('default', PLUGIN_EVENT_DSGVO_GDPR_SHOW_IN_FOOTER_TEXT_DEFAULT); break; - case 'gpdr_info': + case 'gdpr_info': $propbag->add('type', 'content'); - $propbag->add('name', PLUGIN_EVENT_DSGVO_GPDR_INFO); - $propbag->add('description', PLUGIN_EVENT_DSGVO_GPDR_INFO_DESC); - $propbag->add('default', $this->inspect_gpdr()); + $propbag->add('name', PLUGIN_EVENT_DSGVO_GDPR_INFO); + $propbag->add('description', PLUGIN_EVENT_DSGVO_GDPR_INFO_DESC); + $propbag->add('default', $this->inspect_gdpr()); break; case 'cookie_consent': $propbag->add('type','boolean'); - $propbag->add('name', PLUGIN_EVENT_DSGVO_GPDR_COOKIE_CONSENT); - $propbag->add('description', PLUGIN_EVENT_DSGVO_GPDR_COOKIE_CONSENT_DESC); + $propbag->add('name', PLUGIN_EVENT_DSGVO_GDPR_COOKIE_CONSENT); + $propbag->add('description', PLUGIN_EVENT_DSGVO_GDPR_COOKIE_CONSENT_DESC); $propbag->add('default', 'true'); break; case 'cookie_consent_text': $propbag->add('type', 'text'); - $propbag->add('name', PLUGIN_EVENT_DSGVO_GPDR_COOKIE_CONSENT_TEXT); - $propbag->add('description', PLUGIN_EVENT_DSGVO_GPDR_COOKIE_CONSENT_TEXT_DESC); - $propbag->add('default', PLUGIN_EVENT_DSGVO_GPDR_COOKIE_CONSENT_TEXT_DEFAULT); + $propbag->add('name', PLUGIN_EVENT_DSGVO_GDPR_COOKIE_CONSENT_TEXT); + $propbag->add('description', PLUGIN_EVENT_DSGVO_GDPR_COOKIE_CONSENT_TEXT_DESC); + $propbag->add('default', PLUGIN_EVENT_DSGVO_GDPR_COOKIE_CONSENT_TEXT_DEFAULT); break; case 'cookie_consent_path': $propbag->add('type', 'string'); - $propbag->add('name', PLUGIN_EVENT_DSGVO_GPDR_COOKIE_CONSENT_PATH); - $propbag->add('description', PLUGIN_EVENT_DSGVO_GPDR_COOKIE_CONSENT_PATH_DESC); - $propbag->add('default', $serendipity['serendipityHTTPPath'] . 'plugins/serendipity_event_dsgvo_gpdr/'); + $propbag->add('name', PLUGIN_EVENT_DSGVO_GDPR_COOKIE_CONSENT_PATH); + $propbag->add('description', PLUGIN_EVENT_DSGVO_GDPR_COOKIE_CONSENT_PATH_DESC); + $propbag->add('default', $serendipity['serendipityHTTPPath'] . 'plugins/serendipity_event_dsgvo_gdpr/'); break; } @@ -134,8 +134,8 @@ class serendipity_event_dsgvo_gpdr extends serendipity_event return true; } - function inspect_gpdr() { - $out = PLUGIN_EVENT_DSGVO_GPDR_SERENDIPITY_CORE; + function inspect_gdpr() { + $out = PLUGIN_EVENT_DSGVO_GDPR_SERENDIPITY_CORE; $classes = serendipity_plugin_api::enum_plugins(); foreach ($classes as $class_data) { @@ -234,18 +234,18 @@ class serendipity_event_dsgvo_gpdr extends serendipity_event function parseText($text) { global $serendipity; - $url = $this->get_config('gpdr_url'); + $url = $this->get_config('gdpr_url'); if (empty($url)) { - $url = $serendipity['serendipityHTTPPath'] . $serendipity['indexFile'] . '?serendipity[subpage]=dsgvo_gpdr_privacy'; + $url = $serendipity['serendipityHTTPPath'] . $serendipity['indexFile'] . '?serendipity[subpage]=dsgvo_gdpr_privacy'; } - $text = str_replace('%gpdr_url%', $url, $text); + $text = str_replace('%gdpr_url%', $url, $text); return $text; } function isActive() { global $serendipity; - if ($serendipity['GET']['subpage'] == 'dsgvo_gpdr_privacy') { + if ($serendipity['GET']['subpage'] == 'dsgvo_gdpr_privacy') { return true; } @@ -265,7 +265,7 @@ class serendipity_event_dsgvo_gpdr extends serendipity_event // Only act to comments. Trackbacks are an API so we cannot add checks there. if (empty($serendipity['POST']['accept_privacy'])) { $eventData = array('allow_comments' => false); - $serendipity['messagestack']['comments'][] = PLUGIN_EVENT_DSGVO_GPDR_COMMENTFORM_ERROR; + $serendipity['messagestack']['comments'][] = PLUGIN_EVENT_DSGVO_GDPR_COMMENTFORM_ERROR; return false; } } @@ -276,9 +276,9 @@ class serendipity_event_dsgvo_gpdr extends serendipity_event case 'frontend_comment': if (serendipity_db_bool($this->get_config('commentform_checkbox'))) { ?> -
+
- > + >
get_config('gpdr_content'); + $statement = $this->get_config('gdpr_content'); if (empty($statement)) { - $statement = '
' . PLUGIN_EVENT_DSGVO_GPDR_STATEMENT_ERROR . '
'; + $statement = '
' . PLUGIN_EVENT_DSGVO_GDPR_STATEMENT_ERROR . '
'; } - echo '
' . $statement . '
'; + echo '
' . $statement . '
'; } return true; break; case 'frontend_footer': if (serendipity_db_bool($this->get_config('show_in_footer'))) { - echo ''; + echo ''; } if (serendipity_db_bool($this->get_config('cookie_consent'))) { @@ -337,7 +337,7 @@ class serendipity_event_dsgvo_gpdr extends serendipity_event break; case 'css': - if (!strpos($eventData, '.dsgvo_gpdr')) { + if (!strpos($eventData, '.dsgvo_gdpr')) { // class exists in CSS, so a user has customized it and we don't need default echo file_get_contents(dirname(__FILE__) . '/style.css'); } diff --git a/serendipity_event_dsgvo_gdpr/style.css b/serendipity_event_dsgvo_gdpr/style.css new file mode 100644 index 00000000..7cdc203b --- /dev/null +++ b/serendipity_event_dsgvo_gdpr/style.css @@ -0,0 +1,12 @@ +/* +Default style.css file of serendipity_event_dsgvo_gdpr. +You can customize this CSS by editing your template's stylesheet and simply placing a ".dsgvo_gdpr" class somewhere, then this file will no longer be loaded. + */ + +.dsgvo_gdpr_footer { + text-align: center; +} + +.dsgvo_gdpr_statement { + margin: 1em; +} \ No newline at end of file diff --git a/serendipity_event_dsgvo_gpdr/todo.txt b/serendipity_event_dsgvo_gdpr/todo.txt similarity index 100% rename from serendipity_event_dsgvo_gpdr/todo.txt rename to serendipity_event_dsgvo_gdpr/todo.txt diff --git a/serendipity_event_dsgvo_gpdr/style.css b/serendipity_event_dsgvo_gpdr/style.css deleted file mode 100644 index cce76342..00000000 --- a/serendipity_event_dsgvo_gpdr/style.css +++ /dev/null @@ -1,12 +0,0 @@ -/* -Default style.css file of serendipity_event_dsgvo_gpdr. -You can customize this CSS by editing your template's stylesheet and simply placing a ".dsgvo_gpdr" class somewhere, then this file will no longer be loaded. - */ - -.dsgvo_gpdr_footer { - text-align: center; -} - -.dsgvo_gpdr_statement { - margin: 1em; -} \ No newline at end of file