Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'custom activity page'

Viewing 25 results - 351 through 375 (of 831 total)
  • Author
    Search Results
  • danbp
    Participant

    Try this to remove ALL activity feeds

    function bpfr_hide_rss_feeds() {	
       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_feeds');

    This snippet will only show logged in users friends activities (on all activity pages of the site)

    
    function bpfr_filtering_activity( $retval ) {
    	$retval['scope'] = 'friends';		
    		return $retval;
    	}
    add_filter( 'bp_after_has_activities_parse_args', 'bpfr_filtering_activity' );

    Add to bp-custom.php or child-theme functions.php

    More details about this on Codex

    #235875
    rosyteddy
    Participant
    #235536

    In reply to: Member Count

    rosyteddy
    Participant

    Hi you may check these threads – not sure if they can help you but you may consider to have a look. Have you any custom code and/or various plugins? Thanks.

    https://buddypress.org/support/topic/member-counter-on-activity-page-not-working/
    https://buddypress.trac.wordpress.org/ticket/5228
    https://buddypress.trac.wordpress.org/ticket/4061

    danbp
    Participant

    Please read here, it’s better explained.

    The example given on Codex is related to ‘page’, and you want to show something on ‘activity’.

    Instead of 'component_id' => buddypress()->activity->id,
    use 'component_id' => 'activity',
    and instead of
    add_action( 'bp_init', 'customize_page_tracking_args' );
    use init with a very late priority
    add_action( 'init', 'customize_page_tracking_args', 999 );

    Pfuiiiiii, taked me a while to find this.

    Here a working example of a CPT called Music and how to get it in the SWA

    // allow tracking of our CPT
    add_post_type_support( 'music', 'buddypress-activity' );
    
    // creating the dropdown filter on activity and members page
    function customize_page_tracking_args() {
        // Check if the Activity component is active before using it.
        if ( ! bp_is_active( 'activity' ) ) {
            return;
        }
     
        bp_activity_set_post_type_tracking_args( 'music', array(
            'component_id'             => 'activity', // unique ID
            'action_id'                => 'new_music', // new_$post_type where new_ is mandatory
            'bp_activity_admin_filter' => __( 'Published a new music', 'text-domain' ),
            'bp_activity_front_filter' => __( 'Music', 'text-domain' ),
    			'contexts'                 => array( 'activity', 'member' ), // swa & member activity page
    			'activity_comment'         => true,
    			'bp_activity_new_post'     => __( '%1$s posted a new <a href="%2$s">Music</a>', 'text-domain' ),
    			'bp_activity_new_post_ms'  => __( '%1$s posted a new <a href="%2$s">Music</a>, on the site %3$s', 'text-domain' ),
    			'position'                 => 100,
        ) );
    }
    add_action( 'init', 'customize_page_tracking_args', 999 );
    
    // creating the CPT
    function bpfr_create_post_type() {
      register_post_type( 'music',
        array(
          'labels' => array(
            'name' => __( 'Music', 'text-domain' ),
            'singular_name' => __( 'Music', 'text-domain' )
          ),
          'public' => true,
          'has_archive' => true,
        )
      );
    }
    add_action( 'init', 'bpfr_create_post_type' );
    

    FYI, i added the mentionned topic to the Codex page. Would probably help more than one. ๐Ÿ˜‰

    #235083
    leanneoleary
    Participant

    Thanks for your help with this but I am still not sure what I need to do. The function I posted was just an example that I had found from an earlier forum, I do not need to add videos and pictures to the activity stream.

    I need to add details of a custom post type every time a custom form is submitted from the frontend by a user. The custom post type is “Files”. Below is a class for the form and it is within the CMB (custom meta boxes) plugin folder. Can you advise on how to implement the code to record these forms posts in the activity stream?

    class uploadForm {
    
        // Set prefix
        public $prefix = '_cmb_'; 
    
        /**
         * Construct the class.
         */
        public function __construct() {
            add_filter( 'cmb_meta_boxes', array( $this, 'cmb_metaboxes' ) );
            add_shortcode( 'cmb-form', array( $this, 'do_frontend_form' ) );
            add_action( 'init', array( $this, 'initialize_cmb_meta_boxes' ), 9 );
           /* add_action( 'cmb_save_post_fields', array( $this, 'save_fields' ), 10, 4 );*/
            add_action( 'save_post', array( $this, 'save_fields' ), 10, 4 );
           /*add_filter( 'bp_blogs_record_comment_post_types', 'add_activity' );   IS THIS CORRECT?  */ 
        }
    
        /**
         * Define the metabox and field configurations.
         */
        public function cmb_metaboxes( array $meta_boxes ) {
    
            /**
             * Metabox for the "Memorials" front-end submission form
             */
            $meta_boxes['upload_files_metabox'] = array(
                'id'         => 'files',
                'title'      => __( 'Upload files', 'cmb' ),
                'pages'      => array( 'Files' ), // Post type
                'context'    => 'normal',
                'priority'   => 'high',
                'show_names' => true, // Show field names on the left
                'fields'     => array(
                    array(
                        'name'       => __( 'File description', 'cmb' ),
                        'desc'       => __( 'File title or description', 'cmb' ),
                        'id'         => $this->prefix . 'title',
                        'type'       => 'text',
                    ),
                    array(
                        'name'     => __( 'Project stage', 'cmb' ),
                        'desc'     => __( 'select stage (optional)', 'cmb' ),
                        'id'       => $this->prefix . 'category',
                        'type'     => 'taxonomy_select',
                        'taxonomy' => 'stages', // Taxonomy Slug
                    ),
                    array(
                        'name' => __( 'Link to website', 'cmb' ),
                        'desc' => __( 'Add url to website (optional)', 'cmb' ),
                        'id'   => $this->prefix . 'url',
                        'type' => 'text_url',
                        'protocols' => array('http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet'), // Array of allowed protocols
                        // 'repeatable' => true,
                    ),
                   array(
                        'name' => __( 'Upload image', 'cmb' ),
                        'desc' => __( 'Upload an image or enter a URL.', 'cmb' ),
                        'id'   => $this->prefix . 'image',
                        'type' => 'file',
                    ),
    
                  array(
                      'name'         => __( 'Upload files', 'cmb' ),
                      'desc'         => __( 'Upload or add multiple images/attachments.', 'cmb' ),
                      'id'           => $this->prefix . 'file_list',
                      'type'         => 'file_list',
                  ),
                  array(
                    'name' => __( 'oEmbed', 'cmb' ),
                    'desc' => __( 'Enter a youtube, twitter, or instagram URL. Supports services listed at <a href="https://codex.wordpress.org/Embeds">https://codex.wordpress.org/Embeds</a>.', 'cmb' ),
                    'id'   => $this->prefix . 'embed',
                    'type' => 'oembed',
                 ), 
                ),
            );
    
            return $meta_boxes;
        }
    
        /**
         * Shortcode to display a CMB form for a post ID.
         */
        public function do_frontend_form() {
    
            // Default metabox ID
            $metabox_id = 'upload_files_metabox';
    
            // Get all metaboxes
            $meta_boxes = apply_filters( 'cmb_meta_boxes', array() );
    
            // If the metabox specified doesn't exist, yell about it.
            if ( ! isset( $meta_boxes[ $metabox_id ] ) ) {
                return __( "A metabox with the specified 'metabox_id' doesn't exist.", 'cmb' );
            }
    
            // This is the WordPress post ID where the data should be stored/displayed.
            $post_id = 0;
    
            if ( $new_id = $this->intercept_post_id() ) {
                $post_id = $new_id;
                echo 'Thank You for your submission.';
            } 
    
            // Shortcodes need to return their data, not echo it.
            $echo = false;
    
            // Get our form
            $form = cmb_metabox_form( $meta_boxes[ $metabox_id ], $post_id, $echo );
    
            return $form;
        }
    
        /**
         * Get data before saving to CMB.
         */
        public function intercept_post_id() {
    
            // Check for $_POST data
            if ( empty( $_POST ) ) {
                return false;
            } 
             
            
    
            // Check nonce
            if ( ! ( isset( $_POST['submit-cmb'], $_POST['wp_meta_box_nonce'] ) && wp_verify_nonce( $_POST['wp_meta_box_nonce'], cmb_Meta_Box::nonce() ) ) ) {
                return;
            }
            
            // Setup and sanitize data
            if ( isset( $_POST[ $this->prefix . 'title' ] ) ) {
                           
              
                //add post data to database    
                $this->new_submission = wp_insert_post( array(
                    'post_title'            => sanitize_text_field( $_POST[ $this->prefix . 'title' ] ),
                    'post_author'           => get_current_user_id(),
                    'post_status'           => 'publish', // Set to draft so we can review first
                    'post_type'             => 'file',
                ), true );
    
                // If no errors, save the data into a new post draft
                if ( ! is_wp_error( $this->new_submission ) ) {
                    
                    return $this->new_submission;
                    
                   
                } 
    
            }
    
            return false;
        }
    
        /**
         * Grant temporary permissions to subscribers.
         */
        public function grant_publish_caps( $caps, $cap, $args ) {
    
            if ( 'edit_post'  == $args[0] ) {
                $caps[$cap[0]] = true;
            }
    
            return $caps;
        }
        
       
        
    
        /**
         * Save custom fields and uploaded files 
         */
        public function save_fields( $post_id, $post  ) {
    
                if($_POST['_cmb_category'] != ''){
                    add_post_meta( $post_id, '_cmb_category', $_POST['_cmb_category'], true );
                }
                if($_POST['_cmb_url'] != ''){
                    add_post_meta( $post_id, '_cmb_url', $_POST['_cmb_url]'], true );
                }
                if($_POST['_cmb_image'] != ''){
                    add_post_meta( $post_id, '_cmb_image', $_POST['_cmb_image'], true );
                }
                if($_POST['_cmb_image_id'] != ''){
                    add_post_meta( $post_id, '_cmb_image_id', $_POST['_cmb_image_id'], true );
                }
                if($_POST['_cmb_file_list'] != ''){
                    add_post_meta( $post_id, '_cmb_file_list', $_POST['_cmb__file_list'], true );
                }
                if($_POST['_cmb_embed'] != ''){
                    add_post_meta( $post_id, '_cmb_embed', $_POST['_cmb_embed'], true );
                }
           
    
        }
    
        /**
         * Initialize CMB.
         */
        public function initialize_cmb_meta_boxes() {
    
            if ( ! class_exists( 'cmb_Meta_Box' ) ) {
                require_once 'init.php';
            }
    
        }
        
        /**
         * Add to buddypress activity timeline. - HOW???
         */
        public function add_activity($post_types) {
    
           /* $activity_id = bp_activity_add( $args );
            
            return $activity_id;*/
    
           /*   $post_types[] = 'file'; 
              return $post_types;*/
        }  
        
    
    } // end class
    
    $uploadForm = new uploadForm();
    
    #234753
    mathijs84
    Participant

    Thanks danbp,

    You think Buddypress is the right way to go ??

    With point 2 i mean, that at the start of each month every user has to upload a new picture.
    So this will be custom development i guess!

    We are only going to use the member (wall)pages, kinda like a facebook wall. Is it possible to somehow get the elements like activity, photo’s, documents and messages on 1 page without the tabs?

    #233983
    Mathieu Viet
    Moderator

    At What priority does Easy Custom Post Types hooks ‘init’ ?

    You need to be sure the post type has been defined before using bp_activity_set_post_type_tracking_args() so change ‘bp_init’ to ‘init’ and try to add a very late priority, eg:

    // Don't forget to add the 'buddypress-activity' support!
    add_post_type_support( 'sd_article', 'buddypress-activity' );
     
    function customize_page_tracking_args() {
        // Check if the Activity component is active before using it.
        if ( ! bp_is_active( 'activity' ) ) {
            return;
        }
     
        bp_activity_set_post_type_tracking_args( 'sd_article', array(
            'component_id'             => 'activity',
            'action_id'                => 'new_sd_article',
            'bp_activity_admin_filter' => __( 'Neuer Artikel verรถffentlicht', 'custom-domain' ),
            'bp_activity_front_filter' => __( 'Artikel', 'custom-domain' ),
            'contexts'                 => array( 'activity', 'member' ),
            'bp_activity_new_post'     => __( '%1$s hat den neuen <a href="%2$s">Artikel</a>', 'sozialdynamik' ),
            'bp_activity_new_post_ms'  => __( '%1$s hat den neuen <a href="%2$s">Artikel</a>, on the site %3$s', 'sozialdynamik' ),
            'position'                 => 100,
        ) );
    }
    add_action( 'init', 'customize_page_tracking_args', 1000 );
    #233982
    Monkey1980
    Participant

    1. I just did it to test, the original code you provided was for pages – having established that it worked I then had an entry in the activity, in the admin it showed ‘Published a new page’ – i then changed the post type to my custom one and set my action id and notice in the admin it said ‘Unregistered action – new_blog_page’ in the Action Column for the page test entry – I realised this was the ‘action_id’ from your original code so new the code worked. It just does not work when I set my CPT for some reason. The CPT does create an activity entry but using the default message.

    2. It is registered using Easy Custom Post Types plugin, however I have another CPT in my child theme (services-type.php) and the same thing happens for this post type.

    3. This is possible for the CPT in my child theme but not the one’s created using the ECPT plugin – I will test with this disabled and perhaps migrate the CPT’s into the child theme if I find that it is causing the conflict.

    #233962
    Monkey1980
    Participant

    Sorry!

    Indeed, the New Post generates an activity item with ‘user wrote a new item’ – if a then change the CPT to ‘page’ but leave the action ID as my custom one the WordPress Admin and the Frontend both show my custom activity message! my code is below – the %3$s makes sense as I not running multi-site:

    // Don't forget to add the 'buddypress-activity' support!
    add_post_type_support( 'sd_article', 'buddypress-activity' );
     
    function customize_page_tracking_args() {
        // Check if the Activity component is active before using it.
        if ( ! bp_is_active( 'activity' ) ) {
            return;
        }
     
        bp_activity_set_post_type_tracking_args( 'sd_article', array(
            'component_id'             => buddypress()->activity->id,
            'action_id'                => 'new_sd_article',
            'bp_activity_admin_filter' => __( 'Neuer Artikel verรถffentlicht', 'custom-domain' ),
            'bp_activity_front_filter' => __( 'Artikel', 'custom-domain' ),
            'contexts'                 => array( 'activity', 'member' ),
            'bp_activity_new_post'     => __( '%1$s hat den neuen <a href="%2$s">Artikel</a>', 'sozialdynamik' ),
            'bp_activity_new_post_ms'  => __( '%1$s hat den neuen <a href="%2$s">Artikel</a>, on the site %3$s', 'sozialdynamik' ),
            'position'                 => 100,
        ) );
    }
    add_action( 'bp_init', 'customize_page_tracking_args' );
    
    ----->

    I hope this is clearer!! :0)

    #233960
    Mathieu Viet
    Moderator

    Hi i’m sorry. It must be because i’m french, but i’m not sure to understand what you reported ๐Ÿ™

    If i “rephrase” like this :

    When adding the buddypress-activity support for my custom post type and specifying custom action strings arguments i don’t manage to have my custom strings displayed into the activity stream but instead the default action string eg : user wrote a new item

    Would it be ok with your description of the trouble ?

    %3$s should do something if your config is multisite. Is your config multisite ?

    I would also prefer to show the page title as is shown when a blog is posted as supposed to just showing โ€œUser has posted a new โ€˜item’โ€ โ€“ perhaps a %4$s can be added???

    This would require some more activity meta. I haven’t included this part in core, so you’ll need to add a filter to achieve your goal. But let’s try to fix things step by step. I’m going to investigate on the “rephrase” i’ve just done.

    My first impression is i’m a bit surprised as i’m using Post type activities for one of my plugin and everything seems to be ok… See this image :
    Ideastream

    #233958
    Monkey1980
    Participant

    Saw the 2.2 update today and was very pleased to see we can now have activity for Custom Post Types – so exited was I that I updated immediately!!! (coincidentally doing some dev’ stuff/maintenance)

    However my excitement soon passed – after poking around for the last few hours as the code you suggested did not seem to work fully it seems I have the following situation:

    1. When I specify my Custom Post Type, i do indeed get an activity entry …wahaay!!! – unfortunately the message is the default and not my custom message :0(

    2. If I specify the post type as ‘page’ – the message is my custom one (front end and back end) but obviously the activity feed is not updated as ‘page’ is not my CPT (previous entries from testing revealed this behaviour as when I changed the CPT back to page I have left the ‘action_id’ set to my CPT) :0(

    I also have a question, it seems the custom message %1$s for the user’s name – %2$s for the the link and %3$s for site name.

    For some reason %3$s doesn’t do anything?

    I would also prefer to show the page title as is shown when a blog is posted as supposed to just showing “User has posted a new ‘item'” – perhaps a %4$s can be added???

    Any help here would be most appreciated!! :0)

    Regards

    Sam

    #233561
    deshmukh
    Participant

    @henrywright Thanks! Here is what I did:

    edited /wp-content/plugin/buddypress/bp-activity/activity-template.php

    Found the activity loop and changed $defaults = array(
    ‘display_comments’ => ‘stream’

    That puts all comments on the top but only the comments are pulled to the top. What I really wanted was the entire conversation is pulled to the top.

    Also, I think what I have done is crude and somehow, not ‘proper’. For instance, when I update buddypress plugin, all my changes will be gone.

    How do I make sure that the changes remain?

    Also, I have gone through https://codex.buddypress.org/developer/function-examples/bp_activity_add/

    But still am nebulous about:
    You can add items to the activity stream using bp_activity_add(). Youโ€™d write a custom function and hook it to the relevant action which fires when a group message has been posted (see a)

    Can you elaborate?

    Lastly, the codex page talks about adding new activity to database. I hope, it makes sure that one gets to see messages posted to only those groups one is authorized to see.

    PS – When I crack it, is there any way I can contribute to the codex so other newbies like me have access to the stuff? How?

    Thanks!

    #232799

    In reply to: Pagination in Activity

    r-a-y
    Keymaster

    The following codex page provides an example of how to change the activity pagination to a custom number:

    Using bp_parse_args() to filter BuddyPress template loops

    #232477
    djsteveb
    Participant

    @djpaul – I’m not sure if it was working on the previous server; I THINK something related to mod_sec settings on that server was causing problems for the site, so I had to move it. Weird things started happening… changing widgets order would not save properly (found a work around by entering accessibility mode in screen options) – also custom menu settings would not add pages to the custom menu – could not figure out why.. so moved to new server.. now widgets save and stuff.


    @danbp
    – I do use a bp-custom to make a user’s profile default show their profile instead of activity tab. (Wish I knew how to get rid of the “BASE” showing there!) – but I don’t think anything else is doing any custom pagination loop stuff in bp-custom or theme functions or anything.

    not seeing anything in server error log.

    not sure how to check for css or js errors.. like using the w3c validator? or is this a java console debugger thing I have heard about?

    Not sure what to put, my_bp_activities_per_page_5_on_groups_activity (would that be the proper first line of the code? (or where (bp-custom?) – to modify groups display. Trying to understand that page you referenced and the trac codes.

    when I tried adding – it does show a new page of groups, but only displays 2 groups, yet under that is says “Viewing 8 – 14 of 211 groups ” – strange.

    #231097
    danbp
    Participant

    hi @navinachettri,

    wide question ! Causes are multiple, from server power to browser settings, medias size and some conflict with a theme, a plugin or a custom function….

    An easy thing to do is to restrain the image size and weight in the media settings.
    Another thing would be to check the activity page code if you use a child-theme.

    About flickering, have you tested with different brower ? Could also be a js conflict…

    As you see, your question brings more question as answers. Good debug. ๐Ÿ˜‰

    #231089
    danbp
    Participant

    To remove @username near the header avatar on profile page, use this (in bp-custom.php)

    function bpfr_remove_mention_from_profile() {	
    	// hide the hardcoded @ sign and username
    	echo '<style> h2.user-nicename { display:none; } </style>';
    
    	if( bp_is_user() && ! bp_get_member_user_id() ) {
            $user_id = 'displayed: '. bp_displayed_user_id();
        } else {
            $user_id = 'get_member_user: '. bp_get_member_user_id();
        }
    
    	remove_filter( 'bp_get_displayed_user_mentionname', bp_activity_get_user_mentionname( bp_displayed_user_id() ) );
    	
    }
    add_filter( 'bp_get_displayed_user_mentionname', 'bpfr_remove_mention_from_profile' ); 

    To remove the mention sub tab from profile page, use this (in bp-custom.php):

    
    function bpfr_hide_mention( $retval = 1 ) {
    	$retval = false;
    	// condition 
    	if ( bp_is_user() && ! bp_is_my_profile() ) {
    		$retval = true;
    	}	
    	return $retval;
    }
    
    function bpfr_hide_mention_nav() {	
    	// stop if condition is not ok
    	if ( ! bpfr_hide_mention() ) {
    		return;
    	}
    	// otherwise we remove the nav item
    	//bp subnav items
    	bp_core_remove_subnav_item( 'activity', 'mentions' ); 
    }
    add_action( 'bp_ready', 'bpfr_hide_mention_nav' );

    To unlink @mention (this removes only the link not the mentionned username) AND remove the public message button, use this (in bp-custom.php):
    add_filter( 'bp_activity_do_mentions', '__return_false' );

    To allow the new BP 2.1 @mention tool in bbPress, use this (in bp-custom.php):

    
    function bpfr_bbpress_maybe_load_mentions_scripts( $retval = false ) {
    	if ( function_exists( 'bbpress' ) && is_bbpress() ) {
    		$retval = true;
    	}
     
    	return $retval;
    }
    add_filter( 'bp_activity_maybe_load_mentions_scripts', 'bpfr_bbpress_maybe_load_mentions_scripts' );

    Tested with WP 4.1 – BP 2.1.1 – bbP 2.5.4

    #231036
    danbp
    Participant

    Tempera theme was recently updated and normally you haven’t to use the old buddybar.
    So the define is of no utility… (see ticket)

    BP use now the WordPress Toolbar.

    It looks also that you have 2 activity pages, 2 members page and 2 groups page. There should be only one. See if you have deleted pages, and clear the trash.
    Also set up the pretty permalinks (anything but default), or at least re-save that setting page.

    Finally, make a test with one of wp’s default theme, bring anything to work, before activating Tempera.

    I use another theme of the same author, and if like i suspect, there is the same theme customization tool in Tempera, you must be carefull with that theme settings.

    In BP settings, you have an option to show/hide the toolbar to logged out user. Deactivate it.

    And read the theme doc attentively ! ๐Ÿ˜‰

    #230068
    danbp
    Participant

    Give this a try – add to bp-custom.php or child-theme functions.php

    This will show only blog activities on site/user activity & rss page.

    function bpfr_filtering_activity( $retval ) {
    	$retval['object'] = 'blogs';		
    		return $retval;
    	}
    add_filter( 'bp_before_has_activities_parse_args', 'bpfr_filtering_activity' );

    Codex reference: https://codex.buddypress.org/developer/using-bp_parse_args-to-filter-buddypress-template-loops/

    #229799
    Carme Mias
    Participant

    Hello,
    I get the same error message in the BuddyPress Activity admin page. Also, AG Custom Admin don’t seem to give any solution either.
    Does anyone have a recommendation on how to solve this?
    Thanks

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

    #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; }

    #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');
    ?>
Viewing 25 results - 351 through 375 (of 831 total)
Skip to toolbar