axew3
Forum Replies Created
-
Forum: Plugins
In reply to: [WP w3all phpBB] Assign phpBB Groups according to WordPress RoleAnother hint for you (since i was looking), and to be used outside of the indicated hooks:
on any hook, to get user’s levels:
$user_levels = pmpro_getMembershipLevelsForUser($uid,true); // passing the second param true, will get all levels, omitting it or passing it as false only the active one
echo'<pre>';print_r($user_levels);exit;
to get subscriptions, whenever for more ocmplex things needed:
$active_subscriptions = PMPro_Subscription::get_subscriptions_for_user( $uid ); print_r($active_subscriptions);exit;
of course, the same could be easily achieved with direct queries, once you see the database structure and you understand which data you want to do what.
Forum: Plugins
In reply to: [WP w3all phpBB] Assign phpBB Groups according to WordPress RoleHint (maybe stupid to say) for you (i will follow with this as possible):
declare as global, vars
$w3all_phpbb_connection and $w3all_config
within the function you’ll create.Get the WP userdata into the function by ID, if the user email value is not already available.
Then perform into phpBB a query to get the phpBB user id of this user, based on his email (or execute a little more complex but single query, to update values and switch the user from a group to another into phpBB).
Or perform update/delete queries by user id after that you’ve get the ID, so to switch the user from a group to another into phpBB.
Some queries examples are here (and some phpBB groups how to switch mechanism)
https://www.axew3.com/w3/2022/12/phpbb-wordpress-roles-groups-switch/
pss i’ve see the site you built. Awesome! ??
Forum: Plugins
In reply to: [WP w3all phpBB] Assign phpBB Groups according to WordPress RoleI just have take a look into the documentation and it is quite easy to assert that the Paid Memberships Pro plugin works very well and the documentation is very helpful and quite extended. WoW!
Here there is an example that can be easily used exactly for the scope you say (with some modification and code addition so to connect to phpBB and so to change user’s groups based on results of these hooks):
https://www.paidmembershipspro.com/hook/pmpro_after_all_membership_level_changes/
OR THIS
https://www.paidmembershipspro.com/hook/pmpro_after_change_membership_level/
I will follow as i can to focus on a practical and very easy example.
- This reply was modified 5 months, 1 week ago by axew3.
Forum: Plugins
In reply to: [WP w3all phpBB] Assign phpBB Groups according to WordPress RoleI’ve find out after that the error was coming out due to woocommerce active; it cause also the subsequent error on Paid Memberships Pro about Rest request returning 403, when on edit page/post:
GET
https://localhost/wp/wp-content/plugins/woocommerce/assets/client/blocks/coming-soon.css?ver=wc-8.9.3
[HTTP/1.1 404 Not Found 1104ms]then
XHRGET
https://localhost/wp/wp-json/pmpro/v1/post_restrictions/?post_id=2&_locale=user
[HTTP/1.1 403 Forbidden 1052ms]then
Object { code: "rest_forbidden", message: "Sorry, you are not allowed to do that.", data: {…} }
index.js:1:763that is the issue above reported. Once woocommerce has been disabled Paid Memberships Pro work fine now.
I will check as possible for an easy suggestion for you (except the already existent):
https://www.axew3.com/w3/2022/12/phpbb-wordpress-roles-groups-switch/
- This reply was modified 5 months, 1 week ago by axew3.
Forum: Plugins
In reply to: [WP w3all phpBB] Assign phpBB Groups according to WordPress RoleAnd unfortunately, it at moment return the same, even setting up the wordpress as http (so i hoped it would work fine, since the 403 error). But it still keep returning error on console as above said, even when on the membership plugin i’ve set the Force SSL option to NO and wp run on http.
Forum: Plugins
In reply to: [WP w3all phpBB] Assign phpBB Groups according to WordPress RoleHello! looking for a test so to see an easy way to integrate, but at moment, unfortunately, when on editing a WP page and setting it, adding a membership so to make it viewable only when one of two possible, a free and a pay membership are subscribed, it return me the problem that the membership is not saved at all when i save/update the page… Looking ….
the console return
Object { code: "rest_forbidden", message: "Sorry, you are not allowed to do that.", data: {…} }
index.js:1:763
fetchRestrictedLevels Ember- This reply was modified 5 months, 1 week ago by axew3.
Forum: Plugins
In reply to: [WP w3all phpBB] Remove Preload with theme integrationIf using page-forum.php (or page-whatever you named it) into your active template folder
at line 218 until 222 of the actual there is this div you can remove
<div id="w3idwloader" class="w3_wrap_loader"> <noscript><h3 style="background-color:#333;color:#FFF;padding:15px;font-size:0.8em;pointer-events:auto;">Javascript disabled: can't load the forum page at this Url.<br />Enable Javascript on your browser or visit the forum here:<br /><br /><?php echo $w3all_url_to_cms;?><br /><a href="<?php echo $w3all_url_to_cms;?>">To be auto-redirected click here<br />(may this link will not work)</a></h3></noscript> <div class="w3preloadtext"><?php echo $w3guessdomaindisplay ; ?></div> <div class="ww3_loader"><div class="w3_loader"></div></div> </div>
if using by shortcode into file /wp-content/plugins/wp-w3all-phpbb-integration/views/wp_w3all_phpbb_iframe_short.php line 96 until 100 (echoed by php)
<div id="w3idwloader" class="w3_wrap_loader"> <noscript><h3 style="background-color:#333;color:#FFF;padding:15px;font-size:0.8em;pointer-events:auto;">Javascript disabled: can\'t load the forum page at this Url.<br />Enable Javascript on your browser or visit the forum here:<br /><br />'.$w3all_url_to_cms.'<br /><a href="'.$w3all_url_to_cms.'">To be auto-redirected click here<br />(may this link will not work)</a></h3></noscript> <div class="w3preloadtext">'.$w3guessdomaindisplay.'</div> <div class="ww3_loader"><div class="w3_loader"></div></div> </div>
By shortcode will be definitively the main way to do the template integration, from the next plugin release that will fix several issues definitively (anyway the code of both is the same) https://www.axew3.com/w3/forums/viewtopic.php?p=6320#p6320
Forum: Fixing WordPress
In reply to: Space gap in adminNo it was 8.2 in true, i just switched to 8.3 because it is not a server where it is possible to manage lot of server settings (shared hosting), so to cause a sort of server restart (which on it i cannot perform) i switched the php version as last dramatic possibility since from this morning i was becoming crazy about it! It fixed the issue.
Thank you all guys! ??
Now i can start to renew on the staging site with peace of mind!
Forum: Fixing WordPress
In reply to: Space gap in adminFIXED!
I do not why but as soon i changed the php version on server (and reverted to 8.2) the gap disappeared.
It is the unique thing i did that “seem” affected and fixed: since from this afternoon i cleaned cache on browser, disabled plugins, reloaded any and each file to be sure that there was not a return carriage or white space into wp-config.php etc etc
It seem strange that the switch of php can cause the issue to be resolved, (a sort of server cache? do not think, all plugins are active now, and there is no cache working any way) anyway, sorry guys i have no other explain (and it was not the reason of the fix probably?) but it seem to be fixed now.
- This reply was modified 6 months, 2 weeks ago by axew3.
Forum: Fixing WordPress
In reply to: Space gap in adminThis is it and, it come out, beside the other mentioned, when if on debugging mode
it is making me crazy, i’ve try out all and everything, even ob_get_contents();
ob_end_clean();
at moment failed, i am looking to reverse from where it can come out but with no success.p.s there are no errors in php logs!
- This reply was modified 6 months, 2 weeks ago by axew3.
Forum: Fixing WordPress
In reply to: Space gap in adminHello, sorry, no the menu admin bar is visible , i intentionally screened not including the site name that display into the bar admin, the black line you see in the screenshot is where the horizontal admin bar menu start and correctly show. As can be seen, after a gap, while should be no space there
The last twentytwentyfour, or old theme presents the same and in admin there should be no theme conflict by the way, and it is the same, as said, even with all plugins disabled. It show when in admin.
Forum: Fixing WordPress
In reply to: Space gap in adminHello! The difference is that between the Dashboard item and the top bar, there is a big space of almost 15/30px (maybe) into mine while your or any normal, there is no gap.
Sometime it was caused, i remember, by white spaces or return carriage at the end of some file, but in this case i cannot imagine from where it could come out
Forum: Plugins
In reply to: [WP w3all phpBB] Combine existing usersSorry for my delay on answer to this that i missed!
Yes, it is possible any kind of integration with easy, just follow the procedure (even it is bad Eng i know) and if any question just post!
Forum: Plugins
In reply to: [WP w3all phpBB] 403 Error when accessing ACPOk, i see thank for the video that let understand more than words, due to my english. Look, the problem here seem to be something else because as you click into the link for the ACP, as you can see the forum appear NOT IFRAMED and it is pure phpBB: well, always it is pure phpBB, because it is only iframed into a WP page, but when going to ACP, you see that the page load with real phpBB url.
So, are you out of the ACP? How you login into?
To be anyway sure that it is not something interfering with the JS code added into the overall_header.html template file, you should maybe test it commenting this line of js code, into the added:
document.location.replace(href0);
change into
//document.location.replace(href0);
assuming that you have the ACP option set to YES about Recompile Stale Templates (so that changes done to template files takes immediate effect).
If it is something interfering, that’s strange, with issue you report, it can be only the above mentioned.
While this line commented, when you load the phpBB at real url, it will not be redirected to the iframed WP page, but will remain at real phpBB url. So you can test it out of the iframe box and any possible interference. At same time, you can always access to the iframed phpBB, by accessing the WP forum page.
Let know!
Forum: Plugins
In reply to: [WP w3all phpBB] 414 Request-URI Too Long2.7.9 has been released. Still in trouble?