These are, mainly changes on coming 1.7.5 release:
Buddypress integration: user's profile fields syncro, all fileds updated in phpBB (and viceversa if update is done/allowed in phpBB profile):
profile fields by default in Buddypress are 4, which we are interested on 3 of those, that are google account field, facebook field, yahoo field: these are by default created in Buddypress, than you can add your customs fields.
In phpBB there are much more created by default:
youtube, googleplus, google, skype, twitter, facebook, yahoo, icq, aol, interests, occupation, website.
(website and email fields are already synchronized)
What the wp_w3all plugin will do?
Will update these fields respectively on phpBB, if these are existent in WP, when user update his profile data fields in WP, and viceversa if update will be done by the user in phpBB.
Will be mandatory, that the field need to contain the name of the service, that is maybe obvious will be for any field, to distinguish one from other: will be practically sure that if the field is for twitter, the field name will be named with something that contain the word 'twitter' inside.
Not advanced users will find easy to setup this feature, because it only require to add custom profile fields in Buddypress, naming those fields, containing the name of the service inside.
An easy "What fields i can add in Buddypress, expecting that are also syncro updated in phpBB/WP user's profile" explanation will be added.
It should be clear for advanced programmer users what mean the above. And will be easy to edit the code adding more custom profile fields.
More advanced:
The integration, will update not only profiles fields by default listed above, but also avatar (if avatar enabled in wp_w3all).
Users can update avatars in any flavor, in WP, and will be updated in phpBB, and viceversa.
Even Buddypress who is online, WP widget will contain correct avatars of course: i'm so not well decided, if filter in this native BP widget the result, adding also phpBB online users, or add a wp_w3all completely separated one. ... any suggestion is welcome ...
About this feature, will require to activate in phpBB the Remote Avatar option for avatars in phpBB to work correctly.
This post is also a starting memo (especially for me) about all what mean integrating WP with BP, into phpBB.
Possibly, will be added yet on this 1.7.5 the who is online, considering users online on phpBB+WP, only in WP, only in phpBB, displayed into a widget, or as shortcode that will be possible to insert anywhere (so posts, widgets) ...
More important fixes and code cleanup.
Coming 1.7.5: complete Buddypress integration and more
- axew3
- w3all User
- Posts: 2883
- Joined: Fri Jan 22, 2016 5:15 pm
- Location: Italy
- Contact:
- axew3
- w3all User
- Posts: 2883
- Joined: Fri Jan 22, 2016 5:15 pm
- Location: Italy
- Contact:
Re: Coming 1.7.5: complete Buddypress integration and more
In phpBB an user can setup profile fields or not, there is no option about profile fields that you can choose to display as public, or only for members, as on buddypress. In phpBB you can choose only to fill a profile field, so if filled, it will be shown, while if the field is empty, nothing is shown.
In WP Buddypress, you can setup fields for users, and each can choose what of those can be viewed publicly or only by members, or even only by the same user.
So the best way, will be:
in case the profile field in WP BP will result as public, will be updated in phpBB.
in case the profile field in WP BP will be set to be shown for members only or only me, it will be reset to empty in phpBB.
In WP Buddypress, you can setup fields for users, and each can choose what of those can be viewed publicly or only by members, or even only by the same user.
So the best way, will be:
in case the profile field in WP BP will result as public, will be updated in phpBB.
in case the profile field in WP BP will be set to be shown for members only or only me, it will be reset to empty in phpBB.
- axew3
- w3all User
- Posts: 2883
- Joined: Fri Jan 22, 2016 5:15 pm
- Location: Italy
- Contact:
Re: Coming 1.7.5: complete Buddypress integration and more
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.
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.
- axew3
- w3all User
- Posts: 2883
- Joined: Fri Jan 22, 2016 5:15 pm
- Location: Italy
- Contact:
Re: Coming 1.7.5: complete Buddypress integration and more
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 ...
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 ...
- axew3
- w3all User
- Posts: 2883
- Joined: Fri Jan 22, 2016 5:15 pm
- Location: Italy
- Contact:
Re: Coming 1.7.5: complete Buddypress integration and more
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:
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 ...
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:
The mentioned %s placeholder, could be so the passed value that an user have set into Buddypress profile.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.
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 ...
- axew3
- w3all User
- Posts: 2883
- Joined: Fri Jan 22, 2016 5:15 pm
- Location: Italy
- Contact:
Re: Coming 1.7.5: complete Buddypress integration and more
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:
for interests, the word interests, lower or capital or both mixed letters, or any of the words in the following array:
for location, the word location, lower or capital or both mixed letters, or any of the words in the following array:
for website, the word website, lower or capital or both mixed letters, or any of the words in the following array:
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!
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"
);
Code: Select all
array(
"en" => "interests",
"it" => "interessi",
"fr" => "interets",
"de" => "interest",
"nl" => "belangen",
"es" => "intereses"
);
Code: Select all
array(
"en" => "location",
"it" => "locazione",
"fr" => "emplacement",
"de" => "lage",
"nl" => "plaats",
"es" => "location"
);
Code: Select all
array(
"en" => "website",
"it" => "sito web",
"fr" => "site web",
"de" => "website",
"nl" => "website",
"es" => "sitio web"
);
"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!