Forum Replies Created
-
In reply to: Profile blogs created but not listed
I had this same problem. It’s a problem, because the average member will have no clue what’s going on and will start emailing about it.
The directory search says this if it can’t find a blog:
Blogs must fill in at least one piece of profile data to show in blog lists.
How are blogs supposed to do that? What profile data?
“I had already edited the profile data and it still didn’t show up” -> you also have to change the privacy setting that only mentions search engine, not listing on the system itself.
This process needs work.
In reply to: Main Navigation helpNo, not in the header; in a function that puts classes in the body tag and then you can use those classes to highlight current in CSS.
So in my theme I have something like this in header.php:
<body class="<?php custom_body_class() ?>">And then a function custom_body_class in functions.php in the theme.
It’s a different approach, but I noticed the same problem with ‘members’ getting added to just about any body tag. I wasn’t able to figure out why, but managed to sort of make it work by throwing the kitchen sink at it.
I know, not very helpful…
In reply to: Please Help Fix Bugs for 1.0.4The members, groups and blogs sections have these menus:
<div class="content-header">
<ul class="content-header-nav">
<?php bp_blogs_blog_tabs() ?>
</ul>
</div>But unlike menus in other sections, the function bp_blogs_blog_tabs already includes the ul tags. To be able to use another style navigation in my template I had to put a function bp_blogs_blog_tabs_minus_ul in bp_custom.php.
Not sure if this counts as a bug or where to post it. I tried the report-a-bug button, but couldn’t get access.
In reply to: Main Navigation helpI just wrestled with that issue here.
A ‘members’ class was added to the body tag on pages under groups and blogs. BP_MEMBERS_SLUG or $bp->current_component are not very “precise” I guess.
I wasn’t able to figure out why this happens. I managed to get it to work, sort of, with the combination of lines in my custom function for the navigation.
In reply to: Clean professional user registration?BTW, the system lists this thread as ‘3 posts, 1 voice – Latest reply from jorrie’. Nice illustration of how unreliable user management is…
In reply to: Clean professional user registration?Had another look at GigaOm’s form. They have log in with email address and password and somehow managed to get rid of the username.
Step 2 lists their subscription packages and asks for credit card details etc. Still no username/nickname/blogname.
I’d like to know how they did it. The source mentions Kissmetrics and there’s a class called “zend_form”. Probably custom code?
In reply to: Clean professional user registration?I need a more professional member registration as well. I’ll use this excellent plugin which allows login with email address, but there are a lot of other annoying issues I still have to solve:
Restructuring registration process to an industry standard
How to use full name, first name + last name
Make 2+ part name in full name required + xprofile_sync_wp_profile()
Autogenerate or remove username
Generate username (+ blog url) from fullname
Use full name in confirmation emails
ListMessenger (or PHPlist) integration – plugin?
I’m not sure how much GigaOM actually changed. Their form looks a lot like the regular Buddypress (?) registration, minus that annoying username. Not sure how they did that.
They’re not using Buddypress, are they?
Most of it is just a radically customized theme. I suspect they probably also use one of the commercial member subscription plugins.
I’m working on my new site here. The old site has a registration system based on PunBB. I’m not a PHP programmer, so please keep us posted on any progress you make.
In reply to: Extended Profiles on Sign up?rant removed
Short version, no, it’s not easy.
In reply to: How to get a section identifier in the body tag?I think I finally got what I wanted using all these combined:
$c[] = $bp->current_component; //outputs current component
$c[] = $bp->current_action; // outputs current action
if ( $bp->current_component == 'activity' || $bp->current_component == 'profile' || $bp->current_component == 'wire' || $bp->current_component == 'messages' || $bp->current_component == 'friends')
$c[] = 'members';
if ( bp_is_page( BP_MEMBERS_SLUG ) )
$c[] = 'members';The shorter version from two posts ago apparently does not work.
If I leave anything out, something breaks; I get a ‘members’ tag on ‘groups’ and ‘blogs’ or no tags or whatever. Why, I have no clue…
Is there a way to exclude or remove a tag? I don’t want two buttons on the navigation highlighted on the groups members section, for example.
In reply to: How to get a section identifier in the body tag?How is current_component identified? This is like herding cats.
Is there a way to make the tags mutually exclusive; if $c[] is ‘members’, it is NOT ‘groups’ or ‘blogs’ etc.?
In reply to: How to get a section identifier in the body tag?This also works!

