Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'custom activity page'

Viewing 25 results - 376 through 400 (of 831 total)
  • Author
    Search Results
  • #205098
    shanebp
    Moderator

    Try this in bp-custom.php

    function wirelab_check_activity_login() { 
      if( ! is_user_logged_in() ) {
        wp_die("To view this page you must first log in.");
      }
    }
    add_action('bp_before_directory_activity', 'wirelab_check_activity_login');
    #203195
    1a-spielwiese
    Participant

    1st:

    ‘Such custom function are added to child-theme functions.php’

    I did this, and I deactivated my reddle-child/buddypress/activtity-folder by renaming it. – I get the text displayed, but not at the place, where I want:

    http://1a-spielwiese.de/wp-content/uploads/2014/10/Activity_Intro.jpg

    2nd:

    I tried it as well by using the bp-custom.php:

    a) When I inserted your code at the end of that file, I got displayed nothing.

    b) And when I inserted it before the line <?php get_footer(); ?>:

    <?php
    /**
     * BuddyPress: Full-width template
     *
     * A custom page template without sidebar.
     *
     * @ since Reddlle 1.3.1 and BuddyPress 2.1
     */
    
    get_header(); ?>
     
    	<div id="primary">
    		<div id="content" role="main">
    			<?php while ( have_posts() ) : the_post(); ?>
    				<?php get_template_part( 'content', 'page' ); ?>
    			<?php endwhile; // end of the loop. ?>
    		</div><!-- #content -->
    	</div><!-- #primary --> 
    
    <?php get_footer(); ?>

    then I got my introductory text displayed behind the activity stream.

    #197062
    Julia_B
    Participant

    Thanks @peter-hamilton. No, I haven’t tried customize page yet, could that enable posting to the activity feed directly from the homepage?

    It would be great to know how to make the the links you have on the top left, I will look forward to the tutorial. 🙂

    #197053
    peter-hamilton
    Participant

    I can not see any activity on you homepage?

    Did you use the customize option to change to a static page?

    #197045
    peter-hamilton
    Participant

    Hi Julia_B

    To alter the templates for activity you need to do the following:

    Create a page called buddypress in your root folder.
    Inside the buddypress folder you create another folder called activity and in there another folder called single.

    Now you need to access your existing plugins folder.
    Open buddypress -> bp-templates -> bp-legacy -> buddypress

    Here you will find 5 folders, one is activity, inside this are some php files and a folder called single, inside this single folder is the index.php file that runs the activity.

    I copied all 5 folders to my new buddypress folder in my root and all the files in those folders, with them able to control/change the buddypress layout as I would with a child theme.

    To have an activity wall on homepage you only need to customize the appearance of wordpress in the admin area/backend.

    Go to “appearances” then “customize”, here you can change “front page” to activity and it should work.

    Good luck

    #196197
    Julia_B
    Participant

    Thanks @danbp showing site activity by using the topic filter sounds good. I went to this link – https://buddypress.org/support/topic/changing-the-default-activity-filter/ – but the posts there were a bit over my head as a beginner to be honest. However, the link in that thread to this article was useful: http://wpmu.org/how-to-customize-the-buddypress-activity-loop/

    Problem is I can’t find the the /activity/ folder in my theme. Where do I need to look for that?

    Also, is there a way I can allow members to post directly to the activity stream from the homepage, Facebook style, and for members comment on each others’ posts from there too?

    I appreciate the help.

    #192175
    richtelford
    Participant

    Hi @danbp. Okay so essentially what you are saying is I need to write a complex custom query?

    I’ve been examining the Buddypress class and function files in detail over the last few weeks due to the lack of documentation for BuddyPress – not a criticism btw. Yep I’m familiar with meta_query and using that already to get groups by meta_value. I wrote a function for returning activity IDs based on group meta:

    function wfw_get_group_activities_by_sport($sports = array())
    {
    	global $bp,$wpdb;
    
    	if(!$sports)
    		return false;
    
    	// GET GROUP IDS WHICH HAVE CHOSEN SPORT SELECTED
    	foreach($sports as $sport)
    	{
    		$meta_query[] = array(
    			"key" => "group_sport",
    			"value" => $sport,
    			"compare" => 'LIKE'
    		);
    	}
    
    	if(count($meta_query) > 1)
    		$meta_query = array_merge(array('relation' => 'OR'), $meta_query);
    
    	$group_arr = BP_Groups_Group::get(array(
    		'per_page'=>-1,
    		'meta_query' => $meta_query
    	));	
    
    	if(!$group_arr['total'] || !$group_arr['groups'])
    		return false;
    
    	foreach($group_arr['groups'] as $group)
    	{
    		$group_id_array[] = $group->;id;
    	}
    
    	$item_id = implode(",", $group_id_array);
    
    	$sql = "SELECT id FROM {$bp->activity->table_name} WHERE component = 'groups' AND item_id IN ({$item_id})";
    	$activity_id_array = $wpdb->get_col( $sql);	
    	
    	if(!$activity_id_array)
    		return false;
    
    	$activity_id = implode(',', $activity_id_array);
    
    	return $activity_id;
    }

    which I can then use to filter results:

    $activity_id = wfw_get_group_activities_by_sport(array($_GET['sport']));
    
    $filter = '&in='.$activity_id.'&object=groups';
    				
    if ($activity_id && bp_has_activities( bp_ajax_querystring( 'activity' ).$filter ) ) :  ?>

    Now I just need to somehow combine what I’m using but it sounds like a complex query is the way to go. I was looking for a more elegant solution using BP functions to achieve this but I guess it’s not yet possible.

    Anybody else have experience in this?

    Thanks.

    #191040
    peter-hamilton
    Participant

    A few images of my latest updates to BBFacelook, did not have much time last few weeks so progress is slow.
    In the meantime slowly getting more members to test the forums functionality.

    This is the new profile page now the default page when clicking a member’s link or avatar.

    bbfacelook profile page

    forum list is a little updated most important function is the topic title in the freshness column.

    bbfacelook forum list

    I have quite a few plugins installed, and some even hardcoded into my theme to lighten the code as much as possible.

    Current plugins are:
    . Invite anyone
    . BBPress like button
    . Buddypress activity plus
    . easy sign-up
    . GD BBpress attachements
    . wp post filter
    . bbpress
    . buddypress

    Plugins that I have hardcoded are:
    . Background For User Profile
    . BuddyPress Group Customizer Lite
    . TinyMCE

    As soon as I have more work done I will make another update here.

    P.H.

    #191003
    danbp
    Participant

    hi @millir,

    give this a try:
    tested on wp 4.0 bp 2.0.2 theme 2013 – snippet is in bp-custom.php

    /*activity stream on homepage */
    if (!function_exists('wwn_bp_activities')) {
        function wwn_bp_activities( ) {
    		ob_start();
    		
    		// Remove 'bp_replace_the_content' filter to prevent infinite loops
    		remove_filter( 'the_content', 'bp_replace_the_content' );
    		if ( bp_has_activities( bp_ajax_querystring( 'activity' ) . 'per_page=5' ) ) :
    		bp_get_template_part( 'activity/index' );
    		
    		// Remove 'bp_replace_the_content' filter to prevent infinite loops
    		add_filter( 'the_content', 'bp_replace_the_content' );
    		
    		// Get the output buffer contents
    		$output = ob_get_clean();
    		
    		// Echo or return the output buffer contents
    		if ( true === $echo ) {
    			echo $output;
    		} else {
    			return $output;
    		}
    		endif;	
    		
    		ob_end_clean();
    	
    }
    add_shortcode('wwn_bp_activities', 'wwn_bp_activities');
    }
    #190874
    danbp
    Participant

    hi @canadadre,

    you have to read the mentionnedd topic AND to follow the links if the topic contains some. 😉

    i hope for you that you know how to copy/paste, because the above snippets must be added to your child-theme functions.php, or better into bp-custom.php

    1. – Deny access to admins profile

    // deny access to admins profile. User is redirected to the homepage
    function bpfr_hide_admins_profile() {
    	global $bp; 
    	if(bp_is_profile && $bp->displayed_user->id == 1 && $bp->loggedin_user->id != 1) :
    		wp_redirect( home_url() );
    	exit;
    	endif;
    }
    add_action( 'wp', 'bpfr_hide_admins_profile', 1 );

    2. – Remove admin from the member directory and recount members

    
    // Remove admin from the member directory
    function bpdev_exclude_users($qs=false,$object=false){
        
        $excluded_user='1'; // Id's to remove, separated by comma
    	
        if($object != 'members' && $object != 'friends')// hide admin to members & friends 
        return $qs;
    	
        $args=wp_parse_args($qs);
    
        if(!empty($args['user_id']))
        return $qs;	
    	
        if(!empty($args['exclude']))
    		$args['exclude'] = $args['exclude'].','.$excluded_user;
        else
    		$args['exclude'] = $excluded_user;
    	
        $qs = build_query($args);
    
        return $qs;
    	
    }
    add_action('bp_ajax_querystring','bpdev_exclude_users',20,2);
    
    // once admin is removed, we must recount the members !
    function bpfr_hide_get_total_filter($count){
        return $count-1;
    }
    add_filter('bp_get_total_member_count','bpfr_hide_get_total_filter');

    3. – Hide admin’s activities from all activity feeds

    // hide admin's activities from all activity feeds
    function bpfr_hide_admin_activity( $a, $activities ) {	
    	
    	// ... but allow admin to see his activities!
    	if ( is_site_admin() )	
    		return $activities;	
    	
    	foreach ( $activities->activities as $key => $activity ) {	
    		// ID's to exclude, separated by commas. ID 1 is always the superadmin
    		if ( $activity->user_id == 1  ) {			
    			
    			unset( $activities->activities[$key] );			
    			
    			$activities->activity_count = $activities->activity_count-1;			
    			$activities->total_activity_count = $activities->total_activity_count-1;			
    					$activities->pag_num = $activities->pag_num -1;				
    		}		
    	}		
    	// Renumber the array keys to account for missing items 	
    	$activities_new = array_values( $activities->activities );		
    	$activities->activities = $activities_new;	
    	
    	return $activities;
    	
    }
    add_action( 'bp_has_activities', 'bpfr_hide_admin_activity', 10, 2 );

    May this help !

    danbp
    Participant

    Hello @multimartin,

    2 nd question:
    in the private blog settings, general > reading > search engine visibility, check disallow box. This will hide any of the private blog activities to appear on site activity and user feeds, except for those who are members of this blog.

    If it is not enough, considerer this plugin

    1 st question:
    read here

    danbp
    Participant

    Hello @saurabhsjain91,

    first let’s see what is normally going on with group settings:
    This is a public group
    Any site member can join this group.
    This group will be listed in the groups directory and in search results.
    Group content and activity will be visible to any site member.

    This is a private group

    Only users who request membership and are accepted can join the group.
    This group will be listed in the groups directory and in search results.
    Group content and activity will only be visible to members of the group.

    As you see, the only difference is the group content and activity visibility.

    The easiest way would be to create only private groups, so the members had to request membership to access them. But it is not what you want to do and unfortunately, modifying group privacy for better flexibility is not very doable.

    So, we have to focus on what it is possible to do with public groups accessibility, the one with the fewest restrictions.

    Lukily, core developper @imath stumbled also upon this problem a few mounth back. And finally produced a plugin.

    The features are:

    1. allow users to submit a request to join the group.
    2. selectively hiding group tabs.
    3. add a custom group homepage when non-members are viewing the group.

    More about this experimental plugin on @pollyplummer ‘s WPTavern.
    The original post (fr) on @imath ‘s blog
    The plugin can be downladed on github.

    May this help ! 😉

    #187235

    In reply to: Members Profile Page

    Venutius
    Moderator

    I think I’ve nearly done it! It’s taken hours of searching and a lot of lateral thinking but I’ve sorted on of my asks, and that is for a home page that summarises the various activity streams. I’ve got a test system up at http://www.sacredvale.org and I’ve been able to set it up with a posts feed, and activity feed, and forum feed and also a popular groups list.

    I’m not happy with the forum feed though it will do, and the groups feed is just weird and won’t.

    I’ve also found an app that allows me to say exactly where a widget will display, so I can customise the sidebars for every page view I care to.

    There’s a lot of bugs here and there, mainly to do with the look and feel of the overall system and I’m still working on the members profile pages but an awful lot of what I’ve been looking for I’ve been able to deliver, for very little money.

    Now, if only we can get wordpress turbocharged lol

    Plugin count so far? a cool 100….but my feature list beats any off the shelf social network site I know.

    #187206
    danbp
    Participant

    Test this one. It works for me on a static homepage with custom template.

    
    <?php if ( is_user_logged_in() ) :			
    	bp_get_template_part( 'activity/post-form' );			
    endif; ?>
    #186970

    In reply to: Members Profile Page

    Venutius
    Moderator

    I ended opting for Graphene, there are some compatibility issues, but it is so flexible, I must have tried about 30 different themes before settling on it.

    I reckon all in all I’ve assessed about 500 plugins to arrive at what I have got. Comparing to other social networking sites I think I’m pretty comparable to pay for options such as Ning, some aspects are seriously lacking though. User profile customisation and on site social networking options being the biggies.

    I wired my landing page to be the activity feed, with a blog summary slider, and then used a right sidebar to do a lot of the customisation with widgets. For the members profile pages I added a second left sidebar with more personal widgets like friend and group recommendations.

    Image and video sharing was another issue, I think I’ve just solved that though. I figured it was ket not to have basic users having to access the admin bar to add images to galleries etc but they also needed to be able to create galleries that the whole site could see.

    Currently I’m at the stage where I keep finding features I never knew I had lol.

    What I would really like, is a USP, a feature that other social sites do not have. Not sure what that is exactly and it may be that the total collection equates to that but I still feel it needs something. Maybe insertion of slide shows into blogs without the short codes etc, so normal users can do it.

    #186953

    In reply to: Members Profile Page

    Venutius
    Moderator

    So for I’ve found a short code for the activity feed and this is giving me some ideas. I’ve found lots of widgets that let me customise the members profile page so overall I think I’m getting there.

    One of the issues with running Buddypress as a social network is the volume of plugins you need to use in order to get the right level of features and customisations, I’m running more than 80 in total. Inevitably this leads compatibility issues.

    Key features that are lacking – user profile page self-customisation options, Friends and memberships activity feeds, custom page views, image sharing options and site “fanfare options such as featured users, groups, posts and images on one page.

    But a big thanks to all those developers out there that are providing generally high quality plugins that fill a lot of these gaps.

    #186945
    danbp
    Participant

    Hi @totoff,

    What’s new is a form (see activity/post-form.php)
    To get it on a custom page, you can call it like it’s done in activity/index.php

    if ( is_user_logged_in() ) :
    		 bp_get_template_part( 'activity/post-form' ); 
     endif;

    That said, this form is not exactly a post editor, but more a brief notice or message publication to members, and depends of the context (activities or groups for ex.)

    To let users publish blog poss from the front-end, you have to search for a specific plugin probably.

    #186381
    wp_maybe
    Participant

    Yes, adding stuff to the activity stream is easy with plugins like Activity Plus, Buddypress docs.

    Also, Buddypress allows for automatic embeds in the activity stream from a lot of sites, including youtube. You just have to drop in the URL in the “Whats new” box. You can refer to the link here for more information: https://codex.buddypress.org/getting-started/embeds/

    Embedding media to other pages would require custom coding, as @shanebp has pointed out. Where exactly do you intend to show your embeds?

    #186371
    shanebp
    Moderator

    There are plugins like Activity Plus that allow embedding things like a uTube link in the activity page on a member’s profile.

    There are several pages in a member’s profile, including a profile page that has data describing that member. There ways to allow for what you want, but it would require some custom coding, iow. not an option out of the box, afaik.

    #186094
    danbp
    Participant

    Has the “enable comments” flag an impact on this feature?

    Yes. And also “allow search engines”.

    Users watch the activity stream to see what happened since the last time they connected.
    This means that if they connect each 4 days, they check further. And this became false :
    They won’t be looking 3 pages further for a comment that has just been posted a minute ago.

    SWA is an instant information feed. The’re so many different uses of BP that i wouldn’t give one more than another, but i’m pretty sure that nobody is searching for something that is not/or could be – visible instantly.
    If i don’t see an activity called comment, i don’t search for it. And if i would search, i use the SWA show filter.

    Now back to the problem.
    Try this snippet which will force chronological comment display on the SWA.
    install it in bp-custom.php or theme’s functions.php

    And give feedback !

    
    function bpfr_stream( $qs, $object ) {
    	if ( 'activity' != $object ) {
    		return $qs;
    	}
    	
    	$qs = wp_parse_args( $qs, array() );
    	
    	$qs['display_comments'] = 'stream';
    	
    	return $qs;
    }
    add_filter( 'bp_ajax_querystring', 'bpfr_stream', 20, 2 );
    #186059
    danbp
    Participant

    In the menu settings you can link to the activity page, not to a specific activity (so far i know).

    I posted 3 snippets on Github to test and choose what you need/prefer to use.

    Copy/paste the code into bp-custom.php

    #185458
    danbp
    Participant

    @jejemo

    try by adding this at the begin of your function
    $user_id = bp_get_activity_user_id();

    If you’re working on the Toolbar, the correct way to add a menu is like on this example:

    
    /* add links/menus to the admin bar*/
    /* more details here: http://wpengineer.com/2113/add-menus-to-the-admin-bar-of-wordpress/ */
    
    function mytheme_admin_bar_render() {
    global $wp_admin_bar;
    
    	$wp_admin_bar->add_menu( array(
    		'parent' => 'new-content', // use 'false' for a root menu, or pass the ID of the parent menu
    		'id' => 'new_media', // link ID, defaults to a sanitized title value
    		'title' => __('Media'), // link title
    		'href' => admin_url( 'media-new.php') // name of file
    		'meta' => false // array of any of the following options: array( 'html' => '', 'class' => '', 'onclick' => '', target => '', title => '' );
    		)
    	);
    }
    add_action( 'wp_before_admin_bar_render', 'mytheme_admin_bar_render' ); 

    A similar method is used to add a tab. Here on a user profile.

    function bpfr_my_setup_nav() {
        global $bp;
    	
    	$mytab=array(
    	'name'            => 'My Tab',
    	'link'      	  => 'http://example.com/wp-content/themes/twentythirteen/my_extra_page.php',
    	'slug'         	  => 'my-tab',
    	'css_id'          => 'my_custom_tab',
    	'position'        => 100,
    	'user_has_access' => 1,
        'screen_function' => 'xprofile_screen_my_tab'
    	);
    	$bp->bp_options_nav['profile']['my-tab']=$mytab; 	
    }
    add_action('bp_setup_nav', 'bpfr_my_setup_nav');
    #183854
    cwjordan
    Participant

    Instead of the template change suggested above, it works better to add the following

    /* set default BP to profile page instead of activity page */
    define( 'BP_DEFAULT_COMPONENT', 'profile' );
    

    in your wp-content/plugins/bp-custom.php file (create that file if it does not exist – see https://codex.buddypress.org/plugindev/bp-custom-php/ for more about that file).

    cwjordan
    Participant

    It may be that you need to set:

    /* set default BP to profile page instead of activity page */
    define( 'BP_DEFAULT_COMPONENT', 'profile' );
    

    in your wp-content/plugins/bp-custom.php file (create that file if it does not exist – see https://codex.buddypress.org/plugindev/bp-custom-php/ for more about that file).

    #183332
    amckinnell
    Participant

    Hi Henry, here is the contents of that window:

    Request URL: http://photoforte.com/wp-admin/admin-ajax.php
    Request Method: POST
    Status Code: HTTP/1.1 200 OK
    Request Headers 12:51:58.000
    X-Requested-With: XMLHttpRequest
    User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:29.0) Gecko/20100101 Firefox/29.0
    Referer: http://photoforte.com/activity/
    Pragma: no-cache
    Host: photoforte.com
    Content-Type: application/x-www-form-urlencoded; charset=UTF-8
    Content-Length: 97
    Connection: keep-alive
    Cache-Control: no-cache
    Accept-Language: en-gb,en;q=0.5
    Accept-Encoding: gzip, deflate
    Accept: application/json, text/javascript, */*; q=0.01
    Sent Cookie
    wp-settings-time-10: 1398959694
    wp-settings-10: libraryContent=browse&editor=html&wplink=1&urlbutton=none&imgsize=full&align=center&hidetb=1
    wordpress_test_cookie: WP+Cookie+check
    wordpress_logged_in_0226a87af55d37f15c17099beebb5b87: amckinnell|1402256837|5ccb9ec3cbdec1dc82a94b7ed790dd41
    wordpress_0226a87af55d37f15c17099beebb5b87: amckinnell|1402256837|5b043d1b070ce3f02b6457a112bdfd6a
    s2member_tracking: fnIyOk5PVFdEQUJGSk9CeFBsZ2NMV3BiN2Rna3hMQUw0aTZzOmI3ZmEwNjU4NTQ2MGE0OWNiZDlmYTJhZGE2OTIyNDQzfEKGYUXbL9qRK4qkpq9Olm8qeZTiTkNtW3IJQea7fc4a
    PHPSESSID: d3jd0dp456hmi7p57ib09rrku7
    bp-activity-oldestpage: 1
    __utmz: 82912087.1400555092.174.6.utmcsr=Photo Forté Members|utmccn=7ce74da5f7-2014_May_Lesson_Week_3|utmcmd=email|utmctr=0_76b17b8542-7ce74da5f7-
    __utmc: 82912087
    __utmb: 82912087.7.9.1401047433231
    __utma: 82912087.1423870743.1397575542.1400993272.1401047233.201
    Response Headers Δ1626ms
    X-Robots-Tag: noindex
    x-frame-options: SAMEORIGIN
    x-content-type-options: nosniff
    Transfer-Encoding: chunked
    Server: Apache
    Pragma: no-cache
    Keep-Alive: timeout=5, max=85
    Host-Header: 192fc2e7e50945beb8231a492d6a8024
    Expires: Wed, 11 Jan 1984 05:00:00 GMT
    Date: Sun, 25 May 2014 19:51:50 GMT
    Content-Type: text/html; charset=UTF-8
    Connection: Keep-Alive
    Cache-Control: no-cache, must-revalidate, max-age=0

    About your other questions, it is a total custom theme, but I haven’t made any changes to it for weeks and this problem just cropped up a couple of days ago. I know for sure it just started because I use that load more all day.

    It’s difficult for me to answer the question about whether it happens in the default theme because I don’t want to change my live site because people are using it, and when I create a staging site, the load more button works in the current theme. I cannot understand why the problem only exists on the live site and not the staging site. I am creating the staging site when I am seeing the issue, it only takes a couple of minutes to create it, it’s on the same server, but the load more button works there.

    Thanks again for your help.

Viewing 25 results - 376 through 400 (of 831 total)
Skip to toolbar