Coming 1.7.5: complete Buddypress integration and more

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: Coming 1.7.5: complete Buddypress integration and more

Re: Coming 1.7.5: complete Buddypress integration and more

by axew3 » Mon Sep 11, 2017 9:05 am

1.7.5 is coming very soon:

Code: Select all

= 1.7.5 =
*Release Date - very soon*

* Last Topics Widget fix: one single query, for all Last Topics widget's instances.
* Add Buddypress avatar and user's profile fields integration option (at cost of one single query added, if option is active)
* Add Shortcode to retrieve and display phpBB Last Topics on WP posts, pages etc. About how to use it, please see (NOTE: still not updated with explain about this new 1.7.5 addition) https://www.axew3.com/w3/2017/07/wordpress-shortcode-phpbb-posts-into-wp-post/
* Functions about profile updates have been optimized (class WP_w3all_phpbb -> phpbb_update_profile AND class WP_w3all_phpbb -> verify_phpbb_credentials)
* Fix some hints on Wp_w3all admin config page
* More fixes and code cleanup.

EDITED:


1.7.5 has been released, the procedure to integrate Buddypress profile fields with phpBB profile fields is here:
https://www.axew3.com/w3/2017/09/wordpr ... tegration/

Re: Coming 1.7.5: complete Buddypress integration and more

by axew3 » Fri Sep 08, 2017 7:47 pm

The entire way the WP_w3all plugin update fields, has been rewrite. The function phpbb_update_profile( has been totally rebuilt eliminating
many messy lines of code, and have been cleaned up.

More fixes applied for several adjustments to have a correct code flow (but more will be done on next releases) and to speed up execution.

Requests for additions are:
Shortcode for Topics (not only single posts) and shortcode for Last Topics Widget.
bbcode parsing for posts/topics shortcodes, about this mod (that seem interesting to add) https://www.phpbb.com/customise/db/exte ... ediaembed/
These whats i remember right now.

I'm sorry for the delay on releasing 1.7.5, but it is on the way!

Re: Coming 1.7.5: complete Buddypress integration and more

by axew3 » Thu Sep 07, 2017 8:19 pm

This is the last going on log before 1.7.5 release, to fix points about Buddypress complete profile fields integration: after all will be more precisely explained on the WP_w3all plugin installation procedure (i hope, but u know about my Eng that is bad!).

By the way, all is working fine, but the fact that the code has been write to search for matches between phpBB/WPBP Profile Fields Names, this present some aspect that need to be explained and applied, to get all working ok.

How the WPBP profile fields integration work:
1) This features have been added as option for Buddypress, so it can be activate or not on WP_w3all config (as well avatar integration option for Buddypress is option to be activated or not).
2) Any custom field can be added into WPBP: but only default phpBB profile fields will be updated (read post above to know what are), or a manual code addition/removal will be necessary into WP_w3all queries to have the joke work.

3) In Buddypress, is possible to name any field as more like, but if it need to be updated also in phpBB,

the field name displayed to the user, need to contain:

for youtube, the word youtube (lower or capital or both mixed letters, into a phrase also)
for facebook, the word facebook (lower or capital or both mixed letters, into a phrase also)
for icq, the word icq (lower or capital or both mixed letters, into a phrase also)
for skype, the word skype (lower or capital or both mixed letters, into a phrase also)
for twitter, the word twitter (lower or capital or both mixed letters, into a phrase also)
for googleplus, the word google (lower or capital or both mixed letters, into a phrase also (just google, so it can be used for one google service we like, and not just googleplus))
for yahoo, the word yahoo (lower or capital or both mixed letters)
for aol, the word aol (lower or capital or both mixed letters)

So it is important to not repeat and use as Fields Names of Buddypress some word that is already used to detect another field (or others 4 fields below).

This can work very fine until the name of the field is about services, because normally these are named in any language the same, while remaining four default phpBB profile fields, which are: occupation, interests, location, website can be differently named: in Italian the Eng word occupation is written occupazione, in Dutch it is bezetting etc etc.

For these 4 fields, IT IS REQUIRED that these Profile Fields Names are named in Buddypress as single word like:

for occupation, the word occupation, lower or capital or both mixed letters, or any of the words in the following array:

Code: Select all

array(
    "en" => "occupation",
    "it" => "occupazione",
    "fr" => "occupation",
    "de" => "occupation",
    "nl" => "bezetting",
    "es" => "ocupacion"
);
for interests, the word interests, lower or capital or both mixed letters, or any of the words in the following array:

Code: Select all

array(
    "en" => "interests",
    "it" => "interessi",
    "fr" => "interets",
    "de" => "interest",
    "nl" => "belangen",
    "es" => "intereses"
);
for location, the word location, lower or capital or both mixed letters, or any of the words in the following array:

Code: Select all

array(
    "en" => "location",
    "it" => "locazione",
    "fr" => "emplacement",
    "de" => "lage",
    "nl" => "plaats",
    "es" => "location"
);
for website, the word website, lower or capital or both mixed letters, or any of the words in the following array:

Code: Select all

array(
    "en" => "website",
    "it" => "sito web",
    "fr" => "site web",
    "de" => "website",
    "nl" => "website",
    "es" => "sitio web"
);
as is easy to understand, these arrays for these 4 BP profile field names, contains pairs of values about
"language" => "translated word"

in these arrays, is easy to add any other language, OR, you can also choose to modify the translation of the Profile Field Name into something different. like for example:
"en" => "website"
we could change into:
"en" => "your web space"
so as profile field name in Buddypress, we'll set for website field profile name:
Your Web Space OR Your web space (or any other mixed lower/capital letters, but the phrase NEED TO BE THE SAME as it is on the related array).

