Skip to content

initial draft of adding buddypress support #454

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

clariner
Copy link

@clariner clariner commented Sep 7, 2014

i have created the required files to support buddpress groups. I think the only thing remaining that i would need some pointers with is the converting the the posts 2 posts query arguments to one supported by BP_Groups_Group::get()

sed -i "s/yourpasswordhere/$DB_PASS/" wp-tests-config.php

# create database
mysqladmin create $DB_NAME --user="$DB_USER" --password="$DB_PASS"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2P already has a bin/install-wp-tests.sh file, so this file is a duplicate and should be removed.

@scribu
Copy link
Owner

scribu commented Sep 8, 2014

After only a quick look, the code looks alright. I will do some actual testing when you say it's ready.

Due to #449, in order to be able to merge this, you will have to submit all the files from the core/ directory in a separate pull request to https://github.com/scribu/wp-lib-posts-to-posts.

@clariner
Copy link
Author

clariner commented Sep 8, 2014

I will double check but I had issues with using an version above V1.6.3.

AFAIK it was down to missing files / unable to file certain files. I will merge in #449 to my version and review.

If I find anything I will posts on #449

@scribu
Copy link
Owner

scribu commented Sep 8, 2014

AFAIK it was down to missing files / unable to file certain files.

You need to install the Composer dependencies. See the updated CONTRIBUTING.md.

@clariner
Copy link
Author

clariner commented Sep 8, 2014

I will be able to issue a complete pull request against the other repository once i have resolved the final issue which is how to modify the do_query, capture_query and get_list functions.

As WP_Query and WP_User_Query can't be used is it possible to convert these function to use $wpdb? It doesn't seem like $wpdb->get_results() is available ($wpdb is null, i have use global) within these functions.
If they can be modified how can the arguments be passed along?

@scribu
Copy link
Owner

scribu commented Sep 9, 2014

As WP_Query and WP_User_Query can't be used is it possible to convert these function to use $wpdb?

If BuddyPress doesn't have an equivalent class, like BP_Group_Query, then yeah, using $wpdb is fine.

($wpdb is null, i have use global)

That's not possible, since WordPress can't load plugins without having first set up $wpdb.

@scribu
Copy link
Owner

scribu commented Sep 9, 2014

If they can be modified how can the arguments be passed along?

If there is no BP_Group_Query class to hook into, you will still be able to use p2p_type( 'some_connection_type' )->get_connected( $some_group ).

@clariner
Copy link
Author

clariner commented Sep 9, 2014

It looks like BP_Group_Query and BP_User_Query will be available in Buddypress 2.2.

…into buddypress-groups

Updated dropdown-bpgroup and field-title-bpgroup
@clariner
Copy link
Author

clariner commented Sep 9, 2014

I have update the pull request to support changes in #449.

@scribu
Copy link
Owner

scribu commented Sep 10, 2014

Cool, but if you look at the changed files you'll see that there are 4 that need to be deleted from this PR:

  • bin/install-wp-tests
  • core/item-bpgroup.php
  • core/query-bpgroup.php
  • core/side-bpgroup.php

@clariner
Copy link
Author

I have updated the pull request following your comments.

@solhuebner
Copy link

BuddyPress support is a great addition!
Thank you!

@solhuebner
Copy link

Any news for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants