Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] How do I change my activity from everything to updates on default?


  • dugfunny
    Participant

    @dugfunny

    I have seen a few unsuccessful posts about this, all out of date or just plain wrong. Can someone clearly give me a step by step of where to edit what to make that happen? I don’t want things like so and so joined the website showing up by default. By default I would love to have just people’s updates show up.

    Also, when you click on a user’s profile, where and what would I need to edit to make it automatically take you to their profile information (name, location, age, etc…), rather than their activity wall.

    Thank you SO much in advance for the clear assistance. I know that lots of people will be very happy to finally have a solution to this problem. Thanks!

Viewing 12 replies - 1 through 12 (of 12 total)

  • dugfunny
    Participant

    @dugfunny

    I am running buddypress 2.0.1 and wordpress 3.9.1, as well as a child theme of kleo 1.3. Thanks again!


    dugfunny
    Participant

    @dugfunny

    Also, when you click on a user’s profile, where and what would I need to edit to make it automatically take you to their profile information (name, location, age, etc…), rather than their activity wall.

    Figured that one out. Anyone have a solution to the others? Here is how i fixed this problem, in bp-custom.php , which is located inside of your plugins folder, paste this code…

    <?php
    // hacks and mods will go here
    define( ‘BP_DEFAULT_COMPONENT’, ‘profile’ );
    ?>

    @dugfunny,

    the following thread will solve your problem

    https://buddypress.org/support/topic/block-activity-stream-types/

    Naijaping


    dugfunny
    Participant

    @dugfunny

    Thank you, I don’t want it blocked though. I just want it not shown on default. By default I would like Updates shown, but still want the option there for a user to see everything if they’d like to.


    danbp
    Participant

    @danbp

    You simply have to modify the html order of the select you will find in /wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/activity/index.php.

    This will only affect the site wide activity Show: [All]

    If you want the same behaviour on all activity pages, you have to change accordingly each index.php file of each activate component.


    dugfunny
    Participant

    @dugfunny

    im in that file, and have tried one or two things with no change. could you be more specific with what to change to what? id be so grateful man, ive been trying to figure this out for weeks. THAAAAAAAANK YOU! @chouf1


    dugfunny
    Participant

    @dugfunny

    heres my code….

    <?php do_action( 'bp_before_directory_activity' ); ?>
    
    <div id="buddypress">
    
    	<?php do_action( 'bp_before_directory_activity_content' ); ?>
    
    	<?php if ( is_user_logged_in() ) : ?>
    
    		<?php bp_get_template_part( 'activity/post-form' ); ?>
    
    	<?php endif; ?>
    
    	<?php do_action( 'template_notices' ); ?>
    
    	<div class="item-list-tabs activity-type-tabs" role="navigation">
    		<ul>
    			<?php do_action( 'bp_before_activity_type_tab_all' ); ?>
    
    			<li class="selected" id="activity-all"><a href="<?php bp_activity_directory_permalink(); ?>" title="<?php esc_attr_e( 'The public activity for everyone on this site.', 'buddypress' ); ?>"><?php printf( __( 'All Members <span>%s</span>', 'buddypress' ), bp_get_total_member_count() ); ?></a></li>
    
    			<?php if ( is_user_logged_in() ) : ?>
    
    				<?php do_action( 'bp_before_activity_type_tab_friends' ); ?>
    
    				<?php if ( bp_is_active( 'friends' ) ) : ?>
    
    					<?php if ( bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?>
    
    						<li id="activity-friends"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/' . bp_get_friends_slug() . '/'; ?>" title="<?php esc_attr_e( 'The activity of my friends only.', 'buddypress' ); ?>"><?php printf( __( 'My Friends <span>%s</span>', 'buddypress' ), bp_get_total_friend_count( bp_loggedin_user_id() ) ); ?></a></li>
    
    					<?php endif; ?>
    
    				<?php endif; ?>
    
    				<?php do_action( 'bp_before_activity_type_tab_groups' ); ?>
    
    				<?php if ( bp_is_active( 'groups' ) ) : ?>
    
    					<?php if ( bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) : ?>
    
    						<li id="activity-groups"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/' . bp_get_groups_slug() . '/'; ?>" title="<?php esc_attr_e( 'The activity of groups I am a member of.', 'buddypress' ); ?>"><?php printf( __( 'My Groups <span>%s</span>', 'buddypress' ), bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ); ?></a></li>
    
    					<?php endif; ?>
    
    				<?php endif; ?>
    
    				<?php do_action( 'bp_before_activity_type_tab_favorites' ); ?>
    
    				<?php if ( bp_get_total_favorite_count_for_user( bp_loggedin_user_id() ) ) : ?>
    
    					<li id="activity-favorites"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/favorites/'; ?>" title="<?php esc_attr_e( "The activity I've marked as a favorite.", 'buddypress' ); ?>"><?php printf( __( 'My Favorites <span>%s</span>', 'buddypress' ), bp_get_total_favorite_count_for_user( bp_loggedin_user_id() ) ); ?></a></li>
    
    				<?php endif; ?>
    
    				<?php if ( bp_activity_do_mentions() ) : ?>
    
    					<?php do_action( 'bp_before_activity_type_tab_mentions' ); ?>
    
    					<li id="activity-mentions"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/mentions/'; ?>" title="<?php esc_attr_e( 'Activity that I have been mentioned in.', 'buddypress' ); ?>"><?php _e( 'Mentions', 'buddypress' ); ?><?php if ( bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) ) : ?> <strong><span><?php printf( _nx( '%s new', '%s new', bp_get_total_mention_count_for_user( bp_loggedin_user_id() ), 'Number of new activity mentions', 'buddypress' ), bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) ); ?></span></strong><?php endif; ?></a></li>
    
    				<?php endif; ?>
    
    			<?php endif; ?>
    
    			<?php do_action( 'bp_activity_type_tabs' ); ?>
    		</ul>
    	</div><!-- .item-list-tabs -->
    
    	<div class="item-list-tabs no-ajax" id="subnav" role="navigation">
    		<ul>
    			<li class="feed"><a href="<?php bp_sitewide_activity_feed_link(); ?>" title="<?php esc_attr_e( 'RSS Feed', 'buddypress' ); ?>"><?php _e( 'RSS', 'buddypress' ); ?></a></li>
    
    			<?php do_action( 'bp_activity_syndication_options' ); ?>
    
    			<li id="activity-filter-select" class="last">
    				<label for="activity-filter-by"><?php _e( 'Show:', 'buddypress' ); ?></label>
    				<select id="activity-filter-by">
    					<option value="-1"><?php _e( 'Everything', 'buddypress' ); ?></option>
    					<option value="activity_update"><?php _e( 'Updates', 'buddypress' ); ?></option>
    
    					<?php if ( bp_is_active( 'blogs' ) ) : ?>
    
    						<option value="new_blog_post"><?php _e( 'Posts', 'buddypress' ); ?></option>
    						<option value="new_blog_comment"><?php _e( 'Comments', 'buddypress' ); ?></option>
    
    					<?php endif; ?>
    
    					<?php if ( bp_is_active( 'forums' ) ) : ?>
    
    						<option value="new_forum_topic"><?php _e( 'Forum Topics', 'buddypress' ); ?></option>
    						<option value="new_forum_post"><?php _e( 'Forum Replies', 'buddypress' ); ?></option>
    
    					<?php endif; ?>
    
    					<?php if ( bp_is_active( 'groups' ) ) : ?>
    
    						<option value="created_group"><?php _e( 'New Groups', 'buddypress' ); ?></option>
    						<option value="joined_group"><?php _e( 'Group Memberships', 'buddypress' ); ?></option>
    
    					<?php endif; ?>
    
    					<?php if ( bp_is_active( 'friends' ) ) : ?>
    
    						<option value="friendship_accepted,friendship_created"><?php _e( 'Friendships', 'buddypress' ); ?></option>
    
    					<?php endif; ?>
    
    					<option value="new_member"><?php _e( 'New Members', 'buddypress' ); ?></option>
    
    					<?php do_action( 'bp_activity_filter_options' ); ?>
    
    				</select>
    			</li>
    		</ul>
    	</div><!-- .item-list-tabs -->
    
    	<?php do_action( 'bp_before_directory_activity_list' ); ?>
    
    	<div class="activity" role="main">
    
    		<?php bp_get_template_part( 'activity/activity-loop' ); ?>
    
    	</div><!-- .activity -->
    
    	<?php do_action( 'bp_after_directory_activity_list' ); ?>
    
    	<?php do_action( 'bp_directory_activity_content' ); ?>
    
    	<?php do_action( 'bp_after_directory_activity_content' ); ?>
    
    	<?php do_action( 'bp_after_directory_activity' ); ?>
    
    </div>
    

    danbp
    Participant

    @danbp

    Please don’t post BP files, it’s really unnecessary. We’re all BP user ! 👿
    Sorry, i didn’t correctly understand your request. I thought you wanted to change the order of the selectbox filters. If you also interested, see this old tread.

    SWA shows by default all site activities and they can be filtered. It is well documented on the Codex.

    If for some reason you don’t want to modify a theme file, you can use a custom function and put it into bp-custom.php

    Example ( BP 2.0+ only)

    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' );

    Now the swa shows only notices (if exist). If you need to see a member activity, you have to go on his profile. Same for groups, the activity is only on the group page.


    dugfunny
    Participant

    @dugfunny

    so adding the above code into bp-custom.php will cause the activity stream to show updates by default, right? and its that easy, copy and paste? @chouf1


    dugfunny
    Participant

    @dugfunny

    and is there anywhere specific in the page that i put it or is anywhere fine? thank you soooooooo much man you have no idea lol


    dugfunny
    Participant

    @dugfunny

    well that most definitely worked. thank you so much!


    rainerkormann
    Participant

    @rainerkormann

    Hi @danbp

    I used your Code and it works like a charm – thanks a million 🙂

    One thing: using your nice Filter-Function, it’s only possible to make a comment, after one click on one, no matter which, of the Activity-Tabs (“All Members|Friends|Groups”)…

    Without that click, the “Comment”-Button of someones entry just doesn’t work 🙁

    PS: when I change the If-Statement to use your Code also for Groups, so only Updates are shown (which works), there is no way I can make the Comment-Button work…:

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

    Do you have an idea, what i can do?

    Thanks in advance,
    Rainer.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘[Resolved] How do I change my activity from everything to updates on default?’ is closed to new replies.
Skip to toolbar