Search Results for 'wordpress'
-
AuthorSearch Results
-
November 10, 2009 at 6:57 pm #56389
In reply to: How to display avatars in normal theme at 125px?
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;
}
?>November 10, 2009 at 5:30 pm #56379In reply to: Comment authors are not linked to their profile
Lriggle
ParticipantTo 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.November 10, 2009 at 5:27 pm #56378In reply to: 500 Error when Activating
chrisk2020
ParticipantSorry, 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?
November 10, 2009 at 4:35 pm #7515Topic: how to create a list of groups from a plugin
in forum How-to & TroubleshootingSamuel Aguilera
ParticipantHi!
I’m trying to create a list of predefined groups with all the required info, just like If I make them from the create group form, but from a little plugin instead.
I’m trying to create ONE group with this code based in the bp-groups.php and bp-groups-classes.php code that I can see for this:
global $bp;
$bp->groups->new_group_id = false;
$bp->groups->current_group = new BP_Groups_Group( $bp->groups->new_group_id, false, false );
// manual set some details
$my_group_name = ‘TEST GROUP, S.L.’;
$my_group_description = ‘TEST GROUP DESCRIPTION’;
$my_group_creator = ‘1’;
$group_status = ‘hidden’;
$group_enable_wire = ‘0’;
$group_enable_forum = ‘1’;
$bp->groups->new_group_id = groups_create_group( array( ‘group_id’ => $bp->groups->new_group_id, ‘creator_id’ => $my_group_creator, ‘name’ => $my_group_name, ‘description’ => $my_group_description, ‘news’ => ”, ‘slug’ => groups_check_slug( sanitize_title($my_group_name) ), ‘status’ => $group_status, ‘enable_wire’ => $group_enable_wire, ‘enable_forum’ => $group_enable_forum, ‘date_created’ => time() ) );
// uptade group meta
groups_update_groupmeta( $bp->groups->new_group_id, ‘total_member_count’, 1 );
groups_update_groupmeta( $bp->groups->new_group_id, ‘last_activity’, time() );
groups_update_groupmeta( $bp->groups->new_group_id, ‘theme’, ‘buddypress’ );
groups_update_groupmeta( $bp->groups->new_group_id, ‘stylesheet’, ‘buddypress’ );
Using this the group array is created without problems in the wp_bp_groups table.
But no group meta is created in the wp_bp_groups_groupmeta table

