Point to phpBB profile from WP

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: Point to phpBB profile from WP

Re: Point to phpBB profile from WP

by axew3 » Thu Nov 21, 2019 8:39 pm

P.s : the wordpress way is very easy also doing this without any javascript:
just add action when wordpress profile page event hook fire (or grab the username of the user where/when exist in various ways), execute the query, retrieve phpBB ID, load phpBB profile.
Easy and short. I will add soon on next version this convenient way, will be easy to be adapted for any scope.

Re: Point to phpBB profile from WP

by axew3 » Thu Nov 21, 2019 8:30 pm

Well no, you do not need userid, you need username because IDs normally mismatch.
You want that if an user click into a profile url that isn't his own profile, to view another user profile, then phpBB url profile of this user should be provided.

may a db call to phpBB done when a profile url clicked in wordpress (js event listener) then an ajax call will fire to execute the query, retrieve uid in phpBB, return value, and build url to point to phpBB (that need to contain id).
This is maybe the wordpress side way.

But you could do the same passing to phpBB the username, that would be also more easy to do.
Normal phpBB profile url look like this:

Code: Select all

https://www.axew3.com/w3/forums/memberlist.php?mode=viewprofile&u=390
Let say that in wordpress you edit wp profile urls to point to something like this:

Code: Select all

https://www.axew3.com/w3/forums/memberlist.php?mode=viewprofile&uname=anUsername
Then on top of phpBB viewprofile.php if you're wild, or via a phpBB mod:
On top of the file, you could $_GET the var uname, sanitize, and execute a query to check the phpBB id of this username, then build the url to phpBB profile adding the user id, stop code execution, reload page to correct phpBB user profile.

I will consider to add the wordpress way as soon into plugin.

Point to phpBB profile from WP

by zawin » Thu Nov 21, 2019 12:41 pm

Hello,
how can I point to phpBB user profile from Wordpress? Wordpress User ID is different from phpBB user ID and I need $w3phpbbuid.

Thank you

Top