Page 2 of 3

Re: 2.9.0 logs

Posted: Wed Sep 04, 2024 3:15 pm
by axew3
ADD
w3all Public functions - groups roles switches

That can be used into any filter or action hook:

viewtopic.php?p=6662#p6662

Re: 2.9.0 logs

Posted: Wed Sep 04, 2024 3:30 pm
by axew3
Fix all the user login possible issues in WordPress.

Re: 2.9.0 logs

Posted: Wed Sep 04, 2024 9:24 pm
by axew3
Fix lack of the

Code: Select all

global $w3all_custom_output_files
into private static function verify_phpbb_credentials()

the lack of it lead to not load the eventual custom wpRoles_phpbbGroups.php file, if used. It will never be loaded:
viewtopic.php?p=6619#p6619

Re: 2.9.0 logs

Posted: Sun Sep 08, 2024 7:56 pm
by axew3
Any characters/languages for usernames:

2.9.0 add a new option that will allow to add phpBB usernames transliterated into WordPress as Latin alphabet (any language) as default, OR into any other native language alphabet.

Code: Select all

define('WPW3ALL_USE_DEFAULT_WP_UCHARS', 1);
AND

Code: Select all

define( 'WPW3ALL_USE_UNAME_NATIVE_LANG_CHARS', 1 );
Considered alphabets are

Code: Select all

Arabic,Armenian,Bengali,Bopomofo,Braille,Buhid,Canadian_Aboriginal,Cherokee,Cyrillic,Devanagari,Ethiopic,Georgian,Greek,Gujarati,Gurmukhi,Han,Hangul,Hanunoo,Hebrew,Hiragana,Inherited,Kannada,Katakana,Khmer,Lao,Latin,Limbu,Malayalam,Mongolian,Myanmar,Ogham,Oriya,Runic,Sinhala,Syriac,Tagalog,Tagbanwa,TaiLe,Tamil,Telugu,Thaana,Thai,Tibetan,Yi
The integration code by default, if no option via DEFINE into the wp-config.php as been set, will add phpBB usernames that are not Latin into WordPress, transliterated to Latin.

If

Code: Select all

define('WPW3ALL_USE_DEFAULT_WP_UCHARS', 1);
option is set, usernames into WordPress will be added as sanitized allowing these chars also into a WP MUMS multisite:

Code: Select all

-0-9A-Za-z _.@
if not and if WP is MUMS, the username will added after that it has been purged from unwanted characters, so allowing only letters and numbers:

Code: Select all

0-9A-Za-z 
if

Code: Select all

define( 'WPW3ALL_USE_UNAME_NATIVE_LANG_CHARS', 1 );
is set, usernames are added into WordPress using the native language, after that it has been sanitized by unwanted characters (exactly like the Latin) like above mentioned.
The correct cleanup of the username by unwanted characters in any native language is performed using regular expressions that never fails.

The new added and used function that allow this, will reside into:
/wp-content/plugins/wp-w3all-phpbb-integration/common/helpers.php

It will start looking definitively like this:

Code: Select all

# function w3all_detectClean_language_chars

# Detect any text language
##$test = w3all_detectClean_language_chars($text, false, false, true);
// and return one of these
// Arabic,Armenian,Bengali,Bopomofo,Braille,Buhid,Canadian_Aboriginal,Cherokee,Cyrillic,Devanagari,Ethiopic,Georgian,Greek,Gujarati,Gurmukhi,Han,Hangul,Hanunoo,Hebrew,Hiragana,Inherited,Kannada,Katakana,Khmer,Lao,Latin,Limbu,Malayalam,Mongolian,Myanmar,Ogham,Oriya,Runic,Sinhala,Syriac,Tagalog,Tagbanwa,TaiLe,Tamil,Telugu,Thaana,Thai,Tibetan,Yi

# return sanitized text for -> MUMS that allow only '[0-9A-Za-z]'
##$test = w3all_detectClean_language_chars($text, true);

# return sanitized text for -> default WP '[-0-9A-Za-z _.@]'
##$test = w3all_detectClean_language_chars($text, false, false, false);

# return text transliterated to Latin text
##$test = w3all_detectClean_language_chars($text, false, true);

function w3all_detectClean_language_chars($text, $return_x_mums = false, $returnLatin = false, $returnDetectLang = false)
{
...
...

Re: 2.9.0 logs

Posted: Wed Sep 11, 2024 2:47 pm
by axew3
The previous post about
Any characters/languages for usernames
has been updated completely:
viewtopic.php?p=6671#p6671

phpBB usernames into WordPress from 2.9.0> can be added in WordPress in any alphabet if the option is set.
Please read the previous post!

Re: 2.9.0 logs

Posted: Sat Sep 14, 2024 8:26 am
by axew3
2.9.0 is on the way to be released.

Beside lot of bugs fixed, and the above mentioned features to manage users roles/groups switches, about phpBB usernames and alphabet/languages, worth to mention again that the integration code will respect from now on these rules

Any NON Latin phpBB username (any language), will be added as transliterated in Latin into WordPress, by default.
If the 'transliterator_transliterate' function is not available, because it is not configured in PHP (but it commonly is) then the username will probably not be correctly processed by WordPress and the user transfer will fail (user not transferred/created in WP). In this case, an array of languages/chars could be provided to workaround the lacking of if 'transliterator_transliterate' Php native function, but by default the code will not (of course) provide it. Anyway as said, it is commonly available into any Php.

For example:

Cyrillic двойняшки become dvoynyashki

*But any username, into any alphabet language can be added and used into WordPress.

To let it happen, like the option for MUMS WP multisite that consent to add phpBB usernames into WP allowing chars range of the default WP, and not only lettersNumbers usernames, adding this into the wp-config.php file

Code: Select all

define('WPW3ALL_USE_DEFAULT_WP_UCHARS', 1);
after the line

Code: Select all

/* Add any custom values between this line and the "stop editing" line. */

To add in WordPress usernames using native characters of phpBB usernames, this need to be added instead:

Code: Select all

define( 'WPW3ALL_USE_UNAME_NATIVE_LANG_CHARS', 1 );
now the Cyrillic username двойняшки will be transferred/created into WP as двойняшки

Once it has been added into the wp-config.php file, the username will be transferred into WordPress into any of these situations:
when the user come as logged into phpBB, with a non Latin username, and visiting WP will be added and logged on fly, with his (same) username like it is into phpBB, but purged as explained here: viewtopic.php?p=6671#p6671
or on login into WordPress, or using the transfer process for phpBB users to be imported into WP.

*NOTE: worth also to mention that, into my tests, and even using a default WordPress setting it let say as cyrillic, after that an user has been added as Cyrilic username, when the user go to update his profile, WordPress answer with an error about failed user addition (that happen into a default wordpress and not due to the plugin integration code that during tests have been also disabled), and there is no way to update the user's profile into WP, answer by WordPress is:
Cannot create a user with an empty login name.
My question (that i have not investigate) is:
what it do a WordPress configured in a non Latin language when usernames are not into Latin and how it is managed?
The code should work fine into any "modified" (??) WordPress that allow to manage native non Latin usernames into WordPress (if it is the way that it is done, or some other).