And I get a lot of mysql errors in my apache error.log like these:
WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘WHERE slug = ‘test-group-s-l” at line 1 for query SELECT slug FROM WHERE slug = ‘test-group-s-l’ made by require_once, require_once, require_once, require_once, include_once, groups_check_slug, BP_Groups_Group->check_slug, referer: http://localhost/wp-admin/plugins.php
WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘WHERE slug = ‘test-group-s-l” at line 1 for query SELECT slug FROM WHERE slug = ‘test-group-s-l’ made by require_once, require_once, require_once, require_once, include_once, groups_create_group, groups_check_slug, BP_Groups_Group->check_slug, referer: http://localhost/wp-admin/plugins.php
WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘( \n\t\t\t\t\tcreator_id,\n\t\t\t\t\tname,\n\t\t\t\t\tslug,\n\t\t\t\t\tdescription,\n\t\t\t\t\tnews,\n\t\t\t\t\tstat’ at line 1 for query INSERT INTO ( \n\t\t\t\t\tcreator_id,\n\t\t\t\t\tname,\n\t\t\t\t\tslug,\n\t\t\t\t\tdescription,\n\t\t\t\t\tnews,\n\t\t\t\t\tstatus,\n\t\t\t\t\tenable_wire,\n\t\t\t\t\tenable_forum,\n\t\t\t\t\tdate_created\n\t\t\t\t) VALUES (\n\t\t\t\t\t1, ‘TEST GROUP, S.L.’, ‘test-group-s-l’, ‘TEST GROUP DESCRIPTION’, ”, ”, 0, 1, FROM_UNIXTIME(1257869606)\n\t\t\t\t) made by require_once, require_once, require_once, require_once, include_once, groups_create_group, BP_Groups_Group->save, referer: http://localhost/wp-admin/plugins.php
It seems to have a problem with the MYSQL syntax used by groups_check_slug function, but the slug is created…
Somebody can help me to find out why the meta info is not added?
Any help would be very appreciated.
November 10, 2009 at 3:04 pm #56369In reply to: New Plugin – BuddyPress Links – Beta Support
MrMaz
ParticipantI 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!
November 10, 2009 at 3:21 am #75115334559
Inactivei have a custom wordpress mu install with a custom theme and i’m trying to get the members directory function of buddypress running.
anyone gimme a little help on a how to ?
November 10, 2009 at 3:13 am #56334r-a-y
KeymasterIs 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.
November 10, 2009 at 12:55 am #56331In reply to: WordCamp NY BP get together – Who’s In?
5320203
InactiveThird time trying to post. Trying the logout/login work-around posted by Andy. Guess cookies?
I am new to this forum and to MU/BP but not to wordpress. I am flying into NYC from Fort Lauderdale on my way to Calgary, and so even though I am on a tight schedule, I would love to meetup with MU/BP developers as my next several ventures are set to explore using MU/BP extensively, developing multiple themes and plugins.
I arrive at LGA at 8:45 so I will be rolling in late, but if my cameras arrive on time I would be happy to document 1 or more sessions (as requested on this thread). Has anyone volunteered for this yet? If so/not, lets co-ordinate priorities for recording, and who is willing and able.
Lastly, since I am arriving the day-of, I will have my luggage with me. Does anyone know if the venue has a place for me to keep a few bags until the end of the first day?
Really looking forward to meeting all these bright minds working towards solutions on common problems.
November 10, 2009 at 12:36 am #7509Topic: Posting Comments on External Page via Flash
in forum How-to & TroubleshootingNovember 10, 2009 at 12:36 am #56330In reply to: External Group Blogs
jamesyeah
ParticipantHi,
I’m currently running on WordPress MU 2.8.5.2 with BuddyPress 1.1.2.
James
November 10, 2009 at 12:09 am #7507Bowe
ParticipantHi,
One a regular wordpress theme you have avatars for signed up members.. but right now these are not linked to the BP member avatars, which means that member avatars are not displayed on blogs inside my sites network. Is there a piece of code which I can insert in my blogthemes to show the BP avatar of the user that is commenting? Thanks in advance guys!
November 9, 2009 at 11:45 pm #56324In reply to: Theme reference guide for 1.1?
Xevo
ParticipantSee the codex, https://codex.buddypress.org/.
Best way to learn theme tags right now is just downloading a few buddypress themes and look at the source. Those on member blogs (if thats what you mean) applies to wpmu and has nothing to do with buddypress.
Use this site (http://wpseek.com/browse/) to look at all wordpress and wpmu functions.
November 9, 2009 at 10:03 pm #56314John James Jacoby
KeymasterWhen you are including directly code that is usually a plugin, you need to make sure that you include all of its dependencies before you proceed through the file you’re using to load that code.
In my opinion, the only way to make this transition is to do so knowing that you’re totally bypassing the ability to update the plugin and that it is now something that you’re including manually, either within your template or maybe even bp-custom.php. If the plugin itself was all you needed, then you’d just activate it and let it do it’s thing, right?
So, rather than hook the loading of those files into a WordPress action, load them via your parent themes’ functions.php file, and put that code in your parent/functions/ folder…
I try to keep things clean and logical, but I also reinvent a lot of wheels and re-factor existing WordPress plugins for my own custom applications. Breadcrumbs, taxonomy clouds, custom kses, etc… My parent themes are loaded with additional code that started out as someone else’s plugin that now is part of my theme. ( I know this goes against the entire reason why plugins exist, and I know it would be better karma to help contribute to a plugin than disassemble it and use its parts as my own, but sometimes that isn’t realistic, and sometimes it helps to see someone else’s perspective on how to achieve a goal. )
Maybe I misunderstood your question entirely… If so, then forget everything I just said.

Long story short,
require ( WP_PLUGIN_DIR . '/bp-classifieds/bp-classifieds-groups.php' );isn’t included everything that plugin needs to live. That file uses another file that’s missing.November 9, 2009 at 9:32 pm #56309In reply to: fullname vs username vs first + last name…
John James Jacoby
KeymasterBuddyPress uses the “display name” to know that they have filled out some profile information. It is the only *always* required field inside BuddyPress.
Because WordPress is centered around the “username” and uses the “nicename” for slug purposes, we’re stuck with those no matter what. I like having my username be short for easy log ins if I can help it of course (sometimes “jjj” is already taken.), but I like my display name be my fullname because it’s how people recognize me.
I don’t see a way around this any time soon. And like Andy said, internationally sometimes people have 4 or more names. I use my middle name, but having a “middle name” field isn’t always optimal either so I lump it in with my first name. (All those years of my mom yelling “John James you get over here this instant!!” must have stuck with me.)

You can rename the primary name field to be whatever you’d like, which is designed to alleviate some of the confusion. It lets you decide what that field means to your users. The “username” is the only thing they can’t change, so they’re using that for life.
November 9, 2009 at 9:03 pm #56307circuit
Participanti’ve made some progress by installing the community blogs plugin.
https://wordpress.org/extend/plugins/bp-community-blogs/
the user’s roles in blog 1 are still removed when they create their own blog, but the plugin corrects this behaviour as soon as the page is reloaded.
this is definitely not a perfect solution but it’s all i can do.
i still have one problem, though. this plugin will not allow me to specify ‘subscriber’ – only ‘contributor’. i tried fiddling with the code and couldn’t get this to work. if anyone could help me hack this together, i would really appreciate it.
November 9, 2009 at 6:37 pm #7500maburker
ParticipantHi,
When first setting up wordpress and buddy press you had to create an admin for the entire site. All of a sudden the admin is no longer an admin. I can only login as a normal member. What went wrong and how do i get those permissions back on that user? Can I just create another user that has an admin permissions?
November 9, 2009 at 6:02 pm #56283In reply to: Re-do output bp_activity_content()
Xevo
ParticipantOk, I’ll try writing my first ever wordpress function then.

Thanks for pointing me in the right direction.
November 9, 2009 at 5:58 pm #56281In reply to: Fatal Error on Upgrade to 1.1.2
geekjon
ParticipantMy Dashboard confirms that I am already on WordPress MU 2.8.5.2
November 9, 2009 at 4:15 pm #7496circuit
Participanthi everyone
i’m not sure whether buddypress or MU is causing this behaviour; i’m desperate for a fix now as it is affecting user logins.
1. if a user creates an account (no blog) they get subscriber status on blog 1. <– correct
2. if a user creates an account AND blog they are NOT GIVEN permissions on blog 1 (role is set to ‘no role for this blog’). roles for ‘their’ blog are fine.
3. if an existing user creates a blog they LOSE all permissions on blog 1 (role is set to ‘no role for this blog’). roles for ‘their’ blog are fine.
after six hours (!) reading and experimenting i found a couple of threads that are hinting at a solution, but having almost destroyed my wp_usermeta table trying to work it out, i’m starting to think i might be out of my depth.
http://buddypress.org/forums/topic/set-default-role-of-new-user
http://mu.wordpress.org/forums/topic/13675?replies=22
http://mu.wordpress.org/forums/topic/11684?replies=5
these threads are all based around similar questions and problems to mine, but some are pretty out of date and mention bugs that have now been fixed, so i’m reluctant to follow the advice until i hear from an expert.
i would really appreciate your help with this.
_____________________________________________________________________________________
1. Which version of WPMU are you running?
2.8.5.2
2. Did you install WPMU as a directory or subdomain install?
Subdomain
3. If a directory install, is it in root or in a subdirectory?
Root
4. Did you upgraded from a previous version of WPMU? If so, from which version?
No
5. Was WPMU functioning properly before installing/upgrading BuddyPress?
N/A
6. Which version of BuddyPress (BP) are you running?
1.1.2
7. Did you upgraded from a previous version of BP? If so, from which version?
No
8. Do you have any plugins other than BuddyPress installed and activated?
Yes – EventCalendar
9. Are you using the standard BuddyPress themes or customized themes?
Custom
10. Have you modified the core files in any way?
No
11. Do you have any custom functions in bp-custom.php?
No
12. If running bbPress, which version? Or did your BuddyPress install come with a copy of bbPress built-in?
1.0.2
13. Please provide a list of any errors in your server’s log files.
Can’t check this at work..
November 9, 2009 at 6:10 am #7490Topic: gzinflate error on upgrading
in forum How-to & TroubleshootingNiami
ParticipantI upgraded BuddyPress via the auto upgrade and when I went into the Bluehost Control Panel (for the server) it said it still needed upgrading so I pressed the upgrade button there – that was clearly a mistake!
There had been a few glitches before then – most notably Group Avatars disappearing and the Recently Active Member Avatar not displaying correctly. After double-upgrading, however, all the member avatars were not displaying and many other photographs missing from blogs.
The back end is throwing up a lot of error messages beginning with:
Warning: gzinflate() [function.gzinflate]: data error in…
The member Avatars and missing photographs still exist in the database but the installation no longer seems to “see†them.
I deactivated all plugins including BuddyPress itself, and and now when I try to reactivate BuddyPress I get:
Fatal error: Cannot redeclare bp_activity_install() (previously declared in /home1/aristasi/public_html/heartbook/wp-content/plugins/buddypress/bp-activity.php:19) in /home1/aristasi/public_html/heartbook/wp-content/plugins/buddypress/bp-activity.php on line 52
Other information:
1. Which version of WPMU are you running?
WordPress MU 2.8.5.2.
2. Did you install WPMU as a directory or subdomain install?
I don’t understand this question. I installed via SimpleScripts on my website’s Control Panel.
3. If a directory install, is it in root or in a subdirectory?
It is in a subdirectory.
4. Did you upgraded from a previous version of WPMU? If so, from which version?
I have upgraded each time for several upgrades.
5. Was WPMU functioning properly before installing/upgrading BuddyPress?
Not completely. The group icons were already missing for some reason after a previous upgrade.
6. Which version of BuddyPress (BP) are you running?
Version 1.1.2
7. Did you upgraded from a previous version of BP? If so, from which version?
I have upgraded several times each time an upgrade was available.
8. Do you have any plugins other than BuddyPress installed and activated?
Not now, but I had Audio Player, WP Events Calendar, Video Quicktags and WP Events Calendar
9. Are you using the standard BuddyPress themes or customized themes?
Standard themes.
10. Have you modified the core files in any way?
No
11. Do you have any custom functions in bp-custom.php?
No
12. If running bbPress, which version? Or did your BuddyPress install come with a copy of bbPress built-in?
I think it has bbPress built in.
13. Please provide a list of any errors in your server’s log files.
I don’t know what server’s log files are.
November 9, 2009 at 2:00 am #56232In reply to: Fatal error in upgrade to 1.1.2
elemsee
ParticipantWell this was the error message I was getting for whatever reason.
`
Downloading update from https://downloads.wordpress.org/plugin/buddypress.1.1.2.zip.
Unpacking the update.
Installing the latest version.
Deactivating the plugin.
Removing the old version of the plugin.
Plugin upgraded successfully.
Attempting reactivation of the pluginFatal error: Cannot redeclare bp_activity_install() (previously declared in /chroot/home/barliman/barlimans.com/html/wp-content/plugins/buddypress/bp-activity.php:19) in /chroot/home/barliman/barlimans.com/html/wp-content/plugins/buddypress/bp-activity.php on line 52
November 8, 2009 at 7:10 pm #56215In reply to: New Plugin – BuddyPress Links – Beta Support
MrMaz
ParticipantA big thanks to Chouf1 and everyone else who is providing feedback on l10n issues. Thanks to Chouf1, I found a filter loop in the bp_links_load_textdomain() function so I have just committed a fix for that to trunk. In addition, there are now two new filters to give more control over the locale string and .mo file path as well, just in case you really don’t like how I am handling things, lol.
I also found a strange issue where MU code is returning an empty locale string if the option in empty in the database, so I also make sure the locale is not empty before wasting a file check (stat).
You can check out the diff here:
https://plugins.trac.wordpress.org/changeset/171526/buddypress-links
I am going to tag a new version tomorrow, hopefully by 1pm EST.
November 8, 2009 at 5:29 pm #56205In reply to: buddypress doesn’t work on stand alone install??!!
Brajesh Singh
Participanthi David
No you can not do it in that way.You need to follow the process for migrating from wordpress to wordpress mu.
1.Export your posts/pages
2.take a backup of your wp-content directory
3.Take a backup of database(in case you need it to revert back)
4.remove the wp from server and install wpmu
5.Import the posts from your export file
6.Upload the uploads ,themes directory to wp-content/ in your new installation
If you have a website with thousands of posts,then export import may be trouble.you may follow this instructions in that case
http://welcome.totheinter.net/2008/10/04/how-to-migrate-from-wordpress-to-wordpress-mu/
Hopefully it helps.
November 8, 2009 at 5:11 pm #56202In reply to: buddypress doesn’t work on stand alone install??!!
Xevo
ParticipantIt is a plugin for wpmu, since you have to install and use it as any other plugin. And yes, if you use a wordpress single install, you will have to switch over too wpmu first.
They plan on making it available for single installs, but don’t hope on that anytime soon.
November 8, 2009 at 5:03 pm #56201In reply to: buddypress doesn’t work on stand alone install??!!
dtclarinet
Participantdavid here again. I just added buddypress to another page http://blog.davidhthomas.net/discussions and it is functional.
It’s strange that is is touted as a “plugin” when it’s really a new wordpress install.
Please correct any of this info if it’s wrong, so I can use buddypress in the most flexible way possible.
thanks,
david
-
AuthorSearch Results
I am posting a comments through Flash by hooking into wordpress’ AJAX with jquery. Everything goes into the database with out a hitch. I also have a custom loop for comments and posts that generates custom XML for a Flash Component. In order for me to update the BuddyPress wp_bp_user_blogs_comments table I have to get the latest comment in the wp_4_comments table here is my code:
$lastest_comment_id = $wpdb->get_var( $wpdb->prepare(“SELECT MAX(comment_ID) FROM $wptable”) );
$latest_comment_date = $wpdb->get_var( $wpdb->prepare(“SELECT comment_date FROM $wptable WHERE comment_ID = $lastest_comment_id” ) );
$new_comment = new BP_JOURNAL_COMMENT;
$new_comment->user_id = $user_id;
$new_comment->blog_id = $blog_id;
$new_comment->comment_id = $lastest_comment_id;
$new_comment->comment_post_id = $post_id;
$new_comment->date_created = $latest_comment_date;
$new_comment->save();
Is there an easier way to do this because my concern is that if two or more people comment on the same post close to the same time then it might grab the wrong comment to update the wp_bp_user_blogs_comments table with … any help would be greatly appreciated.