Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 25 replies - 1 through 25 (of 947 total)
  • Avatar of shanebp
    shanebp
    Moderator

    @shanebp

    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.

    Avatar of shanebp
    shanebp
    Moderator

    @shanebp

    Interesting thread.
    This would be my approach:

    function bpfr_add_page_to_group() {
    	
    	if ( class_exists( 'BP_Group_Extension' ) ) :
    		  
    		class Bongo_Group_Extension extends BP_Group_Extension {
    		 
    		    function __construct() {
    		        $args = array(  
    		  	    'slug'              => 'bongo',
    			    'parent_slug'       => 'admin', 
    		            'nav_item_position' => 100,
    		
    		            'screens' => array(
    		                'edit' => array(
    		                    'name' => 'Bongo', // the tab name                 
    		                ),
    		            ),
    		        );
    		        parent::init( $args );
    		    }
    		 
    		
    		    function settings_screen( $group_id = NULL ) {
    				// don't remove this function
                                    //  = NULL is necessary to avoid Strict Standards warning
    		    }  
    		} // end of class
    
    		bp_register_group_extension( 'Bongo_Group_Extension' );
     
    	endif;
    }
    add_filter('bp_groups_default_extension', 'bpfr_add_page_to_group' );

    Then, to avoid loading the form, create a template overload of
    \buddypress\bp-templates\bp-legacy\buddypress\groups\single\admin.php

    And add a conditional check of the action_variable.
    Just before the form tag, add:

    <?php 
    global $bp; 
    if( $bp->action_variables[0] != 'bongo' ) :
    ?>

    Right after the form close tag, add:

    <?php else :
    	echo 'this is the bongo page'; 
    endif;
    ?>

    Awkward, but seems to work.
    The Group_Extension_API does need some work re making it easier to add tabs and tab counts.
    I think the core devs are aware of this, but perhaps an enhancement ticket is in order?

    @danbp
    >The 1st function let you add custom content on the tab.
    afaik – that function adds the content on every page under ‘Admin’.

    Avatar of shanebp
    shanebp
    Moderator

    @shanebp

    You’ll have a better chance of getting an answer if you use the support forum for that plugin:

    https://wordpress.org/support/plugin/buddypress-links

    Avatar of shanebp
    shanebp
    Moderator

    @shanebp

    > it seems as complicated as re-writing the bp_get_activities

    It’s not even close to being that complicated.

    This examples are re members, but should give you an idea of the general approach to a custom process:

    http://codex.buddypress.org/developer/loops-reference/the-members-loop/#code-examples

    http://codex.buddypress.org/developer/bp_user_query/#code-examples

    Avatar of shanebp
    shanebp
    Moderator

    @shanebp

    If I was doing this, I would write a custom function(s) to gather the activity ids.
    And that function would most likely contain one or more custom db queries.

    If you are unable to write such queries, you may want to consider hiring a developer.

    Avatar of shanebp
    shanebp
    Moderator

    @shanebp

    No.
    Create the activity ids string in a separate custom process – not bp_has_activities.
    Then pass the string into bp_has_activities via the include parameter.

    Avatar of shanebp
    shanebp
    Moderator

    @shanebp

    Your avatars are the correct size.
    Your theme is stretching the avatars.
    Look at your theme css re item-header and item-header-avatar

    Avatar of shanebp
    shanebp
    Moderator

    @shanebp

    No, do not use user_ids as a filter.

    Use ‘include’ as the filter – ONCE – after you gather the activity ids in a separate process.

    Avatar of shanebp
    shanebp
    Moderator

    @shanebp

    Try using the ‘include’ parameter.

    Gather user_ids for bp_loggedin_user_id() + friend ids.
    Use those ids to get activity ids.

    Then gather activity ids for groups you belong to.

    Kick out dupes and pass them in via ‘include’ with scope=false.

    Awkward?
    Yes, but much less so than ‘remove everything but group posts by group member id’s that are not your friends.’

    Avatar of shanebp
    shanebp
    Moderator

    @shanebp

    >However, it doesn’t show activity from your groups that have members which are not your friends

    >Again, bp_loggedin_user_id() + ids of their friends.

    Of course, this will only show friends.

    If you want friends & group members, then collect
    bp_loggedin_user_id() + group member ids + friend ids,
    kick out dupes and pass in a csv string of the ids.

    Avatar of shanebp
    shanebp
    Moderator

    @shanebp

    Nice.

    fwiw… The ‘wp’ approach would be to get rid of the global and use:

    $ids = get_users( array( 'fields' => array( 'ID' ) ) );

    and access via: $id->ID

    Avatar of shanebp
    shanebp
    Moderator

    @shanebp

    Then in your custom handler, adapt the code in bp_blogs_record_comment or write your own using bp_activity_add

    http://codex.buddypress.org/developer/function-examples/bp_activity_add/

    Avatar of shanebp
    shanebp
    Moderator

    @shanebp

    Yes, sorry, I misread and have adjusted my comment.
    I’ve provided a suggestion re a filter hook.

    Avatar of shanebp
    shanebp
    Moderator

    @shanebp

    Please use pastebin or gist to share large code blocks.

    You could always use the filter hook to set $is_blog_public to false and then remove the filter ( add_filter, remove_filter ), as part of your custom comment handling.
    $is_blog_public = apply_filters( 'bp_is_blog_public', (int)get_blog_option( $blog_id, 'blog_public' ) );

    Avatar of shanebp
    shanebp
    Moderator

    @shanebp

    It can be difficult to track that one down.

    But it’s probably ok as is – it’s just a warning, not an error.

    For more info:
    Use var_dump(debug_backtrace()); to see how things were loaded.
    Then comb thru the dump to see which plugin is generating the notice.

    Avatar of shanebp
    shanebp
    Moderator

    @shanebp

    I don’t believe this is a BP issue.
    On a test installation, I can create a post with a member’s name in the slug – and links to that member’s profile work as expected.

    The urls are correct:

    http://www.indiachinainstitute.org/members/lo-sze-ping

    The fact that they are being intercepted is, I suspect, due to some theme code or plugin code.
    I would start with a review of the code that handles ‘ai1ec_event’.

    Avatar of shanebp
    shanebp
    Moderator

    @shanebp

    BuddyPress uses the bbPress plugin for forums.
    So you’re better off asking the question on http://bbpress.org/forums/

    What you want may be possible, to start, see:

    http://bbpress.org/forums/topic/allowing-inline-images-uploads-in-posts/

    http://wordpress.org/plugins/gd-bbpress-attachments/

    Avatar of shanebp
    shanebp
    Moderator

    @shanebp

    At the moment, a custom query to gather matching ids and then pass them into BP_User_Query is the only way to be precise.

    That’s easy to do, as you’ve seen on the codex page (thanks for the edit).

    It would make sense to add xprofile key / value parmeters.
    Perhaps you could create an enhancement ticket?

    Avatar of shanebp
    shanebp
    Moderator

    @shanebp

    Did you try it or are you guessing ?

    This works for me:
    if ( bp_has_activities( bp_ajax_querystring( 'activity' ) . '&user_id=1,2&scope=false') )

    logged in user id = 1
    Members 1 & 2 are friends.
    They both belong to groups – but not the same groups.

    The result shows activity for both members, including group activity.

    Again, bp_loggedin_user_id() + ids of their friends.

    Avatar of shanebp
    shanebp
    Moderator

    @shanebp

    Why wouldn’t it?
    I’m suggesting ways to get around the current limitations of ‘scope’.
    Set scope=false and then try either or both of my untested suggestions.

    Avatar of shanebp
    shanebp
    Moderator

    @shanebp

    ‘include’ is for activity ids.
    So you’d gather user_ids and use them to gather activity ids.
    And then only pass in the activity ids via ‘include’.

    In both cases I suggest, scope needs to be ‘false’.

    Examine the function bp_has_activities to get better understanding of the parameter possibilities.

    Avatar of shanebp
    shanebp
    Moderator

    @shanebp

    try:
    href="<?php echo bp_loggedin_user_domain() ?>wall/"

    Avatar of shanebp
    shanebp
    Moderator

    @shanebp

    I haven’t tried combining scopes.

    You could try my suggestion re user_ids and set scope=false.

    You could try gathering all the user_ids and then use them to gather all the activity ids and then pass them as a csv string to ‘include’ and set scope=false.

    You could test either idea quickly by just using the logged in user id.

    If you try, I’d be interested in hearing about any result.

    Avatar of shanebp
    shanebp
    Moderator

    @shanebp

    Awkward, but you could gather all the ids of the members whose activities should be displayed.
    So, bp_loggedin_user_id() + ids of their friends.
    Then pass the ids in an array to the ‘$user_id’ parameter of bp_has_activities.

    Avatar of shanebp
    shanebp
    Moderator

    @shanebp

    You’re looking at a symptom, not the problem.
    If users are marked as spammers, then activity comments will be marked as spam.
    So that part is working properly.

    The real question is, why are users being marked as spammers?

    To show comments regardless of spam flag, try this in the activity-loop.php template:
    if ( bp_has_activities( bp_ajax_querystring( 'activity' ) . '&spam=false' ) ) :

Viewing 25 replies - 1 through 25 (of 947 total)