Forum Replies Created
-
In reply to: How to get a section identifier in the body tag?
don’t use brackets… use == instead.
eg.
if ( $bp->current_component == 'activity' )In reply to: "Author" role and "My Blogs"Sidenote: The whole WPMU process of adding an existing user to an existing blog is painful. You need to know the username and the email address of the user you want to add! I guess this is done for security reasons… but if you’re a site-admin, knowing the username should be enough (I guess you could use the “Site Admin > Blogs” option as well, but anyway…).
I’m going to test out Burt’s BP Community Blogs plugin to see if it makes things easier.
http://wpmudev.org/project/New-Blog-Defaults
Though I should note that this plugin has absolutely nothing to do with the original poster’s question!
It is extremely handy for setting up what you want for new blog defaults though.
@Pr102
I know this topic is old, but if you’re talking about when you post a comment on a blog, that your name should link to your BP profile… this is possible via this plugin:
In reply to: "Author" role and "My Blogs"Trac ticket created as an enhancement:
In reply to: template_directory in members blogs themeThat sounds about right, Peter.
WPMU does some rewriting so the theme is actually pointing to mywebsite.com/wp-content/themes/default/.
Oh… and no question is a dumb question!
In reply to: changed base.css color and width where else please?Recommendation #1: Instead of editing base.css, rename “custom-sample.css” to “custom.css” and start making your changes in there (make sure you uncomment line 17 in bphome/style.css so this will take effect).
Why make your changes in a custom CSS file? Because when you upgrade BP and your BP Home theme, your changes won’t be affected!
Recommendation #2: Use Firefox and install the Firebug plugin to pinpoint which classes you have to apply your colors on.
Another method is doing a search and replace for the color(s) in question for your styles.
—
Okay I’m just reading this over again… and I’m being an idiot!
You’re talking about the BP member theme… which is an entirely different theme from the bphome theme altogether!
You need to edit a bunch of CSS files in /wp-content/bp-themes/bpmember/css/.
I still recommend making your changes in /wp-content/bp-themes/bpmember/css/custom.css, so when you upgrade BP, your colors and theme will stay intact.
In reply to: Age limiting the sign up process@blackarbor:
You could modify the BuddyPress TOS plugin and change that to an Age Verification field.
This one’s a pretty straightforward WPMU question!
Let’s say your member’s blog is located at:
hxxp://example.com/exampleblog OR hxxp://exampleblog.example.com (if you’re using subdomains)
Your RSS feed for that blog will be:
hxxp://example.com/exampleblog/feed/ OR hxxp://exampleblog.example.com/feed/
With this RSS feed URL, you can easily use the RSS widget to output the latest entry on the homepage.
Or you can do it manually with the RSS feed URL.
In reply to: gd star rating for buddypress work in progress!I’ve been testing GD Star Rating on WPMU and Buddypress and have noted a few bugs to Milan (the developer).
I’ve asked him to see if he can hijack the BP activity stream; so when a rating is made, instead of the default “User commented on the blog post Hello World”, it will change to something else like “User wrote a review for Hello World”… or something like that.
Since it’s one of the most complicated plugins to setup and understand, I’m not going to allow GD Star Rating site-wide so the issues that Kunal17 is having won’t be an issue for me.
In reply to: Skeleton Theme & Component for Developers@gaganawhad, the “Skeleton component” is for BP plugins!
What you want is the BP Skeleton Member Theme, which can be found in:
/wp-content/plugins/buddypress/bp-themes/bpskeletonmember/
Move that folder to:
/wp-content/bp-themes/
Activate it in the WPMU admin area – “BuddyPress > General Settings” and you should be ready to start theming!
In reply to: Core Modifications + BP Upgrades…I think, for the most part, bp-custom.php will do quite nicely.
The only thing that might be a problem is if you’re working deeply with functions that affect the WPMU core. eg. registration. Then you might need to put some of your functions in the wp-content/mu-plugins/.
A mod might want to jump in here to give you further insight.
In reply to: Core Modifications + BP Upgrades…If you’ve kept track of what core changes you’ve made and the changes are minor, then you can keep on doing what you’re doing.
If you made a lot of changes, you might want to consider putting your mods in /wp-content/bp-custom.php and starting from scratch like you mentioned.
Depending on the amount of changes you’ve made, this might be a pain for you!
In reply to: BBpress integration issueRebootNow is correct.
You can temporarily fix this by swapping out the html_entity_decode() function for utf8_decode().
Change
$content = @html_entity_decode( $content, ENT_COMPAT, "UTF-8" );to:
$content = utf8_decode( $content);In reply to: Some valuable Tips with custom templateFor #1, use Justin Tadlock’s Get The Image plugin in a loop. Or to make things easier, use Tadlock’s query_posts widget with Get The Image to easily define which posts to display. The Get The Image plugin does not cache the images though.
If you’re looking for image resizing / caching, try TimThumb from darrenhoyt.com… although I never have been able to get that working on WP.
For #2, there’s two plugins that I know of.
First one is The WordPress Bar. The second one is Pretty Link. It will not integrate with the BP bar… it will add another bar for external pages.
For #3, you’ll have to get creative with the xprofile fields. I have something setup with a BP install I’m working on, which manipulates the BP profile loop and uses CSS manipulation to display the social badges.
In reply to: How to get a section identifier in the body tag?I guess I shouldn’t have led you down the Sandbox road!
I should have said look at those functions as a structure… don’t use it literally as most of that code is WP-specific only.
As for these lines:
global $bp;
echo $bp->current_component; //outputs current component
echo $bp->current_action; // outputs current actionThey are BP-specific and will let you determine what type of BP page you’re on (except for directories)… try it by putting the lines in the header.php of your BP member theme.
I would use the lines in your new CSS class function like this:
function bp_body_class( $print = true ) {
global $bp;
if ( bp_is_page( BP_MEMBERS_SLUG ) )
$c[] = 'members';
//more conditionals here
$c[] = $bp->current_component; //outputs current component
$c[] = $bp->current_action; // outputs current action
// Separates classes with a single space, collates classes for BODY
$c = join( ' ', apply_filters( 'body_class', $c ) ); // Available filter: body_class
// And tada!
return $print ? print($c) : $c;
}Something to that effect in your bp theme’s functions.php file.
That’s basically 90% of the function right there.
I have WPMU setup in the root, but wanted to have the “community” page on a different page as well.
Here’s what I did:
- Create a new WordPress page template with the BP widget toolbar calls in it.
- Create a new WordPress page and apply the page template you created in step #1.
- Add BP widgets to the BP widget toolbar.
That should be it!
In reply to: How to get a section identifier in the body tag?You can create your own css class function to do this… similar to how WP’s Thematic, Sandbox and Hybrid themes have their own css class output function.
Here’s a few lines to get you started:
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 actionHope that helps!
[EDIT]
For directories… you’ll have to check if the page is either BP_MEMBERS_SLUG, BP_GROUPS_SLUG, BP_BLOGS_SLUG.
eg.
if ( bp_is_page( BP_MEMBERS_SLUG ) ) echo ' members';In reply to: Is this the right syntaxHey John,
Regarding the spam comment, do you know if these forums are using the bbPress Akismet plugin?
In reply to: Promoting a Social Network. Discuss.SEO… submit your site to Google, Yahoo and various web directories, write good blog articles relevant to your niche and link to your interior pages. Submit your articles to social sites like Digg and Mixx… pray that it becomes popular

