From be0463488960318c76c69e22c83e8d0d82657b1a Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Fri, 5 Jul 2024 16:14:15 -0700 Subject: [PATCH 01/17] Update test env. Signed-off-by: Matt Friedman --- .github/workflows/tests.yml | 62 ++++++++++++++++++++----------------- 1 file changed, 33 insertions(+), 29 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 03563d4..99da3bf 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -21,7 +21,7 @@ on: jobs: # START Basic Checks Job (EPV, code sniffer, images check, etc.) basic-checks: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 strategy: matrix: include: @@ -33,14 +33,14 @@ jobs: steps: - name: Checkout phpBB - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: phpbb/phpbb ref: ${{ env.PHPBB_BRANCH }} path: phpBB3 - name: Checkout extension - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: phpBB3/phpBB/ext/${{ env.EXTNAME }} @@ -89,28 +89,26 @@ jobs: # START MySQL and MariaDB Job mysql-tests: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 strategy: matrix: include: - - php: '7.1' + - php: '7.2' db: "mariadb:10.1" - - php: '7.1' + - php: '7.2' db: "mariadb:10.2" - - php: '7.1' + - php: '7.2' db: "mariadb:10.3" - - php: '7.1' + - php: '7.2' db: "mariadb:10.4" - - php: '7.1' + - php: '7.2' db: "mariadb:10.5" - - php: '7.1' + - php: '7.2' db: "mysql:5.6" db_alias: "MyISAM Tests" MYISAM: 1 - - php: '7.1' + - php: '7.2' db: "mysql:5.6" - - php: '7.1' - db: "mysql:5.7" - php: '7.2' db: "mysql:5.7" COVERAGE: 1 @@ -127,6 +125,10 @@ jobs: db: "mysql:5.7" - php: '8.2' db: "mysql:5.7" + - php: '8.3' + db: "mysql:5.7" + - php: '8.4' + db: "mysql:5.7" name: PHP ${{ matrix.php }} - ${{ matrix.db_alias != '' && matrix.db_alias || matrix.db }} @@ -156,14 +158,14 @@ jobs: steps: - name: Checkout phpBB - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: phpbb/phpbb ref: ${{ env.PHPBB_BRANCH }} path: phpBB3 - name: Checkout extension - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: phpBB3/phpBB/ext/${{ env.EXTNAME }} @@ -240,22 +242,20 @@ jobs: # START PostgreSQL Job postgres-tests: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 strategy: matrix: include: - - php: '7.1' + - php: '7.2' db: "postgres:9.5" - - php: '7.1' + - php: '7.2' db: "postgres:9.6" - - php: '7.1' + - php: '7.2' db: "postgres:10" - - php: '7.1' + - php: '7.2' db: "postgres:11" - - php: '7.1' + - php: '7.2' db: "postgres:12" - - php: '7.1' - db: "postgres:13" - php: '7.2' db: "postgres:13" - php: '7.3' @@ -270,6 +270,10 @@ jobs: db: "postgres:14" - php: '8.2' db: "postgres:14" + - php: '8.3' + db: "postgres:14" + - php: '8.4' + db: "postgres:14" name: PHP ${{ matrix.php }} - ${{ matrix.db }} @@ -301,14 +305,14 @@ jobs: steps: - name: Checkout phpBB - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: phpbb/phpbb ref: ${{ env.PHPBB_BRANCH }} path: phpBB3 - name: Checkout extension - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: phpBB3/phpBB/ext/${{ env.EXTNAME }} @@ -354,11 +358,11 @@ jobs: # START Other Tests Job (SQLite 3 and mssql) other-tests: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 strategy: matrix: include: - - php: '7.1' + - php: '7.2' db: "sqlite3" - php: '7.2' db: "mcr.microsoft.com/mssql/server:2017-latest" @@ -396,14 +400,14 @@ jobs: steps: - name: Checkout phpBB - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: phpbb/phpbb ref: ${{ env.PHPBB_BRANCH }} path: phpBB3 - name: Checkout extension - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: phpBB3/phpBB/ext/${{ env.EXTNAME }} From 9f84fef0e4bbdec5d6f2f5fcd16c9f276515c202 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Fri, 5 Jul 2024 16:14:27 -0700 Subject: [PATCH 02/17] Update phpBB requirements Signed-off-by: Matt Friedman --- composer.json | 2 +- ext.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 65dea40..b46a835 100644 --- a/composer.json +++ b/composer.json @@ -44,7 +44,7 @@ "extra": { "display-name": "Google Analytics", "soft-require": { - "phpbb/phpbb": ">=3.2.0" + "phpbb/phpbb": ">=3.2.0,<4.0.0@dev" }, "version-check": { "host": "www.phpbb.com", diff --git a/ext.php b/ext.php index dede459..75220f6 100644 --- a/ext.php +++ b/ext.php @@ -19,6 +19,7 @@ class ext extends base */ public function is_enableable() { - return phpbb_version_compare(PHPBB_VERSION, '3.2.0', '>='); + return phpbb_version_compare(PHPBB_VERSION, '3.2.0', '>=') + && phpbb_version_compare(PHPBB_VERSION, '4.0.0-dev', '<'); } } From 91bc0509b19a1dcd0a48a740829e8f0aac3da642 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Thu, 10 Apr 2025 21:08:50 -0700 Subject: [PATCH 03/17] Repo fixes --- .github/workflows/tests.yml | 8 ++++---- README.md | 2 +- composer.json | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 99da3bf..5b2b2db 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -358,7 +358,7 @@ jobs: # START Other Tests Job (SQLite 3 and mssql) other-tests: - runs-on: ubuntu-22.04 + runs-on: ubuntu-20.04 strategy: matrix: include: @@ -368,14 +368,14 @@ jobs: db: "mcr.microsoft.com/mssql/server:2017-latest" db_alias: 'MSSQL 2017' - php: '7.2' - db: "mcr.microsoft.com/mssql/server:2019-latest" + db: "mcr.microsoft.com/mssql/server:2019-CU27-ubuntu-20.04" db_alias: 'MSSQL 2019' name: PHP ${{ matrix.php }} - ${{ matrix.db_alias != '' && matrix.db_alias || matrix.db }} services: mssql: - image: ${{ matrix.db != 'mcr.microsoft.com/mssql/server:2017-latest' && matrix.db != 'mcr.microsoft.com/mssql/server:2019-latest' && 'mcr.microsoft.com/mssql/server:2017-latest' || matrix.db }} + image: ${{ matrix.db != 'mcr.microsoft.com/mssql/server:2017-latest' && matrix.db != 'mcr.microsoft.com/mssql/server:2019-CU27-ubuntu-20.04' && 'mcr.microsoft.com/mssql/server:2017-latest' || matrix.db }} env: SA_PASSWORD: "Pssw0rd_12" ACCEPT_EULA: "y" @@ -415,7 +415,7 @@ jobs: env: MATRIX_DB: ${{ matrix.db }} run: | - if [ $MATRIX_DB == 'mcr.microsoft.com/mssql/server:2017-latest' ] || [ $MATRIX_DB == 'mcr.microsoft.com/mssql/server:2019-latest' ] + if [ $MATRIX_DB == 'mcr.microsoft.com/mssql/server:2017-latest' ] || [ $MATRIX_DB == 'mcr.microsoft.com/mssql/server:2019-CU27-ubuntu-20.04' ] then db='mssql' else diff --git a/README.md b/README.md index 540a50d..380fab7 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ A phpBB official extension that allows administrators to easily add Google Analytics to their forums. -[![Build Status](https://github.com/phpbb-extensions/googleanalytics/workflows/Tests/badge.svg)](https://github.com/phpbb-extensions/googleanalytics/actions) +[![Build Status](https://github.com/phpbb-extensions/googleanalytics/actions/workflows/tests.yml/badge.svg)](https://github.com/phpbb-extensions/googleanalytics/actions) [![codecov](https://codecov.io/gh/phpbb-extensions/googleanalytics/branch/master/graph/badge.svg?token=1HQh953sBs)](https://codecov.io/gh/phpbb-extensions/googleanalytics) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/phpbb-extensions/googleanalytics/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/phpbb-extensions/googleanalytics/?branch=master) diff --git a/composer.json b/composer.json index b46a835..e8be075 100644 --- a/composer.json +++ b/composer.json @@ -39,7 +39,7 @@ "composer/installers": "~1.0" }, "require-dev": { - "phing/phing": "2.4.*" + "phing/phing": "~2.4" }, "extra": { "display-name": "Google Analytics", From 4bf0ee74f44ccc1994d3a14192859704ffff4813 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Tue, 15 Apr 2025 15:17:51 -0700 Subject: [PATCH 04/17] Update tests.yml --- .github/workflows/tests.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5b2b2db..c2a7953 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -358,24 +358,24 @@ jobs: # START Other Tests Job (SQLite 3 and mssql) other-tests: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 strategy: matrix: include: - php: '7.2' db: "sqlite3" - - php: '7.2' - db: "mcr.microsoft.com/mssql/server:2017-latest" - db_alias: 'MSSQL 2017' - php: '7.2' db: "mcr.microsoft.com/mssql/server:2019-CU27-ubuntu-20.04" db_alias: 'MSSQL 2019' + - php: '7.2' + db: "mcr.microsoft.com/mssql/server:2022-CU13-ubuntu-22.04" + db_alias: 'MSSQL 2022' name: PHP ${{ matrix.php }} - ${{ matrix.db_alias != '' && matrix.db_alias || matrix.db }} services: mssql: - image: ${{ matrix.db != 'mcr.microsoft.com/mssql/server:2017-latest' && matrix.db != 'mcr.microsoft.com/mssql/server:2019-CU27-ubuntu-20.04' && 'mcr.microsoft.com/mssql/server:2017-latest' || matrix.db }} + image: ${{ matrix.db != 'mcr.microsoft.com/mssql/server:2022-CU13-ubuntu-22.04' && matrix.db != 'mcr.microsoft.com/mssql/server:2019-CU27-ubuntu-20.04' && 'mcr.microsoft.com/mssql/server:2022-CU13-ubuntu-22.04' || matrix.db }} env: SA_PASSWORD: "Pssw0rd_12" ACCEPT_EULA: "y" @@ -415,7 +415,7 @@ jobs: env: MATRIX_DB: ${{ matrix.db }} run: | - if [ $MATRIX_DB == 'mcr.microsoft.com/mssql/server:2017-latest' ] || [ $MATRIX_DB == 'mcr.microsoft.com/mssql/server:2019-CU27-ubuntu-20.04' ] + if [ $MATRIX_DB == 'mcr.microsoft.com/mssql/server:2022-CU13-ubuntu-22.04' ] || [ $MATRIX_DB == 'mcr.microsoft.com/mssql/server:2019-CU27-ubuntu-20.04' ] then db='mssql' else From c81f6298c302306f7669ca554b79a0d567381647 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Tue, 15 Apr 2025 15:37:37 -0700 Subject: [PATCH 05/17] Update tests.yml [ci skip] --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c2a7953..bd6d021 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -227,7 +227,7 @@ jobs: run: | if [ $COVERAGE == '1' ] then - phpBB/vendor/bin/phpunit --configuration phpBB/ext/$EXTNAME/.github/phpunit-$DB-github.xml --bootstrap ./tests/bootstrap.php --coverage-clover build/logs/clover.xml + phpBB/vendor/bin/phpunit --configuration phpBB/ext/$EXTNAME/.github/phpunit-$DB-github.xml --bootstrap ./tests/bootstrap.php --coverage-clover build/logs/clover.xml --testsuite 'phpBB Test Suite' else phpBB/vendor/bin/phpunit --configuration phpBB/ext/$EXTNAME/.github/phpunit-$DB-github.xml --bootstrap ./tests/bootstrap.php fi From bee0df56f07011c2146f1bb101d07d0d5dc1d937 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Sat, 19 Apr 2025 14:56:50 -0700 Subject: [PATCH 06/17] Update tests.yml [ci skip] --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index bd6d021..c2a7953 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -227,7 +227,7 @@ jobs: run: | if [ $COVERAGE == '1' ] then - phpBB/vendor/bin/phpunit --configuration phpBB/ext/$EXTNAME/.github/phpunit-$DB-github.xml --bootstrap ./tests/bootstrap.php --coverage-clover build/logs/clover.xml --testsuite 'phpBB Test Suite' + phpBB/vendor/bin/phpunit --configuration phpBB/ext/$EXTNAME/.github/phpunit-$DB-github.xml --bootstrap ./tests/bootstrap.php --coverage-clover build/logs/clover.xml else phpBB/vendor/bin/phpunit --configuration phpBB/ext/$EXTNAME/.github/phpunit-$DB-github.xml --bootstrap ./tests/bootstrap.php fi From 6dd2aef8f8aced1967b4f4132dc09fccb05ebedc Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Sun, 20 Apr 2025 09:02:31 -0700 Subject: [PATCH 07/17] Update tests.yml to reusable test framework --- .github/workflows/tests.yml | 460 ++---------------------------------- 1 file changed, 16 insertions(+), 444 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c2a7953..33a073b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,457 +1,29 @@ name: Tests -env: - EXTNAME: phpbb/googleanalytics # Your extension vendor/package name - SNIFF: 1 # Run code sniffer on your code? 1 or 0 - IMAGE_ICC: 1 # Run icc profile sniffer on your images? 1 or 0 - EPV: 1 # Run EPV (Extension Pre Validator) on your code? 1 or 0 - EXECUTABLE_FILES: 1 # Run check for executable files? 1 or 0 - PHPBB_BRANCH: 3.3.x # The phpBB branch to run tests on - on: push: branches: # Run tests when commits are pushed to these branches in your repo + - main - master - develop + - dev/* pull_request: # Run tests when pull requests are made on these branches in your repo branches: + - main - master - develop + - dev/* jobs: - # START Basic Checks Job (EPV, code sniffer, images check, etc.) - basic-checks: - runs-on: ubuntu-22.04 - strategy: - matrix: - include: - - php: '7.2' - db: "none" - NOTESTS: 1 - - name: PHP ${{ matrix.php }} - ${{ matrix.db }} - - steps: - - name: Checkout phpBB - uses: actions/checkout@v4 - with: - repository: phpbb/phpbb - ref: ${{ env.PHPBB_BRANCH }} - path: phpBB3 - - - name: Checkout extension - uses: actions/checkout@v4 - with: - path: phpBB3/phpBB/ext/${{ env.EXTNAME }} - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, mysqli, sqlite, pdo_sqlite, intl, gd, exif, iconv, sqlsrv, pdo_sqlsrv, ldap - coverage: none - - - name: Setup environment for phpBB - env: - DB: ${{ matrix.db }} - PHP_VERSION: ${{ matrix.php }} - NOTESTS: '1' - run: .github/setup-phpbb.sh $DB $PHP_VERSION $NOTESTS - working-directory: ./phpBB3 - - - name: Setup EPV - if: ${{ env.EPV != 0 }} - run: composer require phpbb/epv:dev-master --dev --no-interaction --ignore-platform-reqs - working-directory: ./phpBB3/phpBB - - - name: Run code sniffer - if: ${{ env.SNIFF != 0 }} - env: - NOTESTS: '1' - run: .github/ext-sniff.sh $EXTNAME $NOTESTS - working-directory: ./phpBB3 - - - name: Check image ICC profiles - if: ${{ env.IMAGE_ICC != 0 }} - run: .github/check-image-icc-profiles.sh - working-directory: ./phpBB3 - - - name: Check executable files - if: ${{ env.EXECUTABLE_FILES != 0 }} - run: .github/ext-check-executable-files.sh ./ $EXTNAME - working-directory: ./phpBB3 - - - name: Run EPV - if: ${{ env.EPV != 0 }} - run: phpBB/vendor/bin/EPV.php run --dir="phpBB/ext/$EXTNAME/" - working-directory: ./phpBB3 - # END Basic Checks Job - - # START MySQL and MariaDB Job - mysql-tests: - runs-on: ubuntu-22.04 - strategy: - matrix: - include: - - php: '7.2' - db: "mariadb:10.1" - - php: '7.2' - db: "mariadb:10.2" - - php: '7.2' - db: "mariadb:10.3" - - php: '7.2' - db: "mariadb:10.4" - - php: '7.2' - db: "mariadb:10.5" - - php: '7.2' - db: "mysql:5.6" - db_alias: "MyISAM Tests" - MYISAM: 1 - - php: '7.2' - db: "mysql:5.6" - - php: '7.2' - db: "mysql:5.7" - COVERAGE: 1 - db_alias: "mysql:5.7 with Coverage" - - php: '7.3' - db: "mysql:5.7" - - php: '7.4' - db: "mysql:5.7" - - php: '7.4' - db: "mysql:8.0" - - php: '8.0' - db: "mysql:5.7" - - php: '8.1' - db: "mysql:5.7" - - php: '8.2' - db: "mysql:5.7" - - php: '8.3' - db: "mysql:5.7" - - php: '8.4' - db: "mysql:5.7" - - name: PHP ${{ matrix.php }} - ${{ matrix.db_alias != '' && matrix.db_alias || matrix.db }} - - services: - mysql: - image: ${{ matrix.db }} - env: - MYSQL_ALLOW_EMPTY_PASSWORD: yes - MYSQL_DATABASE: phpbb_tests - ports: - - 3306:3306 - options: >- - --health-cmd="mysqladmin ping" - --health-interval=10s - --health-timeout=5s - --health-retries=3 - - redis: - image: redis - options: >- - --health-cmd "redis-cli ping" - --health-interval 10s - --health-timeout 5s - --health-retries 5 - ports: - - 6379:6379 - - steps: - - name: Checkout phpBB - uses: actions/checkout@v4 - with: - repository: phpbb/phpbb - ref: ${{ env.PHPBB_BRANCH }} - path: phpBB3 - - - name: Checkout extension - uses: actions/checkout@v4 - with: - path: phpBB3/phpBB/ext/${{ env.EXTNAME }} - - - id: database-type - env: - MATRIX_DB: ${{ matrix.db }} - run: | - db=$(echo "${MATRIX_DB%%:*}") - echo "db=$db" >> $GITHUB_OUTPUT - - - name: Setup PHP - if: ${{ matrix.COVERAGE != 1 }} - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, mysqli, sqlite, pdo_sqlite, intl, gd, exif, iconv, sqlsrv, pdo_sqlsrv, ldap - coverage: none - - - name: Setup PHP with Coverage - if: ${{ matrix.COVERAGE == 1 }} - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, mysqli, sqlite, pdo_sqlite, intl, gd, exif, iconv, sqlsrv, pdo_sqlsrv, ldap - coverage: xdebug - - - name: Setup environment for phpBB - env: - DB: ${{steps.database-type.outputs.db}} - PHP_VERSION: ${{ matrix.php }} - NOTESTS: '0' - run: .github/setup-phpbb.sh $DB $PHP_VERSION ${NOTESTS:-0} - working-directory: ./phpBB3 - - - name: Setup database - env: - DB: ${{steps.database-type.outputs.db}} - MYISAM: ${{ matrix.MYISAM != 1 && '0' || '1' }} - run: .github/setup-database.sh $DB $MYISAM - working-directory: ./phpBB3 - - - name: Setup PHPUnit files - env: - DB: ${{steps.database-type.outputs.db}} - COVERAGE: ${{ matrix.COVERAGE != 1 && '0' || '1' }} - run: | - if [ $COVERAGE == '1' ] - then - sed -n '1h;1!H;${;g;s/<\/php>/<\/php>\n\t\n\t\t\n\t\t\t..\/<\/directory>\n\t\t\t\n\t\t\t\t..\/tests\/<\/directory>\n\t\t\t\t..\/language\/<\/directory>\n\t\t\t\t..\/migrations\/<\/directory>\n\t\t\t<\/exclude>\n\t\t<\/whitelist>\n\t<\/filter>/g;p;}' .github/phpunit-$DB-github.xml &> phpBB/ext/$EXTNAME/.github/phpunit-$DB-github.xml - else - mkdir -p phpBB/ext/$EXTNAME/.github && cp .github/phpunit* $_ - fi - working-directory: ./phpBB3 - - - name: Run unit tests - env: - DB: ${{steps.database-type.outputs.db}} - COVERAGE: ${{ matrix.COVERAGE != 1 && '0' || '1' }} - run: | - if [ $COVERAGE == '1' ] - then - phpBB/vendor/bin/phpunit --configuration phpBB/ext/$EXTNAME/.github/phpunit-$DB-github.xml --bootstrap ./tests/bootstrap.php --coverage-clover build/logs/clover.xml - else - phpBB/vendor/bin/phpunit --configuration phpBB/ext/$EXTNAME/.github/phpunit-$DB-github.xml --bootstrap ./tests/bootstrap.php - fi - working-directory: ./phpBB3 - - - name: Send code coverage - if: ${{ matrix.COVERAGE == 1 }} - uses: codecov/codecov-action@v3 - with: - files: ./phpBB3/build/logs/clover.xml - # END MySQL and MariaDB Job - - # START PostgreSQL Job - postgres-tests: - runs-on: ubuntu-22.04 - strategy: - matrix: - include: - - php: '7.2' - db: "postgres:9.5" - - php: '7.2' - db: "postgres:9.6" - - php: '7.2' - db: "postgres:10" - - php: '7.2' - db: "postgres:11" - - php: '7.2' - db: "postgres:12" - - php: '7.2' - db: "postgres:13" - - php: '7.3' - db: "postgres:13" - - php: '7.4' - db: "postgres:13" - - php: '8.0' - db: "postgres:12" - - php: '8.0' - db: "postgres:13" - - php: '8.1' - db: "postgres:14" - - php: '8.2' - db: "postgres:14" - - php: '8.3' - db: "postgres:14" - - php: '8.4' - db: "postgres:14" - - name: PHP ${{ matrix.php }} - ${{ matrix.db }} - - services: - postgres: - image: ${{ matrix.db != 'postgres:9.5' && matrix.db != 'postgres:9.6' && matrix.db != 'postgres:10' && matrix.db != 'postgres:11' && matrix.db != 'postgres:12' && matrix.db != 'postgres:13' && 'postgres:10' || matrix.db }} - env: - POSTGRES_HOST: localhost - POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgres - ports: - - 5432:5432 - options: >- - -v /var/run/postgresql:/var/run/postgresql - --health-cmd pg_isready - --health-interval 10s - --health-timeout 5s - --health-retries 5 - - redis: - image: redis - options: >- - --health-cmd "redis-cli ping" - --health-interval 10s - --health-timeout 5s - --health-retries 5 - ports: - - 6379:6379 - - steps: - - name: Checkout phpBB - uses: actions/checkout@v4 - with: - repository: phpbb/phpbb - ref: ${{ env.PHPBB_BRANCH }} - path: phpBB3 - - - name: Checkout extension - uses: actions/checkout@v4 - with: - path: phpBB3/phpBB/ext/${{ env.EXTNAME }} - - - id: database-type - env: - MATRIX_DB: ${{ matrix.db }} - run: | - db=$(echo "${MATRIX_DB%%:*}") - echo "db=$db" >> $GITHUB_OUTPUT - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, mysqli, sqlite, pdo_sqlite, intl, gd, exif, iconv, sqlsrv, pdo_sqlsrv, ldap - coverage: none - - - name: Setup environment for phpBB - env: - DB: ${{steps.database-type.outputs.db}} - PHP_VERSION: ${{ matrix.php }} - NOTESTS: '0' - run: .github/setup-phpbb.sh $DB $PHP_VERSION ${NOTESTS:-0} - working-directory: ./phpBB3 - - - name: Setup database - env: - DB: ${{steps.database-type.outputs.db}} - MYISAM: '0' - run: .github/setup-database.sh $DB $MYISAM - working-directory: ./phpBB3 - - - name: Setup PHPUnit files - run: mkdir -p phpBB/ext/$EXTNAME/.github && cp .github/phpunit* $_ - working-directory: ./phpBB3 - - - name: Run unit tests - env: - DB: ${{steps.database-type.outputs.db}} - run: phpBB/vendor/bin/phpunit --configuration phpBB/ext/$EXTNAME/.github/phpunit-$DB-github.xml --bootstrap ./tests/bootstrap.php - working-directory: ./phpBB3 - # END PostgreSQL Job - - # START Other Tests Job (SQLite 3 and mssql) - other-tests: - runs-on: ubuntu-22.04 - strategy: - matrix: - include: - - php: '7.2' - db: "sqlite3" - - php: '7.2' - db: "mcr.microsoft.com/mssql/server:2019-CU27-ubuntu-20.04" - db_alias: 'MSSQL 2019' - - php: '7.2' - db: "mcr.microsoft.com/mssql/server:2022-CU13-ubuntu-22.04" - db_alias: 'MSSQL 2022' - - name: PHP ${{ matrix.php }} - ${{ matrix.db_alias != '' && matrix.db_alias || matrix.db }} - - services: - mssql: - image: ${{ matrix.db != 'mcr.microsoft.com/mssql/server:2022-CU13-ubuntu-22.04' && matrix.db != 'mcr.microsoft.com/mssql/server:2019-CU27-ubuntu-20.04' && 'mcr.microsoft.com/mssql/server:2022-CU13-ubuntu-22.04' || matrix.db }} - env: - SA_PASSWORD: "Pssw0rd_12" - ACCEPT_EULA: "y" - ports: - - 1433:1433 - options: >- - --health-cmd="/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P 'Pssw0rd_12' -Q \"Use [master]; CREATE DATABASE [phpbb_tests] COLLATE Latin1_General_CI_AS\" || exit 1" - --health-interval 10s - --health-timeout 5s - --health-retries 5 - --health-start-period 10s - - redis: - image: redis - options: >- - --health-cmd "redis-cli ping" - --health-interval 10s - --health-timeout 5s - --health-retries 5 - ports: - - 6379:6379 - - steps: - - name: Checkout phpBB - uses: actions/checkout@v4 - with: - repository: phpbb/phpbb - ref: ${{ env.PHPBB_BRANCH }} - path: phpBB3 - - - name: Checkout extension - uses: actions/checkout@v4 - with: - path: phpBB3/phpBB/ext/${{ env.EXTNAME }} - - - id: database-type - env: - MATRIX_DB: ${{ matrix.db }} - run: | - if [ $MATRIX_DB == 'mcr.microsoft.com/mssql/server:2022-CU13-ubuntu-22.04' ] || [ $MATRIX_DB == 'mcr.microsoft.com/mssql/server:2019-CU27-ubuntu-20.04' ] - then - db='mssql' - else - db=$(echo "${MATRIX_DB%%:*}") - fi - echo "db=$db" >> $GITHUB_OUTPUT - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, mysqli, sqlite, pdo_sqlite, intl, gd, exif, iconv, sqlsrv, pdo_sqlsrv, ldap - coverage: none - - - name: Setup environment for phpBB - env: - DB: ${{steps.database-type.outputs.db}} - PHP_VERSION: ${{ matrix.php }} - NOTESTS: '0' - run: .github/setup-phpbb.sh $DB $PHP_VERSION ${NOTESTS:-0} - working-directory: ./phpBB3 - - - name: Setup database - env: - DB: ${{steps.database-type.outputs.db}} - MYISAM: '0' - run: .github/setup-database.sh $DB $MYISAM - working-directory: ./phpBB3 - - - name: Setup PHPUnit files - run: mkdir -p phpBB/ext/$EXTNAME/.github && cp .github/phpunit* $_ - working-directory: ./phpBB3 - - - name: Run unit tests - env: - DB: ${{steps.database-type.outputs.db}} - run: phpBB/vendor/bin/phpunit --configuration phpBB/ext/$EXTNAME/.github/phpunit-$DB-github.xml --bootstrap ./tests/bootstrap.php - working-directory: ./phpBB3 - # END Other Tests Job + call-tests: + uses: phpbb-extensions/test-framework/.github/workflows/tests.yml@3.3.x + with: + EXTNAME: phpbb/googleanalytics # Your extension vendor/package name + SNIFF: 1 # Run code sniffer on your code? 1 or 0 + IMAGE_ICC: 1 # Run icc profile sniffer on your images? 1 or 0 + EPV: 1 # Run EPV (Extension Pre Validator) on your code? 1 or 0 + EXECUTABLE_FILES: 1 # Run check for executable files? 1 or 0 + CODECOV: 1 # Run code coverage via codecov? 1 or 0 + PHPBB_BRANCH: 3.3.x # The phpBB branch to run tests on + secrets: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} # Do not change this From 2e156619fe739c6a7cc8997d5ba4f31f4f6bd21f Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Tue, 6 May 2025 14:55:03 -0700 Subject: [PATCH 08/17] Update tests.yml --- .github/workflows/tests.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 33a073b..e98d76c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -16,14 +16,10 @@ on: jobs: call-tests: + name: Extension tests uses: phpbb-extensions/test-framework/.github/workflows/tests.yml@3.3.x with: - EXTNAME: phpbb/googleanalytics # Your extension vendor/package name - SNIFF: 1 # Run code sniffer on your code? 1 or 0 - IMAGE_ICC: 1 # Run icc profile sniffer on your images? 1 or 0 - EPV: 1 # Run EPV (Extension Pre Validator) on your code? 1 or 0 - EXECUTABLE_FILES: 1 # Run check for executable files? 1 or 0 - CODECOV: 1 # Run code coverage via codecov? 1 or 0 - PHPBB_BRANCH: 3.3.x # The phpBB branch to run tests on + EXTNAME: phpbb/googleanalytics # Your extension vendor/package name + CODECOV: 1 # Run code coverage via codecov? 1 or 0 secrets: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} # Do not change this From f1d39a3fabe1787273c6a3bc4d7cf49131981252 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Sun, 25 May 2025 07:57:39 -0700 Subject: [PATCH 09/17] Update .gitattributes [ci skip] --- .gitattributes | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.gitattributes b/.gitattributes index 15e367d..490d0e7 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,9 +1,7 @@ -tests/ export-ignore -travis/ export-ignore -.github/ export-ignore -.travis.yml export-ignore +.github export-ignore .gitignore export-ignore .gitattributes export-ignore -phpunit.xml.* export-ignore -composer.lock export-ignore build.xml export-ignore +composer.lock export-ignore +phpunit.xml.* export-ignore +tests export-ignore From 8d00dfe806b3ae40227a7c10c91031090a33704f Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Wed, 10 Sep 2025 18:03:44 -0700 Subject: [PATCH 10/17] Add google analytics privacy information --- event/listener.php | 24 ++++++- language/en/googleanalytics_ucp.php | 52 +++++++++++++++ tests/event/listener_test.php | 74 +++++++++++++++++++--- tests/functional/google_analytics_test.php | 11 ++++ 4 files changed, 150 insertions(+), 11 deletions(-) create mode 100644 language/en/googleanalytics_ucp.php diff --git a/event/listener.php b/event/listener.php index f0329f9..b3f7d79 100644 --- a/event/listener.php +++ b/event/listener.php @@ -60,9 +60,10 @@ public function __construct(config $config, language $language, template $templa public static function getSubscribedEvents() { return [ + 'core.page_header' => 'load_google_analytics', 'core.acp_board_config_edit_add' => 'add_googleanalytics_configs', - 'core.page_header' => 'load_google_analytics', - 'core.validate_config_variable' => 'validate_googleanalytics_id', + 'core.validate_config_variable' => 'validate_googleanalytics_id', + 'core.page_footer_after' => 'append_agreement', ]; } @@ -171,4 +172,23 @@ public function validate_googleanalytics_id($event) // Update error event data $event['error'] = $error; } + + /** + * Append additional agreement details to the privacy agreement. + * + * @return void + */ + public function append_agreement() + { + if ((strpos($this->user->page['page_name'], 'ucp') !== 0) + || !$this->template->retrieve_var('S_AGREEMENT') + || ($this->template->retrieve_var('AGREEMENT_TITLE') !== $this->language->lang('PRIVACY'))) + { + return; + } + + $this->language->add_lang('googleanalytics_ucp', 'phpbb/googleanalytics'); + + $this->template->append_var('AGREEMENT_TEXT', $this->language->lang('PHPBB_ANALYTICS_PRIVACY_POLICY', $this->config['sitename'])); + } } diff --git a/language/en/googleanalytics_ucp.php b/language/en/googleanalytics_ucp.php new file mode 100644 index 0000000..e93b046 --- /dev/null +++ b/language/en/googleanalytics_ucp.php @@ -0,0 +1,52 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +*/ + +/** +* DO NOT CHANGE +*/ +if (!defined('IN_PHPBB')) +{ + exit; +} + +if (empty($lang) || !is_array($lang)) +{ + $lang = []; +} + +// DEVELOPERS PLEASE NOTE +// +// All language files should use UTF-8 as their encoding and the files must not contain a BOM. +// +// Placeholders can now contain order information, e.g. instead of +// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows +// translators to re-order the output of data while ensuring it remains correct +// +// You do not need this where single placeholders are used, e.g. 'Message %d' is fine +// equally where a string contains only two placeholders which are used to wrap text +// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine +// +// Some characters you may want to copy&paste: +// ’ » “ ” … +// + +$lang = array_merge($lang, [ + 'PHPBB_ANALYTICS_PRIVACY_POLICY' => ' +