These arrays can be added into the custom WP_w3all phpBB config.php file, so when plugin update nothing will be lost, if changed something from the default, maybe due to addition of your language.

after this ... i stop for a moment, it is very hard to write a comprehensible Eng explaining things like this, more than code it!

Hope it is sufficient clear, but will be improved before to be published into the install help pages, when 1.7.5 will be released.
... for programmers: to get the result, it has been added two queries in WP because i've not find out any way to access to any Buddypress array containing user's profile fields data at runtime, as explained on code comments. It seem to me strange that there is no way to access to ready user's profile data provided by the BP loop, so maybe, after, some hint will help to improve, removing even this single added query! That would be amazing!

Re: Coming 1.7.5: complete Buddypress integration and more

by axew3 » Fri Aug 25, 2017 10:57 am

DRAFT
Let mention there are tons of possibles solutions, that are not suitable for non programmers guys. Will not be explained here how could be possible to edit even regex patterns in phpBB db tables to fit any needs, or even more deep and complex solutions, we'll aim here to an easy and basic explain/solution suitable for anybody, and to get the integration of Buddypress profile fields fully working with phpBB in WP_w3all.

For 1.7.5 > WP_w3all plugin version: this topic, as the previous about Profile Fields in phpBB, will be updated along the time. It is assumed you have already read (know) before the important one about

WP_w3all phpBB integration and phpBB PROFILE FIELDS

Same as explained on linked post, on Buddypress you can create/eliminate custom profile fields.
If you want Buddypress integrated in full with phpBB about profile fields, it is necessary that profile fields existent in WordPress, are present and exists also in phpBB, but there is a problem more on how phpBB by default, store profile fields values, and how it use these values, that isn't in the same way that WordPress do. We could go deep with this explain, that implicate many of possibilities: in short, as said, it is easy for any programmer to adjust the code to fit any specific WP-phpBB configuration. But it will be less easy to code something that will be good for any possible configuration automatically. Somewhere, some light will come out, at moment i've not go deep in this reasoning.

For the moment, on WP_w3all 1.7.5> with WP + Buddypress, and we need to integrate Profile Fields, they need to match in on phpBB and WP.

As read on post above, is assumed that you have recreate or you already have the default situation in phpBB about users profile fields, but for the integration with Buddypress about profile fields, it is not sufficient.
Here we must choose how to proceed, because in phpBB some profile field is displayed using a placeholder, appended to something that you decide.
Advanced phpBB users know what this mean, if not, take a look on
ACP -> Users and Groups tab -> Custom profile fields
for example, click the green icon to edit the Twitter profile field:
look how this field need to be setup for twitter where option:
Display field as a contact field:
Contact fields are displayed within the contact section of the user profile and are displayed differently in the mini profile next to posts and private messages. You can use %s as a placeholder variable which will be replaced by a value provided by the user.
The mentioned %s placeholder, could be so the passed value that an user have set into Buddypress profile.
So is needed that this value will come as valid to be used in phpBB as placeholder, because the contact link (as you see when you are on edit screen for the phpbb_twitter field) is in this way:
http://twitter.com/%s
If we leave the field in this way in phpBB, and in WordPress profile, an user setup as Twitter value the complete Twitter URL, like x example https://twitter.com/alessio_nanni
than the result in phpBB will be
http://twitter.com/ + https://twitter.com/alessio_nanni, so http://twitter.com/https://twitter.com/alessio_nanni
because the placeholder contain the value the user have setup in Buddypress profile, and phpBB will concatenate the string http://twitter.com/ with the passed value.
To resolve you can put as description for Twitter profile field in Buddypress, that is necessary to setup the value as Twitter account name, (alessio_nanni) and not as complete URL, but this may will not be very useful in WordPress if the link to Twitter in WordPress/Buddypress is not rebuilt as complete Twitter URL to display, like phpBB do.

WP with Buddypress and phpBB default profile fields integration procedure:

COMING ...

Re: Coming 1.7.5: complete Buddypress integration and more

by axew3 » Tue Aug 22, 2017 7:53 pm

The feature will be added as option, and an How To tutorial about will be added.
As well profile fields also for default WP (not Buddypress installed) become option in WP_w3all 1.7.5.
Will be possible so to integrate users about profiles fields, or not.
1.7.5 is coming ...

Re: Coming 1.7.5: complete Buddypress integration and more

by axew3 » Thu Aug 17, 2017 7:57 am

There are more problems i've found on integrating all profile fields between WPBP and phpBB.
For example default profile fields in WP, are text fields, to link services like Facebook on user's profile.
You could also choose to switch those fields to be URL instead of text fields.
The problem is, how these values are treated in phpBB: the explain is hard with my ENG...
in short, to resolve this very complicated situation, would be necessary:

that maybe all profile fields in WP are setup in the way to accept input only in the way phpBB accept these values (which i think is not easy thing to be done for common users: i could provide a script to execute that change values on specific tables, but it can result another time hard to write some code that can be suitable for any scenario).

OR all phpBB fields setup to accept instead URLs as values to display.

ABout the BP avatar on profile instead, it will work very fine on any scenario (but in phpBB need to be activated on ACP the custom Avatar URL's option for users).

Resuming, i'm now not so sure to add this feature, because too many complications that common users will not be able to resolve.
Maybe i will add a tutorial that advanced users could use to integrate completely, the Buddypress profile fields.

PS ive also realize looking on code that if all default phpBB install fields aren't existent in phpBB, the integration will return error on two specific queries.
That nobody have report until now. This will be fixed on next plugin version.

Top