SEO isn’t an exact science… but it helps.
Like DJPaul said, also network with others with similar interests (Facebook, Twitter, etc.). Write guest posts on their site (if they have one), etc.
In reply to: Very weird spam incident…Some people have suggested installing WP Hashcash to block signups, though I haven’t tried it myself.
But you’re saying that someone signed up on your BP install with the Facebook Connect plugin?
So it sounds like a problem with the FB plugin… not sure though.
Sounds like DJPaul suspects the same thing!
In reply to: Trying to stop spam emailHey Jfcarter,
Sorry for not being clear there.
If you’re using the default BP member theme, I replaced instances of bp_send_message_button with the newly, created bp_send_message_to_friend_button in these files:
* /bp-themes/bpmember/activity/just-me.php
* /bp-themes/bpmember/wire/latest.php
* /bp-themes/bpmember/profile/index.php
Keep in mind that if you’re using a different BP member theme, that those template links might be different.
Hope that was clear enough!
In reply to: Trying to stop spam emailI liked this idea, so I implemented it on my BP install.
I decided to do step #2.
Here’s what I added to my /wp-content/plugins/bp-custom.php:
function bp_send_message_to_friend_button() {
global $bp;
if ( bp_is_home() || !is_user_logged_in() || !friends_check_friendship($bp->loggedin_user->id,$bp->displayed_user->id) )
return false;
$ud = get_userdata( $bp->displayed_user->id );
?>
<div class="generic-button">
<a class="send-message" title="<?php _e( 'Send Message', 'buddypress' ) ?>" href="<?php echo $bp->loggedin_user->domain . $bp->messages->slug ?>/compose/?r=<?php echo $ud->user_login ?>"><?php _e( 'Send Message', 'buddypress' ) ?></a>
</div>
<?php
}Then I edited the template files mentioned above with the new function call – bp_send_message_to_friend_button().
Now, the “Send Message” button only shows up if you are a friend of said user.
I’ve added a trac ticket about this issue as an enhancement, so maybe the above change will be built into the bp_send_message_button() function in the next BP release instead of having to add your own function.
—
There’s still the autocomplete feature in the “My Messages > Compose” area, as well as the wire and group wire to worry about though… one step at a time!
In reply to: Trying to stop spam emailIs this a bot or a manual signup who manually sends messages to the users?
Anyway, the way I see it, there are two ways to combat this problem in the interim:
1) do a check to see if the logged-in user is a friend of that user, if so run the bp_send_message_button() function
2) code own function based on bp_send_message_button() and do the check within this function
Either option will require modifying the Buddypress member theme template in three places:
* /bp-themes/bpmember/activity/just-me.php
* /bp-themes/bpmember/wire/latest.php
* /bp-themes/bpmember/profile/index.php
(I’m using the default BP member theme as an example)
This is only for the “Send message” button though… how did the person spam your users?
In reply to: Only show usernamesIf you want to hide the core xprofile “name” field, you’ll have to edit the /profile/profile-loop.php file in order to do this.
One way to do this is mentioned here:
https://buddypress.org/forums/topic/faq-how-to-code-snippets-and-solutions#post-13243
This will hide your entire “Base” xprofile group though.
But that’s one way around it!
In reply to: How to add new menus and tabsThe easiest way would be to just manually edit the navigation in your bp-themes template…
If you’re using the default BP member theme, that would be located here:
/wp-content/bp-themes/bpmember/header.php