Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'buddypress'

Viewing 25 results - 11,576 through 11,600 (of 69,016 total)
  • Author
    Search Results
  • #246507
    danbp
    Participant

    @gurusurfer,

    this need a template overload.

    Make first a child-theme.
    Copy notifications-loop.php from bp-templates/bp-legacy/buddypress/members/single/notifications/ to
    /child-theme/buddypress/members/single/notifications/notifications-loop.php

    At the begin of the file (line 1) copy/paste <?php bp_get_template_part( 'activity/post-form' ); ?>. Don’t remove php tags.

    Save. You’re done.

    #246506
    danbp
    Participant

    Please don’t double post. Topic closed.
    Conversation continue here:
    https://buddypress.org/support/topic/adding-whats-new-form-to-the-mentions-template/

    #246505
    vysakhnair
    Participant

    <select id=”activity-filter-by”>
    <option value=”-1″><?php _e( ‘— Everything —’, ‘buddypress’ ); ?></option>

    <?php bp_activity_show_filters(); ?>

    <?php do_action( ‘bp_activity_filter_options’ ); ?>

    </select>


    @venutius
    this is the code in that page I directly removed the Everything which is coming as the first option but now i want updates as the first option from where the function bp_activity_show_filters() is getting values from database or any of the files

    #246500
    danbp
    Participant

    Hi @ma3ry,

    unable to visit the indicated page due to redirection… BP’s xProfile text box contains are autolinked by default for the 5 first words.
    This is handy when you use a field called city for example. The city name is autolinked and let each user click on it to find other who may entered the same name.

    Of course, an about me box with a long description, which several autolinked words has less interrest. Fortunately, you can deactivate xprofile autolinking.
    Two options for this: all or selected.

    Here 3 snippets. The first can be used if you want to completely remove autolink from all field values.
    The second is a new filter to let you choose the field(s) you want to deactivate. This need two snippet. The first to rewrite a filter and the second to remove / replace the existing BP filter.

    Add the snippet to bp-custom.php.

    // remove any autolink from profile
    function remove_xprofile_links() {
    remove_filter( 'bp_get_the_profile_field_value', 'xprofile_filter_link_profile_data', 9, 2 );
    }
    add_action( 'bp_init', 'remove_xprofile_links' ); 
    
    // custom filter to selectively remove autolink
    function my_xprofile_filter_link_profile_data( $field_value, $field_type = 'textbox' ) {
    
        // Access the field you are going to display value.
        global $field;
    
        // In this array you write the ids (separated by comma) of the fields you want to hide the link.
        $excluded_field_ids = array(2);
    
        // If the id of this $field is in the array, we return the value only and not the link.
        if (in_array($field->id, $excluded_field_ids))
    	return $field_value;
    	
    	if ( 'datebox' == $field_type )
    	return $field_value;
    	
    	if ( !strpos( $field_value, ',' ) && ( count( explode( ' ', $field_value ) ) > 5 ) )
    	return $field_value;
    	
    	$values = explode( ',', $field_value );
    	
    	if ( !empty( $values ) ) {
    		foreach ( (array) $values as $value ) {
    			$value = trim( $value );
    			
    			// If the value is a URL, skip it and just make it clickable.
    			if ( preg_match( '@(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?)@', $value ) ) {
    				$new_values[] = make_clickable( $value );
    				
    				// Is not clickable
    			} else {
    				
    				// More than 5 spaces
    				if ( count( explode( ' ', $value ) ) > 5 ) {
    					$new_values[] = $value;
    					
    					// Less than 5 spaces
    				} else {
    					$search_url   = add_query_arg( array( 's' => urlencode( $value ) ), bp_get_members_directory_permalink() );
    					$new_values[] = '<a href="' . $search_url . '" rel="nofollow">' . $value . '</a>';
    				}
    			}
    		}
    		
    		$values = implode( ', ', $new_values );
    	}
    	
    	return $values;
    }
    
    /**
     * We remove the buddypress filter and add our custom filter.
     */
    function remove_xprofile_links() {
        // Remove the old filter.
        remove_filter( 'bp_get_the_profile_field_value', 'xprofile_filter_link_profile_data', 9, 2 );
        // Add your custom filter.
        add_filter( 'bp_get_the_profile_field_value', 'my_xprofile_filter_link_profile_data', 9, 2);
    }
    add_action('bp_setup_globals', 'remove_xprofile_links');
    #246498
    danbp
    Participant
    #246494
    @mercime
    Participant

    There is nothing on the page, where is the shortcode for the register page and activate page?

    There is no shortcode. If you enabled registration after you set up BuddyPress, then follow instructions at https://codex.buddypress.org/getting-started/register-and-activation-pages/
    After you do so, you’d need to log out first in order to “see” the Registration page.

    #246491
    @mercime
    Participant

    For example, I changed the background of the home page to black, the group page also went black.


    @jessicana
    That is the default behavior as BP adds rudimentary styles to the components in BP pages.
    BP injects BP classes in the <body> tag. View > Source or use FF/Chrome inspector and you’ll find numerous classes e.g. in a Group named “The Godfather”, you’ll find the following classes you can use for the single group home page or for the rest of the Groups component pages:
    <body class="single-item groups group-the-godfather group-home home buddypress ... etc.>
    so you can use e.g.

    body.buddypress {
    /* for all BP pages */
    }

    or

    body.groups {
    /* for all groups */
    }

    or

    body.group-home {
    /* for the single group's home page */
    }

    etc.

    #246487
    Henry Wright
    Moderator

    There’s 2 ways of doing this.

    1. You could modify the members-loop template (see the BuddyPress Template Hierarchy for details on how that’s done). See here. You would just add bp_member_profile_data( 'field=the field name here' ); to the template.

    2. Add this to your theme’s functions.php file:

    function add_info_to_members_loop() {
        echo bp_get_member_profile_data( 'field=the field name here' );
    }
    add_action( 'bp_directory_members_item', 'add_info_to_members_loop' );
    #246486
    Henry Wright
    Moderator

    You can’t do that currently. The only way to add an item to the activity stream is with bp_activity_add(). See the bp_activity_add() article for more details.

    #246481
    jtorral
    Participant

    So I partially fixed it but I think I need buddypress input for the following.

    Here is what I did

    I created a custom template from a copy of the page.php in the themes directory. Inside of that template was a call to comments_template(); which I removed from the custom template.

    I then changed the “Members” page to use the new template with a name of “No Comments”

    Now when I load http://jorgetorralba.com/members/ I get the desired affect without the comments and ping backs.

    However, if I go one level deeper and click on a user name such as

    http://jorgetorralba.com/members/cjtorralba/

    The comments reappear. Same on Activity page even after changing activity to use the new custom templates.

    Any idea ???

    #246480
    jtorral
    Participant

    I have an even bigger problem now. Comments wont show for anyone who is logged in after installing “disable comments”, then deleteing the plugin then restoring a db backup from last night. I know its not related to buddypress but I am racking my brains trying to figure out what happened.

    even a find for files modified does not show anything. only logged off users can see comments on post now arg !!!!

    r-a-y
    Keymaster

    Thanks for the report, @kalico.

    I’ve added a ticket for this here:
    https://buddypress.trac.wordpress.org/ticket/6719

    We’ll have a better error message for users for v2.5.0.

    #246470

    In reply to: Activity Stream

    erich199
    Participant

    @dhscratch

    I’m having a similar issue as you with the mentions .js file not loading.

    I also have an issue when I limit the number of items, the load more doesn’t work.

    https://buddypress.org/support/topic/move-activity-stream/

    #246460

    In reply to: Move Activity Stream

    erich199
    Participant

    Ok, I had to hunt for the code in the default buddypress themes but I found it.

    Two things I need to do now:

    1.) Make it so the post form will work on another user’s profile

    2.) Add pagination so the user stream on the profile page doesn’t make someone scroll down a mile to see post.

    #246458
    buckyb
    Participant

    I think I’m close 🙂

    I got the field I want to show up on my custom page, but I can’t figure out how to make it edit and submit the changes to the right group. Here’s what I’m using in my custom editing page:

    <?php do_action( ‘bp_before_profile_edit_content’ );

    if ( bp_has_profile( ‘profile_group_id=’ . bp_get_current_profile_group_id() ) ) :
    while ( bp_profile_groups() ) : bp_the_profile_group(); ?>

    <div>
    <form action=”<?php bp_the_profile_group_edit_form_action(); ?>” method=”post” id=”profile-edit-form” class=”standard-form my-group”>

    <label for=”field_1″>Custom Field</label>
    <input id=”field_1″ type=”text” value=”<?php echo xprofile_get_field_data(‘Custom Field’); ?>” >

    <?php do_action( ‘bp_after_profile_field_content’ ); ?>

    <div class=”submit”>
    <input type=”submit” name=”profile-group-edit-submit” id=”profile-group-edit-submit” value=”<?php _e( ‘Save Changes’, ‘buddypress’ ); ?> ” />
    </div>

    <input type=”hidden” name=”field_ids” id=”field_ids” value=”29,19,20″ />

    <?php wp_nonce_field( ‘bp_xprofile_edit’ ); ?>

    </form>

    </div>
    <?php ?>

    <?php endwhile; ?>

    <?php endif; ?>

    <?php do_action( ‘bp_after_profile_edit_content’ ); ?>

    #246432
    ikanaspencer
    Participant

    Twenty Fifteen Theme and only BuddyPress activated and I still get that message.

    … Disable BuddyPress the error is gone. Custom Taxonomy and Post types were made via the functions.php, as of my testing with the Twenty Fifteen these customizations were not enabled at all. Now I think I did forget to mention this is a multisite setup with only 1 site currently.

    Can you give me some clues of what hooks might have been used? I can do some investigating.

    #246427

    In reply to: Custom Hook Help

    Henry Wright
    Moderator

    Take a look at the source where the hook appears. See here. You should see do_action( 'bp_after_registration_confirmed' );.

    This invokes all functions hooked to bp_after_registration_confirmed. So for example:

    function test() {
        // The code here will be run.
    }
    add_action( 'bp_after_registration_confirmed', 'test' );

    In this particular case, nothing is passed to test(). So to answer your question:

    how do I retrieve registration data from the hook?

    If an argument is supplied to do_action() like this: do_action( 'bp_after_registration_confirmed', $user_id );, then that argument is passed to your custom function. You can receive that argument like this:

    function test( $user_id ) {
        // Do something with $user_id here.
    }
    add_action( 'bp_after_registration_confirmed', 'test' );

    So the short answer is if you want to use $user_id in your custom function, then bp_after_registration_confirmed isn’t the right hook to use, because it comes with no arguments. This isn’t always the case because sometimes you may have request variables available but I won’t get into that.

    Hope this helps!

    #246426
    jessicana
    Participant

    mercime and @hnla I would appreciate any insights from your part as I need to finish my project and buddypress groups page is reading the home page customized styles.

    Thanks

    #246416

    In reply to: Custom Hook Help

    Henry Wright
    Moderator

    Can someone confirm if this code will ever be overwritten by an update to WordPress or BuddyPress?

    Updating WordPress or BuddyPress won’t overwrite anything you have added to your theme, but updating your theme will do. The way around this is to create a Child Theme.

    #246414

    In reply to: Custom Hook Help

    happymunkee
    Participant

    Thanks for your responses. Plugging in the same code into functions.php inside the theme itself seems to resolve the problem. I put the snippet in wp-content/themes/klein/functions.php. Can someone confirm if this code will ever be overwritten by an update to WordPress or BuddyPress? I know updating BP will overwrite the register.php page.

    #246412

    In reply to: Activity Stream

    dhscratch
    Participant

    Thanks @venutius, but I’m really hoping to get a solution that maintains full functionality of buddypress native activity stream page (e.g., ability to @users and toggle between mentions, friends, groups)… really would love to know how to access and edit the html structure of buddypress pages I guess…

    Thanks again!

    #246408
    shanebp
    Moderator

    How are you creating the custom taxonomy pages?

    re: ‘We get this annoying error’ – yes it is annoying.
    It also indicates that something is calling BuddyPress or a WP user function too early in the load process – usually via a hook.
    Unfortunately, many themes and plugins do that and there is no warning – but BP will issue the warning.
    Tracking down the culprit can be difficult.

    That warning notice will not appear if you are only using WP and BP with a standard WP theme like 2015.

    #246401

    In reply to: Front-end Dashboard

    Mrdanielclarke
    Participant

    Hi danbp,

    Apologies, maybe I wasn’t clear initially.
    I have Buddypress and yes my users can already change the profile picture from the front end, as well as upload files, etc.

    On my site, users can update their profile, change their avatar, upload various types of files, etc. as well as post on 2 other pages. I want a front-end dashboard where the user can make all the changes from there, so they don’t have to navigate around the site for different changes.

    Hope that makes more sense.

    Thanks

    #246396

    In reply to: Front-end Dashboard

    danbp
    Participant

    If you use BuddyPress, each user can change/modify his profile picture on frontend !

    Try yoursite/members/username/profile/change-avatar/

    To share files, you have some plugins like BuddyDrive which comes also with a frontend editor.

    #246395
    danbp
    Participant

    BuddyPress Templaters are @mercime and @hnla.

Viewing 25 results - 11,576 through 11,600 (of 69,016 total)
Skip to toolbar