Search Results for 'buddypress'
-
Search Results
-
Hello,
I am trying to add a custom activity action and add it to the database after a form is submitted. The activity does not show on the activity stream and it is not added on the database.
I can’t figure out why. Here is my code below first I use the bp_activity_set_action and bp_activity_add inside the nen_register_activity_actions action as suggested on the documentation, I define the component id-s and callback but can’t figure out why the the activity is not registred and not added on the database.
Thank you to everyone for the help
add_action("gform_after_submission_79", "nen_update_date_time_treaty", 10, 2); function nen_update_date_time_treaty($entry, $form) { $user_id = get_current_user_id(); $treaty_date = date('Y/m/d'); $status = rgar( $entry, '4.1' ); // var_dump($status); if ($status == '1') { //global $bp; //get the current user link with First Name and last name // $buddypress_link = bp_core_get_userlink( bp_loggedin_user_id(), $no_anchor = false, $just_link = false ); // //post buddypress activity // bp_activity_post_update(array('content' =>"$buddypress_link has ratified the <a href='/ratify-new-earth-treaty' target='_blank' class='fancybox'>New Earth Treaty</a> ", 'user_id' => bp_loggedin_user_id())); function nen_register_activity_actions() { global $bp, $wp_query; $bp = buddypress(); /* arguments are : - 'component_id', 'component_action_type' to use in {$wpdb->prefix}bp_activity database - and 'caption' to display in the select boxes */ bp_activity_set_action( $bp->activity->id, 'nen_treaty_ratified', __( 'Ratified new earth treaty', 'buddypress' ), 'bp_activities_format_activity_action_left_group', __( 'Members Ratified', 'buddypress' ), array( 'activity', 'group', 'member', 'member_groups' ) ); //$activity_content = 'ACTIVITY CONTENT'; $this_user_profile_url = bp_core_get_user_domain($wp_user_id); $action_String = "<a href=\"". $this_user_profile_url ."\">@" . bp_core_get_username($wp_user_id)."</a> has just ratified the new earth treaty"; //add activity to the database bp_activity_add( array( 'user_id' => $wp_user_id, 'action' => $action_String, // 'content' => $activity_content, 'component' => 'nen_treaty_ratified_action', // 'primary_link' => '<a href="'.get_post_permalink($this_activity_id).'">' . $title . '</a>', 'type' => 'custom_activity_update', 'hide_sitewide' => false )); } add_action( 'bp_register_activity_actions', 'nen_register_activity_actions' ); update_user_meta($user_id, 'treaty_ratified', $status ); update_user_meta($user_id, 'treaty_timestamp', $treaty_date ); } else { delete_user_meta($user_id, 'treaty_timestamp'); } }Topic: Re-Tweet Activity
Hi,
I’m wondering if is there a plugin for re-tweeting buddypress activity?
I know there was some – but it’s not available anymore… I googled, looked at 100s of plugins and I couldn’t find anything.
Could you recommend any?
Thanks 🙂How to prevent duplicate activity entries when bbPress replies edited?
I tried this here:
https://buddypress.org/support/topic/duplicate-activity-entries-when-bbpress-replies-edited/
but it doesn’t work.
Duplicate activity entries are still being posted after a forum reply has been edited.HELP!
Topic: Redirect does not work
Hi there, I am trying to redirect a user who signs up using the buddypress registration form to a register confirmation page.
I have tried numerous code snippets from across the internet and some simply added a white bar to the top of my website, others did nothing and I am still stuck for a solution.
Is there anyone that could help? I am simply looking to redirect users to complete registration to be redirected to another page.
Is it possible to maybe make this standard functionality in BuddyPress in the future? Seems like a lot of people are trying to do something like this.
Hi there,
I’m using buddypress as a recruiting platform where people have a form with xprofile fields to complete a complex CV. I want all the data (even members list) to be private, I just want the user to be able to see his own data and delete or modify it.
Only admin should be able to see the member list in order to select profiles when necessary.
To do so, I have set almost all fields to “Only me” and limited access to public areas in the following way:/* Prevent logged out users from accessing bp activity page and other profiles*/ add_filter('get_header','nonreg_visitor_redirect',1); function nonreg_visitor_redirect() { global $bp; // The user ID of the currently logged in user $current_user_id = (int) trim($bp->loggedin_user->id); // The author that we are currently viewing $author_id = (int) trim($bp->displayed_user->id); if ( !current_user_can( 'manage_options' ) ) { if( bp_is_activity_component() || bp_is_groups_component() || bp_is_group_forum() || bp_is_page( BP_MEMBERS_SLUG ) || ($current_user_id !== $author_id && $author_id != 0)) { wp_redirect( get_option('siteurl') ); } } }For me it works fine, but I’m new at Buddypress, and I wonder if I’m missing something.
Is there any backdoor that I have forgot?
Should I limit something else?
To preserve this info is crucial for me.Hi there!
I have a child theme in my WordPress and it has the appropiate buddypress folder inside.
I have successfully done a custom buddypress>members>profile-loop.php and buddypress>members>members-loop.php, but I’m struggling to make buddypress>members>single>member-header.php work.
Is there anything wrong with the files’s path?
The changes I do in the file don’t show in the website afterwards.
The original file come from buddypress>bp-themes…What am I doing wrong?
I notice when I am logged into my s2member website as a paid user, if I click on my profile (Buddypress) and change password, it logs me out and then I can no longer log in. I opened up phpMyAdmin to look up my user record, and the password in the user_pass field was NOT encrypted. So in my buddypress profile I changed my password to ‘welcome’ (sans quotes..), and in the user_pass field in the WP users table, the password was not encrypted. Ideas?
Hello!
I am setting up a new WP multisite for two sites, using different domains for each site. I would like to use BuddyPress on both sites, but share the same BuddyPress instance/data between each site. The two communities will have a lot of overlap, and one site may eventually subsume the other.
Can BuddyPress do this? If so, what configuration do I need to look for?
I found this link, but I am unfamiliar with the terminology. While the steps were clear, I am new and their overall intent was opaque to me.
TIA!
Hello there,
I know that this issue has been posted somewhere before but as far as I saw this issue has not been resolved yet
in fact I am surprised that buddypress does not include such important feature !
I want conditional fields on my registration page based on a choice the visitor makes
for example
Your job: dropdown box contains {engineer, translator}
if the visitor selects engineer another dropdown will appear with the following options {computer, civil} else the child dropdown will have {En to Fr, En to Chinese}Hi all,
I need to add some extra fields to the “Request Membership” page for some private group, in order to permit to the administrators to make some pre-selections of candidates.
The ideal was be that the groups administrators could create the list of fields by themselves
someone know if exist a plugin for that?
I tried “BuddyPress Groups Extras” but is not that I need.
I am trying to add extra fields into my registration form using the following code into the functions.php file in my child theme (One Social). The code should capture the data for woo commerce to use at the checkout.
//Adding Registration fields to the form
add_action( ‘register_form’, ‘adding_custom_registration_fields’ );
function adding_custom_registration_fields( ) {//lets make the field required so that i can show you how to validate it later;
$firstname = empty( $_POST[‘firstname’] ) ? ” : $_POST[‘firstname’];
$lastname = empty( $_POST[‘lastname’] ) ? ” : $_POST[‘lastname’];
?>
<div class=”form-row form-row-wide”>
<label for=”reg_firstname”><?php _e( ‘First Name’, ‘woocommerce’ ) ?><span class=”required”>*</span></label>
<input type=”text” class=”input-text” name=”firstname” id=”reg_firstname” size=”30″ value=”<?php echo esc_attr( $firstname ) ?>” />
</div>
<div class=”form-row form-row-wide”>
<label for=”reg_lastname”><?php _e( ‘Last Name’, ‘woocommerce’ ) ?><span class=”required”>*</span></label>
<input type=”text” class=”input-text” name=”lastname” id=”reg_lastname” size=”30″ value=”<?php echo esc_attr( $lastname ) ?>” />
</div><?php
}//Validation registration form after submission using the filter registration_errors
add_filter( ‘woocommerce_registration_errors’, ‘registration_errors_validation’ );/**
* @param WP_Error $reg_errors
*
* @return WP_Error
*/
function registration_errors_validation( $reg_errors ) {if ( empty( $_POST[‘firstname’] ) || empty( $_POST[‘lastname’] ) ) {
$reg_errors->add( ’empty required fields’, __( ‘Please fill in the required fields.’, ‘woocommerce’ ) );
}return $reg_errors;
}//Updating use meta after registration successful registration
add_action(‘woocommerce_created_customer’,’adding_extra_reg_fields’);function adding_extra_reg_fields($user_id) {
extract($_POST);
update_user_meta($user_id, ‘first_name’, $firstname);
update_user_meta($user_id, ‘last_name’, $lastname);
update_user_meta($user_id, ‘billing_first_name’, $firstname);
update_user_meta($user_id, ‘shipping_first_name’, $firstname);
update_user_meta($user_id, ‘billing_last_name’, $lastname);
update_user_meta($user_id, ‘shipping_last_name’, $lastname);
}The code works fine until Buddypress is activated. The it just reverts to the usual wordpress log in with only the profile fields that are shown in the “Profile Fields” tab on the wordpress dashboard.
I feel like I must be missing something obvious but it is driving me crazy! Any help would be enormously appreciated. Thanks!
Does BuddyPress comply with disability W3C standards? I have a client who needs a fully compliant website with forum features.
Thanks
Mary
Topic: Adding Custom Emails
I followed both of these tutorials https://codex.buddypress.org/emails/custom-emails/ and https://webdevstudios.com/2016/02/23/buddypress-2-5/ for customizing email. I put the 2 functions in bp-custom.php, exactly the same on the tutorial. The problem is i don’t see those custom emails. The ‘bp_send_email’ function gives me this result http://pastebin.com/YC6D0Ysm. I also check in the database table ‘wp_term_taxonomy’ and ‘wp_terms’, i don’t see the description and the ‘post_recieved_comment’.