[3.2][3.3][DEV] Recent Topics Extension for phpBB

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Scam Warning
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
User avatar
salvocortesiano
Registered User
Posts: 292
Joined: Mon Mar 22, 2010 1:49 pm
Location: Florence (Italy)
Name: Salvo Cortesiano

[3.2][3.3][DEV] Recent Topics Extension for phpBB

Post by salvocortesiano »

# Recent Topics Extension for phpBB

## Overview
This extension enhances topic discovery in phpBB forums by adding visual indicators to recent topics based on their creation date. It provides an intuitive way for users to identify new or recently created topics through customizable icon indicators.

## Features
- Automatically marks recent topics with customizable icons
- Three tiers of recency indicators (very recent, medium recent, less recent)
- Fully configurable through the Admin Control Panel (ACP)
- Customizable timeframes for each recency tier
- Eight different icon styles to choose from
- Optional animation effects for the icons
- Responsive design that works on all devices
- Statistics page showing topic creation distribution
- Complete localization support (English and Italian included)

## Other implementations in the future
- Export data to a CSV file and PDF format

## Requirements
- phpBB 3.2.0 or higher
- PHP 5.4 or higher

## Installation
1. Download the latest release
2. Unpack the downloaded archive
3. Copy the contents of the uncompressed folder to: `/ext/salvocortesiano/recenttopics/`
4. Navigate in the ACP to `Customise -> Manage extensions`
5. Find `Recent Topics` under "Disabled Extensions" and click "Enable"

## Configuration
1. Navigate in the ACP to `Extensions -> Recent Topics`
2. Adjust settings as needed:
- Enable/disable the extension
- Set the maximum age for topics to be considered "recent"
- Configure threshold days for each recency tier
- Select icons for each recency tier
- Enable/disable animation effects

## License
This extension is released under the GNU General Public License, version 2 (GPL-2.0).

## Support
For support questions or issues, please visit the official support thread on phpBB.com or https://github.com/TakeOwer

## Version History
- **1.0.1** (Initial Release): Complete functionality with full ACP configuration and multilingual support.

## Screen
1.recent_topics.jpg
## Screen
2.test_recent_topics.jpg
## Screen
3.recent_topics_statistic.jpg
## Screen
4.recent_topics_forum.jpg
## Screen
5.recent_topics_settings.jpg
####
## Download: https://github.com/TakeOwer/recenttopics
####

## Guide to add new SVG icons to the Recent Topics extension
To add new SVG icons to your Recent Topics extension, you need to edit two main files. Here's a complete step-by-step guide:


1. Edit the icon definition file
The main file to edit is recenttopics/includes/icons_data.php. This file contains all SVG icon definitions available for the extension.

Procedure:
Find an SVG icon you want to use (you can use Feather Icons as a source, as you already have some of these).
Add the new icon to the get_icons() method in the icons_data class:

Code: Select all

'nome_chiave_icona' => array(
    'name' => 'RECENTTOPICS_ICON_NOME_CHIAVE',
    'svg' => '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-icon-name"><!-- contenuto SVG qui --></svg>'
),
Replace:
nome_chiave_icona with a short name without spaces (e.g. heart, calendar)
RECENTTOPICS_ICON_NOME_CHIAVE with the name of the language variable (e.g. RECENTTOPICS_ICON_HEART) the SVG content with your icon code

2. Add translations to supported languages
You also need to add translations in the language files for each supported language.

For the English language:
Edit the file recenttopics/language/en/info_acp_recenttopics.php and add a new translation string before the )); final:

Code: Select all

'RECENTTOPICS_ICON_NOME_CHIAVE' => 'Nome descrittivo dell\'icona in inglese',
For the Italian language:
Edit the file recenttopics/language/en/info_acp_recenttopics.php and add:

Code: Select all

'RECENTTOPICS_ICON_NOME_CHIAVE' => 'Friendly name of the icon in English',
Full example
Here's a complete example for adding a "heart" icon:
1. Edit the recenttopics/includes/icons_data.php file:

Code: Select all

public static function get_icons()
{
    return array(
        // Existing icons...
        
        'star' => array(
            'name' => 'RECENTTOPICS_ICON_STAR',
            'svg' => '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-star"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon></svg>'
        ),
        
        // Add the new icon here
        'heart' => array(
            'name' => 'RECENTTOPICS_ICON_HEART',
            'svg' => '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-heart"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path></svg>'
        ),
        
        // Other existing icons...
    );
}
2. Edit the file recenttopics/language/en/info_acp_recenttopics.php:

