Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'custom activity page'

Viewing 25 results - 451 through 475 (of 1,252 total)
  • Author
    Search Results
  • izzyian
    Participant

    I found this code and put it in my child theme functions but it does not work for me :

    //=Change the number of activity items to show per page
    function my_custom_query_filter( $query_string ) {
    $query_string .= ‘&per_page=10′;
    return $query_string;
    }
    add_filter( ‘bp_dtheme_ajax_querystring’, ‘my_custom_query_filter’ );
    shanebp
    Moderator

    >Buddypress is waiting for the first login of each user

    At which point it will add a last_activity timestamp.
    The easiest solution is to add those timestamps for everyone via a script.
    Put this code in your bp-custom.php file, then open your site in a browser.
    Then remove the code – or it will update the timestamp on every page load.

    
    function daten_add_last_activity() {
        global $wpdb;
        foreach ( $wpdb->get_col( "SELECT ID FROM $wpdb->users" ) as $user_id ) {
            bp_update_user_last_activity( $user_id, bp_core_current_time() );
        }
    }
    add_action('bp_init', 'daten_add_last_activity' );
    mcpeanut
    Participant

    Hi, just a quik question for you all, im using a plugin that my users can create an article that uses custom post types sort of like a blog post that other users can then comment on, i am trying to get the custom post type associated with the user who made the post to show up in there sidebar, i dont want to show them globally meaning only the user that created it should be able to see it in their sidebar on the sitewide activity page, basically just an easy access link for them to click from sitewide activity back to their posts. anyone done something similar that can point me in the right direction or do you know of a plugin to achieve this? thx

    #228288

    Since BP 1.6 there has been a constant that defines this.

    Just add define ( 'BP_GROUPS_DEFAULT_EXTENSION', 'forum' ); to your functions.php or bp-custom.php file.

    From then on, when you click to go to a group, it will display the group’s forum page instead of the normal ‘Home’ activity landing page.

    Toby
    Participant

    Using WordPress 4.0 and Buddypress 2.1.1 and autosuggest is not coming up for the “what’s new” box on group home page.

    It seems that the group home page is failing the test done by bp_activity_maybe_load_mentions_scripts(). Not sure if this is something specific to my site, but it doesn’t appear to be as the page fails on both the first and third groups of logic tests in ( bp_is_activity_component() || bp_is_blog_page() && is_singular() && comments_open() || is_admin() );

    I’ve fixed it using the following code in my bp_custom.php file, but I’m wondering if this is intended functionality, site-specific or a bug?

    	function my_load_mentions_on_group_home_page( $retval )
    	{
    		if( bp_is_group_home() )
    			$retval = true;
    		return $retval;
    	}
    	add_filter( "bp_activity_maybe_load_mentions_scripts", "my_load_mentions_on_group_home_page" );
    MVHartley
    Participant

    Hello folks,

    I’ve been researching translation plugins for my buddypress site (WordPress 4.0 Buddypress 2.1.1 – clean install as of yet, running twenty thirteen theme right now, just starting out on the theme development for my site, I want to pin the language issue down before doing anything)

    I want to be able to provide my visitors the option of displaying my buddypress in different languages however I do NOT want to translate any of the blogs/posts/comments/forums/any user generated content I just want to translate text on the BP pages, text in the menus, alerts etc

    The only slightly complicated bit to it is I have a few custom defined profile fields that I would like to translate

    To illustrate, take this example

    my (hypothetical) member page would read:

    Name : Matt <—User entered text, not translated
    languages: English, Swedish <—selected from drop down list/check boxes
    Country : England <—selected from drop down list/check boxes
    Nationality : English <—selected from drop down list/check boxes

    MY activity feed/entry would read

    “Hello everyone, my name is Matt”

    ****Now let’s say a French visitor visits my profile, they would read

    Nom: Matt
    Langue: Anglais, Suédois
    Pay : Angleterre
    nationalité : Anglais

    “Hello everyone, My name is matt”

    **I do NOT want my comment to read**

    “Salut tout le monde, je suis matt”

    So in short, I want to be able to provide translations of everything on the website that I have coded in there (menus, alerts, instructions, registration emails, info pages etc) but leave alone anything that a user has typed

    I would really appreciate being pointed in the correct direction for this – almost all of the plugins I’ve come across so far are focused on providing translations for everything, blog posts included

    Cheers!

    Matt

    #228029
    Tanner Moushey
    Participant

    Hello @boki88! Unfortunately it sounds like theme you are using does not have the ability to change those BuddyPress styles without some custom coding. Fortunately, it looks like you have Jetpack enabled and Jetpack has a CSS editor where you can enter custom styles without having to edit code in the theme files.

    Go to the edit css page (http://anibusters.com/wp-admin/themes.php?page=editcss) and enter the following style:

    .gp-theme #buddypress #activity-stream p { color: black; }

    ksporich12
    Participant

    I had been designing a BuddyPress site for a couple months now and I had several plugins installed. Every plugin was working well with each other. I decided to make a few major changes and I installed several more plugins to test. I did a lot of installing, testing, and uninstalling. Eventually I wound up installing Jetpack when I noticed that comments and activity posts were not working correctly. I clicked on the activity page in my dashboard and I noticed an error notice from the AG Custom Admin plugin.

    I uninstalled every plugin one at a time and the error never went away. I began to investigate the code when I soon notice that I could no longer log in to my back end. I tried everything i could think of. Ultimately ended up deleting BuddyPress folder in my FileManager and reinstalled it. Same error with only BuddyPress and AG Custom Admin. I uninstalled the entire wordpress site from my server and started completely over.

    I have uninstalled the database and started completely from scratch. I installed WordPress, and BuddyPress. I opened up my browser console and the error is still there.

    Can anyone provide any insight? This has been a very frustrating process and I am not experienced enough to figure this out. I can’t seem to find anyone else who may have already solved this issue.

    Thanks,
    Ken

    #214084
    MuseMusic
    Participant

    Hello All,

    I’m looking to create a BuddyPress site that allows users to share youtube videos. My wish list of the features I would like to create are as follows:

    • Custom post type for adding a video (video post type).
    • Create a page containing a loop filtered for displaying each video post.
    • Create an entry in the activity stream alerting that a new video has been posted.
    • Create a notification that alerts users if their friends adds a video.

    I am pretty clear on how to create a custom post type and then create a filtered loop to display the custom posts. I’m not so sure about adding an entry to the activity stream and creating an alert for the users’ friends. Would anyone be able to give me some advice on how to achieve this?

    Cheers!

    #212370
    Halo Diehard
    Participant

    Thanks for your quick response, @danbp. I did not include the support information, because I just needed an answer to my simple question; didn’t think anyone would be able to help me with my actual issue, since I am using Simple Press and not bbPress.

    Simple Press has a BuddyPress plugin, that integrates some of the functionality of their forums into the BuddyPress activity, and allows the forum owner to elect to use the BuddyPress profile, for example, over the SP one. But I am not seeing any forum posts in activity. I contacted them, but I also was not seeing the forum tab like I see here. I was here for a separate issue, and noticed that forum tab, so I opened this topic to ask about the tab.

    Maybe that tab disappears if bbPress is not active, I’m not sure, but I really thought I remembered with the bbPress forums that my member’s posts were mixed in with all the other sitewide activity, and I don’t remember ever seeing a forum tab. I’m on my second BuddyPress supported theme; the first was Custom Community, and now I’m using Matheson.

    I’m familiar with how to set up BuddyPress, but thanks for the links. Here is the rest of the info, in case it helps:

    1. Which version of WordPress are you running? 4.0

    2. Did you install WordPress as a directory or subdomain install? If this is either or, than it’s a directory install

    3. If a directory install, is it in root or in a subdirectory? Again, not sure of the question. My url points to the root wordpress folder, but that folder is not in the root of my server, but a few folders in.

    4. Did you upgrade from a previous version of WordPress? If so, from which version? Have had WordPress and upgraded every release for a couple of years

    5. Was WordPress functioning properly before installing/upgrading BuddyPress (BP)? e.g. permalinks, creating a new post, commenting. Yes.

    6. Which version of BP are you running? 2.1.1

    7. Did you upgraded from a previous version of BP? If so, from which version? 2.1.0? I don’t know, the same: Have had BuddyPress for at least a year, upgrade it as releases come out.

    8. Do you have any plugins other than BuddyPress installed and activated? If so, which ones?

    (Ones followed by asterisk are not active, since I’m not committed yet to Simple Press. Others I’m getting around to testing, or only use occasionally. Yes, I know it’s a lot.)

    Add New Default Avatar
    BadgeOS *
    bbp buddypress profile information *
    bbPress *
    bbPress Enable TinyMCE Visual Tab *
    bbPress Go To First Unread Post *
    bbPress Stay Checked *
    bbP Signature *
    Black Studio TinyMCE Widget
    BuddyPress
    BuddyPress Groups Extras *
    Content Aware Sidebars *
    Email posts to subscribers *
    Google Analytics by Yoast
    iFlyChat
    LenSlider *
    Link Library
    NextScripts: Social Networks Auto-Poster
    Posts for Page Plugin
    Quick Chat
    Simple: Press
    Simple: Press v5 Importer
    Simple social share
    SlideDeck 2 Lite *
    Social Login
    Stop Registration Spam
    Subscribe/Connect/Follow
    T(-) Countdown
    ToTop Link
    Ultimate Posts Widget *
    Video Thumbnails
    WangGuard
    WordPress SEO
    wp-Monalisa
    WP Ads Within Contents *
    WP Custom Login
    WP Overview (lite)
    WP Symposium Toolbar

    9. Are you using the standard BuddyPress themes or customized themes? I am using Matheson, a theme listed as working with BuddyPress, and it is further customized via css by myself.

    10. Have you modified the core files in any way? No.

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

    12. If running bbPress, which version? Or did your BuddyPress install come with a copy of bbPress built-in? bbPress is deactivated, using Simple Press.

    13. Please provide a list of any errors in your server’s log files. I’ve searched to try and find these, and I have no idea how to find them.

    14. Which company provides your hosting? 1and1

    15. Is your server running Windows, or if Linux; Apache, nginx or something else? If this might be relevant, I will try to find out. Think it’s Linux.

    #210013
    danbp
    Participant

    @mineo

    there are always difference between two BuddyPress version…. If you use a custom translation, you must update your version at each BP update. This is how translating a plugin or a theme works and has nothing to do with php files or studying the support.

    Version 2.0

    Version 2.0.1

    Version 2.0.3

    Version 2.1

    and so on…

    For example, the difference between 2.0.1 and 2.1 is not the translation itself, but the translation comments who where added for better disambiguation.

    So for example the word “activity’ in bp 2.01 is written in the po file like this:

    #: bp-activity/bp-activity-loader.php:165
    #: bp-activity/bp-activity-loader.php:276
    msgid "Personal"
    msgstr ""

    and in BP 2.1, you see this:

    #: bp-activity/bp-activity-loader.php:277
    msgctxt "My Account Activity sub nav"
    msgid "Personal"
    msgstr ""

    A comment was added who look like this: msgctxt "My Account Activity sub nav"

    Because of this comment, even if the phrase is already translated, poEdit consider that there is a modification and mark this phrase as fuzzy. And because it is fuzzy, gettext doesn’t use it and the word stays in english.

    In 2.1 “activity” remains 9 times alone, with 9 different disambiguation context, in difference to older versions where “activity” was used indifferently for any context.

    So if you didn’t take care of such difference, you can think your word is translated. It is, but outside of the context.

    
    msgctxt "Page title for the Activity directory."
    msgid "Activity"
    
    msgctxt "Activity items per page (screen options)"
    msgid "Activity"
    
    msgctxt "Admin Dashbord SWA page title"
    msgid "Activity"
    
    msgctxt "Admin Dashbord SWA menu"
    msgid "Activity"

    etc
    This means of course that you have to translate “activity” 9 times, instead one time, but the avantage to write it differently, depending your language and the context where the word is used.

    And again, modifying a po file with a text editor without compiling it into mo format is unuseable. You must use a compiler like poEdit, as gettext use .mo file to translate.

    Po/pot files are only working files, not system files like mo is.

    #205216
    WireLab
    Participant

    Hi,

    Sorry i need a bit more help as I failed to get it to work. So I created a bp-custom.php under wp-content/plugins

    and added the following below, however my activity-stream page was still accessible without login

    <?php
    // hacks and mods will go here
    function wirelab_check_activity_login() { 
      if( ! is_user_logged_in() && bp_is_activity() ) {
        wp_redirect( '/wp-login.php' ); 
        exit;
      }
    }
    add_action('bp', 'wirelab_check_activity_login');
    ?>
    #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.

    #201174
    Venutius
    Moderator

    Currently, the group home view simply shows the activity feed. Personally I think there should be opitions on what to show at this view, to allow it to be more customisable.

    I’m thinking a tick list of items that you want to include in the home view, so for example, if the group has a forum why not show this on the homepage? Same with the group description, maybe the group chat room and also any document folders etc.

    Generally with Buddypress and with WordPress, there are too many clicks required and too much scrolling to get to the information that you want. Each component is separate and you have to click on a link to see that particular feature, there are no aggregated views that summarise the information available. This makes things less accessible and less exciting.

    We live in a world of one click and zero patience, if we as a user to wait for a pageload then lets try to make that page as interesting as possible, with as much cool info as possible, lets not make them search out the information, lets give it to them as soon as they set a foot in the door.

    #200468
    GhostPool
    Participant

    Hi there,

    I’ve created my own activity loop shortcode. This worked fine with BuddyPress 2.0.2 and below, but with the recent changes to bp_has_activities() regarding the activity count the pagination is no longer working. I’ve also tried implementing the new load more button but when clicked it does not load more content. Here is the code I’m using: http://pastebin.com/CZaRhUwd

    I’ve added “count_total=count_query” to the query to load the page count but it has no effect. Am I missing something here, it just doesn’t seem to work.

    #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.

    #191182
    albert101
    Participant

    Hi,
    wondering if someone can help me here.
    After having tried hard not to bother any one I think found the problem( a custom js file) in my theme that is causing issues with my activities page.
    If i take the line off BP works like it is supposed to. but then other functions like sliders etc don’t.
    The following is the line of code causing the problem.
    wp_enqueue_script( ‘xyz-custom-script’, $template_dir . ‘/js/custom.js’, array( ‘jquery’ ), $theme_version, true );

    How should i go about in a correct fashion disable the script from queuing on the activity page please.
    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 !

Viewing 25 results - 451 through 475 (of 1,252 total)
Skip to toolbar