+

Analytics

+ “%1$s” may use Google Analytics, a web analytics service provided by Google LLC (“Google”), to help us understand how visitors use the site. Google Analytics uses cookies and similar technologies to collect information about your interactions with the site, including the pages you visit, the time spent on each page, and general usage patterns. +

+ The information generated by these cookies about your use of “%1$s” (including your IP address) is transmitted to and stored by Google on servers in the United States or other locations. Google uses this information to evaluate your use of the site, compile reports on website activity for us, and provide other services relating to website activity and internet usage. +

+ Google may also transfer this information to third parties where required to do so by law, or where such third parties process the information on Google’s behalf. To learn more about how Google collects and processes data, please see Google’s Privacy Policy at: https://policies.google.com/privacy. +

+ You can opt out of Google Analytics by installing the Google Analytics opt-out browser add-on, available at: https://tools.google.com/dlpage/gaoptout. + ', +]); diff --git a/tests/event/listener_test.php b/tests/event/listener_test.php index 6400d83..a8b300d 100644 --- a/tests/event/listener_test.php +++ b/tests/event/listener_test.php @@ -10,8 +10,6 @@ namespace phpbb\googleanalytics\tests\event; -require_once __DIR__ . '/../../../../../includes/functions_acp.php'; - class listener_test extends \phpbb_test_case { /** @var \phpbb\googleanalytics\event\listener */ @@ -21,7 +19,7 @@ class listener_test extends \phpbb_test_case protected $config; /** @var \phpbb\language\language */ - protected $lang; + protected $language; /** @var \PHPUnit\Framework\MockObject\MockObject|\phpbb\template\template */ protected $template; @@ -29,6 +27,15 @@ class listener_test extends \phpbb_test_case /** @var \phpbb\user */ protected $user; + public static function setUpBeforeClass(): void + { + $acp_functions = __DIR__ . '/../../../../../includes/functions_acp.php'; + if (is_file($acp_functions)) + { + require_once $acp_functions; + } + } + /** * Setup test environment */ @@ -46,8 +53,8 @@ protected function setUp(): void $this->template = $this->getMockBuilder('\phpbb\template\template') ->getMock(); $lang_loader = new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx); - $this->lang = new \phpbb\language\language($lang_loader); - $this->user = new \phpbb\user($this->lang, '\phpbb\datetime'); + $this->language = new \phpbb\language\language($lang_loader); + $this->user = new \phpbb\user($this->language, '\phpbb\datetime'); $this->user->data['user_id'] = 2; $this->user->data['is_registered'] = true; } @@ -59,7 +66,7 @@ protected function set_listener() { $this->listener = new \phpbb\googleanalytics\event\listener( $this->config, - $this->lang, + $this->language, $this->template, $this->user ); @@ -80,9 +87,10 @@ public function test_construct() public function test_getSubscribedEvents() { self::assertEquals([ - 'core.acp_board_config_edit_add', 'core.page_header', + 'core.acp_board_config_edit_add', 'core.validate_config_variable', + 'core.page_footer_after', ], array_keys(\phpbb\googleanalytics\event\listener::getSubscribedEvents())); } @@ -152,7 +160,7 @@ public function test_add_googleanalytics_configs($mode, $display_vars, $expected $event_data = ['display_vars', 'mode']; $event_data_after = $dispatcher->trigger_event('core.acp_board_config_edit_add', compact($event_data)); - extract($event_data_after, EXTR_OVERWRITE); + extract($event_data_after); $keys = array_keys($display_vars['vars']); @@ -243,8 +251,56 @@ public function test_validate_googleanalytics_id($cfg_array, $expected_error) { self::assertArrayHasKey($expected, $event_data_after); } - extract($event_data_after, EXTR_OVERWRITE); + extract($event_data_after); self::assertEquals($expected_error, $error); } + + /** + * Data for test_append_agreement + * + * @return array + */ + public function append_agreement_data() + { + return [ + [false, 'PRIVACY', 0], // No agreement + [true, 'TERMS', 0], // Wrong title + [true, 'PRIVACY', 1], // Correct conditions + ]; + } + + /** + * Test the append_agreement method + * + * @dataProvider append_agreement_data + * @param mixed $s_agreement S_AGREEMENT template variable value + * @param mixed $agreement_title AGREEMENT_TITLE template variable value + * @param int $expected_append_calls Expected append_var calls + */ + public function test_append_agreement($s_agreement, $agreement_title, $expected_append_calls) + { + $this->config['sitename'] = 'Test Forum'; + $this->user->page['page_name'] = 'ucp.php'; + + $this->template->expects(self::atMost(2)) + ->method('retrieve_var') + ->withConsecutive(['S_AGREEMENT'], ['AGREEMENT_TITLE']) + ->willReturnOnConsecutiveCalls($s_agreement, $this->language->lang($agreement_title)); + + if ($expected_append_calls > 0) + { + $this->template->expects(self::once()) + ->method('append_var') + ->with('AGREEMENT_TEXT', $this->language->lang('PHPBB_ANALYTICS_PRIVACY_POLICY', 'Test Forum')); + } + else + { + $this->template->expects(self::never()) + ->method('append_var'); + } + + $this->set_listener(); + $this->listener->append_agreement(); + } } diff --git a/tests/functional/google_analytics_test.php b/tests/functional/google_analytics_test.php index 27bcfb4..584a5b3 100644 --- a/tests/functional/google_analytics_test.php +++ b/tests/functional/google_analytics_test.php @@ -84,4 +84,15 @@ public function test_google_analytics_code() $crawler = self::request('GET', 'index.php'); self::assertStringContainsString($this->sample_ga_code, $crawler->filter('head > script')->eq(1)->text()); } + + /** + * Test Analytics agreement appears as expected + */ + public function test_ucp_agreement() + { + $this->add_lang_ext('phpbb/googleanalytics', 'googleanalytics_ucp'); + + $crawler = self::request('GET', 'ucp.php?mode=privacy'); + $this->assertStringContainsString($this->lang('PHPBB_ANALYTICS_PRIVACY_POLICY', 'yourdomain.com'), $crawler->filter('.agreement')->html()); + } } From f9dd24575206ad53f5d92cde91c990610ac27ccd Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Sat, 20 Sep 2025 07:23:11 -0700 Subject: [PATCH 11/17] Add all translations --- language/ar/googleanalytics_ucp.php | 52 ++++++++++++++++++++ language/cs/googleanalytics_ucp.php | 52 ++++++++++++++++++++ language/da/googleanalytics_ucp.php | 52 ++++++++++++++++++++ language/de/googleanalytics_ucp.php | 52 ++++++++++++++++++++ language/de_x_sie/googleanalytics_ucp.php | 52 ++++++++++++++++++++ language/el/googleanalytics_ucp.php | 52 ++++++++++++++++++++ language/es/googleanalytics_ucp.php | 52 ++++++++++++++++++++ language/es_x_tu/googleanalytics_ucp.php | 52 ++++++++++++++++++++ language/fr/googleanalytics_ucp.php | 52 ++++++++++++++++++++ language/hr/googleanalytics_ucp.php | 52 ++++++++++++++++++++ language/hr_x_vi/googleanalytics_ucp.php | 52 ++++++++++++++++++++ language/it/googleanalytics_ucp.php | 52 ++++++++++++++++++++ language/nl/googleanalytics_ucp.php | 52 ++++++++++++++++++++ language/pl/googleanalytics_ucp.php | 52 ++++++++++++++++++++ language/pt/googleanalytics_ucp.php | 52 ++++++++++++++++++++ language/pt_br/googleanalytics_ucp.php | 52 ++++++++++++++++++++ language/ro/googleanalytics_ucp.php | 52 ++++++++++++++++++++ language/ru/googleanalytics_ucp.php | 52 ++++++++++++++++++++ language/sk/googleanalytics_ucp.php | 52 ++++++++++++++++++++ language/sv/googleanalytics_ucp.php | 52 ++++++++++++++++++++ language/tr/googleanalytics_ucp.php | 52 ++++++++++++++++++++ language/zh_cmn_hant/googleanalytics_ucp.php | 52 ++++++++++++++++++++ 22 files changed, 1144 insertions(+) create mode 100644 language/ar/googleanalytics_ucp.php create mode 100644 language/cs/googleanalytics_ucp.php create mode 100644 language/da/googleanalytics_ucp.php create mode 100644 language/de/googleanalytics_ucp.php create mode 100644 language/de_x_sie/googleanalytics_ucp.php create mode 100644 language/el/googleanalytics_ucp.php create mode 100644 language/es/googleanalytics_ucp.php create mode 100644 language/es_x_tu/googleanalytics_ucp.php create mode 100644 language/fr/googleanalytics_ucp.php create mode 100644 language/hr/googleanalytics_ucp.php create mode 100644 language/hr_x_vi/googleanalytics_ucp.php create mode 100644 language/it/googleanalytics_ucp.php create mode 100644 language/nl/googleanalytics_ucp.php create mode 100644 language/pl/googleanalytics_ucp.php create mode 100644 language/pt/googleanalytics_ucp.php create mode 100644 language/pt_br/googleanalytics_ucp.php create mode 100644 language/ro/googleanalytics_ucp.php create mode 100644 language/ru/googleanalytics_ucp.php create mode 100644 language/sk/googleanalytics_ucp.php create mode 100644 language/sv/googleanalytics_ucp.php create mode 100644 language/tr/googleanalytics_ucp.php create mode 100644 language/zh_cmn_hant/googleanalytics_ucp.php diff --git a/language/ar/googleanalytics_ucp.php b/language/ar/googleanalytics_ucp.php new file mode 100644 index 0000000..e93b046 --- /dev/null +++ b/language/ar/googleanalytics_ucp.php @@ -0,0 +1,52 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +*/ + +/** +* DO NOT CHANGE +*/ +if (!defined('IN_PHPBB')) +{ + exit; +} + +if (empty($lang) || !is_array($lang)) +{ + $lang = []; +} + +// DEVELOPERS PLEASE NOTE +// +// All language files should use UTF-8 as their encoding and the files must not contain a BOM. +// +// Placeholders can now contain order information, e.g. instead of +// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows +// translators to re-order the output of data while ensuring it remains correct +// +// You do not need this where single placeholders are used, e.g. 'Message %d' is fine +// equally where a string contains only two placeholders which are used to wrap text +// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine +// +// Some characters you may want to copy&paste: +// ’ » “ ” … +// + +$lang = array_merge($lang, [ + 'PHPBB_ANALYTICS_PRIVACY_POLICY' => ' +

