Forum Replies Created
-
Try this out in /wp-content/plugins/bp-custom.php:
function my_bp_is_friend() {
global $bp;
if (friends_check_friendship($bp->loggedin_user->id,$bp->displayed_user->id) )
return true;
return false;
}Then copy /bp-default/members/single/member-header.php to your child theme.
Next, edit:
<?php if ( is_user_logged_in() && !bp_is_my_profile() && function_exists( 'bp_send_private_message_link' ) ) : ?>to:
<?php if ( is_user_logged_in() && !bp_is_my_profile() && my_bp_is_friend() && function_exists( 'bp_send_private_message_link' ) ) : ?>In reply to: Looking for a Following-FeatureThere was a guy on testbp.org who said that they were working on a followers/following feature.
Not sure what the status on that is.
In reply to: Editing Members ProfileIf you’re a site admininstrator, there should also be a menu called “Admin Options” when you’re on any profile.
In this menu, there are links to edit a user’s profile and avatar, marking the account as spam and deleting the account.
That’s what we wanted though right?
In reply to: Diagonal friend listingYour theme’s stylesheet.
Usually this is located in /wp-content/themes/YOURTHEME/style.css.
In reply to: BuddyPress Group Tags is now availableGo to example.com/blogs when you’re logged in.
You should see the “Create a Blog” button next to the h3.
This is only if you have blog registration open on WPMU of course!
In reply to: Identify “/membername/” in Admin Bar?If you just want to output a link with the logged in user’s name, use:
<?php bp_loggedinuser_link() ?>The word “component” shouldn’t be tacked on…
I just changed my permalinks to /%postname%/ and now WP posts do not return anything for $bp->current_component.
Needs some investigating… but hopefully that helps somebody.
Hmm okay… i’m just testing this locally with a child theme of the default BP theme. I also haven’t upgraded to BP 1.2.1 on this test box.
Are you echoing $bp->current_component to get these results – “a-post-with-everything-in-itcomponent” and “groupcomponent”?
I only tested the current_component on one WP page… okay just tested with one post.
It returns a number if you’re on a WP post, so do a check for is_numeric.
global $bp;
if (is_front_page() || (isset($bp->current_component) && !is_numeric($bp->current_component)) ) {
YOUR BP CSS/JS here
}This is untested… but give it a shot.
Look at the current_component.
<?php global $bp;
if (isset($bp->current_component)) {
YOUR BP CSS/JS here
}
?>The current_component should only return something if it is a BP page.
[EDIT]
Just checked the activity stream home page… it doesn’t return anything for that.
You’ll need to add a conditional for that as well.
In reply to: Fatal error (with possible solution)Set this in wp-config.php:
define('WP_MEMORY_LIMIT', '80M');Read more here:
https://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP
In reply to: I can’t see my inbox messages@putnam01 – are you using the default theme?
What happens when you use the default theme in BP 1.2 after you upgrade?
You don’t need to migrate; all you need to do is upgrade to BP 1.2.1!
Read this guide:
https://codex.buddypress.org/getting-started/upgrading-from-10x/
In reply to: Identify “/membername/” in Admin Bar?Check out /plugins/buddypress/bp-core/bp-core-templatetags.php
Specifically:
bp_get_member_permalink()[EDIT]
You’re looking for user_login for the “membername” part.
Look at:
https://codex.wordpress.org/Function_Reference/get_userdata
https://codex.wordpress.org/Function_Reference/get_currentuserinfo
In reply to: Allow People to sign upYou probably need to enable registration on your WordPress site.
In reply to: Creating my own buddypress themeWhite screen usually means errors!
Do you see any errors in the server log?
In reply to: Creating my own buddypress themeTake a look at the BP Template Pack plugin.
This plugin will try to make your WP theme compatible with BP.
—
You can also build a child theme from the default BuddyPress theme.
Read how to do it here:
https://codex.buddypress.org/how-to-guides/building-a-buddypress-child-theme/
In reply to: Terms of service for BuddypressHa! Didn’t know you could add a TOS as a CC license!
Cool of WordPress.com to offer one! Will take a look at this later.
@motionsw – yes you can use it as a guide for your own.
Here’s the part that says you can:
…you’re more than welcome to steal [this TOS] and repurpose it for your own use, just make sure to replace references to us with ones to you, and if you want we’d appreciate a link to WordPress.com somewhere on your site. We spent a lot of money and time on the below, and other people shouldn’t need to do the same.
In reply to: Alternative Usage of a Profile FieldYou shouldn’t need the xprofile field loop.
Use something like this to grab the value directly:
$background_url = xprofile_get_field_data( 'ENTER YOUR XPROFILE FIELD VALUE', bp_get_the_site_member_user_id() );In reply to: Adding Images to GroupsYou can use the regular <img> HTML code to show images.
<img src="YOUR IMAGE URL" />There are also some third-party plugins to attach images:
*BP-Gallery beta (paid plugin) – http://buddydev.com
– adds a gallery component to BP; you can attach images to groups (and profiles) this way as well
* Forum Attachments for BuddyPress -https://wordpress.org/extend/plugins/forum-attachments-for-buddypress/
– allows you to attach images to forum posts only in BP
– needs some testing in BP 1.2 though; i’ve only tested this a bit in BP 1.2, needs a little work
In reply to: Alternative Usage of a Profile FieldForgot to mention if you’re going with the xprofile field route, you should check the mime-type for the URL.
This would provide some additional security.
DJPaul’s idea is good as well!
In reply to: Send email to user upon new notificationSo just to be clear, you want an email to be sent to someone when they receive a notification in the BuddyBar?
This is the default behaviour already!