Ad blocker detected: Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker on our website.
Description:
A simple Portal page with acp control to disable/enable and portal text, viewonline status.
You can use bbcodes and smilies in the text area.
There is a welcome message which changes during the day. Code originally by RmcGirr83
Noindex from Crizzo's about us page.
Displays user reg date and how long they have been member
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
Galandas wrote: ↑18 Oct 2024, 23: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
// 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