Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'buddypress'

Viewing 25 results - 18,351 through 18,375 (of 94,539 total)
  • Author
    Search Results
  • #243541
    mangelesgcl
    Participant

    Hello!

    I want disable admin bar on homepage. I tried disabling the “Show the admin bar for logged out users” but it doesn’t work. Then, I’ve tried as many php codes as I found out on this forum and other websites but anything works:

    https://buddypress.org/support/topic/disable-admin-bar/

    https://buddypress.org/support/topic/remove-buddypress-admin-bar/

    and others…

    Please, could you help me? Thanks!

    #243538
    coffeywebdev
    Participant

    Take a look at this code, I think it may be helpful for you…

    I created a function vp_add_group_activity_comments() that hooks to the ‘post_comment’ action, so when a user posts a comment an activity stream item is created and added to their group’s feed.. (on my site users can only be in one group at a time)

    It’s all about what you set for the $args array….

    
    function vp_add_group_activity_comments($comment_id){
    
    $comment = get_comment( $comment_id );
    GLOBAL $wpdb;
    $user_id = get_current_user_id();
    $user_info = get_userdata( $user_id );
    
    $current_user_group_id = $wpdb->get_var("SELECT group_id FROM ".$wpdb->prefix."bp_groups_members WHERE user_id = '".(int)$user_id."'");
    
    $comment_action = "<a href='".site_url()."/members/".$user_info->user_login."'>".$user_info->first_name." ".$user_info->last_name."</a> posted a comment on <a href='".get_permalink($comment->comment_post_ID )."'>".get_the_title($comment->comment_post_ID)."</a>";
    
    // arguments to pass to the bp_activity_add() function
    $args = array(
    'action'            => $comment_action,                     // The activity action - e.g. "Jon Doe posted an update"
    'content'           => $comment->comment_content,                     // Optional: The content of the activity item e.g. "BuddyPress is awesome guys!"
    'component'         => 'groups',                  // The name/ID of the component e.g. groups, profile, mycomponent
    'type'              => 'activity_update',                  // The activity type e.g. activity_update, profile_updated
    'primary_link'      => get_permalink($comment->comment_post_ID ),                     // Optional: The primary URL for this item in RSS feeds (defaults to activity permalink)
    'user_id'           => $user_id,  // Optional: The user to record the activity for, can be false if this activity is not for a user.
    'item_id'           => $current_user_group_id,                  // Optional: The ID of the specific item being recorded, e.g. a blog_id
    'secondary_item_id' => $comment->comment_ID,                  // Optional: A second ID used to further filter e.g. a comment_id
    'recorded_time'     => bp_core_current_time(), // The GMT time that this activity was recorded
    'hide_sitewide'     => 0,                  // Should this be hidden on the sitewide activity stream?
    'is_spam'           => 0,                  // Is this activity item to be marked as spam?
    );
    
    $add_activity = bp_activity_add($args);
    
    // Update the group's last activity
    groups_update_last_activity( $current_user_group_id );
    
    return true;
    }  
    add_action('comment_post', 'vp_add_group_activity_comments' );
    
    #243537
    coffeywebdev
    Participant

    Take a look at the code below to see how I use the post_comment action to hook my function vp_add_group_activity_comments(), which creates an activity stream item when a user posts a comment and adds it to their group’s activity stream… This is just what we are doing for our site, but if you look at the code you should be able to figure out how to do it for your site….

    
    function vp_add_group_activity_comments($comment_id){
    
    $comment = get_comment( $comment_id );
    GLOBAL $wpdb;
    $user_id = get_current_user_id();
    $user_info = get_userdata( $user_id );
    
    $current_user_group_id = $wpdb->get_var("SELECT group_id FROM ".$wpdb->prefix."bp_groups_members WHERE user_id = '".(int)$user_id."'");
    
    $comment_action = "<a href='".site_url()."/members/".$user_info->user_login."'>".$user_info->first_name." ".$user_info->last_name."</a> posted a comment on <a href='".get_permalink($comment->comment_post_ID )."'>".get_the_title($comment->comment_post_ID)."</a>";
    
    // arguments to pass to the bp_activity_add() function
    $args = array(
    'action'            => $comment_action,                     // The activity action - e.g. "Jon Doe posted an update"
    'content'           => $comment->comment_content,                     // Optional: The content of the activity item e.g. "BuddyPress is awesome guys!"
    'component'         => 'groups',                  // The name/ID of the component e.g. groups, profile, mycomponent
    'type'              => 'activity_update',                  // The activity type e.g. activity_update, profile_updated
    'primary_link'      => get_permalink($comment->comment_post_ID ),                     // Optional: The primary URL for this item in RSS feeds (defaults to activity permalink)
    'user_id'           => $user_id,  // Optional: The user to record the activity for, can be false if this activity is not for a user.
    'item_id'           => $current_user_group_id,                  // Optional: The ID of the specific item being recorded, e.g. a blog_id
    'secondary_item_id' => $comment->comment_ID,                  // Optional: A second ID used to further filter e.g. a comment_id
    'recorded_time'     => bp_core_current_time(), // The GMT time that this activity was recorded
    'hide_sitewide'     => 0,                  // Should this be hidden on the sitewide activity stream?
    'is_spam'           => 0,                  // Is this activity item to be marked as spam?
    );
    
    $add_activity = bp_activity_add($args);
    
    // Update the group's last activity
    groups_update_last_activity( $current_user_group_id );
    
    return true;
    }  
    add_action('comment_post', 'vp_add_group_activity_comments' );
    
    Justin Handley
    Participant

    I moved Buddypress from a Multisite install to a single site install. When I did this, all users are there, but they aren’t showing as members, and all activity is gone. I’m hoping this is a simple find / replace in the database, but I can’t figure out what I need to do to restore the correct information?

    #243532
    danbp
    Participant
    Henry Wright
    Moderator

    You will need to go through all of the BuddyPress communication channels available:

    1. Private messaging
    2. Public messaging

    etc

    Then when a user attempts to send a message to a user they have not been assigned to, disallow it to happen via one of the hooks BuddyPress makes available.

    With reference to assigning a user to a user, this could be achieved via user meta.

    #243529
    Bezuhov
    Participant

    Just tested with new install of only wordpress and buddypress, all latest versions. Posts and posts comments do not appear in activity stream, sadly.

    It seems there is some inherent bug in the buddypress or something.

    #243526
    Bezuhov
    Participant

    Just tested the snippet provided by @danbp, doesn’t work for me, as nothing shows in the activity stream.

    Will do a clean install, with fresh DB, and only wordpress with buddypress, to see if there is something wrong with my current configuration.

    Will post updates, as i am willing to come to the bottom of this issue for the whole community. 🙂

    #243524
    Bezuhov
    Participant

    djsteveb: site indexing is enabled, yes, googled all the topics regarding this issue, but found (for now) now solution for my problem, will explore further, hope you do too 🙂

    danbp: thanks for the link, read it, and will wait a little bit longer to see if the posts and comments appear in the activity stream after a while

    Generally speaking, is this a bug of the buddypress, or something wrong with my site, as i am seeing that this works just fine on other sites?

    #243520
    danbp
    Participant
    #243519
    danbp
    Participant

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

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

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

    You can also add some condition on the template. Ie

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

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

    #243518
    danbp
    Participant
    #243514
    Henry Wright
    Moderator

    I use a bp-custom.php file in the plugin folder

    Do you mean like this plugins/buddypress/bp-custom.php?

    If so, that’s the wrong place. It should be here:

    plugins/bp-custom.php

    #243513
    djsteveb
    Participant

    Test this using 2014 theme? With other plugins disabled?
    have you “enabled site tracking” in the buddypress settings?
    ( https://buddypress.org/support/topic/what-does-site-tracking-do/ )

    I think I may have a similar issue, and I think there was a thread about this recently, like in the past 3 weeks or so.. I have not whittled it down to a bp-custom issue, or theme issue, or what yet myself – too busy trying to fix more important things at the moment..

    interested if you find the issue / resolution – hope these tidbits help to find..

    #243512
    AdventureRidingNZ
    Participant

    I’ve found it.

    The BBPress plugin ‘Forum Restrict’ conflicts with BuddyPress Profile pic uploads. If you install ‘Forum Restrict’ it will break BuddyPress profile picture uploads.

    Eddie

    #243511
    3T_MJ
    Participant

    I use a bp-custom.php file in the plugin folder. As soon as I put it there, even if the file is empty (!), it causes a problem with adding and deleting post categories in the dashboard. The new categaories don’t show up automatically, only after refreshing manually the page. When deleting categories the same happens but addiionally there’s following error message: “An unidentified error has occurred.”

    When removing bp-custom.php file it works without any problems. This happens with no others plugins than buddypress installed and even if the bp-custom.php doesn’t contain any content.

    Any idea what could be wrong?

    #243508
    muskokee
    Participant

    Hi everyone, using this function (in the subject line) doesn’t just remove the item from the navigation menu, it removes it from the entire functionality of BuddyPress as this previous poster found:

    https://buddypress.org/support/topic/removing-nav-item-prevents-access-to-corresponding-page/

    Holy moly! I just wanted to redesign the layout of the links! Is there a way to *just* remove the navigation item without removing the functionality? I still want to use messages…just want to reposition it on the page!

    Thanks
    Sheri

    Bezuhov
    Participant

    Hi all,

    I just started working on a production site, with latest wordpress and buddypress installed, but can’t quite figure out why post comments do not appear in activity stream. I have search indexing and allow activity stream commenting on blog and forum posts enabled, but nothing happens. Well, everything else works just beautifuly, except that minor or major issue, lol. 🙂

    Any ideas?

    wordpress: 4.2.4
    buddypress: 2.3.2.1
    theme: mesocolumn
    site: beta.karierist.si

    Your help would be much appreciated, thanks. 🙂

    #243491
    danbp
    Participant

    Please read here.

    #243490
    danbp
    Participant

    Are you sure that the mo file contains you’re change ? If yes, save po/mo in a safe place, then remove po/mo from live site and ensure your site comes in english (default).

    – Reload buddypress_xx_XX.mo to wp-content/languages/plugins/buddypress-xx_XX.mo

    Aside, which language are you using ?

    #243489
    danbp
    Participant

    You’re welcome !

    To all readers, Codex reminder when getting 404, missing BP pages, not found errors after setup or upgrade ! 😉

    Settings → BuddyPress → Pages

    Pages are automatically generated for the BuddyPress components you enabled in the components settings using the default slugs based on the name of each component activated. Make sure that activated components have corresponding pages assigned to each in this panel.

    Directories
    Associate a WordPress Page with each BuddyPress component directory.

    • Activity Streams (if activated)
    • User Groups (if activated)
    • Members > this is core and can’t be removed/modified

    Registration

    Associate WordPress Pages with the following BuddyPress Registration pages.

    • Register
    • Activate

    Note: registration is not a BuddyPress component but part of WP core.
    When you allow user registration, you have to add manually these pages.

    danbp
    Participant

    To all readers, Codex reminder when getting 404, missing BP pages, not found errors after setup or upgrade ! 😉

    Settings → BuddyPress → Pages

    Pages are automatically generated for the BuddyPress components you enabled in the components settings using the default slugs based on the name of each component activated. Make sure that activated components have corresponding pages assigned to each in this panel.

    Directories
    Associate a WordPress Page with each BuddyPress component directory.

    • Activity Streams (if activated)
    • User Groups (if activated)
    • Members > this is core and can’t be removed/modified

    Registration

    Associate WordPress Pages with the following BuddyPress Registration pages.

    • Register
    • Activate

    Note: registration is not a BuddyPress component but part of WP core.
    When you allow user registration, you have to add manually these pages.

    #243481
    meaganthefoodie
    Participant

    Found the problem.

    BuddyPress didn’t like that I had the groups page as a sub page of Members. Moved Groups page to the root and now everything works great.

    Thanks for your assistance

    ~M

    #243480
    danbp
    Participant
    danbp
    Participant
Viewing 25 results - 18,351 through 18,375 (of 94,539 total)
Skip to toolbar