Code: Select all

// Other translation strings...
// Icons names
'RECENTTOPICS_ICON_STAR'         => 'Star',
'RECENTTOPICS_ICON_ZAP'          => 'Lightning',
'RECENTTOPICS_ICON_CLOCK'        => 'Clock',
'RECENTTOPICS_ICON_BELL'         => 'Bell',
'RECENTTOPICS_ICON_ALERT_CIRCLE' => 'Alert Circle',
'RECENTTOPICS_ICON_MESSAGE_CIRCLE' => 'Message',
'RECENTTOPICS_ICON_FIRE'         => 'Fire',
'RECENTTOPICS_ICON_AWARD'        => 'Award',
'RECENTTOPICS_ICON_HEART'        => 'Heart', // New translation for the heart icon
// More texts...
));
3. File editing recenttopics/language/it/info_acp_recenttopics.php:

Code: Select all

// Altre stringhe di traduzione...
// Icons names
'RECENTTOPICS_ICON_STAR'         => 'Stella',
'RECENTTOPICS_ICON_ZAP'          => 'Fulmine',
'RECENTTOPICS_ICON_CLOCK'        => 'Orologio',
'RECENTTOPICS_ICON_BELL'         => 'Campana',
'RECENTTOPICS_ICON_ALERT_CIRCLE' => 'Cerchio di avviso',
'RECENTTOPICS_ICON_MESSAGE_CIRCLE' => 'Messaggio',
'RECENTTOPICS_ICON_FIRE'         => 'Fuoco',
'RECENTTOPICS_ICON_AWARD'        => 'Premio',
'RECENTTOPICS_ICON_HEART'        => 'Cuore', // Nuova traduzione per l'icona cuore
// Altri testi...
));
## If you find any bugs or anything else please let me know :)
This extension has been tested on an online forum v.3.3.15 and it works very well!
You do not have the required permissions to view the files attached to this post.
The best way to predict the future is to invent it!
Image
User avatar
nou nou
Registered User
Posts: 790
Joined: Sat Oct 29, 2016 8:08 pm

Re: [3.2][3.3][DEV] Recent Topics Extension for phpBB

Post by nou nou »

Ooooh!

I'm going to test this over the weekend! :)
User avatar
salvocortesiano
Registered User
Posts: 292
Joined: Mon Mar 22, 2010 1:49 pm
Location: Florence (Italy)
Name: Salvo Cortesiano

Re: [3.2][3.3][DEV] Recent Topics Extension for phpBB

Post by salvocortesiano »

nou nou wrote: Fri Apr 11, 2025 12:22 pm Ooooh!

I'm going to test this over the weekend! :)
Ok, let me know if it works :D
The best way to predict the future is to invent it!
Image
User avatar
nou nou
Registered User
Posts: 790
Joined: Sat Oct 29, 2016 8:08 pm

Re: [3.2][3.3][DEV] Recent Topics Extension for phpBB

Post by nou nou »

Tested it on 3.3.15 but it marks every topic as new, regardless of my settings (image below for a setting of max days = 8)
Screenshot 2025-04-15 163833.png
I would also like to see icons displayed on the index page (in the Last Post column) and the Unread Posts page, if possible?
You do not have the required permissions to view the files attached to this post.
User avatar
salvocortesiano
Registered User
Posts: 292
Joined: Mon Mar 22, 2010 1:49 pm
Location: Florence (Italy)
Name: Salvo Cortesiano

Re: [3.2][3.3][DEV] Recent Topics Extension for phpBB

Post by salvocortesiano »

nou nou wrote: Tue Apr 15, 2025 2:41 pm Tested it on 3.3.15 but it marks every topic as new, regardless of my settings (image below for a setting of max days = 8)
Hi,
from the image and icons I see, the topics are older than 8 days, so the icon displayed is correct! If the topic(s) are more recent than 3 days or equal to 3 days, the icon you should see is a star. Another consideration: the icon is shown according to the settings in ACP only when a new topic is created and not when you reply to the topic :)
nou nou wrote: Tue Apr 15, 2025 2:41 pm I would also like to see icons displayed on the index page (in the Last Post column) and the Unread Posts page, if possible?
I'll work on it to see if you can implement this feature!

Regards
Salvo
The best way to predict the future is to invent it!
Image

Return to “Extensions in Development”