Search Results for 'wordpress'
-
Search Results
-
I have been trying to find out ways to implement a Facebook-like “write on wall” or “post to profile” functionality, and it seems that I am not alone. After some research, I was lead to this very helpful article written by Brajesh Singh in 2010:
This is a brief report how I adapted the mod to WordPress 3.4.2 + Buddypress 1.6.1 + Buddpress Template Pack 1.2.1. So far everything seems to work. In case of any confusion, this mod does not exactly implement Facebook write-to-wall. The trick here is to enable the status update form on profiles and, when it is used in the profile of user X, append a short piece of text @mentioning user X. The status will thus show up later in X’s “Mention” tab. It will look more like write-to-wall if I manage to combine the “Personal” and “Mention” streams into one, another mod many people seem to want to have.
I am using not the bp-default theme but Twenty-Eleven + Buddpress Template Pack 1.2.1. All the mods suggested by Brajesh Singh basically still work, modulo different locations and some code updates. Please refer to Brajesh’s original article. The following describes the difference.
For Step 1, find lines 65-66 in members/single/activity.php
if ( is_user_logged_in() && bp_is_my_profile() && ( !bp_current_action() || bp_is_current_action( 'just-me' ) ) )
locate_template( array( 'activity/post-form.php'), true );
Change line 65 to
if ( is_user_logged_in() && ( !bp_current_action() || bp_is_current_action( 'just-me' ) ) )
For Step 2, find line 38 of activity/post-form.php
<?php if ( bp_is_active( 'groups' ) && !bp_is_member() && !bp_is_group() ) : ?>
Change to
<?php if ( bp_is_active( 'groups' ) && !bp_is_member() && !bp_is_group() ) : ?>
For Step 3, in functions.php of your theme (create this file if it does not exist)
<?phpfunction bpdev_remove_post_update(){
remove_action( 'wp_ajax_post_update', 'bp_dtheme_post_update' );
}add_action("init","bpdev_remove_post_update");
add_action( 'wp_ajax_post_update', 'bp_mytheme_post_update' );
/* AJAX update posting */
function bp_mytheme_post_update() {
global $bp;/* Check the nonce */
check_admin_referer( 'post_update', '_wpnonce_post_update' );if ( !is_user_logged_in() ) {
echo '-1';
return false;
}if ( empty( $_POST['content'] ) ) {
echo '-1' . __( 'Please enter some content to post.', 'buddypress' ) . '';
return false;
}if ( empty( $_POST['object'] ) && function_exists( 'bp_activity_post_update' ) ) {
if(!bp_is_home() && bp_is_member())
$content="@". bp_get_displayed_user_username()." ".$_POST['content'];
else
$content=$_POST['content'];$activity_id = bp_activity_post_update( array( 'content' => $content ) );
} elseif ( $_POST['object'] == 'groups' ) {
if ( !empty( $_POST['item_id'] )&&function_exists( 'groups_post_update' ) )
$activity_id = groups_post_update( array( 'content' => $_POST['content'], 'group_id' => $_POST['item_id'] ) );
} else
$activity_id = apply_filters( 'bp_activity_custom_update', $_POST['object'], $_POST['item_id'], $_POST['content'] );if ( !$activity_id ) {
echo '-1' . __( 'There was a problem posting your update, please try again.', 'buddypress' ) . '';
return false;
}if ( bp_has_activities ( 'include=' . $activity_id ) ) {
while ( bp_activities() ) {
bp_the_activity();
locate_template( array( 'activity/entry.php' ), true );
}
}
}?>
The code above is mostly the same as that of Brajesh Singh, apart from the beginning. Brajesh’s code starts with:
remove_action( 'wp_ajax_post_update', 'bp_dtheme_post_update' );
add_action( 'wp_ajax_post_update', 'bp_mytheme_post_update' );
It didn’t work for me — my status updates got duplicated. I then found somewhere else that it didn’t work for themes other than bp-default. If you use bp-default, you might need Brajesh’s version.Hope the above helps.
I am trying change title and content of activation email that buddypress sent to the user after registering.
I tried using add_filter(‘bp_core_activation_signup_user_notification_subject’) but its not working.
I even tried changing the core file (bp-core-filters.php)(temporary solution) but nothing, email is same as before.Im using buddypress 1.5.6 and wordpress 3.3.2
if any one could show me correct direction, i would be really thankful.
Hey all,Im trying to display the member-header.php in the wordpress author page but it gives me “not recently” active when the user is visited. I’d also like to display a profile field in the sidebar.
Anyone knows how this can be accomplished?
Cheers, AronTopic: [Resolved] User blogs?
I just installed wordpress multisite and buddypress, everything is running fine. I want users to be able to write a quick story or blog about there day, etc and when they’re done it shows up on a page like user blogs.
I went ahead and created a test user, figured I can create a quick blog and it would show up on the page you set it for like site directory. I figured maybe it would show up just how it would on a regular wordpress blog. Instead it just shows a list of sites that say view site and I had to create a site/blog myself.
What I wanted was just a page almost like the activity page but it posts recent blogs that users wrote. It would show the user and the title of there post so a user that wants to read it just has to click on the blog title. I don’t want users to have to create a whole new blog page/site with a theme etc as it seems like it would be a long process and that some people just won’t be able to know how or will lose interest in going through that whole process.
Here is an example http://www.worldfishingnetwork.com/community/members.aspx
As you can see it shows recent blogs from members.Not sure if I explained it properly, hopefully I did. Can someone help me on how I can go about doing this? I would greatly appreciate the help.
Thank you
I have noticed this on multiple WordPress sites I run with different versions of Buddypress, including the current one.
When there is a member who has a name containing an apostrophe and somebody searches on that name, the results come up blank.
For example, one site I manage is a chamber of commerce website and one of the business names is Tony K’s. If I search for Tony, they come up. If I search for Tony K, they come up. If I search for Tony K’s, nothing returns.
This also happens on another website I run with the latest versions of WordPress and Buddypress and searching just on the user’s name.
Has anybody run into this issue in the past and, if so, what was your workaround/solution?
Topic: Users can create blogs?
I want my site made so that users can create there own blogs for people to read and have them in a different page example: user blogs
Can this be done using buddypress on wordpress or does it have to be used on multisite? I’ve never used multisite…what’s the difference?
Thank you
Hi.
I want to know why registration page in buddypress doesn’t use the default wordpress fields? I think this is a very intersting feature should be included in buddypress. In ly opinion, being able to chose first name, last name, and all other fields in wordpress, it’s a very nice feature.
Hope you understand what I’m trying to say. Sorry for my bad English.
Good luck.