odinwynd
Forum Replies Created
-
Forum: Plugins
In reply to: [Co-Authors Plus] Neve Theme – Difficulty getting this to workIssue Resolved!
https://docs.themeisle.com/article/1862-how-to-display-multiple-authors-in-neveNavigate to the functions.php file of the Neve theme and paste the code below.
add_filter( 'the_author_posts_link', function( $markup ) { if ( ! function_exists( 'coauthors_posts_links' ) ) { return $markup; } ob_start(); coauthors_posts_links(); $output = ob_get_contents(); ob_end_clean(); return $output; } );
Forum: Plugins
In reply to: [WP OAuth Server (OAuth Authentication)] Extending the /me endpointUpdate:
actual result: http:\/\/www.gravatar.com\/avatar\/xxxxxxxxxxxxxxxxxxThis may be beyond the scope of merely extending the endpoint…
I have tried to encode it in the needed format, and it just crashes WordPress with a critical error.
I tried with json_encode()
That would spit out my array as I believe it is needed to be picked up by Rocket.Chat.
However, the array does not like having a portion that is not a forced object it seems.
I am no expert on OAuth, and I was simply trying to think outside the box to work-around an issue. There is Roles, Groups, and Mapping I would all somehow need to pass through the /me endpoint to make this work.
So I think this is beyond my current understanding, and would require some modifications to the plugin beyond extending an endpoint, especially since I can not get the output into the syntax needed to pick it up as a hunch work-around.
Otherwise, this is an absolutely amazing plugin and I intend to continue using it, I just wish I could solve this.
- This reply was modified 3 years, 8 months ago by odinwynd.
I think I may have found the issue, but it is only a hunch until tested, but I am unsure I can present the data in this manner….
"realmRoles": ["user", "offline_access"], "clientRoles": { "test-app": [ "customer-user" ], "account": [ "view-profile", "manage-account" ] }
I am uncertain honestly.
The main thing I am trying to do, is get my WordPress roles into Rocket.Chat for group and role mapping.
I have yet to produce a successful result. I think I am mostly lacking the understanding of how to pass the data of a Role Claim and Group Claim in a manner where the role would be picked up and usable from the endpoint.
// Get the user object. $user = get_userdata( $user_id ); // Get all the user roles as an array. $user_roles2 = $user->roles; // Check if the role subscriber is present in the array. if ( in_array( 'subscriber', $user_roles2, true ) ) { // // Do something. $subRole = array( // sub_role_1 will act as key "sub_role_1" => array( "role" => "user", // "DCO" => 85, // "FOL" => 74, ), // sub_role_2 will act as key "sub_role_2" => array( "role" => "subscriber", ), ); // echo 'YES, User is a subscriber'; }else{ $subRole = array(); } $result1 = $result + $subRole;
at the bottom…
$response = new WPOAuth2\Response($result2); //$me_data //$result //$result4 $response->send();
The “added” output…
"adm_role_1":{"role":"admin"},"adm_role_2":{"role":"administrator"}
So I have drastically changed my approach when I learned that a duplicate key is always dropped along with it’s value. So my solution was to make a multidimensional array with that data for each role as well as target roles in Rocket.Chat.
I just do not know what other key(s) may be intended to accompany in order for it to function, like a guid or description, as I feel I am missing a parameter and it is being skipped.
However, if I can get this to spit out an output that is up to the “standards” of OAuth’s Group/Role claim it may work. Problem is, I am not finding much definitive information.
- This reply was modified 3 years, 8 months ago by odinwynd. Reason: code quoting
This got flagged as “Spam” because I had to edit the “code tags” too many times…
Forum: Plugins
In reply to: [BuddyMeet] Shortcode Settings issueI was mistaken in what I was trying to put into settings..
This is now a feature request.
Add the ability to pass more interfaceConfig settings in shortcode and group setting page.
This will allow to at least remove the kick button to guests and other fine tweaks.
In the least, add
MOBILE_APP_PROMO: true/false
HIDE_KICK_BUTTON_FOR_GUESTS: true/false
Thanks
- This reply was modified 4 years, 4 months ago by odinwynd.
Forum: Fixing WordPress
In reply to: Strange behavior from “Recent Posts” in “category”Thank you… I commented the link on my bug report to them.
Forum: Fixing WordPress
In reply to: Strange behavior from “Recent Posts” in “category”It seems to be caused by the podcasting plugin I use currently.
PodLove…
It seems at least 1 other person had this issue back in 2018.
But no one responded on their support request in their community.
Trying to weigh my options here now.
I could nix the plugin and find some other way of doing things, or hope they fix it.
Thanks for your response.