Search Results for 'buddypress'
-
AuthorSearch Results
-
February 19, 2015 at 7:34 pm #234809
In reply to: Members Page custom URL with select box value
danbp
Participanthi @aaronkin
see here if this topic can help:
https://buddypress.org/support/topic/adding-new-order-by-on-members-loop/#post-234693February 19, 2015 at 6:03 pm #234806February 19, 2015 at 5:57 pm #234805ishvara
ParticipantUpdate: reverting to BuddyPress 2.1.1 fixes the issue.
February 19, 2015 at 3:35 pm #234793bp-help
ParticipantThanks @danbp for the bug confirmation. I opened the below ticket:
https://buddypress.trac.wordpress.org/ticket/6234February 19, 2015 at 3:30 pm #234792In reply to: User can't edit profile in frontend
danbp
ParticipantBuddyPress was made to extend WP standart profile fields. Normally you haven’t to use WP’s profile fields (aim, jabber, bio, etc) I you need a bio you recreate one.
The only required fields for profiles at the registering level are 4 by WP (username, email, password & pwd confirm) and the Base (field group) Name field which is added by BuddyPress.
If you use bbpres as standalone forum aside BP, you can syncing with wordpress
February 19, 2015 at 3:16 pm #234790danbp
ParticipantThank you for this @bphelp. Noticed the same issue yesterday.
Hopefully there will be a fix Best chance for this, is to open a ticket i guess. đ
February 19, 2015 at 3:15 pm #234789In reply to: How to add custom fields/shortcode in my profile
–Q–Shadows
ParticipantCan you link me to the list of action hooks available in buddypress.
PS> I want the rank+logo to appear under the profile menu/tab where by default the Base info is present. Would appreciate if u provide a hook for that.
February 19, 2015 at 3:14 pm #234788In reply to: Adding new 'Order By' on members loop
ch1n3s3b0y
Participant@shanebp So I have sort of made progress. I found this post by @eberger3. He seemed to be trying to do something similar to me. With his code I have now managed to order the results by price, which is great, but I am also experiencing the same issues he had:
- The pagination doesnât work
- The member count shows âViewing 1 memberâ when there are many more
- The âsearch membersâ box doesnât work. It returns the entire directory
Is this because I am using bp_user_query and not bp_ajax_querystring?
<?php function ch_member_order_options() { ?> <option value="price"><?php _e( 'Price', 'buddypress' ); ?></option> <?php } add_action( 'bp_members_directory_order_options', 'ch_member_order_options' ); add_action( 'bp_pre_user_query', 'sort_by_price' ); function sort_by_price( $bp_user_query ) { // Only run this if one of our custom options is selected if ( in_array( $bp_user_query->query_vars['type'], array( 'price') ) ) { global $wpdb; $field_id = 5; $user_query = $wpdb->get_col("SELECT object_id FROM " . $wpdb->prefix . "term_relationships WHERE term_taxonomy_id = " . $field_id); $users_str = ''; foreach ( $user_query as $user ) { $users_str .= $user . ','; } $users_str = rtrim($users_str, ","); // Adjust SELECT $bp_user_query->uid_clauses['select'] = "SELECT user_id FROM " . $wpdb->prefix . "bp_xprofile_data"; // Adjust WHERE $bp_user_query->uid_clauses['where'] = "WHERE user_id in (" . $users_str . ") AND field_id=18"; // Adjust ORDER BY $bp_user_query->uid_clauses['orderby'] = "ORDER BY CAST(value as UNSIGNED) ASC"; $bp_user_query->uid_clauses['per_page'] = 10; } } ?>Edit: I can see this thread is in Installation category. This was a mistake. I should have but it into ‘How To’ or ‘Creating and Extending’ I can’t change this though.
February 19, 2015 at 12:09 pm #234771In reply to: Restrict posts based on buddypress groups
danbp
ParticipantHi @whoaloic,
want remind some points
– posts are handled by WordPress. BuddyPress speciality are the members, not publication.
When group members want to talk together, they can use the notice editor for brief messages or if you install bbpres they can use the forum.-It exist a buddypress group blog plugin, who allows group members to use a blog, similar to the main blog.
– BuddyPress features are developped if there is a general need, rarely for particular usage.
Of course, you can suggest an ehancement on Trac. To ogin use same credentials as on this forum. Details are explained here.
If you feel concerned by BuddyPress development, i suggest to express your opinion by participating on the brand new 2015 BuddyPress survey. đ
February 19, 2015 at 11:16 am #234766In reply to: Can't put widgets on Buddypress pages?
Rapforthemoment
ParticipantSir, I believe this is basic knowledge. That is not my problem. I cannot add a widget ANYWHERE on a page activated with BuddyPress. I have the right sidebar for widgets and they will not add any kind of widget to any page that has BuddyPress Activity, Groups, etc.
February 19, 2015 at 10:25 am #234764In reply to: Remove public group updates from SWA
danbp
Participanti tested the function and it works on my install. Do you use a cache plugin ? If yes, clear it and try again.
You could also try to do that directly in the activity template, via your child theme.
See bp_has_activities in bp-templates/bp-legacy/buddypress/activity/activity-loop.phpBut this will also affect the whole site activities.
Profile specific what’s new update activity doesn’t exist outside of a user activity page.
In other words, when you call the action filter activity_update, you’ll receive updates from “members”, “groups” and “swa activity” which is default.To understand, open your DB and go to bp-activity table.
You’ll see component, type and action rows, which are used to built the SWA.
And the comp xprofile doesn’t include activity_update actionMore doc about this in /buddypress/bp-activity-template.php:166
February 19, 2015 at 10:17 am #234763In reply to: Restrict posts based on buddypress groups
whoaloic
ParticipantHello,
I finally use https://wordpress.org/support/plugin/user-access-manager to restrict access to posts (and custom post types).
I had to create same groups than BuddyPress for the plugin because this one does not synchronies with BuddyPress groups.
But this plugin effectively adds a Access metabox for each post where I can check groups who are able to read posts.
It will be such an improvement if BuddyPress integrates such a feature.
Where could I post this feature suggestion?Best regards.
February 19, 2015 at 7:34 am #234753In reply to: Creating private section
mathijs84
ParticipantThanks danbp,
You think Buddypress is the right way to go ??
With point 2 i mean, that at the start of each month every user has to upload a new picture.
So this will be custom development i guess!We are only going to use the member (wall)pages, kinda like a facebook wall. Is it possible to somehow get the elements like activity, photo’s, documents and messages on 1 page without the tabs?
February 19, 2015 at 6:35 am #234751In reply to: Can't put widgets on Buddypress pages?
@mercime
Participant@rapforthemoment You can’t put a widget on a page whether it’s BuddyPress or a regular WordPress page. You can only place a widget in a widget area.
February 19, 2015 at 3:08 am #234744In reply to: Activity Stream Gone After Moving Hosting
Henry Wright
ModeratorWithout knowing exactly what was done via the one click migration, it’s going to be hard to pintpoint what went wrong.
Was the one click migration intended for BuddyPress? Just WordPress? I’m not familiar with GoDaddy’s process
February 19, 2015 at 3:04 am #234742In reply to: Activity Stream Gone After Moving Hosting
Andrea Reed
ParticipantHi @henrywright, While I appreciate the comment, the migration was done via GoDaddy. One click migration from one hosting plan to another. The only difference was that the BuddyPress Activity Stream was no longer there.
February 19, 2015 at 1:11 am #234737In reply to: Cannot see a profile page on front end
peter-hamilton
ParticipantDont you think it might be an issue with the theme, you are all alone with this problem so it is not a Buddypress fail, obviously.
A quick search on google shows lts of issues with hueman theme, especially interesting is the need for some “if” calls cause perhaps the theme only uses the single.php template.
Do you have he entire buddypress template folder copied to your theme root?
February 18, 2015 at 11:59 pm #234734Hugo Ashmore
Participantbp_is_user() returns true for the users profile or account screens so probably won’t work in this instance, you might try is_buddypress() for a more generic check to see if this is a BP page.
We can’t tell you where to add that though as we simply have no notion of how wishlist is effecting this re-direct, what file, what function etc etc.
February 18, 2015 at 11:54 pm #234733In reply to: Adding new 'Order By' on members loop
ch1n3s3b0y
Participant@shanebp I tried
$ch_querystring['user_ids'] = $users_str;but I think that only works for bp_user_query();. I saw the example before about how to sort by last name by @danbp and I think I should be able to modify this, but I can’t seem to get it to work:public function alphabetize_by_last_name( $bp_user_query ) { if ( 'alphabetical' == $bp_user_query->query_vars['type'] ) $bp_user_query->uid_clauses['orderby'] = "ORDER BY substring_index(u.display_name, ' ', -1)"; } add_action ( 'bp_pre_user_query', 'alphabetize_by_last_name' );Also, another weird thing is when I change ‘Order By’ to ‘Price’, all of the results show up, but they ignore what is in the search box. I added some code to take the search parameter in the URL and if you reload the page with the search parameter and ‘Price’ as ‘Order By’ then it filters the results as expected, both with ‘Order By’ and with the search term.
If you then change the ‘Order By’ to another option such as ‘Alphabetical’ and then back to ‘Price’, then the AJAX results don’t take into account the search terms. Not sure if I’ve just made a stupid mistake.
function ch_member_order_options() { ?> <option value="price"><?php _e( 'Price', 'buddypress' ); ?></option> <?php } add_action( 'bp_members_directory_order_options', 'ch_member_order_options' ); // filter ajax members by contributing function ch_filter_ajax_querystring( $querystring = '', $object = '' ) { if( $object != 'members' ) return $querystring; $defaults = array( 'type' => 'active', 'action' => 'active', 'scope' => 'all', 'page' => 1, 'user_id' => 0, 'search_terms' => '', 'exclude' => false, ); $ch_querystring = wp_parse_args( $querystring, $defaults ); if( $ch_querystring['type'] == 'price' ) { $path = $_SERVER['DOCUMENT_ROOT']; $path .= "/wp-load.php"; require_once($path); global $wpdb; $field_id = 5; $user_query = $wpdb->get_col("SELECT object_id FROM " . $wpdb->prefix . "term_relationships WHERE term_taxonomy_id = " . $field_id); $users_str = ''; foreach ( $user_query as $user ) { $users_str .= $user . ','; } $users_str = rtrim($users_str, ","); $user_ord = $wpdb->get_col("SELECT user_id FROM " . $wpdb->prefix . "bp_xprofile_data WHERE user_id in (" . $users_str . ") AND field_id=18 ORDER BY value ASC"); $user_ordf = ''; foreach ($user_ord as $user_o) { $user_ordf .= $user_o . ','; } $user_ordf = rtrim($user_ordf,","); $ch_querystring['include'] = $user_ordf; $ch_querystring['type'] = 'alphabetical'; $search_terms = $_GET['s']; if(!empty($search_terms)) { $ch_querystring['search_terms'] = $search_terms; } //var_dump($ch_querystring); return $ch_querystring; } else return $querystring; } add_filter( 'bp_ajax_querystring', 'ch_filter_ajax_querystring', 20, 2 );February 18, 2015 at 11:40 pm #234732In reply to: Adding new 'Order By' on members loop
shanebp
ModeratorNote that right before the return, I switch to
$ch_querystring['type'] = 'alphabetical';
There is no['type'] = 'price';in the class.Not sure about this, but instead of
$ch_querystring['include'] = $users_str;
Try
$ch_querystring['user_ids'] = $users_str;February 18, 2015 at 11:21 pm #234727In reply to: uploading images to sitewide activity
rosyteddy
ParticipantHi Faldekan!
Is it a must that you should use Frontend User Pro for images?
If you have option to use other stuff for images you can use the following – all of these add an icon to the form atop Activity page to click and upload imagesbuddypress-media by rtcamp
mediapress by brajesh
buddypics by modemlooper
bp activity plus
You need to see which works for you.
However, none of these use WP core media.If you can use core media of the WP itself, you can use the p2 theme which also has image upload button attached to the sitewide form. To show image thumbs in Gallery posts in the activity stream your users will have to “insert” at-least one picture apart from the Gallery.
February 18, 2015 at 11:11 pm #234726In reply to: Buddypress Settings Won't Save?
@mercime
ParticipantFebruary 18, 2015 at 11:01 pm #234721In reply to: How to disable BuddyPress Registration
mcpeanut
ParticipantHi @aluxi33, this can easily be done via this code
function my_disable_bp_registration() { remove_action( 'bp_init', 'bp_core_wpsignup_redirect' ); remove_action( 'bp_screens', 'bp_core_screen_signup' ); } add_action( 'bp_loaded', 'my_disable_bp_registration' ); add_filter( 'bp_get_signup_page', "firmasite_redirect_bp_signup_page"); function firmasite_redirect_bp_signup_page($page ){ return bp_get_root_domain() . '/wp-signup.php'; }What you will need to do is first create a bp-custom.php file (make sure you add the opening and closing tags at the top and bottom ) and put it in your plugins folder, then paste the code between the php opening and closing tags and save.
This should disable buddypress registration and let you use wordpress registration as default, hope this helps.
February 18, 2015 at 10:19 pm #234718In reply to: Adding new 'Order By' on members loop
ch1n3s3b0y
Participant@shanebp Thank you so much for your help. I got that working. I managed to query based on the new buddypress member types and also an xprofile field which is great.
One weird issue, I can’t see to order them accurately by the xprofile field (which is price). No matter whether I make SQL ORDER BY ASC or DESC the results always appear in the same order in the members loop. The SQL is definitely returning the results in the correct order as I have done a var_dump and checked.
Could it be something to do with
$ch_querystring['type'] = 'price';I have changed this to a different ‘type’ and it does change the results, but not to display them in the order I want.
February 18, 2015 at 9:56 pm #234716Topic: Author Posts in Profile Page
in forum How-to & Troubleshootingozanguzelkan
ParticipantHi, actually there are a few issues i need to handle. I used @azchipka’s code
in bp-custom.php author posts are been seeing in profile page. However as you’ ll see in this photo how can i solve these highlighted problems?
– remove the rating showing on avatar.
– give hyperlink to page titles.
– post content must be deleted.Regards,
Code is:
//POSTS ON PROFILE STARTS HERE add_action( 'bp_setup_nav', 'add_profileposts_tab', 100 ); function add_profileposts_tab() { global $bp; bp_core_new_nav_item( array( 'name' => 'My Posts', 'slug' => 'posts', 'screen_function' => 'bp_postsonprofile', 'default_subnav_slug' => 'My Posts', 'position' => 25 ) ); } // show feedback when 'Posts' tab is clicked function bp_postsonprofile() { add_action( 'bp_template_content', 'profile_screen_posts_show' ); bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) ); } function profile_screen_posts_show() { query_posts( 'author=' . bp_displayed_user_id() ); if ( have_posts() ) : get_template_part( 'author' ); else:?> <div id="message" class="info"> <p><?php bp_displayed_user_username(); ?> has not published any post! </p> </div> <?php endif; ?> <?php } //POSTS ON PROFILE ENDS HERE ?> -
AuthorSearch Results