Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'buddypress'

Viewing 25 results - 24,026 through 24,050 (of 94,546 total)
  • Author
    Search Results
  • #188366
    danbp
    Participant

    /wp-content/themes/child-theme/buddypress.php

    Template Hierarchy

    #188364
    danbp
    Participant

    this seems not to be an usal path for a buddypress file !

    alexmoomey
    Participant

    When turn activity streams off i get the below error. I turn it back on and everything goes back to normal. But i need them off.

    Fatal error: Call to undefined function bp_get_activity_directory_permalink() in /home/www/scorchburn.org/wp-content/themes/x/framework/functions/global/buddypress.php on line 478

    SK
    Participant

    Here’s a weird one:
    Say I have a WordPress site at domain.com The site also has a portion powered by BuddyPress.

    Now, while I want the BuddyPress/community portion to be public, I don’t want every WordPress-registered user to automatically also have a BuddyPress profile page.

    Is it possible?

    #188360
    victord34
    Participant

    and i must write it in ‘function.php’ in childtheme
    or directly in the file buddypress? (not erase in update ?)

    Jencina
    Participant

    Sorry, not all is well.

    I edit in my custom “register.php” , but I can’t see anything. This is the code of my register custom page:

    <?php 
    global $bp;
    if(empty($bp->signup->step))
    $bp->signup->step=’request-details’;
    ?>
    
    		<form action="” name=”signup_form” id=”signup_form” class=”standard-form” method=”post” enctype=”multipart/form-data”>
    
    		<?php if ( 'registration-disabled' == bp_get_current_signup_step() ) : ?>
    			<?php do_action( 'template_notices' ); ?>
    			<?php do_action( 'bp_before_registration_disabled' ); ?>
    
    				<p><?php _e( 'User registration is currently not allowed.', 'buddypress' ); ?></p>
    
    			<?php do_action( 'bp_after_registration_disabled' ); ?>
    		<?php endif; // registration-disabled signup setp ?>
    
    		<?php if ( 'request-details' == bp_get_current_signup_step() ) : ?>
    
    			<?php do_action( 'template_notices' ); ?>
    
    			<p><?php _e( 'Registering for this site is easy. Just fill in the fields below, and we\'ll get a new account set up for you in no time.', 'buddypress' ); ?></p>
    
    			<?php do_action( 'bp_before_account_details_fields' ); ?>
    
    			<div class="register-section" id="basic-details-section">
    
    				<?php /***** Basic Account Details ******/ ?>
    
    				<h4><?php _e( 'PRUEBA', 'buddypress' ); ?></h4>
    
    				<label for="signup_username"><?php _e( 'Username', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label>
    				<?php do_action( 'bp_signup_username_errors' ); ?>
    				<input type="text" name="signup_username" id="signup_username" value="<?php bp_signup_username_value(); ?>" />
    
    				<label for="signup_email"><?php _e( 'Email Address', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label>
    				<?php do_action( 'bp_signup_email_errors' ); ?>
    				<input type="text" name="signup_email" id="signup_email" value="<?php bp_signup_email_value(); ?>" />
    
    				<label for="signup_password"><?php _e( 'Choose a Password', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label>
    				<?php do_action( 'bp_signup_password_errors' ); ?>
    				<input type="password" name="signup_password" id="signup_password" value="" />
    
    				<label for="signup_password_confirm"><?php _e( 'Confirm Password', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label>
    				<?php do_action( 'bp_signup_password_confirm_errors' ); ?>
    				<input type="password" name="signup_password_confirm" id="signup_password_confirm" value="" />
    
    				<?php do_action( 'bp_account_details_fields' ); ?>
    
    			</div><!-- #basic-details-section -->
    
    			<?php do_action( 'bp_after_account_details_fields' ); ?>
    
    			<?php /***** Extra Profile Details ******/ ?>
    
    			<?php if ( bp_is_active( 'xprofile' ) ) : ?>
    
    				<?php do_action( 'bp_before_signup_profile_fields' ); ?>
    
    				<div class="register-section" id="profile-details-section">
    
    					<h4><?php _e( 'Profile Details', 'buddypress' ); ?></h4>
    
    					<?php /* Use the profile field loop to render input fields for the 'base' profile field group */ ?>
    					<?php if ( bp_is_active( 'xprofile' ) ) : if ( bp_has_profile( array( 'profile_group_id' => 1, 'fetch_field_data' => false ) ) ) : while ( bp_profile_groups() ) : bp_the_profile_group(); ?>
    
    					<?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?>
    
    						<div class="editfield">
    
    							<?php
    							$field_type = bp_xprofile_create_field_type( bp_get_the_profile_field_type() );
    							$field_type->edit_field_html();
    
    							do_action( 'bp_custom_profile_edit_fields_pre_visibility' );
    
    							if ( bp_current_user_can( 'bp_xprofile_change_field_visibility' ) ) : ?>
    								<p class="field-visibility-settings-toggle" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>">
    									<?php printf( __( 'This field can be seen by: <span class="current-visibility-level">%s</span>', 'buddypress' ), bp_get_the_profile_field_visibility_level_label() ) ?> <a href="#" class="visibility-toggle-link"><?php _ex( 'Change', 'Change profile field visibility level', 'buddypress' ); ?></a>
    								</p>
    
    								<div class="field-visibility-settings" id="field-visibility-settings-<?php bp_the_profile_field_id() ?>">
    									<fieldset>
    										<legend><?php _e( 'Who can see this field?', 'buddypress' ) ?></legend>
    
    										<?php bp_profile_visibility_radio_buttons() ?>
    
    									</fieldset>
    									<a class="field-visibility-settings-close" href="#"><?php _e( 'Close', 'buddypress' ) ?></a>
    
    								</div>
    							<?php else : ?>
    								<p class="field-visibility-settings-notoggle" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>">
    									<?php printf( __( 'This field can be seen by: <span class="current-visibility-level">%s</span>', 'buddypress' ), bp_get_the_profile_field_visibility_level_label() ) ?>
    								</p>
    							<?php endif ?>
    
    							<?php do_action( 'bp_custom_profile_edit_fields' ); ?>
    
    							<p class="description"><?php bp_the_profile_field_description(); ?></p>
    
    						</div>
    
    					<?php endwhile; ?>
    
    					<input type="hidden" name="signup_profile_field_ids" id="signup_profile_field_ids" value="<?php bp_the_profile_group_field_ids(); ?>" />
    
    					<?php endwhile; endif; endif; ?>
    
    					<?php do_action( 'bp_signup_profile_fields' ); ?>
    
    				</div><!-- #profile-details-section -->
    
    				<?php do_action( 'bp_after_signup_profile_fields' ); ?>
    
    			<?php endif; ?>
    
    			<?php if ( bp_get_blog_signup_allowed() ) : ?>
    
    				<?php do_action( 'bp_before_blog_details_fields' ); ?>
    
    				<?php /***** Blog Creation Details ******/ ?>
    
    				<div class="register-section" id="blog-details-section">
    
    					<h4><?php _e( 'Blog Details', 'buddypress' ); ?></h4>
    
    					<p><input type="checkbox" name="signup_with_blog" id="signup_with_blog" value="1"<?php if ( (int) bp_get_signup_with_blog_value() ) : ?> checked="checked"<?php endif; ?> /> <?php _e( 'Yes, I\'d like to create a new site', 'buddypress' ); ?></p>
    
    					<div id="blog-details"<?php if ( (int) bp_get_signup_with_blog_value() ) : ?>class="show"<?php endif; ?>>
    
    						<label for="signup_blog_url"><?php _e( 'Blog URL', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label>
    						<?php do_action( 'bp_signup_blog_url_errors' ); ?>
    
    						<?php if ( is_subdomain_install() ) : ?>
    							http:// <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value(); ?>" /> .<?php bp_blogs_subdomain_base(); ?>
    						<?php else : ?>
    							<?php echo home_url( '/' ); ?> <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value(); ?>" />
    						<?php endif; ?>
    
    						<label for="signup_blog_title"><?php _e( 'Site Title', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label>
    						<?php do_action( 'bp_signup_blog_title_errors' ); ?>
    						<input type="text" name="signup_blog_title" id="signup_blog_title" value="<?php bp_signup_blog_title_value(); ?>" />
    
    						<span class="label"><?php _e( 'I would like my site to appear in search engines, and in public listings around this network.', 'buddypress' ); ?>:</span>
    						<?php do_action( 'bp_signup_blog_privacy_errors' ); ?>
    
    						<label><input type="radio" name="signup_blog_privacy" id="signup_blog_privacy_public" value="public"<?php if ( 'public' == bp_get_signup_blog_privacy_value() || !bp_get_signup_blog_privacy_value() ) : ?> checked="checked"<?php endif; ?> /> <?php _e( 'Yes', 'buddypress' ); ?></label>
    						<label><input type="radio" name="signup_blog_privacy" id="signup_blog_privacy_private" value="private"<?php if ( 'private' == bp_get_signup_blog_privacy_value() ) : ?> checked="checked"<?php endif; ?> /> <?php _e( 'No', 'buddypress' ); ?></label>
    
    						<?php do_action( 'bp_blog_details_fields' ); ?>
    
    					</div>
    
    				</div><!-- #blog-details-section -->
    
    				<?php do_action( 'bp_after_blog_details_fields' ); ?>
    
    			<?php endif; ?>
    
    			<?php do_action( 'bp_before_registration_submit_buttons' ); ?>
    
    			<div class="submit">
    				<input type="submit" name="signup_submit" id="signup_submit" value="<?php esc_attr_e( 'Complete Sign Up', 'buddypress' ); ?>" />
    			</div>
    
    			<?php do_action( 'bp_after_registration_submit_buttons' ); ?>
    
    			<?php wp_nonce_field( 'bp_new_signup' ); ?>
    
    		<?php endif; // request-details signup step ?>
    
    		<?php if ( 'completed-confirmation' == bp_get_current_signup_step() ) : ?>
    
    			<?php do_action( 'template_notices' ); ?>
    			<?php do_action( 'bp_before_registration_confirmed' ); ?>
    
    			<?php if ( bp_registration_needs_activation() ) : ?>
    				<p><?php _e( 'You have successfully created your account! To begin using this site you will need to activate your account via the email we have just sent to your address.', 'buddypress' ); ?></p>
    			<?php else : ?>
    				<p><?php _e( 'You have successfully created your account! Please log in using the username and password you have just created.', 'buddypress' ); ?></p>
    			<?php endif; ?>
    
    			<?php do_action( 'bp_after_registration_confirmed' ); ?>
    
    		<?php endif; // completed-confirmation signup step ?>
    
    		<?php do_action( 'bp_custom_signup_steps' ); ?>
    
    		</form>
    
    	</div>
    
    	<?php do_action( 'bp_after_register_page' ); ?>
    
    </div><!-- #buddypress -->
    
    #188354
    Henry Wright
    Moderator

    bp_notifications_add_notification() is used to add a notification. For example:

    if ( bp_is_active( 'notifications' ) ) {
        bp_notifications_add_notification( array(
            'user_id'           => $user_id,
            'item_id'           => $item_id,
            'secondary_item_id' => $secondary_item_id,
            'component_name'    => $component_name,
            'component_action'  => $component_action,
            'date_notified'     => bp_core_current_time(),
            'is_new'            => 1,
        ) );
    }

    See here for more info: https://codex.buddypress.org/developer/function-examples/bp_notifications_add_notification/

    victord34
    Participant

    hello (im french),

    even if the plugin would be paying I take..

    i would like to make a drop down notification in wp-adminbar with numb (like buddypress.org)

    but I’d like to change notifications. exemple : (new page ‘cherry’ was created; page ‘chocolat’ was edit) only PAGES not articles or comment.

    its for a intranet, I want the user to be aware of new pages upload.

    i think @bphelp was talking of this subject in other topic.

    #188351
    danbp
    Participant

    Hi @hardeepasrani,

    xProfile field manipulation is a such common question on this forum. 🙄 Did you searched before asking ?

    But codex first !

    Creating a Plugin


    other reference

    Here a topic where you can find how this works and can be done.
    https://buddypress.org/support/topic/how-to-add-fields-from-xprofile-fields-groups-created-by-me/

    danbp
    Participant

    Hi @jencina,

    set the registration page as homepage. (dashboard > Setting > Front page view).

    Make also a child theme and add a copy of the register.php file who is in /bp-templates/bp-legacy/buddypress/members/ and add it to your child, using the same path.

    /your-theme/buddypress/members/register.php

    On this copy you can add/remove and make any change you want for your new homepage.

    Reference
    https://codex.wordpress.org/Creating_a_Static_Front_Page

    Modifying the Registration Form

    #188349
    danbp
    Participant

    Hi @bnowthen,

    this is one of the most common thing you can do with BuddyPress. 😉 .
    To do that, you have to read the Codex, about members loop.

    First, you will create a child-theme of 2014.
    Than you add a folder called buddypress to it.
    In this folder, you add a sub folder called members.
    You than make a copy of members-loop.php.
    This file is in wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/

    Now, you open the copied file and replace the content of line 16.

    Replace this:
    <?php if ( bp_has_members( bp_ajax_querystring( 'members' ) ) ) : ?>
    with this:
    <?php if ( bp_has_members( bp_ajax_querystring( 'members' ) . '&type=alphabetical' ) ) : ?>

    Save and enjoy.

    References
    https://codex.wordpress.org/Child_Themes

    Members Loop

    Bruce
    Participant

    I want to make the members list page default to an alphabetical sort.
    I’ve searched through BuddyPress forums and tried a couple things suggested in the past, but they didn’t work.
    I’m using BuddyPress Version 2.0.2 in WordPress 2014 theme.
    I don’t know much php, so if you have the answer, I need to be told where exactly to insert or edit any code.

    Would greatly appreciate any help.

    Bruce

    #188337

    In reply to: Hide user email

    bitpath
    Participant

    I’ve seen friends sections shows email addresses, but that may have been in a messaging plugin.
    Are there any buddypress core messaging or find friend sections that bring up and search on email addresses, or are those all plugins? It sounds like where I saw it was a plugin but just making sure then.
    Thank you!

    r-a-y
    Keymaster

    What BuddyPress plugins are both of you using?

    #188334
    ichigo_roukia
    Participant

    Hi All,
    I wonder if there is a way to make customized user filed in buddypress users’ profiles depending on a specific type of the user or its role. All I can find now is a one-type registraton fields for all users. However, for my website (which integrates buddypress) i have different profiles, so i need to find a way to show customized registration fields depeding on the profile user ?! thank you.

    #188326

    In reply to: not recently active

    danbp
    Participant

    Hi @bea107,

    some explanation on how to do this, beside reading the codex.

    The original core function we want to modify:

    /**
     * Format last activity string based on time since date given.
     *
     * @uses bp_core_time_since() This function will return an English
     *       representation of the time elapsed.
     *
     * @param int|string $last_activity_date The date of last activity.
     * @param string $string A sprintf()-able statement of the form '% ago'.
     * @return string $last_active A string of the form '3 years ago'.
     */
    function bp_core_get_last_activity( $last_activity_date, $string ) {
    
    	if ( empty( $last_activity_date ) )
    		$last_active = __( 'Not recently active', 'buddypress' );
    	else
    		$last_active = sprintf( $string, bp_core_time_since( $last_activity_date ) );
    
    	return apply_filters( 'bp_core_get_last_activity', $last_active, $last_activity_date, $string );
    }

    To alter it, we have to create a little function. Here’s the custom function which removes the message string:

    function bea107_core_get_last_activity( $last_activity_date, $string ) {
    		if ( empty( $last_activity_date ) )
    				// we do nothing
    				$last_active = '';
    			else
    				$last_active = sprintf( $string, bp_core_time_since( $last_activity_date ) );
    		}
    add_filter( 'bp_core_get_last_activity', 'bea107_core_get_last_activity' );
    

    If you want to remove the whole filter, you use this

    function bea107_remove_last_activity_filter() {
        remove_filter( 'bp_core_get_last_activity', $last_active, $last_activity_date, $string );
    }
    add_filter( 'bp_core_get_last_activity', 'bea107_remove_last_activity_filter' );

    Both function can be added to your child-theme’s functions.php or bp-custom.php

    #188325

    In reply to: not recently active

    Henry Wright
    Moderator

    Hi @bea107

    Check out the Template Hierarchy article which will let you customise the BuddyPress templates.

    Bajdh
    Participant

    Hi,

    Again thanks for your quick reply.
    Yes, I used the snippet ‘as is’, and then tried to use the field name instead of the ID.
    Field name obviously didn’t work, although you could use it too, according to this page:
    https://codex.buddypress.org/getting-started/guides/displaying-extended-profile-fields-on-member-profiles/

    But I found the profile field ID, and now it works!

    Thank you so much :D.

    (Yes, KLEO has premium support. But they are very, very slow. I opened a few tickets 1-2 weeks ago, still no replies. Found the answer in the meantime though 😛 ).

    danbp
    Participant

    I use the KLEO theme (BuddyPress is integrated), could it be because of that?
    Normally, no.

    But as you use a premium theme, don’t except much help here. You also payed for support. If the snippet doesn’t work for you ( i tested it successfully with Twentythirteen before publishing), you have to get in contact with the theme author or read his doc about customization (if exist).

    To get the field ID, see it from where the field is created, in xprofile admin. If you hover the delete button, you can see it at the bottom left corner of your browser.

    You can also go into the DB and check for it in the bp_xprofile_fields table.

    NOTE:
    When you get a snippet, the first thing to do is to use it “as is” to test it – this means also “understanding how it works”, not to apply what you think is better. 🙄

    And only when the test is ok, you can modify it or try to do so. 😉

    Bajdh
    Participant

    Hey,

    Thank you for your quick reply! 🙂

    I added the code to my theme’s functions.php, and replaced ’54’ with the name of the field (I can’t find the ID number anywhere), but that specific field still shows up in profiles/edit fields.

    I use the KLEO theme (BuddyPress is integrated), could it be because of that?
    Or is there a different way to find the field’s ID number? 🙂

    I really appreciate your help, I didn’t expect such a fast and detailed reply! 😀

    #188319
    Bea107
    Participant

    Hello

    On members profile its says ‘not recently active’ I want to remove this line of information, how do I do this?

    Wordpress 3.9.2
    Twenty Eleven Theme with Buddypress

    Thanks

    danbp
    Participant

    Hi @ww2boy,

    Yes ! 😉 Give this a try. Add it to child theme’s functions.php or bp-custom.php

    function bpfr_hide_profile_edit( $retval ) {	
    	// remove field from edit tab
    	if(  bp_is_profile_edit() ) {		
    		$retval['exclude_fields'] = '54'; // ID's separated by comma
    	}	
    	// allow field on registration page     
    	if ( bp_is_register_page() ) {
    		$retval['include_fields'] = '54'; // ID's separated by comma
    		}		
    	
    	// hide the filed on profile view tab
    	if ( $data = bp_get_profile_field_data( 'field=54' ) ) : 
    		$retval['exclude_fields'] = '54'; // ID's separated by comma	
    	endif;	
    	
    	return $retval;	
    }
    add_filter( 'bp_after_has_profile_parse_args', 'bpfr_hide_profile_edit' );

    Codex reference:
    https://codex.buddypress.org/plugindev/using-bp_parse_args-to-filter-buddypress-template-loops/

    #188307
    nickpeplow
    Participant

    Thanks to Dan & Shane for both taking a look into my issue! You have both been unexpectedly detailed in your response and its much appreciated

    I think for now, my best option would be to continue with the content being shown on the Display() tab, but with it hidden to those who are not admins (purpose was to allow admins to submit jobs, in the admin backend)

    The reason I’m a bit hesitant to display another page is because its one more thing for me to track, exclude from search etc, plus as it would be outside of the buddypress loop I would not be able to easily include any of the $bp values if required in future (e.g. group name).

    shanebp
    Moderator

    This isn’t a BuddyPress question, but…

    WPEngine is a very accomplished hosting company.

    I can’t imagine that they haven’t had customers that migrated from a godaddy WP installation.

    Have you posed this question to WPEngine?

    Hope your migration goes fairly smoothly.
    When you get BuddyPress installed, we await any questions you may have.

    #188288
    r-a-y
    Keymaster

    Based on this thread, I’ve created a new ticket:
    https://buddypress.trac.wordpress.org/ticket/5831

Viewing 25 results - 24,026 through 24,050 (of 94,546 total)
Skip to toolbar