Page 1 of 4
[3.3][RC] Simple Portal - phpBB Extension
Posted: 26 May 2024, 08:39
by Stoker
Extension Name: phpBB Portal
Author: Stoker
Version: 1.1.0
PhpBB Version: 3.3.X
Description:
A simple Portal page, or basicly a Home page for your forum.
Features:
- User joined date
- How long users have been a member in years, months and days
- Personalized welcome message which changes during the day
- Images and font awesome icons which changes during the day. Can be enabled/disabled in ACP
- Text which is configured in ACP. You can use both bbcodes and smilies
- Who is online sections. Like the one on forum index. Just without the legend
- Jumpbox, like the one in forums. Must be anabled in ACP -> Load settings
- Option to display advanced statistics. You need latest version of Stats On Index
Functions are exactly the same on portal as on index
- Canonical url for the portal page
New in version 1.1.0
- Replaced the live counters for membership length and board online length with the function form 3Di onlinesince
- Removed all the statistic code and made this function dependant of Stats On Index.
- Jumpbox
- Now icons and background images can be disabled
- Canonical url for the portal page
- Code cleanup
Addons:
Paypal Donation Statistics on Portal
24 Hour Activity Stats on Portal
Top Five on Portal
100%
100%
Download:
portal_v1.1.0.zip
Screenshots:
default_portal.png
img_stat_portal.png
acp_portal.png
Installation:
- Copy the entire contents of the repository to
ext/stoker/portal/
- Navigate in the ACP to Customise -> Extension Management -> Extensions.
- Click Enable.
portal_v1.0.8.zip
portal_1.0.7.zip
portal1.0.6.zip
portal1.0.5.zip
Re: [EXT] Simple Portal
Posted: 18 Oct 2024, 21:15
by Galandas
Hi I installed your extension on the latest phpbb version 3.3.13 and it gave me this error: [phpBB Debug] PHP Warning: in file
[ROOT]/ext/stoker/portal/controller/main.php on line 137: A non-numeric value encountered
I solved it with this code, if it can help you
Code: Select all
// how long a member for
$member_for = '';
if ($this->user->data['is_registered'] && !$this->user->data['is_bot']) {
// Verifica che user_regdate sia numerico
if (is_numeric($this->user->data['user_regdate'])) {
$member_length = time() - intval($this->user->data['user_regdate']);
} else {
$member_length = 0; // Se non รจ numerico, imposta a 0
}
$years = $months = $days = 0;
$member_for = '';
if ($member_length > 0) { // Assicurati che member_length sia positivo
if ($member_length >= 31536000) {
$years = floor($member_length / 31536000);
$member_length -= ($years * 31536000);
$member_for .= $years > 1 ? ($years . ' ' . $this->user->lang['WELCOME_YEARS'] . ', ') : ($years . ' ' . $this->user->lang['WELCOME_YEAR'] . ', ');
}
$months = floor($member_length / 2628000);
if ($months > 0) {
$member_length -= ($months * 2628000);
$member_for .= $months > 1 ? ($months . ' ' . $this->user->lang['WELCOME_MONTHS'] . ', ') : ($months . ' ' . $this->user->lang['WELCOME_MONTH'] . ', ');
}
$days = floor($member_length / 86400);
if ($days > 0) {
$member_for .= $days > 1 ? ($days . ' ' . $this->user->lang['WELCOME_DAYS']) : ($days . ' ' . $this->user->lang['WELCOME_DAY']);
}
}
}
Re: [EXT] Simple Portal
Posted: 21 Oct 2024, 09:34
by Stoker
Galandas wrote: 18 Oct 2024, 21:15
Hi I installed your extension on the latest phpbb version 3.3.13 and it gave me this error: [phpBB Debug] PHP Warning: in file
[ROOT]/ext/stoker/portal/controller/main.php on line 137: A non-numeric value encountered
I solved it with this code, if it can help you
Code: Select all
// how long a member for
$member_for = '';
if ($this->user->data['is_registered'] && !$this->user->data['is_bot']) {
// Verifica che user_regdate sia numerico
if (is_numeric($this->user->data['user_regdate'])) {
$member_length = time() - intval($this->user->data['user_regdate']);
} else {
$member_length = 0; // Se non รจ numerico, imposta a 0
}
$years = $months = $days = 0;
$member_for = '';
if ($member_length > 0) { // Assicurati che member_length sia positivo
if ($member_length >= 31536000) {
$years = floor($member_length / 31536000);
$member_length -= ($years * 31536000);
$member_for .= $years > 1 ? ($years . ' ' . $this->user->lang['WELCOME_YEARS'] . ', ') : ($years . ' ' . $this->user->lang['WELCOME_YEAR'] . ', ');
}
$months = floor($member_length / 2628000);
if ($months > 0) {
$member_length -= ($months * 2628000);
$member_for .= $months > 1 ? ($months . ' ' . $this->user->lang['WELCOME_MONTHS'] . ', ') : ($months . ' ' . $this->user->lang['WELCOME_MONTH'] . ', ');
}
$days = floor($member_length / 86400);
if ($days > 0) {
$member_for .= $days > 1 ? ($days . ' ' . $this->user->lang['WELCOME_DAYS']) : ($days . ' ' . $this->user->lang['WELCOME_DAY']);
}
}
}
Thanks for reporting
I was aware about the error. Also the membership length was incorrect.
Did an update months ago but unfortunately i forgot to post the update
Let me know if the new code still give you errors
Re: [EXT] Simple Portal
Posted: 21 Oct 2024, 23:05
by Steve
I don't get that error from the latest download. Functions as is. I'll post my files tomorrow with smilies added.
Re: [EXT] Simple Portal
Posted: 05 Nov 2024, 05:16
by Galandas
Re: [EXT] Simple Portal
Posted: 12 Dec 2024, 21:21
by Stoker
Updated, with some Steve changes that I forgot
Fixes some errors
Re: [EXT] Simple Portal
Posted: 15 Dec 2024, 17:42
by Galandas
I always liked the semi-transparent background ippi image under the text, could you kindly tell me how to put it, I see it a bit as a trademark of the simple portal.
Re: [EXT] Simple Portal
Posted: 15 Dec 2024, 20:35
by Stoker
Galandas wrote: 15 Dec 2024, 17:42
I always liked the semi-transparent background ippi image under the text, could you kindly tell me how to put it, I see it a bit as a trademark of the simple portal.
I wont be home for a couple of days.
If I forget, then please remind me

Re: [EXT] Simple Portal
Posted: 15 Dec 2024, 21:10
by Galandas
okay I'll take that as a no, thanks anyway.

Re: [EXT] Simple Portal
Posted: 15 Dec 2024, 21:38
by Stoker
Galandas wrote: 15 Dec 2024, 21:10
okay I'll take that as a no, thanks anyway.
Take it as a yes. But I need my pc to look at the files.
Cant remember the code and as i wrote earlier, im not at home the next couple of days