+

Analytics

+ “%1$s” may use Google Analytics, a web analytics service provided by Google LLC (“Google”), to help us understand how visitors use the site. Google Analytics uses cookies and similar technologies to collect information about your interactions with the site, including the pages you visit, the time spent on each page, and general usage patterns. +

+ The information generated by these cookies about your use of “%1$s” (including your IP address) is transmitted to and stored by Google on servers in the United States or other locations. Google uses this information to evaluate your use of the site, compile reports on website activity for us, and provide other services relating to website activity and internet usage. +

+ Google may also transfer this information to third parties where required to do so by law, or where such third parties process the information on Google’s behalf. To learn more about how Google collects and processes data, please see Google’s Privacy Policy at: https://policies.google.com/privacy. +

+ You can opt out of Google Analytics by installing the Google Analytics opt-out browser add-on, available at: https://tools.google.com/dlpage/gaoptout. + ', +]); diff --git a/language/cs/googleanalytics_ucp.php b/language/cs/googleanalytics_ucp.php new file mode 100644 index 0000000..e93b046 --- /dev/null +++ b/language/cs/googleanalytics_ucp.php @@ -0,0 +1,52 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +*/ + +/** +* DO NOT CHANGE +*/ +if (!defined('IN_PHPBB')) +{ + exit; +} + +if (empty($lang) || !is_array($lang)) +{ + $lang = []; +} + +// DEVELOPERS PLEASE NOTE +// +// All language files should use UTF-8 as their encoding and the files must not contain a BOM. +// +// Placeholders can now contain order information, e.g. instead of +// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows +// translators to re-order the output of data while ensuring it remains correct +// +// You do not need this where single placeholders are used, e.g. 'Message %d' is fine +// equally where a string contains only two placeholders which are used to wrap text +// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine +// +// Some characters you may want to copy&paste: +// ’ » “ ” … +// + +$lang = array_merge($lang, [ + 'PHPBB_ANALYTICS_PRIVACY_POLICY' => ' +

