2.5.0 WordPress phpBB integration has been released!

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

2.5.0 WordPress phpBB integration has been released!

Post by axew3 »

Enjoy lovely people!

Code: Select all

= 2.5.0 =
*Release Date - 20 Jan, 2022*

* Fix: unique database connection instance (faster)
* Fix: front-end plugins email check before update: if the email match another existent into phpBB the update will be rejected with a message. It has been tested working fine into Memberpress and should be ok into any other
* Note: to test that it is working on any plugin and that an existent email is found and the email update rejected, may as obvious, it sould be tested against an email that do not exist in WP, but that exist in phpBB and belong to another user
* Fix: user insertion query into phpBB, using only required values
* Add: common tasks screen, where at moment it is possible to change email for an user only in phpBB or only in WordPress by username, so to make it easy to fix any user's email problem between phpBB and WP
* Fix: all transfers, check and common tasks options that are now ever available: into related option on plugin admin page, or under WP Tools menu
* Some hints have been simplified and updated to be more clear
* Fix: Last posts widgets and shortcodes have been updated to display the same data/hour format of the WordPress setting. Changing WP settings about time/hour format will change the output to the same into widgets/shortcodes
* Add: parsing of the [attachment] bbcode into phpBB post shortcode: see example here https://www.axew3.com/w3/2017/07/wordpress-shortcode-phpbb-posts-into-wp-post/
* Minor code fixes
madoma73
User ww
User ww
Posts: 39
Joined: Tue Dec 31, 2019 10:02 am

Re: 2.5.0 WordPress phpBB integration has been released!

Post by madoma73 »

Hello,
the parsing of attachment in the shortcode is a nice start, but it does not work perfectly on my side.
only one picture is shown and not at the right place:
original post in phpbb: https://my80isfantastic.com/viewtopic.php?t=12222
result post in wordpress: https://my80isfantastic.com/leSite/

maybe it is link to the way, it is attached in the phpbb post
it's

Code: Select all

[attachment=2]image.png[/attachment]  [attachment=1]image.png[/attachment] 
attachment Id is changing not picture name (it is linked to a phpbb extension which allow copy/paste)

Regards

Pierre
Last edited by madoma73 on Fri Jan 21, 2022 8:26 am, edited 1 time in total.
User avatar
axew3
w3all User
w3all User
Posts: 2689
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: 2.5.0 WordPress phpBB integration has been released!

Post by axew3 »

attachment Id is changing not picture name (it is linked to a phpbb extension which allow copy/paste)
Ok that's clear, you pointed the problem.
Nothing impossible to be fixed, it should be quite easy to switch to one or other detecting what way [attachment] has been used.
But using the extension you say, can't you use a default attachment bbcode into posts? (i imagine no because it change it?)
Which is the extension?

[EDITED]
madoma73
User ww
User ww
Posts: 39
Joined: Tue Dec 31, 2019 10:02 am

Re: 2.5.0 WordPress phpBB integration has been released!

Post by madoma73 »

the extension is senky/clipboardimage.
by using it, you can paste in a phpbb post an image from the clipboard, but when using this feature, it ends up with a bbcode like

Code: Select all

[attachment=2]image.png[/attachment]  [attachment=1]image.png[/attachment] 
on which you are not allow to modify anything

but even if the extension is installed, you can still use the standard way (upload) to add attachement.
User avatar
axew3
w3all User
w3all User
Posts: 2689
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: 2.5.0 WordPress phpBB integration has been released!

Post by axew3 »

but even if the extension is installed, you can still use the standard way (upload) to add attachement.
mhh i am curious by the way :)
User avatar
axew3
w3all User
w3all User
Posts: 2689
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: 2.5.0 WordPress phpBB integration has been released!

Post by axew3 »

Looking into function last added about email check into phpBB if it exist, for frontend plugins profile pages, before that the email being updated into wordpress.
I detect a bug more (it is not a bug of this plugin, it is a wrong behavior of plugins like memberpress i think).
The problem, i realize, is that into a plugin like memberpress, into his front-end default profile page it is possible to update the email.
But what it seem to me a bug of memberpress (still not reported to them, and maybe they want it as is for some reason? strange) is the behavior that if you setup into email field something like this myfakingemail (that's not an email) it is correctly updated to the value, it is not checked if the email is valid or not.
As secondary effect may not so probable but could happen, is that what about an user that setup wrong the field then may logout and forget pass? Locked out by his account.

To avoid this disaster, the function
function w3all_filter_pre_user_email( $raw_user_email )
into wp_w3all.php file, should be updated into this (as on next 2.5.1 will be)

Code: Select all

function w3all_filter_pre_user_email( $raw_user_email ) {
   // there is only the passed email to be updated: check if it exist already
   if(is_email(sanitize_email($raw_user_email))){
    $ck = WP_w3all_phpbb::ck_phpbb_user( $user_login = '', $raw_user_email );
      if(!empty($ck)){
        temp_wp_w3_error_on_update('onlymsg');
        exit;
      }
   } else {  // this is not an email, avoid any going on (ex: memberpress setup an email field without checking for email validity so that also something like uiefhiefhuiwfe is ok for him!)
   	   echo __( '<strong>Error</strong>: wrong email format. Return back.', 'wp-w3all-phpbb-integration' );
   	   exit;
   	 }
  return $raw_user_email;
}
Post Reply