2.6.4 phpBB WordPress logs and 2.6.3 bugs report

User avatar
axew3
w3all User
w3all User
Posts: 2689
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

2.6.4 phpBB WordPress logs and 2.6.3 bugs report

Post by axew3 »

1) Optimize/remove some line of redundant and repetitive code in some function

2) Fix (again) the online widget query, to retrieve the correct number of users online

3) Fix the fact, that if the resulting array of online users is empty, (no guests and no registered) the related widget do not display at all, due to this line of code, into /wp-w3all-phpbb-integration/class.wp.w3all.widgets-phpbb.php:

Code: Select all

if(empty($phpbb_online_udata)){ return; }
that has been removed

report bugs if you find any!

ps: not tested but 2.6.3 should be (as it was the code before 2.6<) compatible from Php 5.6, until last Php 8>
User avatar
axew3
w3all User
w3all User
Posts: 2689
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: 2.6.4 phpBB WordPress logs and 2.6.3 bugs report

Post by axew3 »

The query that will retrieve online users into phpBB Stats widget will be this:

Code: Select all

   if( $phpbb_config['load_online_time'] > 0 )
   {
    $losTime = time()-($phpbb_config['load_online_time']*60);
    $phpbb_uonline_udata = $w3all_phpbb_connection->get_results("SELECT S.session_id, S.session_user_id, MAX(S.session_time) AS session_time, S.session_ip, U.user_id, U.username, U.user_email
     FROM ".$w3all_config["table_prefix"]."sessions AS S
     JOIN ".$w3all_config["table_prefix"]."users AS U on U.user_id = S.session_user_id
     WHERE S.session_time > $losTime
     GROUP BY S.session_id
     ORDER BY U.username",ARRAY_A);
   }
     // if 'Guests from same IP should be purged', then it should be done here
[EDITED]
User avatar
axew3
w3all User
w3all User
Posts: 2689
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: 2.6.4 phpBB WordPress logs and 2.6.3 bugs report

Post by axew3 »

The get online users query has been updated again.
I leave a log about it that it is on code:
// if 'Guests from same IP should be purged', then it should be done here
User avatar
axew3
w3all User
w3all User
Posts: 2689
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: 2.6.4 phpBB WordPress logs and 2.6.3 bugs report

Post by axew3 »

Remove the custom iframe shortcode option, may used by few and confusing things, since the introduction of
The (awesome) iframe template integration using shortcode

Anyway all files remains in place so that whenever still used it will follow to work
Post Reply