+

Analytics

+ “%1$s” may use Google Analytics, a web analytics service provided by Google LLC (“Google”), to help us understand how visitors use the site. Google Analytics uses cookies and similar technologies to collect information about your interactions with the site, including the pages you visit, the time spent on each page, and general usage patterns. +

+ The information generated by these cookies about your use of “%1$s” (including your IP address) is transmitted to and stored by Google on servers in the United States or other locations. Google uses this information to evaluate your use of the site, compile reports on website activity for us, and provide other services relating to website activity and internet usage. +

+ Google may also transfer this information to third parties where required to do so by law, or where such third parties process the information on Google’s behalf. To learn more about how Google collects and processes data, please see Google’s Privacy Policy at: https://policies.google.com/privacy. +

+ You can opt out of Google Analytics by installing the Google Analytics opt-out browser add-on, available at: https://tools.google.com/dlpage/gaoptout. + ', +]); diff --git a/language/da/googleanalytics_ucp.php b/language/da/googleanalytics_ucp.php new file mode 100644 index 0000000..e93b046 --- /dev/null +++ b/language/da/googleanalytics_ucp.php @@ -0,0 +1,52 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +*/ + +/** +* DO NOT CHANGE +*/ +if (!defined('IN_PHPBB')) +{ + exit; +} + +if (empty($lang) || !is_array($lang)) +{ + $lang = []; +} + +// DEVELOPERS PLEASE NOTE +// +// All language files should use UTF-8 as their encoding and the files must not contain a BOM. +// +// Placeholders can now contain order information, e.g. instead of +// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows +// translators to re-order the output of data while ensuring it remains correct +// +// You do not need this where single placeholders are used, e.g. 'Message %d' is fine +// equally where a string contains only two placeholders which are used to wrap text +// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine +// +// Some characters you may want to copy&paste: +// ’ » “ ” … +// + +$lang = array_merge($lang, [ + 'PHPBB_ANALYTICS_PRIVACY_POLICY' => ' +

+

Analytics

+ “%1$s” may use Google Analytics, a web analytics service provided by Google LLC (“Google”), to help us understand how visitors use the site. Google Analytics uses cookies and similar technologies to collect information about your interactions with the site, including the pages you visit, the time spent on each page, and general usage patterns. +

+ The information generated by these cookies about your use of “%1$s” (including your IP address) is transmitted to and stored by Google on servers in the United States or other locations. Google uses this information to evaluate your use of the site, compile reports on website activity for us, and provide other services relating to website activity and internet usage. +

+ Google may also transfer this information to third parties where required to do so by law, or where such third parties process the information on Google’s behalf. To learn more about how Google collects and processes data, please see Google’s Privacy Policy at: https://policies.google.com/privacy. +

+ You can opt out of Google Analytics by installing the Google Analytics opt-out browser add-on, available at: https://tools.google.com/dlpage/gaoptout. + ', +]); diff --git a/language/de/googleanalytics_ucp.php b/language/de/googleanalytics_ucp.php new file mode 100644 index 0000000..e93b046 --- /dev/null +++ b/language/de/googleanalytics_ucp.php @@ -0,0 +1,52 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +*/ + +/** +* DO NOT CHANGE +*/ +if (!defined('IN_PHPBB')) +{ + exit; +} + +if (empty($lang) || !is_array($lang)) +{ + $lang = []; +} + +// DEVELOPERS PLEASE NOTE +// +// All language files should use UTF-8 as their encoding and the files must not contain a BOM. +// +// Placeholders can now contain order information, e.g. instead of +// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows +// translators to re-order the output of data while ensuring it remains correct +// +// You do not need this where single placeholders are used, e.g. 'Message %d' is fine +// equally where a string contains only two placeholders which are used to wrap text +// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine +// +// Some characters you may want to copy&paste: +// ’ » “ ” … +// + +$lang = array_merge($lang, [ + 'PHPBB_ANALYTICS_PRIVACY_POLICY' => ' +

+

Analytics

+ “%1$s” may use Google Analytics, a web analytics service provided by Google LLC (“Google”), to help us understand how visitors use the site. Google Analytics uses cookies and similar technologies to collect information about your interactions with the site, including the pages you visit, the time spent on each page, and general usage patterns. +

+ The information generated by these cookies about your use of “%1$s” (including your IP address) is transmitted to and stored by Google on servers in the United States or other locations. Google uses this information to evaluate your use of the site, compile reports on website activity for us, and provide other services relating to website activity and internet usage. +

+ Google may also transfer this information to third parties where required to do so by law, or where such third parties process the information on Google’s behalf. To learn more about how Google collects and processes data, please see Google’s Privacy Policy at: https://policies.google.com/privacy. +

+ You can opt out of Google Analytics by installing the Google Analytics opt-out browser add-on, available at: https://tools.google.com/dlpage/gaoptout. + ', +]); diff --git a/language/de_x_sie/googleanalytics_ucp.php b/language/de_x_sie/googleanalytics_ucp.php new file mode 100644 index 0000000..e93b046 --- /dev/null +++ b/language/de_x_sie/googleanalytics_ucp.php @@ -0,0 +1,52 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +*/ + +/** +* DO NOT CHANGE +*/ +if (!defined('IN_PHPBB')) +{ + exit; +} + +if (empty($lang) || !is_array($lang)) +{ + $lang = []; +} + +// DEVELOPERS PLEASE NOTE +// +// All language files should use UTF-8 as their encoding and the files must not contain a BOM. +// +// Placeholders can now contain order information, e.g. instead of +// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows +// translators to re-order the output of data while ensuring it remains correct +// +// You do not need this where single placeholders are used, e.g. 'Message %d' is fine +// equally where a string contains only two placeholders which are used to wrap text +// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine +// +// Some characters you may want to copy&paste: +// ’ » “ ” … +// + +$lang = array_merge($lang, [ + 'PHPBB_ANALYTICS_PRIVACY_POLICY' => ' +