if ( $bp->current_component == 'activity' || 'profile' || 'wire' || 'messages' || 'friends')
$c[] = 'members';But why does this line also add a ‘members’ tag to the groups directory home page body class?! And the blogs directory…
In reply to: How to get a section identifier in the body tag?Wow, thanks again r-a-y, that actually works!
And it doesn’t replace ‘activity’ in the class, just adds ‘members’, which is probably a good thing.
Learned a new trick I can abuse all over the place.
In reply to: Display Ajax message after normal redirectI think Ajax messages are already used in Buddypress. This is in the template somewhere:
<?php do_action( 'template_notices' ) // (error/success feedback) ?>Could a “please log in or register first” message use the same function?
In reply to: How to get a section identifier in the body tag?Now trying to add something like this, to cut down the number of different classes I have to cover in my CSS:
if ( $bp->current_component( 'activity' ) )
$c[] = 'members';That doesn’t work. Other variations I could try?
In reply to: template_directory in members blogs themeThanks for the quick response r-a-y.
I guess the rewriting is not taking place or only partly, because I see the wrong adresses in the source, get some error messages in the page (‘No such file or directory in…’ etc.) and some weird behavior (the remove-buddypress-adminbar plugin now and then doesn’t work on member blogs, but only in Firefox).
Where does this rewriting take place?
Isn’t there a more direct way to get the right adresses in the template without rewriting after the fact?
In reply to: control of new user activation emailNo, not impossible. You’ll have to write your own plugins.
In reply to: Plugin to show components to registered Users onlyThe Ajax redirect in this solution, with the register?s=1, had some annoying side effects that made it unusable. See the original thread for details.
Or did you fix that problem, sandeepdude? I’m a bit reluctant to try it again and find out that it’s the exact same code…
I’ll look for a solution in the next few days. Another way to show an Ajax message after redirect would probably be part of the solution.
In reply to: Registration Approval PluginApparently a “full-featured privacy (authorization) component for BuddyPress” is in the works for a future release. I hope that includes an approval process, but member management in general seems to be very low on the priority list of the Buddypress developers and community. If you need it anytime soon, I’d look into developing your own plugins.
In reply to: I don't want to make use of the widgetsI have removed everything having to do with widgets from my template. Haven’t seen any negative effects so far.
In reply to: How to get a section identifier in the body tag?Thanks again r-a-y!
I did use Sandbox as an example, just to get something working quick. I had already taken most of the code out, but with your latest suggestions I can clean it up even further.
In reply to: How to get a section identifier in the body tag?Adding this to sandbox_body_class() produces the required result:
if ( bp_is_page( BP_MEMBERS_SLUG ) )
$c[] = 'members';In reply to: How to get a section identifier in the body tag?What are these lines supposed to do?
global $bp;
echo $bp->current_component; //outputs current component
echo '<br />'; // redundant line break! don't worry about this line!
echo $bp->current_action; // outputs current actionI see nothing like that in the functions in post-template.php or Sandbox’ function.php.
Edit: Class on Members and Groups stays at “directory” because it is set in bp-themes, not bphome. It is set with this line:
<?php if ( bp_is_directory() ) : ?> class="directory"<?php endif; ?>Replacing it with the function copied from Sandbox…
In reply to: External BlogsWas this functionality now part of the roadmap for Buddypress? Did Andy or other Buddypress developers get Nicola Greco’s code?
I’ll bring this up on the WPMU forum as well.
In reply to: How to get a section identifier in the body tag?The default templates have body_class() in the body tag. The function body_class() is in post-template.php in the wp-includes folder:
function body_class( $class = '' ) {
// Separates classes with a single space, collates classes for body element
echo 'class="' . join( ' ', get_body_class( $class ) ) . '"';
}Function get_body_class() is in the same file:
/**
* Retrieve the classes for the body element as an array.
*
* @since 2.8.0
*
* @param string|array $class One or more classes to add to the class list.
* @return array Array of classes.
*/
function get_body_class( $class = '' ) {
global $wp_query, $wpdb, $current_user;
$classes = array();
if ( 'rtl' == get_bloginfo('text_direction') )
$classes[] = 'rtl';
if ( is_front_page() )
$classes[] = 'home';
if ( is_home() )
$classes[] = 'blog';
if ( is_archive() )
$classes[] = 'archive';
if ( is_date() )
$classes[] = 'date';
if ( is_search() )
$classes[] = 'search';
if ( is_paged() )
$classes[] = 'paged';
if ( is_attachment() )
$classes[] = 'attachment';
if ( is_404() )
$classes[] = 'error404';
if ( is_single() ) {
$wp_query->post = $wp_query->posts[0];
setup_postdata($wp_query->post);
$postID = $wp_query->post->ID;
$classes[] = 'single postid-' . $postID;
if ( is_attachment() ) {
$mime_type = get_post_mime_type();
$mime_prefix = array( 'application/', 'image/', 'text/', 'audio/', 'video/', 'music/' );
$classes[] = 'attachmentid-' . $postID;
$classes[] = 'attachment-' . str_replace($mime_prefix, '', $mime_type);
}
} elseif ( is_archive() ) {
if ( is_author() ) {
$author = $wp_query->get_queried_object();
$classes[] = 'author';
$classes[] = 'author-' . sanitize_html_class($author->user_nicename , $author->user_id);
} elseif ( is_category() ) {
$cat = $wp_query->get_queried_object();
$classes[] = 'category';
$classes[] = 'category-' . sanitize_html_class($cat->slug, $cat->cat_ID);
} elseif ( is_tag() ) {
$tags = $wp_query->get_queried_object();
$classes[] = 'tag';
$classes[] = 'tag-' . sanitize_html_class($tags->slug, $tags->term_id);
}
} elseif ( is_page() ) {
$classes[] = 'page';
$wp_query->post = $wp_query->posts[0];
setup_postdata($wp_query->post);
$pageID = $wp_query->post->ID;
$classes[] = 'page-id-' . $pageID;
if ( $wpdb->get_var( $wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE post_parent = %d AND post_type = 'page' LIMIT 1", $pageID) ) )
$classes[] = 'page-parent';
if ( $wp_query->post->post_parent ) {
$classes[] = 'page-child';
$classes[] = 'parent-pageid-' . $wp_query->post->post_parent;
}
if ( is_page_template() ) {
$classes[] = 'page-template';
$classes[] = 'page-template-' . str_replace( '.php', '-php', get_post_meta( $pageID, '_wp_page_template', true ) );
}
} elseif ( is_search() ) {
if ( !empty($wp_query->posts) )
$classes[] = 'search-results';
else
$classes[] = 'search-no-results';
}
if ( is_user_logged_in() )
$classes[] = 'logged-in';
$page = $wp_query->get('page');
if ( !$page || $page < 2)
$page = $wp_query->get('paged');
if ( $page && $page > 1 ) {
$classes[] = 'paged-' . $page;
if ( is_single() )
$classes[] = 'single-paged-' . $page;
elseif ( is_page() )
$classes[] = 'page-paged-' . $page;
elseif ( is_category() )
$classes[] = 'category-paged-' . $page;
elseif ( is_tag() )
$classes[] = 'tag-paged-' . $page;
elseif ( is_date() )
$classes[] = 'date-paged-' . $page;
elseif ( is_author() )
$classes[] = 'author-paged-' . $page;
elseif ( is_search() )
$classes[] = 'search-paged-' . $page;
}
if ( !empty($class) ) {
if ( !is_array( $class ) )
$class = preg_split('#s+#', $class);
$classes = array_merge($classes, $class);
}
return apply_filters('body_class', $classes, $class);
}So I guess I could just add this to the code:
if ( bp_is_page( BP_MEMBERS_SLUG ) )
$classes[] = 'members';Etc.
Should I copy this function to functions.php in the template, perhaps rename it, and add the lines for ‘members’ and ‘groups’ etc.?
Or should I aim for a shorter function that only adds something to what this code generates? Would that be possible?
Trying the blunt approach first…
Edit: I’ve tried with that BP_MEMBERS_SLUG line added directly to post-template.php, with $bp in global, but nothing shows up in the body tag.

What am I missing? Is Buddypress bypassing post-template.php anyway? The only class is “directory”.
In reply to: How to get a section identifier in the body tag?Thanks r-a-y!
I’m not really a coder, but Sandbox has a lot of information on the topic.
I’ll look into it when I have time and will report back…