Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'buddypress'

Viewing 25 results - 60,976 through 61,000 (of 69,047 total)
  • Author
    Search Results
  • #56391
    abcde666
    Participant
    #56389
    Sven Lehnert
    Participant

    @ John James Jacoby,

    I had a look in the bp-events-avatar.php to understand more what’s going on there.

    I’m thinking the avatar part could be like it is now.

    It would be enough, if the original resized image would be available.

    I did some changes to the bp-events-avatar.php and make a plugin from it.

    For the moment, I will use the modified functions in custom components until you offer a better way to do it. I think it would be really great if the original resized image would be saved by the core.

    Be careful!

    This Plugin is just a play around on a fun buddypress installation.

    <?php
    /*
    Plugin Name:bp-events-avatar
    Description: This plugin add a template tag bp_event_flyer() to display the event flyer
    Version: 0.0.1
    License: GPL
    */

    function bp_event_flyer( $args = '' ) {
    echo bp_get_event_flyer( $args );
    }
    function bp_get_event_flyer( $args = '' ) {
    global $bp, $events_template;

    $defaults = array(
    'type' => 'org',
    'width' => 'auto',
    'height' => 'auto',
    'class' => 'avatar',
    'id' => false,
    'alt' => __( 'Event avatar', 'bp-events' )
    );

    $r = wp_parse_args( $args, $defaults );
    extract( $r, EXTR_SKIP );

    /* Fetch the avatar from the folder, if not provide backwards compat. */
    if ( !$avatar = bp_event_fetch_avatar( array( 'item_id' => $events_template->event->id, 'object' => 'event', 'type' => $type, 'avatar_dir' => 'event-avatars', 'alt' => $alt, 'css_id' => $id, 'class' => $class, 'width' => $width, 'height' => $height ) ) )
    $avatar = '<img src="' . attribute_escape( $events_template->event->avatar_thumb ) . '" class="avatar" alt="' . attribute_escape( $events_template->event->name ) . '" />';

    return apply_filters( 'bp_get_event_flyer', $avatar );
    }

    /*
    Based on contributions from: Beau Lebens - http://www.dentedreality.com.au/
    Modified for BuddyPress by: Andy Peatling - http://apeatling.wordpress.com/
    */

    /***
    * Set up the constants we need for avatar support
    */

    if ( !defined( 'BP_AVATAR_THUMB_WIDTH' ) )
    define( 'BP_AVATAR_THUMB_WIDTH', 50 );

    if ( !defined( 'BP_AVATAR_THUMB_HEIGHT' ) )
    define( 'BP_AVATAR_THUMB_HEIGHT', 50 );

    if ( !defined( 'BP_AVATAR_FULL_WIDTH' ) )
    define( 'BP_AVATAR_FULL_WIDTH', 150 );

    if ( !defined( 'BP_AVATAR_FULL_HEIGHT' ) )
    define( 'BP_AVATAR_FULL_HEIGHT', 150 );

    if ( !defined( 'BP_AVATAR_ORIGINAL_MAX_WIDTH' ) )
    define( 'BP_AVATAR_ORIGINAL_MAX_WIDTH', 450 );

    if ( !defined( 'BP_AVATAR_ORIGINAL_MAX_FILESIZE' ) )
    define( 'BP_AVATAR_ORIGINAL_MAX_FILESIZE', get_site_option( 'fileupload_maxk' ) * 1024 );

    if ( !defined( 'BP_AVATAR_DEFAULT' ) )
    define( 'BP_AVATAR_DEFAULT', BP_PLUGIN_URL . '/bp-xprofile/images/none.gif' );

    if ( !defined( 'BP_AVATAR_DEFAULT_THUMB' ) )
    define( 'BP_AVATAR_DEFAULT_THUMB', BP_PLUGIN_URL . '/bp-xprofile/images/none-thumbnail.gif' );

    function bp_event_fetch_avatar( $args = '' ) {
    global $bp, $current_blog;

    $defaults = array(
    'item_id' => false,
    'object' => 'user', // user OR group OR blog OR custom type (if you use filters)
    'type' => 'thumb',
    'avatar_dir' => false,
    'width' => false,
    'height' => false,
    'class' => 'avatar',
    'css_id' => false,
    'alt' => __( 'Avatar Image', 'buddypress' ),
    'no_grav' => false // If there is no avatar found, return false instead of a grav?
    );

    $params = wp_parse_args( $args, $defaults );
    extract( $params, EXTR_SKIP );

    if ( !$item_id ) {
    if ( 'user' == $object )
    $item_id = $bp->displayed_user->id;
    else if ( 'group' == $object )
    $item_id = $bp->groups->current_group->id;
    else if ( 'blog' == $object )
    $item_id = $current_blog->id;

    $item_id = apply_filters( 'bp_core_avatar_item_id', $item_id, $object );

    if ( !$item_id ) return false;
    }

    if ( !$avatar_dir ) {
    if ( 'user' == $object )
    $avatar_dir = 'avatars';
    else if ( 'group' == $object )
    $avatar_dir = 'group-avatars';
    else if ( 'blog' == $object )
    $avatar_dir = 'blog-avatars';

    $avatar_dir = apply_filters( 'bp_core_avatar_dir', $avatar_dir, $object );

    if ( !$avatar_dir ) return false;
    }

    if ( !$css_id )
    $css_id = $object . '-' . $item_id . '-avatar';

    if ( $width )
    $html_width = " width='{$width}'";
    else
    $html_width = ( 'thumb' == $type ) ? ' width="' . BP_AVATAR_THUMB_WIDTH . '"' : ' width="' . BP_AVATAR_FULL_WIDTH . '"';

    if ( $height )
    $html_height = " height='{$height}'";
    else
    $html_height = ( 'thumb' == $type ) ? ' height="' . BP_AVATAR_THUMB_HEIGHT . '"' : ' height="' . BP_AVATAR_FULL_HEIGHT . '"';

    $avatar_folder_url = apply_filters( 'bp_core_avatar_folder_url', get_blog_option( BP_ROOT_BLOG, 'siteurl' ) . '/' . basename( WP_CONTENT_DIR ) . '/blogs.dir/' . BP_ROOT_BLOG . '/files/' . $avatar_dir . '/' . $item_id, $item_id, $object, $avatar_dir );
    $avatar_folder_dir = apply_filters( 'bp_core_avatar_folder_dir', WP_CONTENT_DIR . '/blogs.dir/' . BP_ROOT_BLOG . '/files/' . $avatar_dir . '/' . $item_id, $item_id, $object, $avatar_dir );

    /* If no avatars have been uploaded for this item, display a gravatar */
    if ( !file_exists( $avatar_folder_dir ) && !$no_grav ) {

    if ( empty( $bp->grav_default->{$object} ) )
    $default_grav = 'wavatar';
    else if ( 'mystery' == $bp->grav_default->{$object} )
    $default_grav = BP_PLUGIN_URL . '/bp-core/images/mystery-man.jpg';
    else
    $default_grav = $bp->grav_default->{$object};

    if ( $width ) $grav_size = $width;
    else if ( 'full' == $type ) $grav_size = BP_AVATAR_FULL_WIDTH;
    else if ( 'thumb' == $type ) $grav_size = BP_AVATAR_THUMB_WIDTH;

    if ( 'user' == $object ) {
    $ud = get_userdata( $item_id );
    $grav_email = $ud->user_email;
    } else if ( 'group' == $object || 'blog' == $object ) {
    $grav_email = "{$item_id}-{$object}@{$bp->root_domain}";
    }

    $grav_email = apply_filters( 'bp_core_gravatar_email', $grav_email, $item_id, $object );
    $gravatar = apply_filters( 'bp_gravatar_url', 'https://secure.gravatar.com/avatar/' ) . md5( $grav_email ) . '?d=' . $default_grav . '&s=' . $grav_size;

    return apply_filters( 'bp_core_fetch_avatar', "<img src='{$gravatar}' alt='{$alt}' id='{$css_id}' class='{$class}'{$html_width}{$html_height} />", $params );

    } else if ( !file_exists( $avatar_folder_dir ) && $no_grav )
    return false;

    /* Set the file names to search for to select the full size or thumbnail image. */
    $avatar_name = ( 'org' == $type ) ? '-bporg' : '-bpthumb';
    $avatar_name = ( 'full' == $type ) ? '-bpfull' : $avatar_name;
    $legacy_user_avatar_name = ( 'full' == $type ) ? '-avatar2' : '-avatar1';
    $legacy_group_avatar_name = ( 'full' == $type ) ? '-groupavatar-full' : '-groupavatar-thumb';

    if ( $av_dir = opendir( $avatar_folder_dir ) ) {
    while ( false !== ( $avatar_file = readdir($av_dir) ) ) {
    if ( preg_match( "/{$avatar_name}/", $avatar_file ) || preg_match( "/{$legacy_user_avatar_name}/", $avatar_file ) || preg_match( "/{$legacy_group_avatar_name}/", $avatar_file ) )
    $avatar_url = $avatar_folder_url . '/' . $avatar_file;
    }
    }
    closedir($av_dir);

    return apply_filters( 'bp_core_fetch_avatar', "<img src='{$avatar_url}' alt='{$alt}' id='{$css_id}' class='{$class}'{$html_width}{$html_height} />", $params );
    }

    function bp_events_delete_existing_avatar( $args = '' ) {
    global $bp;

    $defaults = array(
    'item_id' => false,
    'object' => 'user', // user OR group OR blog OR custom type (if you use filters)
    'avatar_dir' => false
    );

    $args = wp_parse_args( $args, $defaults );
    extract( $args, EXTR_SKIP );

    if ( !$item_id ) {
    if ( 'user' == $object )
    $item_id = $bp->displayed_user->id;
    else if ( 'group' == $object )
    $item_id = $bp->groups->current_group->id;
    else if ( 'blog' == $object )
    $item_id = $current_blog->id;

    $item_id = apply_filters( 'bp_core_avatar_item_id', $item_id, $object );

    if ( !$item_id ) return false;
    }

    if ( !$avatar_dir ) {
    if ( 'user' == $object )
    $avatar_dir = 'avatars';
    else if ( 'group' == $object )
    $avatar_dir = 'group-avatars';
    else if ( 'blog' == $object )
    $avatar_dir = 'blog-avatars';

    $avatar_dir = apply_filters( 'bp_core_avatar_dir', $avatar_dir, $object );

    if ( !$avatar_dir ) return false;
    }

    if ( 'user' == $object ) {
    /* Delete any legacy meta entries if this is a user avatar */
    delete_usermeta( $item_id, 'bp_core_avatar_v1_path' );
    delete_usermeta( $item_id, 'bp_core_avatar_v1' );
    delete_usermeta( $item_id, 'bp_core_avatar_v2_path' );
    delete_usermeta( $item_id, 'bp_core_avatar_v2' );
    }

    $avatar_folder_dir = apply_filters( 'bp_core_avatar_folder_dir', WP_CONTENT_DIR . '/blogs.dir/' . BP_ROOT_BLOG . '/files/' . $avatar_dir . '/' . $item_id, $item_id, $object, $avatar_dir );

    if ( !file_exists( $avatar_folder_dir ) )
    return false;

    if ( $av_dir = opendir( $avatar_folder_dir ) ) {
    while ( false !== ( $avatar_file = readdir($av_dir) ) ) {
    if ( ( preg_match( "/-bpfull/", $avatar_file ) || preg_match( "/-bpthumb/", $avatar_file ) || preg_match( "/-bporg/", $avatar_file ) ) && '.' != $avatar_file && '..' != $avatar_file )
    @unlink( $avatar_folder_dir . '/' . $avatar_file );
    }
    }
    closedir($av_dir);

    @rmdir( $avatar_folder_dir );

    do_action( 'bp_core_delete_existing_avatar', $args );

    return true;
    }

    function bp_events_avatar_handle_crop( $args = '' ) {
    global $bp;
    $defaults = array(
    'object' => 'user',
    'avatar_dir' => 'avatars',
    'item_id' => false,
    'original_file' => false,
    'crop_w' => BP_AVATAR_FULL_WIDTH,
    'crop_h' => BP_AVATAR_FULL_HEIGHT,
    'crop_x' => 0,
    'crop_y' => 0
    );

    $r = wp_parse_args( $args, $defaults );
    extract( $r, EXTR_SKIP );

    if ( !$original_file )
    return false;

    if ( !file_exists( WP_CONTENT_DIR . '/' . $original_file ) )
    return false;

    if ( !$item_id )
    $avatar_folder_dir = apply_filters( 'bp_core_avatar_folder_dir', WP_CONTENT_DIR . dirname( $original_file ), $item_id, $object, $avatar_dir );
    else
    $avatar_folder_dir = apply_filters( 'bp_core_avatar_folder_dir', WP_CONTENT_DIR . '/blogs.dir/' . BP_ROOT_BLOG . '/files/' . $avatar_dir . '/' . $item_id, $item_id, $object, $avatar_dir );

    if ( !file_exists( $avatar_folder_dir ) )
    return false;

    require_once( ABSPATH . '/wp-admin/includes/image.php' );
    require_once( ABSPATH . '/wp-admin/includes/file.php' );

    /* Delete the existing avatar files for the object */
    bp_core_delete_existing_avatar( array( 'object' => $object, 'avatar_path' => $avatar_folder_dir ) );

    /* Make sure we at least have a width and height for cropping */
    if ( !(int)$crop_w )
    $crop_w = BP_AVATAR_FULL_WIDTH;

    if ( !(int)$crop_h )
    $crop_h = BP_AVATAR_FULL_HEIGHT;

    /* Set the full and thumb filenames */
    $full_filename = wp_hash( $original_file . time() ) . '-bpfull.jpg';
    $thumb_filename = wp_hash( $original_file . time() ) . '-bpthumb.jpg';
    $org_filename = wp_hash( $original_file . time() ) . '-bporg.jpg';

    /* Crop the image */
    $full_cropped = wp_crop_image( WP_CONTENT_DIR . $original_file, (int)$crop_x, (int)$crop_y, (int)$crop_w, (int)$crop_h, BP_AVATAR_FULL_WIDTH, BP_AVATAR_FULL_HEIGHT, false, $avatar_folder_dir . '/' . $full_filename );
    $thumb_cropped = wp_crop_image( WP_CONTENT_DIR . $original_file, (int)$crop_x, (int)$crop_y, (int)$crop_w, (int)$crop_h, BP_AVATAR_THUMB_WIDTH, BP_AVATAR_THUMB_HEIGHT, false, $avatar_folder_dir . '/' . $thumb_filename );
    rename (WP_CONTENT_DIR . $original_file, $avatar_folder_dir . '/' . $org_filename );
    /* Remove the original */
    @unlink( WP_CONTENT_DIR . $original_file );

    return true;
    }
    ?>

    #56386
    pivey
    Participant

    Same issue here.

    No other plugin installed except buddypress.

    The errors i get are the same as Marcelo Vetter describes

    #56385
    Jeff Sayre
    Participant

    Okay, I guess it is time for an update.

    I’ve had some great feedback from a few of the alpha 1 testers. Based on that, I’m proceeding with the next phase. At this stage, I might skip the alpha 2 stage and move directly to the first public beta.

    What does this mean? Well, depending on my progress, the first public beta release of my Privacy Component will be in about 3 weeks. I cannot promise that for certain, but let’s say I’m aiming for December 1st as the release date.

    At that stage, the component while fully-functional, will still be considered for use in non-production environments.

    #56384
    egturbo
    Participant

    thanks for your work. yeah for progress.

    #56379
    Lriggle
    Participant

    To get my blog comments to link to their Buddypress Member profiles, I had to create a custom comment function (explained here: https://codex.wordpress.org/Template_Tags/wp_list_comments ) and then create a link around the avatar. In the link I used <?php echo bp_core_get_userlink( $comment->user_id, false, true ) ?> as the href value.

    #56378
    chrisk2020
    Participant

    Sorry, still trying to figure this out:

    Don’t know if I’m barking up the wrong tree with the cookies, but I’ve noticed something:

    Without buddypress activated on (successful) log in to the admin I get 6 cookies:

    wp-settings-time-1 (domain = mydomain)

    wp-settings (domain = mydomain)

    wordpress_logged_in_ (domain = .mydomain) NOTE THE DOT

    wordpress_ (domain = .mydomain) NOTE THE DOT

    wordpress_ (domain = .mydomain) NOTE THE DOT

    wordpress_test_cookie (domain = .mydomain) NOTE THE DOT

    Activate buddypress plugin = 500 error

    Clear cookies wpmu site comes back

    Log in to wp-admin and get 500 error, but now the cookies are only:

    wordpress_logged_in_ (domain = .mydomain) NOTE THE DOT

    wordpress_ (domain = .mydomain) NOTE THE DOT

    wordpress_ (domain = .mydomain) NOTE THE DOT

    wordpress_test_cookie (domain = .mydomain) NOTE THE DOT

    the two settings cookies without the dot before the domain are missing.

    Could this be causing/ or symptomatic of some kind of path problem?

    #56377
    Scotm
    Participant

    Andy et al

    It appears this issue has been resolved here: https://buddypress.org/forums/topic/can-i-run-non-bp-theme-on-tld-and-bp-theme-on-subdomain-all-on-same-wpmu-install

    The code must be dropped at or near the top of your wp-config file.

    Thx

    #56374
    Mike Pratt
    Participant

    OK. New development. Join this BP.org group -> https://buddypress.org/groups/wordcamp-ny if you are attending or care about WCNY. I will coordinate stuff from there to the extent I can. Bummer i couldn’t upload a nifty WCNY avatar (Andy – feel free :-)

    #56372
    5283373
    Inactive

    I digged a little and I found this:

    When a new user try to upload an avatar, the file goes in:

    /www/wp-content/blogs.dir/1/avatars (the root blog)

    But the profile page displays avatars from:

    /www/wp-content/blogs.dir/3/files/avatars (the sub-second we use for all buddypress pages)

    I’m wondering if it’s not a buddypress bug when there is an hybrid use of themes.

    #56371
    Bowe
    Participant

    Wooow this makes me really happy! Thanks

    #56369
    MrMaz
    Participant

    I have been receiving a lot of bug reports and comments on l10n issues that have already been fixed. Please make sure you are looking at the code for the latest version before sending me a bug, and also double check the trunk to see if it has been patched already.

    Trunk source

    https://plugins.trac.wordpress.org/browser/buddypress-links/trunk

    Revision log

    https://plugins.trac.wordpress.org/log/buddypress-links

    Also, I am working hard on making l10n work properly. The goal is to be 100% compliant, and I think we are close, but its not going to happen overnight, so please be patient ;)

    A lot of people seem anxious to use this plugin in production. Please keep in mind that its still just a baby and it may be a while before it works perfectly for everybody.

    Thank you!

    #56367
    Jeff Sayre
    Participant

    r-a-y

    I suggest pasting your solution into this thread for the time being. Otherwise, it will get pushed down into the the large, deep-thread morass. ;)

    https://buddypress.org/forums/topic/faq-how-to-code-snippets-and-solutions

    A few months from now after all BP installs have hopefully switched to the parent/child theme architecture, it can then be removed.

    #56365
    Jeff Sayre
    Participant

    I have not seen this particular issue reported.

    Above you state that:

    I’ve attempted to one by one remove plugins and add them back I’ve even tried deactivating bp and reuploading it…

    It’s not clear whether you actually had all 3rd-party plugins deactivated when you were attempting to troubleshoot this issue. Just to be clear, you need to switch to the BP default theme and deactivate ALL plugins (other than BuddyPress). This means all WPMU plugins and any BP-dependent 3rd-party plugins should be deactivated.

    You want to distill your install environment down to the lowest common denominator. If your setup then works without issue, you add back one plugin at a time, test, and continue that process until the issue occurs again.

    Sometimes this is not sufficient, though, and you may actually have to remove all the deactivated plugins from your install. You can back them up into a temporary folder and then delete them from the /plugins/ directory (and /mu-plugins/ if you have any there).

    Finally, check your server’s error logs to see if there are ANY errors being reported.

    #56364
    Detective
    Participant
    #56357
    Twittrblog
    Participant

    ok… no one has had this same issue?

    #56356
    grosbouff
    Participant

    Hi JJJ, thanks for your explantions.

    I think this is something you could put it the documentation…

    And for you guys, you can check the plugin I wrote.

    My BuddyPress installation will be only for french people so i don’t need “international names”…

    #56348
    danbpfr
    Participant

    A good tip to localize words or expression used in the output is to open the buddypress.pot file in the language folder with a text editor like Notepad++

    Then a single text search finds you the searched word and also the file name AND the line where the word is.

    Look in bp-status.php to change the HTML order of what you want

    #56341
    kkemenczy
    Participant

    After an apanche and php update at my ISP, the problem still exists. Any idea?

    #56340
    elemsee
    Participant

    I’m keeping my eye on this, as I’m having a similar problem. We’re using BP as a member directory/community for our website. Now with http://mydomain.com/members gone, I attempted to activate BP on a user blog — as example, http://someblog.mydomain.com.

    Buddy bar links look for the syntax http://mydomain.com/members/admin etc., which do not exist.

    Items on the BP-activated blog are looking for links such as http://someblog.mydomain.com/blog etc., which also does not exist.

    5069396
    Inactive

    Thanks for the help, Ray.

    Adding the tables from my forum to my wp db shouldn’t be too hard. It seems to be a prerequisite for integration in bp 1.1

    But i really want my old forum users to be buddypress users, seeing how they have years of forum posts in there. I’d hate to cut them off and make them start all over again.

    #56336
    r-a-y
    Keymaster

    Login to the WPMU admin area, navigate to BuddyPress > Component Setup.

    Start enabling/disabling and see what happens.

    r-a-y
    Keymaster

    Is your WP+bb already integrated? If it is, you can probably easily migrate to BP!

    I’d probably upgrade your bbPress install to 1.0.2.

    Then convert the WP site to WPMU. Here’s a guide I’ve used in the past that might help:

    http://welcome.totheinter.net/2008/10/04/how-to-migrate-from-wordpress-to-wordpress-mu/

    At this point, I’d make sure to see if bbPress integration is properly integrated with your new WPMU setup. The bbPress integration plugin will help here.

    I’d then install BuddyPress and try to use your existing bbPress setup.

    EDIT: Just read this:

    but my bbpress and my wp are 2 different databases, so with bp 1.1 if I combine these, it sounds like it will be easier to integrate these?

    Since your bbPress db does not use the same database as your WP install, I don’t think this is going to work.

    More info here:

    https://codex.buddypress.org/developer-discussions/buddypress-forum/

    You could probably use BuddyPress’ internal bbPress setup, but then your original bbPress will be separate from BP.

    Hopefully someone else can jump in with more info.

    #56330

    In reply to: External Group Blogs

    jamesyeah
    Participant

    Hi,

    I’m currently running on WordPress MU 2.8.5.2 with BuddyPress 1.1.2.

    James

    #56329

    In reply to: External Group Blogs

    Jeff Sayre
    Participant

    Which version of WPMU and BuddyPress are you running?

Viewing 25 results - 60,976 through 61,000 (of 69,047 total)
Skip to toolbar