+

Analytics

+ “%1$s” may use Google Analytics, a web analytics service provided by Google LLC (“Google”), to help us understand how visitors use the site. Google Analytics uses cookies and similar technologies to collect information about your interactions with the site, including the pages you visit, the time spent on each page, and general usage patterns. +

+ The information generated by these cookies about your use of “%1$s” (including your IP address) is transmitted to and stored by Google on servers in the United States or other locations. Google uses this information to evaluate your use of the site, compile reports on website activity for us, and provide other services relating to website activity and internet usage. +

+ Google may also transfer this information to third parties where required to do so by law, or where such third parties process the information on Google’s behalf. To learn more about how Google collects and processes data, please see Google’s Privacy Policy at: https://policies.google.com/privacy. +

+ You can opt out of Google Analytics by installing the Google Analytics opt-out browser add-on, available at: https://tools.google.com/dlpage/gaoptout. + ', +]); diff --git a/language/el/googleanalytics_ucp.php b/language/el/googleanalytics_ucp.php new file mode 100644 index 0000000..e93b046 --- /dev/null +++ b/language/el/googleanalytics_ucp.php @@ -0,0 +1,52 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +*/ + +/** +* DO NOT CHANGE +*/ +if (!defined('IN_PHPBB')) +{ + exit; +} + +if (empty($lang) || !is_array($lang)) +{ + $lang = []; +} + +// DEVELOPERS PLEASE NOTE +// +// All language files should use UTF-8 as their encoding and the files must not contain a BOM. +// +// Placeholders can now contain order information, e.g. instead of +// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows +// translators to re-order the output of data while ensuring it remains correct +// +// You do not need this where single placeholders are used, e.g. 'Message %d' is fine +// equally where a string contains only two placeholders which are used to wrap text +// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine +// +// Some characters you may want to copy&paste: +// ’ » “ ” … +// + +$lang = array_merge($lang, [ + 'PHPBB_ANALYTICS_PRIVACY_POLICY' => ' +

+

Analytics

+ “%1$s” may use Google Analytics, a web analytics service provided by Google LLC (“Google”), to help us understand how visitors use the site. Google Analytics uses cookies and similar technologies to collect information about your interactions with the site, including the pages you visit, the time spent on each page, and general usage patterns. +

+ The information generated by these cookies about your use of “%1$s” (including your IP address) is transmitted to and stored by Google on servers in the United States or other locations. Google uses this information to evaluate your use of the site, compile reports on website activity for us, and provide other services relating to website activity and internet usage. +

+ Google may also transfer this information to third parties where required to do so by law, or where such third parties process the information on Google’s behalf. To learn more about how Google collects and processes data, please see Google’s Privacy Policy at: https://policies.google.com/privacy. +

+ You can opt out of Google Analytics by installing the Google Analytics opt-out browser add-on, available at: https://tools.google.com/dlpage/gaoptout. + ', +]); diff --git a/language/es/googleanalytics_ucp.php b/language/es/googleanalytics_ucp.php new file mode 100644 index 0000000..e93b046 --- /dev/null +++ b/language/es/googleanalytics_ucp.php @@ -0,0 +1,52 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +*/ + +/** +* DO NOT CHANGE +*/ +if (!defined('IN_PHPBB')) +{ + exit; +} + +if (empty($lang) || !is_array($lang)) +{ + $lang = []; +} + +// DEVELOPERS PLEASE NOTE +// +// All language files should use UTF-8 as their encoding and the files must not contain a BOM. +// +// Placeholders can now contain order information, e.g. instead of +// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows +// translators to re-order the output of data while ensuring it remains correct +// +// You do not need this where single placeholders are used, e.g. 'Message %d' is fine +// equally where a string contains only two placeholders which are used to wrap text +// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine +// +// Some characters you may want to copy&paste: +// ’ » “ ” … +// + +$lang = array_merge($lang, [ + 'PHPBB_ANALYTICS_PRIVACY_POLICY' => ' +

+

Analytics

+ “%1$s” may use Google Analytics, a web analytics service provided by Google LLC (“Google”), to help us understand how visitors use the site. Google Analytics uses cookies and similar technologies to collect information about your interactions with the site, including the pages you visit, the time spent on each page, and general usage patterns. +

+ The information generated by these cookies about your use of “%1$s” (including your IP address) is transmitted to and stored by Google on servers in the United States or other locations. Google uses this information to evaluate your use of the site, compile reports on website activity for us, and provide other services relating to website activity and internet usage. +

+ Google may also transfer this information to third parties where required to do so by law, or where such third parties process the information on Google’s behalf. To learn more about how Google collects and processes data, please see Google’s Privacy Policy at: https://policies.google.com/privacy. +

+ You can opt out of Google Analytics by installing the Google Analytics opt-out browser add-on, available at: https://tools.google.com/dlpage/gaoptout. + ', +]); diff --git a/language/es_x_tu/googleanalytics_ucp.php b/language/es_x_tu/googleanalytics_ucp.php new file mode 100644 index 0000000..e93b046 --- /dev/null +++ b/language/es_x_tu/googleanalytics_ucp.php @@ -0,0 +1,52 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +*/ + +/** +* DO NOT CHANGE +*/ +if (!defined('IN_PHPBB')) +{ + exit; +} + +if (empty($lang) || !is_array($lang)) +{ + $lang = []; +} + +// DEVELOPERS PLEASE NOTE +// +// All language files should use UTF-8 as their encoding and the files must not contain a BOM. +// +// Placeholders can now contain order information, e.g. instead of +// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows +// translators to re-order the output of data while ensuring it remains correct +// +// You do not need this where single placeholders are used, e.g. 'Message %d' is fine +// equally where a string contains only two placeholders which are used to wrap text +// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine +// +// Some characters you may want to copy&paste: +// ’ » “ ” … +// + +$lang = array_merge($lang, [ + 'PHPBB_ANALYTICS_PRIVACY_POLICY' => ' +

+

Analytics

+ “%1$s” may use Google Analytics, a web analytics service provided by Google LLC (“Google”), to help us understand how visitors use the site. Google Analytics uses cookies and similar technologies to collect information about your interactions with the site, including the pages you visit, the time spent on each page, and general usage patterns. +

+ The information generated by these cookies about your use of “%1$s” (including your IP address) is transmitted to and stored by Google on servers in the United States or other locations. Google uses this information to evaluate your use of the site, compile reports on website activity for us, and provide other services relating to website activity and internet usage. +

+ Google may also transfer this information to third parties where required to do so by law, or where such third parties process the information on Google’s behalf. To learn more about how Google collects and processes data, please see Google’s Privacy Policy at: https://policies.google.com/privacy. +

+ You can opt out of Google Analytics by installing the Google Analytics opt-out browser add-on, available at: https://tools.google.com/dlpage/gaoptout. + ', +]); diff --git a/language/fr/googleanalytics_ucp.php b/language/fr/googleanalytics_ucp.php new file mode 100644 index 0000000..e93b046 --- /dev/null +++ b/language/fr/googleanalytics_ucp.php @@ -0,0 +1,52 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +*/ + +/** +* DO NOT CHANGE +*/ +if (!defined('IN_PHPBB')) +{ + exit; +} + +if (empty($lang) || !is_array($lang)) +{ + $lang = []; +} + +// DEVELOPERS PLEASE NOTE +// +// All language files should use UTF-8 as their encoding and the files must not contain a BOM. +// +// Placeholders can now contain order information, e.g. instead of +// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows +// translators to re-order the output of data while ensuring it remains correct +// +// You do not need this where single placeholders are used, e.g. 'Message %d' is fine +// equally where a string contains only two placeholders which are used to wrap text +// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine +// +// Some characters you may want to copy&paste: +// ’ » “ ” … +// + +$lang = array_merge($lang, [ + 'PHPBB_ANALYTICS_PRIVACY_POLICY' => ' +

+

Analytics

+ “%1$s” may use Google Analytics, a web analytics service provided by Google LLC (“Google”), to help us understand how visitors use the site. Google Analytics uses cookies and similar technologies to collect information about your interactions with the site, including the pages you visit, the time spent on each page, and general usage patterns. +

+ The information generated by these cookies about your use of “%1$s” (including your IP address) is transmitted to and stored by Google on servers in the United States or other locations. Google uses this information to evaluate your use of the site, compile reports on website activity for us, and provide other services relating to website activity and internet usage. +

+ Google may also transfer this information to third parties where required to do so by law, or where such third parties process the information on Google’s behalf. To learn more about how Google collects and processes data, please see Google’s Privacy Policy at: https://policies.google.com/privacy. +

+ You can opt out of Google Analytics by installing the Google Analytics opt-out browser add-on, available at: https://tools.google.com/dlpage/gaoptout. + ', +]); diff --git a/language/hr/googleanalytics_ucp.php b/language/hr/googleanalytics_ucp.php new file mode 100644 index 0000000..e93b046 --- /dev/null +++ b/language/hr/googleanalytics_ucp.php @@ -0,0 +1,52 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +*/ + +/** +* DO NOT CHANGE +*/ +if (!defined('IN_PHPBB')) +{ + exit; +} + +if (empty($lang) || !is_array($lang)) +{ + $lang = []; +} + +// DEVELOPERS PLEASE NOTE +// +// All language files should use UTF-8 as their encoding and the files must not contain a BOM. +// +// Placeholders can now contain order information, e.g. instead of +// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows +// translators to re-order the output of data while ensuring it remains correct +// +// You do not need this where single placeholders are used, e.g. 'Message %d' is fine +// equally where a string contains only two placeholders which are used to wrap text +// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine +// +// Some characters you may want to copy&paste: +// ’ » “ ” … +// + +$lang = array_merge($lang, [ + 'PHPBB_ANALYTICS_PRIVACY_POLICY' => ' +

+

Analytics

+ “%1$s” may use Google Analytics, a web analytics service provided by Google LLC (“Google”), to help us understand how visitors use the site. Google Analytics uses cookies and similar technologies to collect information about your interactions with the site, including the pages you visit, the time spent on each page, and general usage patterns. +

+ The information generated by these cookies about your use of “%1$s” (including your IP address) is transmitted to and stored by Google on servers in the United States or other locations. Google uses this information to evaluate your use of the site, compile reports on website activity for us, and provide other services relating to website activity and internet usage. +

+ Google may also transfer this information to third parties where required to do so by law, or where such third parties process the information on Google’s behalf. To learn more about how Google collects and processes data, please see Google’s Privacy Policy at: https://policies.google.com/privacy. +

+ You can opt out of Google Analytics by installing the Google Analytics opt-out browser add-on, available at: https://tools.google.com/dlpage/gaoptout. + ', +]); diff --git a/language/hr_x_vi/googleanalytics_ucp.php b/language/hr_x_vi/googleanalytics_ucp.php new file mode 100644 index 0000000..e93b046 --- /dev/null +++ b/language/hr_x_vi/googleanalytics_ucp.php @@ -0,0 +1,52 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +*/ + +/** +* DO NOT CHANGE +*/ +if (!defined('IN_PHPBB')) +{ + exit; +} + +if (empty($lang) || !is_array($lang)) +{ + $lang = []; +} + +// DEVELOPERS PLEASE NOTE +// +// All language files should use UTF-8 as their encoding and the files must not contain a BOM. +// +// Placeholders can now contain order information, e.g. instead of +// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows +// translators to re-order the output of data while ensuring it remains correct +// +// You do not need this where single placeholders are used, e.g. 'Message %d' is fine +// equally where a string contains only two placeholders which are used to wrap text +// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine +// +// Some characters you may want to copy&paste: +// ’ » “ ” … +// + +$lang = array_merge($lang, [ + 'PHPBB_ANALYTICS_PRIVACY_POLICY' => ' +

+

Analytics

+ “%1$s” may use Google Analytics, a web analytics service provided by Google LLC (“Google”), to help us understand how visitors use the site. Google Analytics uses cookies and similar technologies to collect information about your interactions with the site, including the pages you visit, the time spent on each page, and general usage patterns. +

+ The information generated by these cookies about your use of “%1$s” (including your IP address) is transmitted to and stored by Google on servers in the United States or other locations. Google uses this information to evaluate your use of the site, compile reports on website activity for us, and provide other services relating to website activity and internet usage. +

+ Google may also transfer this information to third parties where required to do so by law, or where such third parties process the information on Google’s behalf. To learn more about how Google collects and processes data, please see Google’s Privacy Policy at: https://policies.google.com/privacy. +

