Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'custom activity page'

Viewing 25 results - 351 through 375 (of 1,252 total)
  • Author
    Search Results
  • #244354
    LJagermaster
    Participant

    One of many things that BuddyPress is missing is customisation options (with regards to appearance, theme integration, etc). I’ve put a lot of time and effort into my current theme and it’s being ruined by a big, ugly, grey box on the Activity/homepage. Not being cruel, just honest.

    If the child theme route was an option, i wouldn’t be posting this so please don’t suggest that :-p I’m genuinely surprised this isn’t already available but I’m hoping it will be soon!

    Cheers,

    LJ

    #244072
    djsteveb
    Participant

    For the first time, I think ever, I tried clicking the dropdown to select different activity to show on the site-wide activity page. Tried some of the selections, but they all just made the original everything on the page show (after an ajaxy looking refresh)

    So I wonder if using the parse_Args code to modify the default activity stream things that display is overriding this drop down menu function?

    If so, we need a better way to hide things from the activity stream in the future.

    And I guess we need a way to remove the dropdown menu from showing since it does not work.

    If this parse args code is not affecting the dropdown selection then I guess I have to start deactivating other plugins to see if they are screwing with it.

    my current bp-custom file:

    <?php
    // hacks and mods will go here
    define( 'BP_DEFAULT_COMPONENT', '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' );
    // block activity stream stuff - things to include
    function my_bp_activity_types( $retval ) {
    	// existing BP/bbP activities
    	// remove the one you wont to see from that list
    	$retval['action'] = array( 
    		'activity_comment',
    		'activity_update',
    		'bbp_topic_create',
    		'last_activity',
    		'new_blog_post', 	
    		'new_member',
    		'updated_profile',
    		'rtmedia_update',
    		'bp_doc_created',
    		'new_groupblog_post',
    		'bp_album_picture',
    		'added_group_document',
    		'new_blog_comment',
    		'new_member',
    		'created_group'
    	);	
    
    	return $retval;
    	
    	}
    add_filter( 'bp_after_has_activities_parse_args', 'my_bp_activity_types' );
    // block activyt stream stuff removed friendship_created, new_avatar,bp_doc_edited,activity_liked,
    // deleted_group_document, new_blog, new_forum_post, new_forum_topic, new_status,new_wire_post, joined_group, new_avatar,
    // previously blocked via plugin - deleted_group_document, new_blog, new_member, joined_group, friendship_created, activity_liked
    ?>
    djsteveb
    Participant

    @shubham9
    I have not used this, but I was looking at it yesterday and now thinking about it ->

    Facebook Like User Activity Stream for BuddyPress

    I imagine you could read up on the latest discussions about parse_Args and such and code this yourself.. I have a good imagination though..

    I myself have been considering asking for a way to display both the “profile tab” and the “activity” tab info below that.. with a selectable filter for “Just John Doe” or “John Doe and friends” or something like that.. think that would be cool – and likely not too hard to mashup…

    but I’m still learning php, maybe someone else has an idea on how to make that happen with a simple them functions.php mixin .. I already have a think in bp-custom to make the default profile page show the profile tab instead of the defaults.. so the code is here and there around here I guess.

    #243894
    DevynCJohnson
    Participant

    I shared some ideas and suggestions of mine for BBPress on BBPress’s forum. I would like to do the same here for BuddyPress.

    As I said at BBPress, I am the owner and admin of http://dcjtech.info/ and I love computer programming. Not only do I love programming, but I love to help other developers. I would like to contribute to BuddyPress by offering some suggestions and ideas.

    Please keep in mind that these are just my ideas; I understand that the BuddyPress team has ideas, needs, and concerns of their own that they must address. In addition, even though I learned a lot about the WordPress, BBPress, and BuddyPress framework and inner workings, I admit that there are some parts that I may have over-looked or mis-understood. In summary, I am trying to help make BuddyPress better and more powerful based on what I know, and I want to contribute my ideas as a thanks to all the developers that have spent time and effort making BuddyPress what it is today.

    My ideas –

    1. BuddyPress needs more options and configurable items – the more customizable, the better. Obviously, some developers are concerned about confusing or overwhelming users, so make a special admin page for “advanced” or “miscellaneous” options. Some additional options I think are needed or helpful include disable/enable feeds, disable the activity features while keeping “@” mentions (the activity profile pages attract spam), and fine-tuned settings for various features (like limiting what is shown in the activity streams, limits on messaging and activity stream age and size, etc.).

    2. Export/Import BuddyPress settings – Correct me if I am wrong, but I do not think BBPress has an easy way to export/save settings to be imported to use as a backup or transfer/share settings.

    3. Add a “clear/clean database” option – provide an easy way to selectively perform these various actions. (A) Remove “Manage Sign-up” users (my spam users never get past this, so some sign-ups may be weeks old or more). (B) Remove and delete all “friendships” from the SQL database if “friendships” is disabled (apply a similar feature for private messages and others). (C) Allow the option to delete the SQL tables of disabled BuddyPress modules and re-create them when enabled.

    4. 100% HTML5 Compliant – I have not studied BuddyPress in this perspective or tested anything concerning this idea, so it is possible that I may be very wrong or the developers have a plan already. However, use of HTML5 (or the option to do so) would be helpful.

    Here is an exact copy-paste of idea #12 that I posted on BBPress. I am including it here just in-case this is an idea that should be given to BuddyPress rather than BBPress.

    12. Implement a built-in avatar system (perhaps BuddyPress or WordPress should use this rather than BBPress) – This would allow local avatars and provide a way for Gravatar to be disabled or used as a secondary. True, BuddyPress provides a way to upload avatars, and “Basic User Avatars” and “Simple Local Avatars” are plugins offering that feature. However, after upgrading my theme to HTML5 and removing Flash from my browser, I can no longer upload avatars using any of the three mentioned possibilities (backend or frontend). However, I can still upload media via the backend (w/o Flash) and via the frontend (with Flash). NOTE: I do list “plupload.full.min.js” and other similar scripts in Autoptimze “Exclude list”

    If you see any features on my website that you want to implement in BuddyPress, feel free to let me know and then I can give you the code and tell you how I did it. Also, I use my own style sheets for BBPress, BuddyPress, and some plugins. I have been able to increase performance and decrease size by using a CSS minifier (http://csscompressor.com/) and implementing ideas from errors given by a CSS checker (http://csslint.net/). I saw significant improvements even before I changed the style sheets to specifically suit my website.

    By the way, making BuddyPress templates that can be placed in the regular WordPress theme was a great idea and feature for BuddyPress; smart thinking BuddyPress developers.

    #243881

    In reply to: filter activity loop

    Angelo Rocha
    Participant

    Hi Henry Wright.
    I pasted in functions.php
    =/
    This is my custom loop:

    
    <?php do_action( 'bp_before_activity_loop' ); ?>
    <?php if ( bp_has_activities( bp_ajax_querystring( 'activity' ) ) ) : ?>
    	<noscript>
    		<div class="pagination">
    			<div class="pag-count"><?php bp_activity_pagination_count(); ?></div>
    			<div class="pagination-links"><?php bp_activity_pagination_links(); ?></div>
    		</div>
    	</noscript>
    	<?php if ( empty( $_POST['page'] ) ) : ?>
    		<ul id="activity-stream" class="activity-list item-list">
    	<?php endif; ?>
    
    	<?php while ( bp_activities() ) : bp_the_activity(); ?>
    		<?php locate_template( array( 'activity/entry.php' ), true, false ); ?>
    	<?php endwhile; ?>
    
    	<?php if ( bp_activity_has_more_items() ) : ?>
    		<li class="load-more">
    			<a href="#more"><?php _e( 'Load More', 'buddypress' ); ?></a>
    		</li>
    	<?php endif; ?>
    
    	<?php if ( empty( $_POST['page'] ) ) : ?>
    		</ul>
    	<?php endif; ?>
    <?php else : ?>
    	<div id="message" class="info">
    		<p><?php _e( 'Sorry, there was no activity found. Please try a different filter.', 'buddypress' ); ?></p>
    	</div>
    <?php endif; ?>
    <?php do_action( 'bp_after_activity_loop' ); ?>
    <form action="" name="activity-loop-form" id="activity-loop-form" method="post">
    	<?php wp_nonce_field( 'activity_filter', '_wpnonce_activity_filter' ); ?>
    </form>
    
    djsteveb
    Participant

    @jrunfitpro “there wasn’t a good answer for my question” –
    I think you should of imply replied to your previous (not dupe) thread – would keep things more tidy.
    Also you never reported back what your optimize press people had any details about the issue.

    anyhow, with your setup I wonder..
    “not pulling from certain pages ”
    – what exactly is not being pulled?
    from pages?
    posts?
    multi-site sub blogs?
    Pulled from media comments?

    If you switch to default 2014 theme – does it work then?

    If you use 2014 theme and disable all other plugins (and mu-plugins and bp-custom if you have those) aside from BP is the issue resolved?

    If “not pulling from certain pages” still does not work with 2014 and all other plugins removed, then you may find the answer on the other threads and solution hunting things posted:

    Post comments not appearing in activity stream?


    (and those items linked in comments from there)

    If “not pulling from certain pages” does work fine with 2014 as theme and other plugins disabled – then it’s an issue with your other theme or plugins (or combo of them).

    #243741
    djsteveb
    Participant

    @iseestarz

    Activity wall – Yes – in core.
    all members chat – private user to user email like messages in core. Chat rooms with plugins like “quick chat” – so yes
    sleek custom profiles for members, -hard to tell what is “sleek” – custom? for each member? There are a couple of plugins that played with this – not sure how they work, if they’ve been updated lately.. modding how all profiles look to make them “sleeker” than default 2015 – theme – possible..

    a paid membership option – that would be a plugin.. there are several that get into that.. s2member, paid memberships pro, ultimate member maybe? Some options from wpmudev as well I think.

    A way to let paid members make their own post/articles on the homepage – hmmm.. maybe prevent non paid members from even creating a blog.. or you mean any activity posts on home page – I think these things are possible.. BP recently added “user levels” but I have not see much actually use that.. but extending this should be easy to some degree..

    However if your focus is on paid members things, and you will need support to put all this together and keep it running (you are not a php coder with lots of time to read codex and test things) – then developing around BP is likely to get expensive, and you might be better off forgetting bp exists and looking at some of the more premium systems others have put together around wordpress (a few wpmudev plugins combined achieve what you describe without needing BP) – and there are others..

    Of course you don’t have to look for such a system revolving around wordpress either – there are more mature social network options that may save you time and sanity – things like phpfox, boonex dolphin, oxwall..

    random thoughts from a bp user.. I’m not a dev and have not tested all the things out there that get into paid members things and restrictions.. if you search the forums here there have been a few comments from others pointing to some other similar plugin options – and some people have pointed out troubles with some of those on the market.

    #243737
    iseestarz
    Participant

    So I’m trying to build a social network and some of the features i need I’m not to sure if bp has it all.
    Features I need. Activity wall.all members chat,sleek custom profiles for members, a paid membership option. A way to let paid members make their own post/articles on the homepage.can buddypress do this?

    zoewsaldana
    Participant

    Fixed it!! Okay, for anyone who encounters this issue, the problem was that for some reason (I think perhaps how WP or my server is caching pages) the hooks I was choosing to target for the behavior weren’t working. So instead I added both functions to the “wp” hook, and now it works site-wide!

    
    /* You can add custom functions below, in the empty area
    =========================================================== */
    
    function bp_guest_redirect( $name ) {
        if( ! is_user_logged_in() ) {
            if ( bp_is_activity_component() || bp_is_groups_component() || bp_is_blogs_component() || bp_is_directory() || bp_is_user() || bp_is_members_component() ) 
                wp_redirect( get_option('siteurl') . '/new_member/' );
        }
    }
    add_action( 'wp', 'bp_guest_redirect', 1, 1 );
    function bpfr_hide_rss_feed_to_nonreg_visitor() {
     if ( !is_user_logged_in() ) { 	
       remove_action( 'bp_actions', 'bp_activity_action_sitewide_feed' );
       remove_action( 'bp_actions', 'bp_activity_action_personal_feed' );
       remove_action( 'bp_actions', 'bp_activity_action_friends_feed' );
       remove_action( 'bp_actions', 'bp_activity_action_my_groups_feed' );
       remove_action( 'bp_actions', 'bp_activity_action_mentions_feed' );
       remove_action( 'bp_actions', 'bp_activity_action_favorites_feed' );
       remove_action( 'groups_action_group_feed', 'groups_action_group_feed' ); 
        }
    }
    add_action('wp', 'bpfr_hide_rss_feed_to_nonreg_visitor'); 
    
    

    My theme framework (WPZoom) also recommended I place theme modifying code in the functions/user/ pathway, so I modified functions.php there instead of using bp-custom. I think it would work either place, however.

    Thank you!

    danbp
    Participant

    Any ideas what I’m doing wrong? Using over 4 years old tricks ? 😉

    Give this a try (in bp-custom)

    function bpfr_guest_redirect() {
    global $bp;
    // enter the slug or component conditional here
       if ( bp_is_activity_component() || bp_is_groups_component() || bp_is_blogs_component() || bp_is_page( BP_MEMBERS_SLUG ) || is_bbpress() ) {
    	
    // not logged in user - user will be redirect to any link you want
       if( !is_user_logged_in() ) { 
    	//wp_redirect( get_option('siteurl') ); //back to homepage
    	//wp_redirect( get_option('siteurl') . '/register' ); // back to register page	
    	wp_redirect( get_option('siteurl') . '/your_page_title' ); // back to whatever page
    	} 
       }
    }
    add_filter('get_header','bpfr_guest_redirect',1);

    And to close the second entry door, which many users seems to ignore…

    function bpfr_hide_rss_feed_to_nonreg_visitor() {
    
     if ( !is_user_logged_in() ) { 	
    		
       remove_action( 'bp_actions', 'bp_activity_action_sitewide_feed' );
       remove_action( 'bp_actions', 'bp_activity_action_personal_feed' );
       remove_action( 'bp_actions', 'bp_activity_action_friends_feed' );
       remove_action( 'bp_actions', 'bp_activity_action_my_groups_feed' );
       remove_action( 'bp_actions', 'bp_activity_action_mentions_feed' );
       remove_action( 'bp_actions', 'bp_activity_action_favorites_feed' );
       remove_action( 'groups_action_group_feed', 'groups_action_group_feed' ); 
        }
    }
    add_action('init', 'bpfr_hide_rss_feed_to_nonreg_visitor'); 
    #243519
    danbp
    Participant

    Hi @muskokee,
    BP nav menu code is in bp-core-template.php:3050 to EOF.

    To change the position of an item on profiles page, use this from within bp-custom.php
    Position is defined by the numeric value:

    function bpfr_profile_menu_tab_pos(){
    global $bp;
    $bp->bp_nav['activity']['position'] = 30;
    $bp->bp_nav['forums']['position'] = 50;
    $bp->bp_nav['profile']['position'] = 25;
    $bp->bp_nav['messages']['position'] = 10;
    $bp->bp_nav['notifications']['position'] = 40;
    $bp->bp_nav['friends']['position'] = 20;
    $bp->bp_nav['groups']['position'] = 60;
    }
    add_action('bp_setup_nav', 'bpfr_profile_menu_tab_pos', 100);

    You can also add some condition on the template. Ie

    if ( is_user_logged_in() ) :
       your custom menu stuff
    else
       something for non logged user
    endif;

    Other reference: https://codex.buddypress.org/themes/members-navigation-menus/

    #243008
    joeynimu
    Participant

    Hi,

    I am developing this website and my reading settings for front page i am using my latest posts. My home page is the home.php file in my theme where i have my custom posts loop but i want to have what we have on the activity page to be right after my posts loop. How do i achieve this?

    I have tried using the bb loop below but it doesn’t display anything.

    <?php if ( bp_has_activities( bp_ajax_querystring( 'activity' ) ) ) : ?>
        <?php while ( bp_activities() ) : bp_the_activity(); ?>
     
            <?php locate_template( array( 'activity/entry.php' ), true, false ); ?>
     
        <?php endwhile; ?>
    <?php endif; ?>

    Please give me a kick start, many thanks.

    amanavohra
    Participant

    Hi,

    I am trying to add to group activity stream and send a notification but its not working – Help pls
    Adding to group activity like this

    
    add_post_type_support( 'product', 'buddypress-activity' );
    
    function customize_page_tracking_args() {
    	// Check if the Activity component is active before using it.
    	if ( ! bp_is_active( 'activity' ) ) {
    		return;
    	}
    	
    	global $bp;
    	$gid = $bp->groups->current_group->id;
    	$group = new BP_Groups_Group($gid, true);
    	$user_id = get_current_user_id();
    	
    	
    	groups_record_activity( array(
    			'action'  => apply_filters( 'groups_activity_new_update_action', sprintf( __( '%1$s publicó una actualización en %2$s', 'buddypress'), bp_core_get_userlink( $user_id ), '<a href="' . bp_get_group_permalink( $group ) . '">' . esc_attr( bp_get_group_name( $group ) ) . '</a>' ) ),
    			'content'   => $content,
    			'type'    => $type,
    			'item_id' => $gid,
    			'user_id' => $user_id
    	)
    	);
    
    }
    add_action( 'save_post', 'customize_page_tracking_args', 1000 );
    

    Adding to notification like this

    
    bp_notifications_add_notification( array(
    		'user_id'           => $cid,
    		'item_id'           => $post_id,
    		
    ) );
    
    AM77
    Participant

    Is there a conditional for a users profile page only. When I say profile page I’m referring to the users homepage not the profile tab – mysite.com/members/example-user

    I’ve looked at the BuddypPress template tags, but none work for it.

    Currently, my default component and action for my profile page is activity>personal, so this will work:

    if ( bp_is_activity_component() && bp_is_current_action('just-me') ) {
       
    }

    But I might use a plugin for a new custom user profile page so I need a conditional for the users profile page rather than the default component and action.

    Any help apreciated

    SJS719
    Participant

    Hey guys,

    I have a button on the user profile page which is NOT an XProfile field which I need to add to activity. So when the user clicks the button a new activity will be created in their activity stream. I have successfully added a custom post type to the activity stream so when the user creates a post it shows in activity, but I cannot figure out how to apply the same function I used for the custom post type to the button click.

    Here is my custom post type function:

    // add custom post type listing to the activity stream
    
    add_filter ( 'bp_blogs_record_post_post_types', 'activity_publish_custom_post_types',1,1 );
    function activity_publish_custom_post_types( $post_types ) {
    $post_types[] = 'listing';
    return $post_types;
    }
    
    add_filter('bp_blogs_activity_new_post_action', 'record_cpt_activity_action', 1, 3);
    function record_cpt_activity_action( $activity_action, $post, $post_permalink ) {
    global $bp;
    if( $post->post_type == 'listing' ) {
    
    $activity_action = sprintf( __( '%1$s added a new listing - %2$s', 'buddypress' ), bp_core_get_userlink( (int) $post->post_author ), '' . '<a href="' . $post_permalink . '">' . $post->post_title . '</a>' . '' );
    }
    
    return $activity_action;
    }  

    I really need to implement this so any help is greatly appreciated!

    #242520
    Ben Riga
    Participant

    Hi,

    I’ve been trying to customize a BuddyPress site (WP v4.2.3 BP v2.3.2.1) so that the member nav menus are not all together on one page. I’d like to separate out each of the functions (activity, messages, notifications, friends, etc) into their own page. To do that I’d like to eliminate the side nav menu on those and move that to the a standard wordpress menu at the top of the page. I’m just using the standard Twenty Fourteen theme. I’ve tried eliminating each of the items on the menu using unset($bp->bp_nav[‘activity’]) in bp_setup_nav and that mostly works in that it eliminates the menu items but then leaves the empty div as one big blank area. I’d like to remove that completely. Any thoughts on how I might be able to accomplish that?

    Thanks,
    Ben

    #241989
    Roger Coathup
    Participant

    The default BuddyPress site setup only supports a single activity, members, groups directory page.

    One solution is to create your own custom page templates, and embed the code for the activity, member and group loops in the template. You’d then assign it to your duplicate pages. You can read more about coding your own loops in the documentation section of this site.

    You could also look to see if it’s possible to use the language files — dynamically loading the appropriate text domain translations of the BuddyPress text depending which language the user has selected. In this scenario, you’d work with the default ‘single’ page setup.

    Perhaps too late for your site (if you’ve gone down the polylang route), but for all our multi language solutions, we go the multisite approach and using the Multilingual Press Pro plugin. It gives a really clean solution. Remember to enable bp multiblog if you switch to this approach.

    #241869
    peter-hamilton
    Participant

    sorry, password is: demouser

    I hope it shows a bit more then just a bbpress forum thats added,
    Took me a long time to add the custom functions, especially the profile pages and activity.

    Rollercoasterider
    Participant

    1. Which version of WordPress are you running?
    4.2.2

    2. Did you install WordPress as a directory or subdomain install?
    3. If a directory install, is it in root or in a subdirectory?
    It is at domain.com/members

    4. Did you upgrade from a previous version of WordPress? If so, from which version?
    No

    5. Was WordPress functioning properly before installing/upgrading BuddyPress (BP)? e.g. permalinks, creating a new post, commenting.
    This is a fresh install–relatively, I’ve been playing and testing with it for a month or two, but no posts–not yet public.

    6. Which version of BP are you running?
    2.3.2.1

    7. Did you upgraded from a previous version of BP? If so, from which version?
    I have updated my plugins whenever it asks so maybe, but the issues have been present pretty much since I started. I’vbe just been focusing on different areas.

    8. Do you have any plugins other than BuddyPress installed and activated? If so, which ones?
    Advanced Access Manager: not activated
    Akismet: still need to get the API
    Child Theme Configurator
    Conditional Menus
    Lazy Load for Videos
    Microthemer: not activated
    Press Permit Core: not activated
    Restrict User Access
    Simple:Press
    UpdraftPlus – Backup/Restore
    User Role Editor
    Zippy Courses

    Some are not activated because I was trying out a few different plugins for user roles.

    9. Are you using the standard WordPress theme or customized theme?
    I have created a child theme from the Social Triggers theme for Zippy Courses

    10. Have you modified the core files in any way?
    I don’t think so.

    11. Do you have any custom functions in bp-custom.php?
    I don’t think so.

    12. If running bbPress, which version? Or did your BuddyPress install come with a copy of bbPress built-in?
    Not running bbPress

    13. Please provide a list of any errors in your server’s log files.
    How do I do this?
    I copied the 300 most recent and removed those that were not from the members folder (smf forum had the most) and got a list of 16–of course there would be more if it listed more than 300. But these give addresses and IPs.
    I’m probably not understanding how to do this.

    All of them are File not Found errors and there are 8 different ones–each error shows twice.
    8 refer to Zippy courses, referencing the child theme and wp-admin
    2: wp-admin/index.php
    2: wp-admin/plugins.php
    2: wp-admin/themes.php
    2: wp-admin/update-core.php

    The other 8 do not refer to Zippy Courses, but otherwise refer to the same end places.
    Does that help?

    14. Which company provides your hosting?
    Cyberlynk

    15. Is your server running Windows, or if Linux; Apache, nginx or something else?
    Windows

    I switched themes to 2015 and then 2013 to see if it made a difference and it did not.

    I installed a fresh install of WP at a new location (domain.com/members) for using the zippy courses plugin. Afterwards I thought I should try out BuddyPress with it, so I installed and activated it.
    I’ve had some issues and I don’t know if its zippy courses, buddypress or something else. But I did just go to the codex and read that I should not have use softaculous to install WP.
    So I think I should start over again—not a huge deal since I’m just playing around with zippy and buddy, but I would rather not lose some of the things I’ve done. How can I save what I’ve done and still reinstall? Zippy courses has an importer/exporter, so that’s no problem, but what about the other stuff:
    I’ve set up user roles with a plugin and created a child theme and added a second menu and done some other things that, for me, took time.

    Some of the issues could simply be that I’m still learning (like the child-theme). All of the pages in both the zippy and buddypress core pages section say they are pointing to the page with the corresponding name. I have the front page set as Home. But when I try to go to the homepage it goes directly to the members page instead.
    When I try the links at the top: activity, notifications, profile, settings; they all go to

    The requested URL /members/members/Rollercoasterider/notifications/ was not found on this server.
    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

    The only one that goes somewhere is the log out link and that goes to the Simple:Press forum I just set up—before I installed Simple:Press it went somewhere else. I don’t know why it is now going to Simple:Press. (Other than this now directing to Simple:Press, all these issues were present before I installed Simple:Press).

    Why do pretty permalinks need to be used? I thought I read something (a few years ago) about these causing problems.

    Site: http://theherosspouse.com/members/

    Prabin
    Participant

    hi @danbp
    Actually, I want to display the “Most Favorited Count” in single activity group page in custom drop-down select option called “Most Agreed”. See Above Images.

    ['type'] == 'featured'
    I wanted to compare option value inside the meta_query
    <option value="featured"><?php _e( 'Most Agreed' ); ?></option>

    I am not sure if it works. can you debug this for me ? or what code i need to add ?

    Prabin
    Participant

    @danbp, I have an issue..

    I have “Most Agreed” option in single group page. but the query is not returning desired value.
    can you look into this?

    Here’s the Screenshot
    Most Favourite dropdown

    and Here’s the code

    
    if( class_exists( 'BP_Group_Extension' ) ) :
    
    class bpgmq_feature_group {
    
    public function __construct() {
    $this->setup_hooks();
    }
    private function setup_hooks() {
    $bp = buddypress();
    
    add_filter( 'bp_ajax_querystring', 'custom_filter_ajax_querystring' , 999, 2 );
    // you need to do it for the group directory
    add_action( 'bp_group_activity_filter_options', array( $this, 'agreed_option' ) );
    
    }	
    public function agreed_option() {
    ?>
    <option value="featured"><?php _e( 'Most Agreed' ); ?></option>
    <?php
    }
    
    }
    
    function custom_filter_ajax_querystring( $querystring, $object ) { 
    #var_dump($querystring);
    if($object != 'activity' )
    return $querystring;
    
    $defaults = array('type'=>'active','action'=> 'active','scope'=> 'all','page'=>1,'order'=>'DESC');
    
    #exit;
    /*if( $bpgmq_querystring['type'] != 'featured' ) 
    return $querystring;*/
    $bpgmq_querystring = wp_parse_args( $querystring, $defaults );
    if( $bpgmq_querystring['type'] == 'featured' ){
    $bpgmq_querystring['meta_query'] = array(array('key'=> 'favorite_count','value'=> 1,'type'=> 'numeric','compare' => '>='));
    
    return apply_filters( 'bpgmq_filter_ajax_querystring', $bpgmq_querystring, $querystring );
    }
    var_dump($querystring);
    }
    
    function bpgmq_agreed_group() {
    if( bp_is_active( 'activity') )
    return new bpgmq_feature_group();
    }
    
    add_action( 'bp_init', 'bpgmq_agreed_group' );
    endif;

    Thanx in Advance

    Quinn Goldwin
    Participant

    I would like to add the what’s new form on the all activity page for logged in users.

    Is there a way to do this in bp-custom.php? Any help would be greatly appreciated.

    Quinn Goldwin
    Participant

    Hey Danbp,

    Thank you for the quick responses and all your help. I tried playing around with your way but I’m not advanced enough for working with hooks and custom coding just yet.

    I did find an easier work around that I just pasted into my bp-custom.php and it did the trick. But for other members trying to do this, you need to have the plugin http://buddydev.com/buddypress/show-buddypress-communitysitewide-activity-on-user-profile/ for this to work.

    function bp_change_activity_subnav_default() {
    
    	if ( bp_is_user_activity() ) {
    	
    		$args = array(
    			'parent_slug' => 'activity',
    			'subnav_slug' => 'all-activity'
    		);
    		
    		bp_core_new_nav_default($args);
    	
    	}
    	
    }
    add_action('bp_setup_nav', 'bp_change_activity_subnav_default', 5);   

    I understand you guys aren’t getting paid for your services but now i’m just struggling on adding a “whats new” post form to the all activity page. Buddy dev had some directions on how to add it but I think its dated cause I couldn’t find the code that we needed to switch out. Is there a simple way to add a whats new post form to the all activity page? It would be awesome if it was simple enough to paste it into bp-custom.php.

    Thanks again for everything you guys are great!

    danbp
    Participant

    Which result when you use Twenty Fifteen theme ?
    Do you use some custom functions on group page ?

    Also, as of Codex https://codex.buddypress.org/administrator-guide/groups/
    This is a private group

    Options

    Group content and activity will only be visible to members of the group.

    #241218
    danbp
    Participant

    @quinngoldwin

    it goes to my personal activity instead.

    It’s intended so ! You’re on a profile page, and any links added directly to buddybar or his subnav is alwways, and only, user related. It’s a contextual menu.

    But you can use bp_member_options_nav action hook which is on the template.
    bp-templates/bp-legacy/buddypress/members/single/home.php

    Add this snippet to bp-custom.php your your child theme functions.php:

    
    function goldwin_custom_setup_nav() {
      if ( bp_is_active( 'xprofile' ) )
    ?>
    <li><a href="<?php bp_activity_directory_permalink(); ?>"><?php printf ('All Activities'); ?></a></li>
    <?php  
    }
    add_action( 'bp_member_options_nav', 'goldwin_custom_setup_nav' );

    By default, the hook is placed as latest item of the navbar items. To get as first item, simply move the action at the begin of the list.

    Default code looks like this:

    
    <ul>
    
    <?php bp_get_displayed_user_nav(); ?>
    
    <?php do_action( 'bp_member_options_nav' ); ?>
    
    </ul>

    that you can chage to:

    <ul>
    
    <?php do_action( 'bp_member_options_nav' ); ?>
    
    <?php bp_get_displayed_user_nav(); ?>
    
    </ul>

    But you can’t get your custom item as second, or third, or whatever. Only first or latest.

    How to use bp-custom, functions.php and child_theme is explained on the codex.

Viewing 25 results - 351 through 375 (of 1,252 total)
Skip to toolbar