Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 25 replies - 2,201 through 2,225 (of 3,787 total)
  • @danbp

    Participant

    No worry. It’s just difficult to follow when a huge amount of snippets must be read to understand what each one does.

    I answered also to your other topic. Happy testing !

    @danbp

    Participant

    This question is related to bbPress.
    See bbp_title filter in wp-content/plugins/bbpress/includes/common/template.php:2519
    Similar technique is used by BuddyPress.
    See function bp_modify_page_title in bp-core-filsters.php:514

    Here a usage example to uppercase BP titles.

    function bpfr_profiles_wp_title( $title ='', $sep = '', $seplocation = '' ) {
    	if( bp_get_displayed_user_fullname() ) {
    	$bp = buddypress();
    	
    	// Get the component's ID to try and get it's name
    	$component_id = $component_name = bp_current_component();
    	
    	// Use the actual component name
    	if ( !empty( $bp->{$component_id}->name ) ) {
    	$component_name = $bp->{$component_id}->name;
    	
    	// Fall back on the component ID (probably same as current_component)
    } elseif ( !empty( $bp->{$component_id}->id ) ) {
    	$component_name = $bp->{$component_id}->id;
    	}
    	
    	$title = str_replace( ucwords( $component_name ), '', $title );
    	}  
    	return $title;
    	}
    add_filter( 'bp_modify_page_title', 'bpfr_profiles_wp_title', 20, 3 );
    In reply to: Where are loops put?

    @danbp

    Participant

    Loops are in templates.

    See bp-templates/bp-legacy/buddypress/

    And read carefully template hierarchy to understand how all this is working together.

    @danbp

    Participant

    OMG !
    @urbanfix, you have warnings due to wrong geodirectory usage. Repair it !
    @mcuk please don’t hijack. Open your own topic as you’re not looking on exactly for the same thing.

    Try from this usage example.

    This code builds a tab, fetch an activity type content (here author post) and show it on a template part.

    function bpfr_post_profile_setup_nav() {
    	global $bp;
    	$parent_slug = 'extraposts';
    	$child_slug = 'posts_sub';	
    	
    	bp_core_new_nav_item( array(
    	'name' => __( 'Extra Posts' ),
    	'slug' => $parent_slug,
    	'screen_function' => 'bpfr_profile_post_screen',
    	'position' => 40,
    	'default_subnav_slug' => $child_slug 
    	) );
    	
    	//Add subnav item 	 
    	bp_core_new_subnav_item( array( 
    	'name' => __( 'Latest extras' ), 
    	'slug' => $child_slug, 
    	'parent_url' => $bp->loggedin_user->domain . $parent_slug.'/', 
    	'parent_slug' => $parent_slug, 
    	'screen_function' => 'bpfr_profile_post_screen'
    	) );
    }
    
    	function bpfr_profile_post_screen() {	
    		add_action( 'bp_template_content', 'bpfr_profile_post_screen_content' );
    		bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );
    	}
    
    	function bpfr_profile_post_screen_content() {
    		do_action( my_profile_post);
    	}
    
    add_action( 'bp_setup_nav', 'bpfr_post_profile_setup_nav' );
    
    function bpfr_get_stuff() {
    
       $activity_id = bp_activity_get_activity_id( array(
        'user_id' => $post->post_author,
        'type' => 'new_blog_post', // the activity type you want to show. See in activity table
        'component' => 'blogs',
        'item_id' => 1,
        'secondary_item_id' => $post->ID
       ) );
    	
    	if ( ! $activity_id ) {
    		return '';
    	}
    // this is the activity loop, with some options.
    	if ( bp_has_activities( $activity_id . '&action=activity_update&max=5' )  ) :
    		while ( bp_activities() ) : bp_the_activity();
    
    			bp_get_template_part( 'activity/entry');
    
    		endwhile;
    	endif;
    }
    
    add_action ( 'my_profile_post', 'bpfr_get_stuff' ); 

    Note that this is only an example and most probably the best way to do it.

    There is a little plugin which will be more handy eventually, which allows you to use shortcodes to get activities.

    If you add to plugin’s generate_activity_stream function these two lines

    $temp_post = get_post($post_id);
    $user_id = $temp_post->post_author;

    and change user_id in filtering to 'user_id' => $user_id, you’re able to get about anything for the given author, directly on the post page.

    May this help !

    @danbp

    Participant

    hi @urbanfix,

    please use the code button if you insert code or use an external service like pastebin or github and post the link to the snippet…

    What do you exactly try to built ?
    You first asked about page author’s activity, and now you want to create a tab.

    In reply to: Profile Page

    @danbp

    Participant

    Hi Christina @polkadotheart,

    have you tested with one of WP’s default theme ? If nothing change with theme, try to:

    – play with the display position, website before website name for example (use drag’n’drop in admin interface).

    – change the field visibility. Both website fields are required. Use same setting as for Location.

    So far, no other idea.

    In reply to: activity

    @danbp

    Participant

    Hi,

    to show only notices (aka updates) on the SWA, try this snippet (place in bp-custom.php)

    function make_swa_show_notice_only( $retval ) {	
    	
    	if ( bp_is_page( 'activity' ) ) {
    	$retval['action'] = 'activity_update';					
    	}
    	
    	return $retval;
    	
    	}
    add_filter( 'bp_after_has_activities_parse_args', 'make_swa_show_notice_only' );

    Reference: https://codex.buddypress.org/developer/using-bp_parse_args-to-filter-buddypress-template-loops/

    @danbp

    Participant

    Hi @spanda,

    it’s a bbpress bug who remains since BP 2.0.
    A patch was provided 7 mounth ago but not applied in latest bbP (2.5.6).

    Note that the patch contains a bracket error: ( component ) ) { ). Remove { !

    Open wp-content/plugins/bbpress/includes/extend/buddypress/activity.php

    Remove or comment line 279 & 280 and replace by

    $existing = new BP_Activity_Activity( $activity_id ); 
     		if ( empty( $existing->component ) )

    save and you’re done.

    @danbp

    Participant

    hi @dani-girl,

    intersting question, but thought you’re wrong about Directive 95/46/CE. You have a too strict opinion ! If it would be real, nobody in Europe couldn’t use WordPress and probably also many other CMS’s.
    Which is the EU country you are off ?

    An e-mail is a personnal data and the directive applies. But…

    WordPress need it (username, email and password) to work on registering. That is a legitimate and technical reason, which is allowed.

    You don’t collect it illegaly, or by roundabout and the user has access to it any time. Emails never appear publicly on WP and are used for internal purpose only.

    Opt-in is mandatory since 2002 in Europe. This means you have to prevent/ask the user before he sign in.
    If you clearly write and expose publicly (and easy to access) your policy, explain why you ask the mail, that you freely remove any user data on demand for example, you can ask for an email. This is also valuable for cookies. You should inform the user that you use them… Resaling and forwarding emails for commercial purpose is of course forbidden, but only IF your site has no direct reason to do that. (e-commerce is not a direct reason 😉 )

    On the other side, as site owner, you can’t use your members email for advertisement or any other mailing action without their agreement. Or you will be considered as spammer. Which is also illegal in EU.

    http://www.cnil.fr/english/data-protection/official-texts/

    @danbp

    Participant

    Thought that such a tutorial doesn’t exist.

    Best place to get some in-depth technical information, is to search for AJAX on the Trac.

    @danbp

    Participant

    You have to rule out theme and plugins.

    Activate Twenty Fifteen and BP only and see if the issue remains. If it’s ok, reactivate your plugins one by one, until you isolate the culprit.
    Finally reactivate the theme, and if error is back, you know it’s your theme who give you trouble.

    @danbp

    Participant

    @leanneoleary,

    BuddyPress doesn’t handle the Media Library.
    BuddyPress doesn’t handle registration.

    It’s a bad practice to allow users to upload something to your site until they’re not fully registered. When a user register, WP considers this new account as pending. As long as the user hasn’t activate his account with the activation key, he can only visit the site.

    As you installed BuddyPress, i suggest you use your site à la BuddyPress.
    If you want your members be able to upload files, use BuddyDrive. Each user can upload files from within his profile page and can share them on different levels (public, private, friends only). And much better as the Media Library default behave, each document belong to his user. BuddyDrive attributes a folder to each user who upload a document.

    This is much simplier, well integrated and efficient in a members community as strugling with custom code (and potential errors and security issues).

    @danbp

    Participant

    Hi,

    Config
    ——

    are you on a single or MS install ?
    Your php version is 5.2.17.
    Even if this version is still acceptable for a basic WP blog, i would recommend you use at least 5.3 or better, 5.4 You have many plugins, and working with a too old php is not recommended.

    Plugins
    ——–

    BuddyPress Toolbar is outdated and no more necessary, as Toolbar was slightly modified since WP 3.9 and BP 1.5

    BP Group Organizer is over 2 years too and group admin is anyway fully integrated to BP since 1.7

    About theme
    ———–
    You’re using a premium theme and we can’t assist you for this, as we have no free access to his code.

    BuddyPress Groups component is tailored for grouping members. You can show group members activities, but it’s not intended to categorize posts like you can do it on the blog.

    In other words, a group belongs to members, not to a blog category. So far by default. To get such a behave you have to code it yourself or you can use this plugin.

    In reply to: Warning of Buddypress

    @danbp

    Participant

    @rohi222,

    How looks the register link on Toolbar ?
    Have you tested with another theme ? Try with 2015 or 14 theme

    @danbp

    Participant

    You’re welcome. Glad you got it finally.

    @danbp

    Participant

    As said previously, it’s a theme conflict with bbPress. If you use a custom group template in a child-theme, try to deactivate it.

    A solution to this will be in bbPress 2.6.

    Read here please:
    https://bbpress.trac.wordpress.org/ticket/2718

    And deactivate debug mode on your live site, so notices & warning won’t be public.

    @danbp

    Participant

    You have to use the language file to change BP wordings.

    You said you had no result with buddypress.pot. That’s normal, as this file is not the language file, but only the catalog which contains all strings you could translate or modify to your need.

    Read here how to do this correctly

    Customizing Labels, Messages, and URLs

    @danbp

    Participant

    @danbp

    Participant

    For all non logged in users.

    – klosurdo is the function name.
    – if is the statement
    – is_user_logged_in is the condition
    – ! means “not” in php

    http://www.w3schools.com/php/default.asp

    @danbp

    Participant

    Glad you got it !

    @danbp

    Participant

    If you now use a single install, it would better you remove any constant related to MS from wp-config.

    All given define noticed above may be removed.
    You have also a different htaccess when MS or single WP is running.

    Is issue on a local install or live ?

    @danbp

    Participant

    You’re welcome. Merci for the star !

    @danbp

    Participant

    @shanebp, do we have another OMG Pizza bug here ?
    https://buddypress.org/support/topic/warning-of-buddypress/

    @djpaul, @imath, @hnla opinion welcome !

    @danbp

    Participant

    You said first:
    I would like to create a page for user registration and another page for editing the profile with more options.

    This is a resume of how BP already works.
    The registration page can be extended (BP xprofile component) and user can fill out these additionnal fields from within their profile page.

    Please take a look on Codex, before reinventing the wheel.

    Configure BuddyPress

    User Extended Profiles

    In reply to: Warning of Buddypress

    @danbp

    Participant

    seems to be related to this:
    https://buddypress.trac.wordpress.org/ticket/6226

    @nyroka,
    please read above link given by @shanebp

Viewing 25 replies - 2,201 through 2,225 (of 3,787 total)
Skip to toolbar