+ You can opt out of Google Analytics by installing the Google Analytics opt-out browser add-on, available at: https://tools.google.com/dlpage/gaoptout. + ', +]); diff --git a/language/it/googleanalytics_ucp.php b/language/it/googleanalytics_ucp.php new file mode 100644 index 0000000..e93b046 --- /dev/null +++ b/language/it/googleanalytics_ucp.php @@ -0,0 +1,52 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +*/ + +/** +* DO NOT CHANGE +*/ +if (!defined('IN_PHPBB')) +{ + exit; +} + +if (empty($lang) || !is_array($lang)) +{ + $lang = []; +} + +// DEVELOPERS PLEASE NOTE +// +// All language files should use UTF-8 as their encoding and the files must not contain a BOM. +// +// Placeholders can now contain order information, e.g. instead of +// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows +// translators to re-order the output of data while ensuring it remains correct +// +// You do not need this where single placeholders are used, e.g. 'Message %d' is fine +// equally where a string contains only two placeholders which are used to wrap text +// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine +// +// Some characters you may want to copy&paste: +// ’ » “ ” … +// + +$lang = array_merge($lang, [ + 'PHPBB_ANALYTICS_PRIVACY_POLICY' => ' +

+

Analytics

+ “%1$s” may use Google Analytics, a web analytics service provided by Google LLC (“Google”), to help us understand how visitors use the site. Google Analytics uses cookies and similar technologies to collect information about your interactions with the site, including the pages you visit, the time spent on each page, and general usage patterns. +

+ The information generated by these cookies about your use of “%1$s” (including your IP address) is transmitted to and stored by Google on servers in the United States or other locations. Google uses this information to evaluate your use of the site, compile reports on website activity for us, and provide other services relating to website activity and internet usage. +

+ Google may also transfer this information to third parties where required to do so by law, or where such third parties process the information on Google’s behalf. To learn more about how Google collects and processes data, please see Google’s Privacy Policy at: https://policies.google.com/privacy. +

+ You can opt out of Google Analytics by installing the Google Analytics opt-out browser add-on, available at: https://tools.google.com/dlpage/gaoptout. + ', +]); diff --git a/language/nl/googleanalytics_ucp.php b/language/nl/googleanalytics_ucp.php new file mode 100644 index 0000000..e93b046 --- /dev/null +++ b/language/nl/googleanalytics_ucp.php @@ -0,0 +1,52 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +*/ + +/** +* DO NOT CHANGE +*/ +if (!defined('IN_PHPBB')) +{ + exit; +} + +if (empty($lang) || !is_array($lang)) +{ + $lang = []; +} + +// DEVELOPERS PLEASE NOTE +// +// All language files should use UTF-8 as their encoding and the files must not contain a BOM. +// +// Placeholders can now contain order information, e.g. instead of +// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows +// translators to re-order the output of data while ensuring it remains correct +// +// You do not need this where single placeholders are used, e.g. 'Message %d' is fine +// equally where a string contains only two placeholders which are used to wrap text +// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine +// +// Some characters you may want to copy&paste: +// ’ » “ ” … +// + +$lang = array_merge($lang, [ + 'PHPBB_ANALYTICS_PRIVACY_POLICY' => ' +

+

Analytics

+ “%1$s” may use Google Analytics, a web analytics service provided by Google LLC (“Google”), to help us understand how visitors use the site. Google Analytics uses cookies and similar technologies to collect information about your interactions with the site, including the pages you visit, the time spent on each page, and general usage patterns. +

+ The information generated by these cookies about your use of “%1$s” (including your IP address) is transmitted to and stored by Google on servers in the United States or other locations. Google uses this information to evaluate your use of the site, compile reports on website activity for us, and provide other services relating to website activity and internet usage. +

+ Google may also transfer this information to third parties where required to do so by law, or where such third parties process the information on Google’s behalf. To learn more about how Google collects and processes data, please see Google’s Privacy Policy at: https://policies.google.com/privacy. +

+ You can opt out of Google Analytics by installing the Google Analytics opt-out browser add-on, available at: https://tools.google.com/dlpage/gaoptout. + ', +]); diff --git a/language/pl/googleanalytics_ucp.php b/language/pl/googleanalytics_ucp.php new file mode 100644 index 0000000..e93b046 --- /dev/null +++ b/language/pl/googleanalytics_ucp.php @@ -0,0 +1,52 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +*/ + +/** +* DO NOT CHANGE +*/ +if (!defined('IN_PHPBB')) +{ + exit; +} + +if (empty($lang) || !is_array($lang)) +{ + $lang = []; +} + +// DEVELOPERS PLEASE NOTE +// +// All language files should use UTF-8 as their encoding and the files must not contain a BOM. +// +// Placeholders can now contain order information, e.g. instead of +// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows +// translators to re-order the output of data while ensuring it remains correct +// +// You do not need this where single placeholders are used, e.g. 'Message %d' is fine +// equally where a string contains only two placeholders which are used to wrap text +// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine +// +// Some characters you may want to copy&paste: +// ’ » “ ” … +// + +$lang = array_merge($lang, [ + 'PHPBB_ANALYTICS_PRIVACY_POLICY' => ' +

+

Analytics

+ “%1$s” may use Google Analytics, a web analytics service provided by Google LLC (“Google”), to help us understand how visitors use the site. Google Analytics uses cookies and similar technologies to collect information about your interactions with the site, including the pages you visit, the time spent on each page, and general usage patterns. +

+ The information generated by these cookies about your use of “%1$s” (including your IP address) is transmitted to and stored by Google on servers in the United States or other locations. Google uses this information to evaluate your use of the site, compile reports on website activity for us, and provide other services relating to website activity and internet usage. +

+ Google may also transfer this information to third parties where required to do so by law, or where such third parties process the information on Google’s behalf. To learn more about how Google collects and processes data, please see Google’s Privacy Policy at: https://policies.google.com/privacy. +

+ You can opt out of Google Analytics by installing the Google Analytics opt-out browser add-on, available at: https://tools.google.com/dlpage/gaoptout. + ', +]); diff --git a/language/pt/googleanalytics_ucp.php b/language/pt/googleanalytics_ucp.php new file mode 100644 index 0000000..e93b046 --- /dev/null +++ b/language/pt/googleanalytics_ucp.php @@ -0,0 +1,52 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +*/ + +/** +* DO NOT CHANGE +*/ +if (!defined('IN_PHPBB')) +{ + exit; +} + +if (empty($lang) || !is_array($lang)) +{ + $lang = []; +} + +// DEVELOPERS PLEASE NOTE +// +// All language files should use UTF-8 as their encoding and the files must not contain a BOM. +// +// Placeholders can now contain order information, e.g. instead of +// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows +// translators to re-order the output of data while ensuring it remains correct +// +// You do not need this where single placeholders are used, e.g. 'Message %d' is fine +// equally where a string contains only two placeholders which are used to wrap text +// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine +// +// Some characters you may want to copy&paste: +// ’ » “ ” … +// + +$lang = array_merge($lang, [ + 'PHPBB_ANALYTICS_PRIVACY_POLICY' => ' +

+

Analytics

+ “%1$s” may use Google Analytics, a web analytics service provided by Google LLC (“Google”), to help us understand how visitors use the site. Google Analytics uses cookies and similar technologies to collect information about your interactions with the site, including the pages you visit, the time spent on each page, and general usage patterns. +

+ The information generated by these cookies about your use of “%1$s” (including your IP address) is transmitted to and stored by Google on servers in the United States or other locations. Google uses this information to evaluate your use of the site, compile reports on website activity for us, and provide other services relating to website activity and internet usage. +

+ Google may also transfer this information to third parties where required to do so by law, or where such third parties process the information on Google’s behalf. To learn more about how Google collects and processes data, please see Google’s Privacy Policy at: https://policies.google.com/privacy. +

+ You can opt out of Google Analytics by installing the Google Analytics opt-out browser add-on, available at: https://tools.google.com/dlpage/gaoptout. + ', +]); diff --git a/language/pt_br/googleanalytics_ucp.php b/language/pt_br/googleanalytics_ucp.php new file mode 100644 index 0000000..e93b046 --- /dev/null +++ b/language/pt_br/googleanalytics_ucp.php @@ -0,0 +1,52 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +*/ + +/** +* DO NOT CHANGE +*/ +if (!defined('IN_PHPBB')) +{ + exit; +} + +if (empty($lang) || !is_array($lang)) +{ + $lang = []; +} + +// DEVELOPERS PLEASE NOTE +// +// All language files should use UTF-8 as their encoding and the files must not contain a BOM. +// +// Placeholders can now contain order information, e.g. instead of +// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows +// translators to re-order the output of data while ensuring it remains correct +// +// You do not need this where single placeholders are used, e.g. 'Message %d' is fine +// equally where a string contains only two placeholders which are used to wrap text +// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine +// +// Some characters you may want to copy&paste: +// ’ » “ ” … +// + +$lang = array_merge($lang, [ + 'PHPBB_ANALYTICS_PRIVACY_POLICY' => ' +

+

Analytics

+ “%1$s” may use Google Analytics, a web analytics service provided by Google LLC (“Google”), to help us understand how visitors use the site. Google Analytics uses cookies and similar technologies to collect information about your interactions with the site, including the pages you visit, the time spent on each page, and general usage patterns. +

+ The information generated by these cookies about your use of “%1$s” (including your IP address) is transmitted to and stored by Google on servers in the United States or other locations. Google uses this information to evaluate your use of the site, compile reports on website activity for us, and provide other services relating to website activity and internet usage. +

+ Google may also transfer this information to third parties where required to do so by law, or where such third parties process the information on Google’s behalf. To learn more about how Google collects and processes data, please see Google’s Privacy Policy at: https://policies.google.com/privacy. +

+ You can opt out of Google Analytics by installing the Google Analytics opt-out browser add-on, available at: https://tools.google.com/dlpage/gaoptout. + ', +]); diff --git a/language/ro/googleanalytics_ucp.php b/language/ro/googleanalytics_ucp.php new file mode 100644 index 0000000..e93b046 --- /dev/null +++ b/language/ro/googleanalytics_ucp.php @@ -0,0 +1,52 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +*/ + +/** +* DO NOT CHANGE +*/ +if (!defined('IN_PHPBB')) +{ + exit; +} + +if (empty($lang) || !is_array($lang)) +{ + $lang = []; +} + +// DEVELOPERS PLEASE NOTE +// +// All language files should use UTF-8 as their encoding and the files must not contain a BOM. +// +// Placeholders can now contain order information, e.g. instead of +// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows +// translators to re-order the output of data while ensuring it remains correct +// +// You do not need this where single placeholders are used, e.g. 'Message %d' is fine +// equally where a string contains only two placeholders which are used to wrap text +// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine +// +// Some characters you may want to copy&paste: +// ’ » “ ” … +// + +$lang = array_merge($lang, [ + 'PHPBB_ANALYTICS_PRIVACY_POLICY' => ' +

+

Analytics

+ “%1$s” may use Google Analytics, a web analytics service provided by Google LLC (“Google”), to help us understand how visitors use the site. Google Analytics uses cookies and similar technologies to collect information about your interactions with the site, including the pages you visit, the time spent on each page, and general usage patterns. +

+ The information generated by these cookies about your use of “%1$s” (including your IP address) is transmitted to and stored by Google on servers in the United States or other locations. Google uses this information to evaluate your use of the site, compile reports on website activity for us, and provide other services relating to website activity and internet usage. +

+ Google may also transfer this information to third parties where required to do so by law, or where such third parties process the information on Google’s behalf. To learn more about how Google collects and processes data, please see Google’s Privacy Policy at: https://policies.google.com/privacy. +

+ You can opt out of Google Analytics by installing the Google Analytics opt-out browser add-on, available at: https://tools.google.com/dlpage/gaoptout. + ', +]); diff --git a/language/ru/googleanalytics_ucp.php b/language/ru/googleanalytics_ucp.php new file mode 100644 index 0000000..e93b046 --- /dev/null +++ b/language/ru/googleanalytics_ucp.php @@ -0,0 +1,52 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +*/ + +/** +* DO NOT CHANGE +*/ +if (!defined('IN_PHPBB')) +{ + exit; +} + +if (empty($lang) || !is_array($lang)) +{ + $lang = []; +} + +// DEVELOPERS PLEASE NOTE +// +// All language files should use UTF-8 as their encoding and the files must not contain a BOM. +// +// Placeholders can now contain order information, e.g. instead of +// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows +// translators to re-order the output of data while ensuring it remains correct +// +// You do not need this where single placeholders are used, e.g. 'Message %d' is fine +// equally where a string contains only two placeholders which are used to wrap text +// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine +// +// Some characters you may want to copy&paste: +// ’ » “ ” … +// + +$lang = array_merge($lang, [ + 'PHPBB_ANALYTICS_PRIVACY_POLICY' => ' +

+

Analytics

+ “%1$s” may use Google Analytics, a web analytics service provided by Google LLC (“Google”), to help us understand how visitors use the site. Google Analytics uses cookies and similar technologies to collect information about your interactions with the site, including the pages you visit, the time spent on each page, and general usage patterns. +

