From cf89de1c9513411465fb8801abd005cf673de012 Mon Sep 17 00:00:00 2001 From: Andy Vandenberghe Date: Fri, 22 May 2026 09:02:32 +0200 Subject: [PATCH 1/3] 2.1.0 (22/05/2026) - [CHG] Updated composer requirements to phpBB 3.3.0+ and PHP 7.1.3+ - [CHG] Replaced FontAwesome 4 icon class `fa-sticky-note-o` with FA5 `far fa-sticky-note` in the quick links template - [CHG] Quoted service references (`@template`, `@dbal.conn`, ...) in `config/services.yml` for compatibility with the phpBB 3.3 Symfony YAML parser - [DEL] Removed obsolete `S_IS_31` template branch and the phpBB-3.1 quick-link fallback markup - [DEL] Removed unused `\phpbb\config\config` injection from the event listener - [NEW] added Dutch translation --- .github/workflows/tests.yml | 18 ++++++ .gitignore | 18 ++++++ README.md | 56 +++++++++++------ composer.json | 61 +++++++++++-------- config/services.yml | 19 +++--- contrib/CHANGELOG.md | 14 +++++ event/listener.php | 8 +-- language/nl/notes.php | 26 ++++++++ .../navbar_header_quick_links_after.html | 14 ++--- travis/prepare-phpbb.sh | 24 -------- 10 files changed, 166 insertions(+), 92 deletions(-) create mode 100644 .github/workflows/tests.yml create mode 100644 .gitignore create mode 100644 contrib/CHANGELOG.md create mode 100644 language/nl/notes.php delete mode 100755 travis/prepare-phpbb.sh diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..a3e4ffc --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,18 @@ +name: Tests + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + test: + uses: phpbb-extensions/test-framework/.github/workflows/tests.yml@3.3.x + with: + EXTNAME: 'senky/notes' + PRIMARY_PHP_VERSION: '8.1' + PHP_VERSION_MATRIX: '["8.1", "8.2", "8.3", "8.4"]' + RUN_MSSQL_JOBS: 0 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0fbf0b2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,18 @@ +### macOS +# Finder metadata +.DS_Store + +# Thumbnails +._* + +# Custom folder icons +Icon + +# Volume root files +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent \ No newline at end of file diff --git a/README.md b/README.md index dd22f78..724b6cc 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,49 @@ -# phpBB Notes Extension +Notes for phpBB 3.3 +=========== -This is the repository for the development of the phpBB Notes Extension +Extension for phpBB that lets every registered user keep a private notepad on the forum. +Extension by Jakub Senko ([Senky](https://github.com/Senky)). -[![Build Status](https://travis-ci.org/Senky/phpbb-ext-notes.svg?branch=develop)](https://travis-ci.org/Senky/phpbb-ext-notes) +**Version:** 2.1.0 (22/05/2026) -## Install +#### Requirements +- phpBB 3.3.0 or higher +- PHP 7.1.3 or higher -1. [Download the latest validated release](https://www.phpbb.com/customise/db/extension/notes/). -2. Unzip the downloaded release and copy it to the `ext` directory of your phpBB board. -3. Navigate in the ACP to `Customise -> Manage extensions`. -4. Look for `Notes` under the Disabled Extensions list, and click its `Enable` link. +#### Features +- Per-user private notepad accessible from the quick links menu +- Notes are stored on the `user_note` column of the users table and never shown to other users, administrators, or moderators +- Single page at `/app.php/notes` +- Bots are redirected to the index + +#### ACP Options +None — the extension has no configurable settings. -## Uninstall +#### Extension integrations +None. -1. Navigate in the ACP to `Customise -> Extension Management -> Extensions`. -2. Look for `Notes` under the Enabled Extensions list, and click its `Disable` link. -3. To permanently uninstall, click `Delete Data` and then delete the `/ext/senky/notes` directory. +#### Languages +English, German, Dutch, French, Spanish, Estonian, Portuguese (Brazil), Russian, Arabic -## Support +#### Tested on +prosilver + +#### Installation +1. [Download the latest release](https://github.com/Senky/notes) and unzip it. +2. Copy the contents to `/ext/senky/notes/` (so that `composer.json` is at `/ext/senky/notes/composer.json`). +3. Navigate in the ACP to `Customise -> Manage extensions`. +4. Find `Notes` under "Disabled Extensions" and click `Enable`. -* **Important: Only official release versions validated by the phpBB Extensions Team should be installed on a live forum. Pre-release (beta, RC) versions downloaded from this repository are only to be used for testing on offline/development forums and are not officially supported.** -* Report bugs and other issues to our [Issue Tracker](https://github.com/Senky/phpbb-ext-notes/issues). -* Support requests should be posted and discussed in the [Notes topic at phpBB.com](https://www.phpbb.com/customise/db/extension/notes/support). +#### Uninstallation +1. Navigate in the ACP to `Customise -> Manage extensions`. +2. Click the `Disable` link for `Notes`. +3. To permanently uninstall, click `Delete Data`, then delete the `notes` folder from `/ext/senky/`. -## License +#### Support +- [Support forum](https://www.avathar.be/forum/viewforum.php?f=16) + +#### License [GNU General Public License v2](http://opensource.org/licenses/GPL-2.0) + + +Originally by Jakub Senko. Updated for phpBB 3.3 by Andy Vandenberghe (Sajaki). diff --git a/composer.json b/composer.json index 1d5c421..cd110bf 100644 --- a/composer.json +++ b/composer.json @@ -1,27 +1,38 @@ { - "name": "senky/notes", - "type": "phpbb-extension", - "description": "This extension allow users to write their own notes.", - "version": "2.0.0", - "time": "2016-08-30", - "license": "GPL-2.0", - "authors": [ - { - "name": "Jakub Senko", - "email": "jakubsenko@gmail.com", - "role": "Lead Developer" - } - ], - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpbb/epv": "dev-master" - }, - "extra": { - "display-name": "Notes", - "soft-require": { - "phpbb/phpbb": ">=3.1.0,<3.3" - } - } + "name": "senky/notes", + "type": "phpbb-extension", + "description": "This extension allow users to write their own notes.", + "version": "2.1.0", + "time": "2026-05-22", + "license": "GPL-2.0", + "authors": [ + { + "name": "Jakub Senko", + "email": "jakubsenko@gmail.com", + "role": "Lead Developer" + }, + { + "name": "Andreas Van den berghe", + "email": "sajaki@avathar.be", + "role": "Contributor" + } + ], + "require": { + "php": ">=7.1.3", + "phpbb/phpbb": ">=3.3.0,<4.0" + }, + "require-dev": { + "phpbb/epv": "dev-master" + }, + "extra": { + "display-name": "Notes", + "soft-require": { + "phpbb/phpbb": ">=3.3.0,<4.0" + }, + "version-check": { + "host": "www.phpbb.com", + "directory": "/customise/db/extension/notes", + "filename": "version_check" + } + } } \ No newline at end of file diff --git a/config/services.yml b/config/services.yml index e873b16..6b4bc11 100644 --- a/config/services.yml +++ b/config/services.yml @@ -2,18 +2,17 @@ services: senky.notes.controller: class: senky\notes\controller\main_controller arguments: - - @dbal.conn - - @template - - @user - - @controller.helper - - @request - - %core.root_path% - - %core.php_ext% + - '@dbal.conn' + - '@template' + - '@user' + - '@controller.helper' + - '@request' + - '%core.root_path%' + - '%core.php_ext%' senky.notes.listener: class: senky\notes\event\listener arguments: - - @template - - @controller.helper - - @config + - '@template' + - '@controller.helper' tags: - { name: event.listener } diff --git a/contrib/CHANGELOG.md b/contrib/CHANGELOG.md new file mode 100644 index 0000000..a4c1477 --- /dev/null +++ b/contrib/CHANGELOG.md @@ -0,0 +1,14 @@ +### Changelog + +- 2.1.0 (22/05/2026) + - [CHG] Updated composer requirements to phpBB 3.3.0+ and PHP 7.1.3+ + - [CHG] Replaced FontAwesome 4 icon class `fa-sticky-note-o` with FA5 `far fa-sticky-note` in the quick links template + - [CHG] Quoted service references (`@template`, `@dbal.conn`, ...) in `config/services.yml` for compatibility with the phpBB 3.3 Symfony YAML parser + - [DEL] Removed obsolete `S_IS_31` template branch and the phpBB-3.1 quick-link fallback markup + - [DEL] Removed unused `\phpbb\config\config` injection from the event listener + - [NEW] added Dutch translation + +- 2.0.0 (30/08/2016) + - Original release by Jakub Senko ([Senky](https://github.com/Senky)) for phpBB 3.1 / 3.2 + +Originally by Jakub Senko. Updated for phpBB 3.3 by Andy Vandenberghe (Sajaki). diff --git a/event/listener.php b/event/listener.php index 727223e..5016e2b 100644 --- a/event/listener.php +++ b/event/listener.php @@ -23,22 +23,17 @@ class listener implements EventSubscriberInterface /** @var \phpbb\controller\helper */ protected $helper; - /** @var \phpbb\config\config */ - protected $config; - /** * Constructor * * @param \phpbb\template\template $template Template object * @param \phpbb\controller\helper $helper Helper object - * @param \phpbb\config\config $config Config object * @access public */ - public function __construct(\phpbb\template\template $template, \phpbb\controller\helper $helper, \phpbb\config\config $config) + public function __construct(\phpbb\template\template $template, \phpbb\controller\helper $helper) { $this->template = $template; $this->helper = $helper; - $this->config = $config; } /** @@ -84,7 +79,6 @@ public function assign_common_template_variables($event) { $this->template->assign_vars(array( 'U_SENKY_NOTES' => $this->helper->route('senky_notes_notes'), - 'S_IS_31' => version_compare($this->config['version'], '3.2.0', '<'), )); } } diff --git a/language/nl/notes.php b/language/nl/notes.php new file mode 100644 index 0000000..277672f --- /dev/null +++ b/language/nl/notes.php @@ -0,0 +1,26 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +*/ + +if (!defined('IN_PHPBB')) +{ + exit; +} + +if (empty($lang) || !is_array($lang)) +{ + $lang = array(); +} + +$lang = array_merge($lang, array( + 'NOTES' => 'Notities', + 'NOTES_DESCRIPTION' => 'De notities die je hier ziet, zijn voor niemand anders zichtbaar, ook niet voor beheerders en moderators.', + 'SAVE_NOTES' => 'Notities opslaan', + 'NOTES_SAVED' => 'Je notities zijn opgeslagen.

