Released 2.6.0: report bugs and 2.6.1 logs

Post a reply


This question is a means of preventing automated form submissions by spambots.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

If you wish to attach one or more files enter the details below.

Maximum filesize per attachment: 1 MiB.

Expand view Topic review: Released 2.6.0: report bugs and 2.6.1 logs

Re: Released 2.6.0: report bugs and 2.6.1 logs

by axew3 » Sun Mar 20, 2022 5:10 pm

REMOVE:

Code: Select all

load_plugin_textdomain( 'wp-w3all-phpbb-integration' );
obsolete and deprecated

Re: Released 2.6.0: report bugs and 2.6.1 logs

by axew3 » Sat Mar 19, 2022 11:20 am

REMOVE
W3PHPBBUSESSION constant, replaced by global var $w3all_phpbb_usession.
Custom views files (which using vars in the old way are only 2, the login form and Unread PM short) will follow to work in the old way also.

Re: Released 2.6.0: report bugs and 2.6.1 logs

by axew3 » Sat Mar 19, 2022 10:30 am

FIX
/wp-content/plugins/wp-w3all-phpbb-integration/common/phpbb_endpoints_ext_functions.php

where line:

Code: Select all

    if ( ! current_user_can( 'delete_users' ) OR $w3all_wpusers_delete_ary_once > 1 )
changed into:

Code: Select all

    if ( ! current_user_can( 'delete_users' ) OR $w3all_wpusers_delete_ary_once == 1 )
because due to a commented line above, the code as it was, was firing by the way cURL more than one time, at each user's deletion, if related option "delete users in phpBB when users deleted in WP" option active.

Report bugs if you found any!

Re: Released 2.6.0: report bugs and 2.6.1 logs

by axew3 » Thu Mar 17, 2022 8:09 am

FIX
The last added widget phpBB forums online and stats code
has been updated at date of this post:

to correctly display avatars div when avatars images active. Also an instruction has been moved out of a foreach because redundant
please update to this fixed file downloading here (if already updated to 2.6.0 at date of this post):
https://plugins.trac.wordpress.org/expo ... _stats.php

and replace the file into:

/wp-content/plugins/wp-w3all-phpbb-integration/views/phpbb_uonline_stats.php


the new fixed and correct code of this file is this now (if you wish to update with just a copy/paste on file replacing old code on it):

Code: Select all

<?php defined( 'ABSPATH' ) or die( 'forbidden' );

// remove adding // or activate by removing //
echo '<div>'.__( 'Most users ever online was: ', 'wp-w3all-phpbb-integration' ) . W3PHPBBCONFIG['record_online_users'] . '</div>'
. '<div>'.__( 'Registered users: ', 'wp-w3all-phpbb-integration' ) . W3PHPBBCONFIG['num_users'] . '</div>'
. '<div>'.__( 'Topics: ', 'wp-w3all-phpbb-integration' ) . W3PHPBBCONFIG['num_topics'] . '</div>'
. '<div>'.__( 'Posts: ', 'wp-w3all-phpbb-integration' ) . W3PHPBBCONFIG['num_posts'] . '</div>'
. '<div>'.__( 'There are', 'wp-w3all-phpbb-integration' ) . ' ' .$guests_num. ' '. __( 'guests ', 'wp-w3all-phpbb-integration' ) . __( 'and', 'wp-w3all-phpbb-integration' ) . ' ' .$reg_num. ' ' . __( 'users online ', 'wp-w3all-phpbb-integration' )
//. __( '<br />(based on users active over the past', 'wp-w3all-phpbb-integration' ).' '.W3PHPBBCONFIG['load_online_time']. ' ' .__( 'minutes)', 'wp-w3all-phpbb-integration' ).'</div>'
.'<br />';

echo'<div id="" class="w3_widget_online_udata" style="display:flex;flex-wrap:wrap;padding:0;">';

if( $ava_or_ulinks == 'avatars' ){ // avatars

$avatar_dim = empty(intval($ava_dimension)) ? $w3all_last_t_avatar_dim : $ava_dimension;
foreach($phpbb_online_udata as $udata) :
 if($udata['user_id'] > 2){
   echo'<div class="w3_ava_wonline" style="text-align:center;padding:5px 5px 5px 0;width:'.$avatar_dim.'px">';
   // use widget $ava_dimension if the value has been set for this widget
   // do not rewrite global $w3all_last_t_avatar_dim
    if( $online_ulink_yn > 0 ){
     echo get_avatar($udata['user_email'], $avatar_dim,'',$udata['username']) 
     .'<a href="'.$w3all_url_to_cms.'/memberlist.php?mode=viewprofile&u='.$udata['user_id'].'">'.$udata['username'].'</a>';
    } else {
       echo '<a href="'.$w3all_url_to_cms.'/memberlist.php?mode=viewprofile&u='.$udata['user_id'].'">'.get_avatar($udata['user_email'], $avatar_dim,'',$udata['username']).'</a>';
      }
   echo'</div>';
 }
endforeach;

} // END with avatars

if( $ava_or_ulinks == 'links' ){ // usernames text links

 foreach($phpbb_online_udata as $udata) :
  echo'<div class="w3_ulinks_wonline" style="text-align:center;padding:0 5px 5px 0">';
  if($udata['user_id'] > 2){
   echo '<a href="'.$w3all_url_to_cms.'/memberlist.php?mode=viewprofile&u='.$udata['user_id'].'">'.$udata['username'].'</a>';
  }
  echo'</div>';
 endforeach;

} // END with usernames text links

echo '</div>';
online_stats.png
online_stats.png (13.65 KiB) Viewed 2082 times
check the file to see how it is easy to customize as more you like. check widgets options and activate as links, avatars, avatars with link etc

Released 2.6.0: report bugs and 2.6.1 logs

by axew3 » Thu Mar 17, 2022 12:52 am

2.6.0 has been released!
Report bugs!

Code: Select all

== Changelog ==

= 2.6.0 =
*Release Date - 17 Mar, 2022*

* Fix: multisite user deletion and users deletion all over
* Add: new shortcode/widget (online users and forums stats). Related output file is /views/phpbb_uonline_stats.php
* Fix: correct user switch, when session mismatching due to different logins on different tabs using different users
* Fix: avatars to correctly get avatar by email and not username
* Add: iframe param "scroll_default" for the awesome shortcode, so that it is possible to disable the scroll behavior (may when the phpBB iframed into a post that will display as url default a specific topic)
* Update iframe files and page-forum. If you wish to update follow update steps (only) here: https://www.axew3.com/w3/2020/01/phpbb-wordpress-template-integration-iframe-v5/
* Change: the shortcode param security_token, available for all shortcodes where applied
* Minor code fixes
* Minor hints fixes
* All logs 2.6.0: https://www.axew3.com/w3/forums/viewtopic.php?f=2&t=1715

Top