+ The information generated by these cookies about your use of “%1$s” (including your IP address) is transmitted to and stored by Google on servers in the United States or other locations. Google uses this information to evaluate your use of the site, compile reports on website activity for us, and provide other services relating to website activity and internet usage. +

+ Google may also transfer this information to third parties where required to do so by law, or where such third parties process the information on Google’s behalf. To learn more about how Google collects and processes data, please see Google’s Privacy Policy at: https://policies.google.com/privacy. +

+ You can opt out of Google Analytics by installing the Google Analytics opt-out browser add-on, available at: https://tools.google.com/dlpage/gaoptout. + ', +]); diff --git a/language/sk/googleanalytics_ucp.php b/language/sk/googleanalytics_ucp.php new file mode 100644 index 0000000..e93b046 --- /dev/null +++ b/language/sk/googleanalytics_ucp.php @@ -0,0 +1,52 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +*/ + +/** +* DO NOT CHANGE +*/ +if (!defined('IN_PHPBB')) +{ + exit; +} + +if (empty($lang) || !is_array($lang)) +{ + $lang = []; +} + +// DEVELOPERS PLEASE NOTE +// +// All language files should use UTF-8 as their encoding and the files must not contain a BOM. +// +// Placeholders can now contain order information, e.g. instead of +// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows +// translators to re-order the output of data while ensuring it remains correct +// +// You do not need this where single placeholders are used, e.g. 'Message %d' is fine +// equally where a string contains only two placeholders which are used to wrap text +// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine +// +// Some characters you may want to copy&paste: +// ’ » “ ” … +// + +$lang = array_merge($lang, [ + 'PHPBB_ANALYTICS_PRIVACY_POLICY' => ' +

+

Analytics

+ “%1$s” may use Google Analytics, a web analytics service provided by Google LLC (“Google”), to help us understand how visitors use the site. Google Analytics uses cookies and similar technologies to collect information about your interactions with the site, including the pages you visit, the time spent on each page, and general usage patterns. +

+ The information generated by these cookies about your use of “%1$s” (including your IP address) is transmitted to and stored by Google on servers in the United States or other locations. Google uses this information to evaluate your use of the site, compile reports on website activity for us, and provide other services relating to website activity and internet usage. +

+ Google may also transfer this information to third parties where required to do so by law, or where such third parties process the information on Google’s behalf. To learn more about how Google collects and processes data, please see Google’s Privacy Policy at: https://policies.google.com/privacy. +

+ You can opt out of Google Analytics by installing the Google Analytics opt-out browser add-on, available at: https://tools.google.com/dlpage/gaoptout. + ', +]); diff --git a/language/sv/googleanalytics_ucp.php b/language/sv/googleanalytics_ucp.php new file mode 100644 index 0000000..e93b046 --- /dev/null +++ b/language/sv/googleanalytics_ucp.php @@ -0,0 +1,52 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +*/ + +/** +* DO NOT CHANGE +*/ +if (!defined('IN_PHPBB')) +{ + exit; +} + +if (empty($lang) || !is_array($lang)) +{ + $lang = []; +} + +// DEVELOPERS PLEASE NOTE +// +// All language files should use UTF-8 as their encoding and the files must not contain a BOM. +// +// Placeholders can now contain order information, e.g. instead of +// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows +// translators to re-order the output of data while ensuring it remains correct +// +// You do not need this where single placeholders are used, e.g. 'Message %d' is fine +// equally where a string contains only two placeholders which are used to wrap text +// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine +// +// Some characters you may want to copy&paste: +// ’ » “ ” … +// + +$lang = array_merge($lang, [ + 'PHPBB_ANALYTICS_PRIVACY_POLICY' => ' +

+

Analytics

+ “%1$s” may use Google Analytics, a web analytics service provided by Google LLC (“Google”), to help us understand how visitors use the site. Google Analytics uses cookies and similar technologies to collect information about your interactions with the site, including the pages you visit, the time spent on each page, and general usage patterns. +

+ The information generated by these cookies about your use of “%1$s” (including your IP address) is transmitted to and stored by Google on servers in the United States or other locations. Google uses this information to evaluate your use of the site, compile reports on website activity for us, and provide other services relating to website activity and internet usage. +

+ Google may also transfer this information to third parties where required to do so by law, or where such third parties process the information on Google’s behalf. To learn more about how Google collects and processes data, please see Google’s Privacy Policy at: https://policies.google.com/privacy. +

+ You can opt out of Google Analytics by installing the Google Analytics opt-out browser add-on, available at: https://tools.google.com/dlpage/gaoptout. + ', +]); diff --git a/language/tr/googleanalytics_ucp.php b/language/tr/googleanalytics_ucp.php new file mode 100644 index 0000000..e93b046 --- /dev/null +++ b/language/tr/googleanalytics_ucp.php @@ -0,0 +1,52 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +*/ + +/** +* DO NOT CHANGE +*/ +if (!defined('IN_PHPBB')) +{ + exit; +} + +if (empty($lang) || !is_array($lang)) +{ + $lang = []; +} + +// DEVELOPERS PLEASE NOTE +// +// All language files should use UTF-8 as their encoding and the files must not contain a BOM. +// +// Placeholders can now contain order information, e.g. instead of +// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows +// translators to re-order the output of data while ensuring it remains correct +// +// You do not need this where single placeholders are used, e.g. 'Message %d' is fine +// equally where a string contains only two placeholders which are used to wrap text +// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine +// +// Some characters you may want to copy&paste: +// ’ » “ ” … +// + +$lang = array_merge($lang, [ + 'PHPBB_ANALYTICS_PRIVACY_POLICY' => ' +

+

Analytics

+ “%1$s” may use Google Analytics, a web analytics service provided by Google LLC (“Google”), to help us understand how visitors use the site. Google Analytics uses cookies and similar technologies to collect information about your interactions with the site, including the pages you visit, the time spent on each page, and general usage patterns. +

+ The information generated by these cookies about your use of “%1$s” (including your IP address) is transmitted to and stored by Google on servers in the United States or other locations. Google uses this information to evaluate your use of the site, compile reports on website activity for us, and provide other services relating to website activity and internet usage. +

+ Google may also transfer this information to third parties where required to do so by law, or where such third parties process the information on Google’s behalf. To learn more about how Google collects and processes data, please see Google’s Privacy Policy at: https://policies.google.com/privacy. +

+ You can opt out of Google Analytics by installing the Google Analytics opt-out browser add-on, available at: https://tools.google.com/dlpage/gaoptout. + ', +]); diff --git a/language/zh_cmn_hant/googleanalytics_ucp.php b/language/zh_cmn_hant/googleanalytics_ucp.php new file mode 100644 index 0000000..e93b046 --- /dev/null +++ b/language/zh_cmn_hant/googleanalytics_ucp.php @@ -0,0 +1,52 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +*/ + +/** +* DO NOT CHANGE +*/ +if (!defined('IN_PHPBB')) +{ + exit; +} + +if (empty($lang) || !is_array($lang)) +{ + $lang = []; +} + +// DEVELOPERS PLEASE NOTE +// +// All language files should use UTF-8 as their encoding and the files must not contain a BOM. +// +// Placeholders can now contain order information, e.g. instead of +// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows +// translators to re-order the output of data while ensuring it remains correct +// +// You do not need this where single placeholders are used, e.g. 'Message %d' is fine +// equally where a string contains only two placeholders which are used to wrap text +// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine +// +// Some characters you may want to copy&paste: +// ’ » “ ” … +// + +$lang = array_merge($lang, [ + 'PHPBB_ANALYTICS_PRIVACY_POLICY' => ' +

+

Analytics

+ “%1$s” may use Google Analytics, a web analytics service provided by Google LLC (“Google”), to help us understand how visitors use the site. Google Analytics uses cookies and similar technologies to collect information about your interactions with the site, including the pages you visit, the time spent on each page, and general usage patterns. +

+ The information generated by these cookies about your use of “%1$s” (including your IP address) is transmitted to and stored by Google on servers in the United States or other locations. Google uses this information to evaluate your use of the site, compile reports on website activity for us, and provide other services relating to website activity and internet usage. +

+ Google may also transfer this information to third parties where required to do so by law, or where such third parties process the information on Google’s behalf. To learn more about how Google collects and processes data, please see Google’s Privacy Policy at: https://policies.google.com/privacy. +