Terug naar notities', +)); diff --git a/styles/prosilver/template/event/navbar_header_quick_links_after.html b/styles/prosilver/template/event/navbar_header_quick_links_after.html index fdb04b6..7fda9a3 100644 --- a/styles/prosilver/template/event/navbar_header_quick_links_after.html +++ b/styles/prosilver/template/event/navbar_header_quick_links_after.html @@ -1,9 +1,5 @@ -{% if S_IS_31 %} -
  • {{ lang('NOTES') }}
  • -{% else %} -
  • - - {{ lang('NOTES') }} - -
  • -{% endif %} +
  • + + {{ lang('NOTES') }} + +
  • \ No newline at end of file diff --git a/travis/prepare-phpbb.sh b/travis/prepare-phpbb.sh deleted file mode 100755 index 01770ad..0000000 --- a/travis/prepare-phpbb.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash -# -# This file is part of the phpBB Forum Software package. -# -# @copyright (c) phpBB Limited -# @license GNU General Public License, version 2 (GPL-2.0) -# -# For full copyright and license information, please see -# the docs/CREDITS.txt file. -# -set -e -set -x - -EXTNAME=$1 -BRANCH=$2 -EXTPATH_TEMP=$3 - -# Copy extension to a temp folder -mkdir ../../tmp -cp -R . ../../tmp -cd ../../ - -# Clone phpBB -git clone --depth=1 "git://github.com/phpbb/phpbb.git" "phpBB3" --branch=$BRANCH From 8cfa78d51335a76c39ef7251f80827391efa5a9f Mon Sep 17 00:00:00 2001 From: Andy Vandenberghe Date: Fri, 22 May 2026 09:04:23 +0200 Subject: [PATCH 2/3] rm travis file --- .travis.yml | 57 ----------------------------------------------------- 1 file changed, 57 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 2ec0cc2..0000000 --- a/.travis.yml +++ /dev/null @@ -1,57 +0,0 @@ -sudo: required - -language: php - -matrix: - include: - - php: 5.4 - env: DB=mysqli - - php: 5.4 - env: DB=mysql - - php: 5.4 - env: DB=mariadb - - php: 5.4 - env: DB=postgres - - php: 5.4 - env: DB=sqlite3 - - php: 5.5 - env: DB=mysqli - - php: 5.6 - env: DB=mysqli - - php: 7.0 - env: DB=mysqli - - php: 7.1 - env: DB=mysqli - - php: hhvm - env: DB=mysqli - allow_failures: - - php: hhvm - fast_finish: true - -env: - global: - - EXTNAME="senky/notes" - - SNIFF="1" - - IMAGE_ICC="1" - - EPV="1" - - PHPBB_BRANCH="3.2.x" - -branches: - only: - - master - - develop - -install: - - travis/prepare-phpbb.sh $EXTNAME $PHPBB_BRANCH - - cd ../../phpBB3 - - travis/prepare-extension.sh $EXTNAME $PHPBB_BRANCH - - travis/setup-phpbb.sh $DB $TRAVIS_PHP_VERSION - - sh -c "if [ '$EPV' != '0' ] && [ '$TRAVIS_PHP_VERSION' = '5.5' ] && [ '$DB' = 'mysqli' ]; then cd phpBB; composer require phpbb/epv:dev-master --dev --no-interaction; cd ../; fi" - -before_script: - - travis/setup-database.sh $DB $TRAVIS_PHP_VERSION - -script: - - sh -c "if [ '$SNIFF' != '0' ]; then travis/ext-sniff.sh $DB $TRAVIS_PHP_VERSION $EXTNAME; fi" - - sh -c "if [ '$IMAGE_ICC' != '0' ]; then travis/check-image-icc-profiles.sh $DB $TRAVIS_PHP_VERSION; fi" - - sh -c "if [ '$EPV' != '0' ] && [ '$TRAVIS_PHP_VERSION' = '5.5' ] && [ '$DB' = 'mysqli' ]; then phpBB/vendor/bin/EPV.php run --dir='phpBB/ext/$EXTNAME/'; fi" From a83c21fe7ba20ead3a87f4f4d59fda91e71c431a Mon Sep 17 00:00:00 2001 From: Andy Vandenberghe Date: Fri, 22 May 2026 09:07:56 +0200 Subject: [PATCH 3/3] fix license --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index cd110bf..bb6ee06 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "description": "This extension allow users to write their own notes.", "version": "2.1.0", "time": "2026-05-22", - "license": "GPL-2.0", + "license": "GPL-2.0-only", "authors": [ { "name": "Jakub Senko",