diff --git a/README.md b/README.md index b93b7a8..ff7ed65 100644 --- a/README.md +++ b/README.md @@ -17,10 +17,12 @@ Simple, GDPR-ready privacy controls with category-based consent, ACP management - Consent banner and preference modal - Category-based consent options -- Consent logging +- Deferred script and iframe media loading +- Consent logging with CSV export and deletion tools - Consent version resets -- ACP-managed categories, integrations, and audit logs -- Extension integration API +- Google Consent Mode +- ACP-managed categories, integrations, translations, and audit logs +- PHP and JavaScript integration APIs ### Supported categories: diff --git a/composer.json b/composer.json index 1b4d0bc..0092ac0 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "phpbb/consentmanager", "type": "phpbb-extension", - "description": "Centralized GDPR-compliant consent and deferred script loading for phpBB forums.", + "description": "GDPR-ready consent manager for phpBB forums, providing category consent, deferred script and iframe loading, consent logging, and extension integration APIs.", "homepage": "https://www.phpbb.com/", "version": "1.0.0-a2", "keywords": ["phpbb", "extension", "gdpr", "consent", "cookies"], diff --git a/language/en/common.php b/language/en/common.php index a7a8a81..84e0eb1 100644 --- a/language/en/common.php +++ b/language/en/common.php @@ -30,6 +30,7 @@ 'CONSENTMANAGER_DEFAULT_BANNER_TITLE' => 'We value your privacy', 'CONSENTMANAGER_DEFAULT_BANNER_TEXT' => 'This forum uses cookies to keep you signed in, secure your account, and ensure the site works properly. With your consent, we may also use optional cookies and similar technologies for analytics, marketing, and embedded media.', 'CONSENTMANAGER_DEFAULT_BANNER_SUBTEXT' => 'You can change your preferences at any time in the Privacy Settings.', + 'CONSENTMANAGER_PRIVACY_POLICY_LINK' => 'Read our %s here.', 'CONSENTMANAGER_CATEGORY_NECESSARY' => 'Necessary', 'CONSENTMANAGER_CATEGORY_NECESSARY_EXPLAIN' => 'Required for forum security, authentication, and essential site functionality.', 'CONSENTMANAGER_CATEGORY_ANALYTICS' => 'Analytics', diff --git a/service/log_manager.php b/service/log_manager.php index 333ba11..a73f31b 100644 --- a/service/log_manager.php +++ b/service/log_manager.php @@ -54,11 +54,6 @@ public function __construct(config $config, driver_interface $db, user $user, $c */ public function log_consent(array $categories, $version) { - if ((int) $this->user->data['user_id'] === ANONYMOUS) - { - return; - } - $record = [ 'anonymized_id' => $this->get_anonymized_subject(), 'consent_version' => (int) $version, @@ -71,12 +66,14 @@ public function log_consent(array $categories, $version) } /** - * Build an anonymized identifier for the current authenticated user. + * Build an anonymized identifier for the current user or session. * * @return string */ protected function get_anonymized_subject() { - return hash_hmac('sha256', 'u:' . (int) $this->user->data['user_id'], $this->config['rand_seed']); + $subject = (int) $this->user->data['user_id'] !== ANONYMOUS ? 'u:' . (int) $this->user->data['user_id'] : 's:' . $this->user->session_id; + + return hash_hmac('sha256', $subject, $this->config['rand_seed']); } } diff --git a/styles/all/template/event/overall_footer_body_after.html b/styles/all/template/event/overall_footer_body_after.html index a20cc30..9efdf01 100644 --- a/styles/all/template/event/overall_footer_body_after.html +++ b/styles/all/template/event/overall_footer_body_after.html @@ -1,8 +1,9 @@ {% if S_CONSENTMANAGER_ENABLED %} +{% set privacy_link %}{{ lang('PRIVACY') }}{% endset %}