+ You can opt out of Google Analytics by installing the Google Analytics opt-out browser add-on, available at: https://tools.google.com/dlpage/gaoptout. + ', +]); From c731359736eb40189bd093545b3a00ab60fff2d2 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Sat, 20 Sep 2025 07:23:57 -0700 Subject: [PATCH 12/17] Only show privacy info if analytics enabled --- event/listener.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/event/listener.php b/event/listener.php index b3f7d79..da0259b 100644 --- a/event/listener.php +++ b/event/listener.php @@ -180,7 +180,8 @@ public function validate_googleanalytics_id($event) */ public function append_agreement() { - if ((strpos($this->user->page['page_name'], 'ucp') !== 0) + if (!$this->config['googleanalytics_id'] + || (strpos($this->user->page['page_name'], 'ucp') !== 0) || !$this->template->retrieve_var('S_AGREEMENT') || ($this->template->retrieve_var('AGREEMENT_TITLE') !== $this->language->lang('PRIVACY'))) { From f71af5ffef8d2d58a5c21efa58b30801632fdff5 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Sat, 20 Sep 2025 17:14:20 -0700 Subject: [PATCH 13/17] Bump to 1.1.0 --- CHANGELOG.md | 11 ++++++++--- composer.json | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b96133..dafaf8e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,18 +1,23 @@ # Changelog +## 1.1.0 - 2025-09-20 + +- Added an amendment to the forum privacy policy regarding how Google may collect and/or use user's data. +- Dropped support for phpBB 3.1 + ## 1.0.6 - 2020-11-15 - Added support for Google Analytics Measurement ID. This is for users who have set up a Google Analytics 4 property with a Web data stream (which begins with "G-") instead of Universal Analytics (which begins with "UA-"). ## 1.0.5 - 2019-11-15 -- Support added for Google Analytics new Global Site tag. Now there is an option to select whether you want to use the new Global Site tag (gtag.js), or the older Analytics tag (analytics.js). Existing installations will not be automatically switched over to the newer Global Site tag, however, fresh installs will default to the newer Global Site tag. Details about the new Global Site tag can be found in your Google Analytics Account Admin. +- Support added for Google Analytics new Global Site tag. Now there is an option to select whether you want to use the new Global Site tag (gtag.js) or the older Analytics tag (analytics.js). Existing installations will not be automatically switched over to the newer Global Site tag, however, fresh installs will default to the newer Global Site tag. Details about the new Global Site tag can be found in your Google Analytics Account Admin. - Fixed a bug where Google Analytics ACP Board settings could conflict with other extensions ACP Board settings that resulted in a PHP error. - Added Spanish casual honorifics translation. ## 1.0.4 - 2018-05-17 -- Added an option to enable visitor IP anonymization. This is recommended by Google to make the data collected for Analytics compliant with the EU‘s GDPR laws which go into effect May 25, 2018. +- Added an option to enable visitor IP anonymisation. Google recommends this to make the data collected for Analytics compliant with the EU‘s GDPR's laws, which go into effect May 25, 2018. - Added German translation (formal and casual) ## 1.0.3 - 2017-08-04 @@ -37,7 +42,7 @@ ## 1.0.1 - 2014-11-28 - Fixed issues in the README.md -- Added a new template event `phpbb_googleanalytics_alter_ga_requirements` which may be used by other extensions to add more tracking options (like the ability to track advertisements). See here for a example: https://support.google.com/analytics/answer/2444872?hl=en&utm_id=ad +- Added a new template event `phpbb_googleanalytics_alter_ga_requirements` which may be used by other extensions to add more tracking options (like the ability to track advertisements). See here for an example: https://support.google.com/analytics/answer/2444872?hl=en&utm_id=ad - Added Arabic language pack - Added Dutch language pack - Added French language pack diff --git a/composer.json b/composer.json index e8be075..70032f0 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "type": "phpbb-extension", "description": "A phpBB official extension that allows administrators to easily add Google Analytics to their forums.", "homepage": "https://www.phpbb.com/customise/db/extension/googleanalytics/", - "version": "1.1.0-dev", + "version": "1.1.0", "keywords": ["phpbb", "extension", "google", "analytics"], "license": "GPL-2.0-only", "authors": [ From 4cfd71c2f0e55d8a2b28bbfb1b6a96fd99bdfa00 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Sat, 7 Feb 2026 08:34:19 -0800 Subject: [PATCH 14/17] Support secure cookies over https --- event/listener.php | 1 + .../all/template/event/overall_header_stylesheets_after.html | 1 + tests/event/listener_test.php | 3 +++ 3 files changed, 5 insertions(+) diff --git a/event/listener.php b/event/listener.php index da0259b..c47718e 100644 --- a/event/listener.php +++ b/event/listener.php @@ -80,6 +80,7 @@ public function load_google_analytics() 'GOOGLEANALYTICS_TAG' => $this->config['googleanalytics_tag'], 'GOOGLEANALYTICS_USER_ID' => $this->user->data['user_id'], 'S_ANONYMIZE_IP' => $this->config['ga_anonymize_ip'], + 'S_COOKIE_SECURE' => $this->config['cookie_secure'], ]); } diff --git a/styles/all/template/event/overall_header_stylesheets_after.html b/styles/all/template/event/overall_header_stylesheets_after.html index 7895b2f..4ad533b 100644 --- a/styles/all/template/event/overall_header_stylesheets_after.html +++ b/styles/all/template/event/overall_header_stylesheets_after.html @@ -13,6 +13,7 @@ {%- EVENT phpbb_googleanalytics_gtag_options -%} {%- if S_REGISTERED_USER %}'user_id': '{{ GOOGLEANALYTICS_USER_ID }}',{% endif -%} {%- if S_ANONYMIZE_IP %}'anonymize_ip': true,{% endif -%} + {%- if S_COOKIE_SECURE -%}'cookie_flags': 'samesite=none;secure',{%- endif -%} }); {% else %} diff --git a/tests/event/listener_test.php b/tests/event/listener_test.php index a8b300d..ea42e30 100644 --- a/tests/event/listener_test.php +++ b/tests/event/listener_test.php @@ -48,7 +48,9 @@ protected function setUp(): void // Load/Mock classes required by the event listener class $this->config = new \phpbb\config\config([ 'googleanalytics_id' => 'UA-000000-01', + 'googleanalytics_tag' => 1, 'ga_anonymize_ip' => 0, + 'cookie_secure' => 0, ]); $this->template = $this->getMockBuilder('\phpbb\template\template') ->getMock(); @@ -108,6 +110,7 @@ public function test_load_google_analytics() 'GOOGLEANALYTICS_TAG' => $this->config['googleanalytics_tag'], 'GOOGLEANALYTICS_USER_ID' => $this->user->data['user_id'], 'S_ANONYMIZE_IP' => $this->config['ga_anonymize_ip'], + 'S_COOKIE_SECURE' => $this->config['cookie_secure'], ]); $dispatcher = new \phpbb\event\dispatcher(); From 407b7269f2704a0404232a7e1536777d1fb7fcb8 Mon Sep 17 00:00:00 2001 From: Zorglube <630192+zorglube@users.noreply.github.com> Date: Thu, 12 Feb 2026 11:46:13 +0100 Subject: [PATCH 15/17] Review - https://github.com/Cube707/phpbb-matomoanalytics/pull/1#discussion_r2795502115 - https://github.com/Cube707/phpbb-matomoanalytics/pull/1#discussion_r2795506679 - https://github.com/Cube707/phpbb-matomoanalytics/pull/1#discussion_r2795515072 - https://github.com/Cube707/phpbb-matomoanalytics/pull/1#discussion_r2795521267 Signed-off-by: Zorglube <630192+zorglube@users.noreply.github.com> --- .github/workflows/tests.yml | 2 +- composer.json | 8 ++++- language/fr/matomoanalytics_acp.php | 50 ----------------------------- tests/event/listener_test.php | 2 +- 4 files changed, 9 insertions(+), 53 deletions(-) delete mode 100644 language/fr/matomoanalytics_acp.php diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a14dd62..aa1d174 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -25,7 +25,7 @@ jobs: name: Extension tests uses: phpbb-extensions/test-framework/.github/workflows/tests.yml@3.3.x with: - EXTNAME: phpbb/googleanalytics # Your extension vendor/package name + EXTNAME: cube/matomoanalytics # Your extension vendor/package name CODECOV: 1 # Run code coverage via codecov? 1 or 0 secrets: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} # Do not change this diff --git a/composer.json b/composer.json index a7d4a7d..aedd0d5 100644 --- a/composer.json +++ b/composer.json @@ -11,8 +11,14 @@ "name": "Jan Wille", "email": "mail@janwille.de", "homepage": "https://janwille.de", - "role": "Upstream Extension Developer" + "role": "Extension Developer" }, + { + "name": "Zorglube", + "email": "630192+zorglube@users.noreply.github.com", + "homepage": "https://blog.broncotoxique.com", + "role": "Extension Contributor" + }, { "name": "Marc Alexander", "email": "admin@m-a-styles.de", diff --git a/language/fr/matomoanalytics_acp.php b/language/fr/matomoanalytics_acp.php deleted file mode 100644 index d51ec2e..0000000 --- a/language/fr/matomoanalytics_acp.php +++ /dev/null @@ -1,50 +0,0 @@ - -* @license GNU General Public License, version 2 (GPL-2.0) -* -*/ - -/** -* DO NOT CHANGE -*/ -if (!defined('IN_PHPBB')) -{ - exit; -} - -if (empty($lang) || !is_array($lang)) -{ - $lang = array(); -} - -// DEVELOPERS PLEASE NOTE -// -// All language files should use UTF-8 as their encoding and the files must not contain a BOM. -// -// Placeholders can now contain order information, e.g. instead of -// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows -// translators to re-order the output of data while ensuring it remains correct -// -// You do not need this where single placeholders are used, e.g. 'Message %d' is fine -// equally where a string contains only two placeholders which are used to wrap text -// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine -// -// Some characters you may want to copy&paste: -// ’ » “ ” … -// - -$lang = array_merge($lang, array( - 'ACP_MATOMOANALYTICS' => 'Matomo Analytics', - 'ACP_MATOMOANALYTICS_ENABLE' => 'Activer Matomo', - 'ACP_MATOMOANALYTICS_ENABLE_EXPLAIN' => 'Activer/desactiver Matomo pour tout le site.', - 'ACP_MATOMOANALYTICS_URL' => 'Matomo Tracker URL', - 'ACP_MATOMOANALYTICS_URL_EXPLAIN' => 'URL de votre instance Matomo. Vous pouvez la trouver dans l\'interface web, à l\'intérieur du code de suivi JavaScript, juste derrière.var u=.', - 'ACP_MATOMOANALYTICS_URL_INVALID' => 'L\'URL doit valider ce format: http(s)://example.com/ (faite attention au slash final)', - 'ACP_MATOMOANALYTICS_SITE_ID' => 'Website ID', - 'ACP_MATOMOANALYTICS_SITE_ID_EXPLAIN' => 'L\'identifiant de votre site web fourni par Matomo.', - 'ACP_MATOMOANALYTICS_SITE_ID_INVALID' => 'ID doit être un entier positif.', -)); \ No newline at end of file diff --git a/tests/event/listener_test.php b/tests/event/listener_test.php index 8789367..2e873f5 100644 --- a/tests/event/listener_test.php +++ b/tests/event/listener_test.php @@ -145,7 +145,7 @@ public function add_matomoanalytics_configs_data() ]; } - /** + /** * Test the add_matomoanalytics_configs event * * @dataProvider add_matomoanalytics_configs_data From 51ea72e87c6f9a4ff44d48f5ee7dc651f9113a9f Mon Sep 17 00:00:00 2001 From: Zorglube <630192+zorglube@users.noreply.github.com> Date: Thu, 12 Feb 2026 12:37:30 +0100 Subject: [PATCH 16/17] Review: - https://github.com/Cube707/phpbb-matomoanalytics/pull/1#pullrequestreview-3787453667 Signed-off-by: Zorglube <630192+zorglube@users.noreply.github.com> --- event/listener.php | 27 +++++++++++++-- language/de/matomoanalytics_ups.php | 52 +++++++++++++++++++++++++++++ language/en/matomoanalytics_ups.php | 52 +++++++++++++++++++++++++++++ 3 files changed, 128 insertions(+), 3 deletions(-) create mode 100644 language/de/matomoanalytics_ups.php create mode 100644 language/en/matomoanalytics_ups.php diff --git a/event/listener.php b/event/listener.php index 79a8875..55a406a 100644 --- a/event/listener.php +++ b/event/listener.php @@ -60,9 +60,10 @@ public function __construct(config $config, language $language, template $templa public static function getSubscribedEvents() { return [ - 'core.acp_board_config_edit_add' => 'add_matomoanalytics_configs', - 'core.page_header' => 'load_matomoanalytics', - 'core.validate_config_variable' => 'validate_matomoanalytics_url', + 'core.page_header' => 'load_matomoanalytics', + 'core.acp_board_config_edit_add' => 'add_matomoanalytics_configs', + 'core.validate_config_variable' => 'validate_matomoanalytics_url', + 'core.page_footer_after' => 'append_agreement', ]; } @@ -159,4 +160,24 @@ public function validate_matomoanalytics_url($event) // Update error event data $event['error'] = $error; } + + /** + * Append additional agreement details to the privacy agreement. + * + * @return void + */ + public function append_agreement() + { + if (!$this->config['googleanalytics_id'] + || (strpos($this->user->page['page_name'], 'ucp') !== 0) + || !$this->template->retrieve_var('S_AGREEMENT') + || ($this->template->retrieve_var('AGREEMENT_TITLE') !== $this->language->lang('PRIVACY'))) + { + return; + } + + $this->language->add_lang('googleanalytics_ucp', 'cube/matomoanalytics'); + + $this->template->append_var('AGREEMENT_TEXT', $this->language->lang('PHPBB_ANALYTICS_PRIVACY_POLICY', $this->config['sitename'])); + } } diff --git a/language/de/matomoanalytics_ups.php b/language/de/matomoanalytics_ups.php new file mode 100644 index 0000000..9cf389f --- /dev/null +++ b/language/de/matomoanalytics_ups.php @@ -0,0 +1,52 @@ + + * @license GNU General Public License, version 2 (GPL-2.0) + * + */ + +/** +* DO NOT CHANGE +*/ +if (!defined('IN_PHPBB')) +{ + exit; +} + +if (empty($lang) || !is_array($lang)) +{ + $lang = []; +} + +// DEVELOPERS PLEASE NOTE +// +// All language files should use UTF-8 as their encoding and the files must not contain a BOM. +// +// Placeholders can now contain order information, e.g. instead of +// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows +// translators to re-order the output of data while ensuring it remains correct +// +// You do not need this where single placeholders are used, e.g. 'Message %d' is fine +// equally where a string contains only two placeholders which are used to wrap text +// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine +// +// Some characters you may want to copy&paste: +// ’ » “ ” … +// + +$lang = array_merge($lang, [ + 'PHPBB_ANALYTICS_PRIVACY_POLICY' => ' +

+

Analytics

+ “%1$s” may use MAtomo Analytics, a web analytics service provided by InnoCraft Limited (InnoCraft, we), to help us understand how visitors use the site. Matomo uses cookies and similar technologies to collect information about your interactions with the site, including the pages you visit, the time spent on each page, and general usage patterns. +

+ The information generated by these cookies about your use of “%1$s” (may include your IP address) is transmitted to and stored on the Matomo deployement solution choosed by the website owned (might be on premise, or into cloud solution). The website owner uses this information to evaluate your use of the site, compile reports on website activity, the uses of thoses infornation is decided by the website owner. +

+ Thoses informations may be transfer to a third parties. To learn more about how the statistics informations are used, contact the website owner. +

+ If you want to opt out of the statistics collection
. + ', +]); From ba8bfb01a44adbdde2a6912a1902056d154bbc5d Mon Sep 17 00:00:00 2001 From: Zorglube <630192+zorglube@users.noreply.github.com> Date: Thu, 12 Feb 2026 16:23:35 +0100 Subject: [PATCH 17/17] Review : https://github.com/Cube707/phpbb-matomoanalytics/pull/1#discussion_r2798710695 Signed-off-by: Zorglube <630192+zorglube@users.noreply.github.com> --- language/en/matomoanalytics_ups.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/language/en/matomoanalytics_ups.php b/language/en/matomoanalytics_ups.php index 9cf389f..b474b7d 100644 --- a/language/en/matomoanalytics_ups.php +++ b/language/en/matomoanalytics_ups.php @@ -41,7 +41,7 @@ 'PHPBB_ANALYTICS_PRIVACY_POLICY' => '

Analytics

- “%1$s” may use MAtomo Analytics, a web analytics service provided by InnoCraft Limited (InnoCraft, we), to help us understand how visitors use the site. Matomo uses cookies and similar technologies to collect information about your interactions with the site, including the pages you visit, the time spent on each page, and general usage patterns. + “%1$s” may use Matomo Analytics, a web analytics service provided by InnoCraft Limited (InnoCraft, we), to help us understand how visitors use the site. Matomo uses cookies and similar technologies to collect information about your interactions with the site, including the pages you visit, the time spent on each page, and general usage patterns.

The information generated by these cookies about your use of “%1$s” (may include your IP address) is transmitted to and stored on the Matomo deployement solution choosed by the website owned (might be on premise, or into cloud solution). The website owner uses this information to evaluate your use of the site, compile reports on website activity, the uses of thoses infornation is decided by the website owner.