Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
817e697
Added canonical link to separate page
IMC-GER Aug 16, 2025
7b703ea
Changed db query for topic list
IMC-GER Aug 16, 2025
e008426
Query conditions adjusted
IMC-GER Aug 16, 2025
71c5e61
Optimization of loops that adjust arrays in rtng_functions
IMC-GER Aug 19, 2025
c3e1be1
Merge branch 'master' into dev
IMC-GER Aug 19, 2025
b9200d1
Template Events
IMC-GER Aug 28, 2025
450937d
Comments corrected during validation
IMC-GER Sep 26, 2025
ba3325b
Revert "Comments corrected during validation"
IMC-GER Sep 29, 2025
c3abc33
Merge branch 'dev-1.0.1' into dev
IMC-GER Sep 29, 2025
b2a98f2
Added vars in event
IMC-GER Oct 17, 2025
f5af904
Template Var S_DISP_TOPIC_TITLE replaced with S_DISP_FIRST_POST
IMC-GER Oct 18, 2025
e3dbd1b
Code optimized in `fill_template()`
IMC-GER Oct 19, 2025
dc1536e
Fixed: Don't show unread topics as unread when set show only unread t…
IMC-GER Oct 19, 2025
d92e41e
Fill event var always with first unread post data
IMC-GER Oct 25, 2025
711d558
Optimise the SQL query for the first unread post.
IMC-GER Nov 1, 2025
addfa86
Code improvements in migration and core
IMC-GER Nov 23, 2025
c3c87cc
v1.1.0-dev 2025-12-28
IMC-GER Dec 28, 2025
a5bff8f
1.1.0-dev9 - Constructor Property Promotion
LukeWCS Dec 29, 2025
655ffb0
1.1.0-dev10 - Placeholder for display name in ACP subtitle
LukeWCS Dec 29, 2025
f1b80ec
1.1.0-dev11 - Completion of dev10
LukeWCS Dec 30, 2025
790db2f
1.1.0-dev12 fixed paginations
IMC-GER Dec 30, 2025
bee2af8
v1.1.0-dev13 Message don't display on index.
IMC-GER Jan 1, 2026
b471b70
v1.1.0-dev14 - The red fa-file icon is not removed when topics are ma…
IMC-GER Jan 1, 2026
f45a6a4
v1.1.0-dev15 - Twig optimization and structure corrections
LukeWCS Jan 4, 2026
bbdd9af
1.1.0-dev16 - Dynamic RTNG title (recent/unread) based on user settings
LukeWCS Jan 12, 2026
7289f6f
1.1.0-dev17
IMC-GER Jan 14, 2026
af2015b
Validation critique from version 1.0.1 taken into account
LukeWCS Jan 14, 2026
8e818ce
1.1.0-dev18 Fixed font size for Edge
IMC-GER Jan 17, 2026
8139495
1.1.0-dev19 Fixed Settings for Anonymous do not take effect immediately
IMC-GER Jan 18, 2026
621b546
v1.1.0-dev20 - Fixed Displays locked passworded forums.
IMC-GER Jan 21, 2026
77f8a2e
v1.1.0-dev21 Added explain
IMC-GER Feb 28, 2026
4965693
v1.1.0 Explain server load
IMC-GER Mar 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion imcger/recenttopicsng/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@ Based on NV Recent Topics for phpBB 3.0, by Joas Schilling ([nickvergessen](http

[![Tests](https://github.com/IMC-GER/RecentTopicsNG/actions/workflows/tests.yml/badge.svg)](https://github.com/IMC-GER/RecentTopicsNG/actions/workflows/tests.yml)

### Version
* v1.1.0
* 08/03/2026

### Requirements
* phpBB 3.3.5 - 3.3.x
* PHP 7.4.0 - 8.4.x
* PHP 8.0 - 8.5.x

### Supported Style
* Prosilver
Expand All @@ -23,6 +27,7 @@ Based on NV Recent Topics for phpBB 3.0, by Joas Schilling ([nickvergessen](http
* [User administration](https://raw.githubusercontent.com/IMC-GER/images/main/screenshots/recenttopicsng/rtng_user_administration.jpg)
* [ACP settings](https://raw.githubusercontent.com/IMC-GER/images/main/screenshots/recenttopicsng/rtng_acp_settings.jpg)
* [ACP edit forum](https://raw.githubusercontent.com/IMC-GER/images/main/screenshots/recenttopicsng/rtng_edit_forum.jpg)
* [ACP server load](https://raw.githubusercontent.com/IMC-GER/images/main/screenshots/recenttopicsng/rtng_acp_load_settings.jpg)

### Authors
* © 2022 - IMC-GER & LukeWCS
Expand Down
13 changes: 8 additions & 5 deletions imcger/recenttopicsng/adm/style/acp_rtng.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@

{% include 'overall_header.html' %}

<h1>{{ lang('RTNG_NAME') }}</h1>
<p>{{ lang('RTNG_EXPLAIN') }}</p>
<h1>{{ lang('RTNG_TITLE') }}</h1>
<p>{{ lang('RTNG_EXPLAIN', RTNG_EXT_NAME) }}</p>

<form id="acp_board" method="post" action="{{ U_ACTION }}">
<form id="rtng_settings" method="post" action="{{ U_ACTION }}">

<fieldset>
<legend>{{ lang('RTNG_GLOBAL_SETTINGS') }}</legend>
Expand Down Expand Up @@ -89,6 +89,9 @@ <h1>{{ lang('RTNG_NAME') }}</h1>

<fieldset>
<legend>{{ lang('RTNG_OVERRIDABLE') }}</legend>
<p>{{ lang('RTNG_OVERRIDABLE_EXPLAIN', U_SERVER_LOAD) }}</p>

<hr>

{% include '@imcger_recenttopicsng/rtng_user_settings.html' %}

Expand Down Expand Up @@ -119,8 +122,8 @@ <h1>{{ lang('RTNG_NAME') }}</h1>
</form>

<p class="rtng-copyright">
{{ RTNG_NAME }} v{{ RTNG_EXT_VER }} &copy; IMC-GER / LukeWCS<br>
{{ lang('RTNG_LANG_DESC') }} v{{ lang('RTNG_LANG_EXT_VER') }} &bull; {{ lang('RTNG_LANG_AUTHOR') }}
{{ RTNG_EXT_NAME }} v{{ RTNG_EXT_VER }} &copy; IMC-GER / LukeWCS<br>
{{ lang('RTNG_LANG_DESC') }} v{{ lang('RTNG_LANG_VER') }} &copy; {{ lang('RTNG_LANG_AUTHOR') }}
</p>

{% include 'overall_footer.html' %}
Expand Down
26 changes: 13 additions & 13 deletions imcger/recenttopicsng/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
"type": "phpbb-extension",
"description": "Adds a list with a number of recent topics to the board index.",
"homepage": "https://github.com/IMC-GER/RecentTopicsNG",
"version": "1.0.1",
"time": "2025-09-27",
"version": "1.1.0",
"time": "2026-03-08",
"license": "GPL-2.0-only",
"authors": [
{
"name": "Thorsten Ahlers",
"homepage": "https://github.com/IMC-GER",
"role": "Developer"
},
{
"name": "LukeWCS",
"homepage": "https://github.com/LukeWCS",
"role": "Developer"
},
{
"name": "Thorsten Ahlers",
"homepage": "https://github.com/IMC-GER",
"role": "Developer"
},
{
"name": "LukeWCS",
"homepage": "https://github.com/LukeWCS",
"role": "Developer"
},
{
"name": "Andreas Vandenberghe",
"homepage": "https://www.avathar.be",
Expand All @@ -32,7 +32,7 @@
}
],
"require": {
"php": ">=7.4,<8.5.0@dev",
"php": ">=8.0,<8.6.0@dev",
"composer/installers": "~1.0"
},
"extra": {
Expand Down
14 changes: 9 additions & 5 deletions imcger/recenttopicsng/config/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ services:
- '@language'
- '@auth'
- '@imcger.recenttopicsng.functions'
- '@imcger.recenttopicsng.controller_common'
- '%core.root_path%'
- '%core.php_ext%'
- '@imcger.recenttopicsng.controller_common'

imcger.recenttopicsng.admin.controller:
class: imcger\recenttopicsng\controller\admin_controller
Expand All @@ -19,17 +19,21 @@ services:
- '@template'
- '@language'
- '@request'
- '@dbal.conn'
- '@ext.manager'
- '@dbal.conn'
- '@cache.driver'
- '@controller.helper'
- '@imcger.recenttopicsng.controller_common'
- '%core.root_path%'
- '%core.php_ext%'

imcger.recenttopicsng.controller_common:
class: imcger\recenttopicsng\controller\controller_common
arguments:
- '@user'
- '@auth'
- '@dbal.conn'
- '@config'
- '@ext.manager'

imcger.recenttopicsng.functions:
class: imcger\recenttopicsng\core\rtng_functions
Expand All @@ -45,10 +49,9 @@ services:
- '@request'
- '@template'
- '@user'
- '@imcger.recenttopicsng.controller_common'
- '%core.root_path%'
- '%core.php_ext%'
- '@imcger.recenttopicsng.controller_common'
- '@?phpbb.collapsiblecategories.operator'

imcger.recenttopicsng.main_listener:
class: imcger\recenttopicsng\event\main_listener
Expand All @@ -59,6 +62,7 @@ services:
- '@language'
- '@auth'
- '@imcger.recenttopicsng.controller_common'
- '@?phpbb.collapsiblecategories.operator'
tags:
- { name: event.listener }

Expand Down
51 changes: 20 additions & 31 deletions imcger/recenttopicsng/controller/admin_controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,36 +15,22 @@

class admin_controller
{
protected object $config;
protected object $template;
protected object $language;
protected object $request;
protected object $db;
protected object $ext_manager;
protected object $helper;
protected object $ctrl_common;
protected string $u_action;

public function __construct
(
\phpbb\config\config $config,
\phpbb\template\template $template,
\phpbb\language\language $language,
\phpbb\request\request $request,
\phpbb\db\driver\driver_interface $db,
\phpbb\extension\manager $ext_manager,
\phpbb\controller\helper $helper,
\imcger\recenttopicsng\controller\controller_common $controller_common
protected \phpbb\config\config $config,
protected \phpbb\template\template $template,
protected \phpbb\language\language $language,
protected \phpbb\request\request $request,
protected \phpbb\db\driver\driver_interface $db,
protected \phpbb\cache\driver\driver_interface $cache,
protected \phpbb\controller\helper $helper,
protected \imcger\recenttopicsng\controller\controller_common $ctrl_common,
protected $phpbb_root_path,
protected $phpEx,
)
{
$this->config = $config;
$this->template = $template;
$this->language = $language;
$this->request = $request;
$this->db = $db;
$this->ext_manager = $ext_manager;
$this->helper = $helper;
$this->ctrl_common = $controller_common;
}

/**
Expand Down Expand Up @@ -90,18 +76,19 @@ public function set_page_url(string $u_action): void
*/
protected function set_template_vars(): void
{
$metadata_manager = $this->ext_manager->create_extension_metadata_manager('imcger/recenttopicsng');

$board_url = generate_board_url(true);
$simple_page_path = $this->helper->route('imcger_recenttopicsng_page_controller', ['page' => 'simple']);
$simple_page_url = $board_url . explode('?', $simple_page_path)[0];
$metadata = $this->ctrl_common->get_rtng_composer_data();
$board_url = generate_board_url(true);
$simple_page_path = $this->helper->route('imcger_recenttopicsng_page_controller', ['page' => 'simple']);
$simple_page_url = $board_url . explode('?', $simple_page_path)[0];
$server_load_url = append_sid("{$this->phpbb_root_path}adm/index.{$this->phpEx}", 'i=acp_board&mode=load') . '#rtng_load_first_unrd_post';

$this->template->assign_vars([
'U_ACTION' => $this->u_action,
'U_RTNG_PAGE_SIMPLE' => $simple_page_url,
'U_SERVER_LOAD' => $server_load_url,

'RTNG_NAME' => $metadata_manager->get_metadata('display-name'),
'RTNG_EXT_VER' => $metadata_manager->get_metadata('version'),
'RTNG_EXT_NAME' => $metadata['extra']['display-name'],
'RTNG_EXT_VER' => $metadata['version'],

'RTNG_ANTI_TOPICS' => $this->config['rtng_anti_topics'],
'RTNG_PARENTS' => (int) $this->config['rtng_parents'],
Expand Down Expand Up @@ -172,5 +159,7 @@ protected function set_vars_usertable(bool $all_user): void
SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . $sql_where;

$this->db->sql_query($sql);

$this->cache->destroy('sql', USERS_TABLE);
}
}
Loading