Search Results for 'wordpress'
-
Search Results
-
This problem has been bugging me for couple of days. After adding a new subnav, I got the following error when trying to use the drop down groups filter:
404 Not Found – mysite.com/wp-admin/admin-ajax.php”Basically I wanted to add a new subnav items under a member’s main nav “groups”. Currently there are two subnav items there: “memberships” and “invitations”. I would like to add my own subnav item called “My Customized Groups”. When this subnav is clicked, it will show groups of certain feature.
Okay the first step is to create a new subnav items. I did it by adding the following code to my functions.php
//add new subnav items
bp_core_new_subnav_item( array(
'name' => __( 'My Customized Groups', 'buddypress' ),
'slug' => 'my-custom-groups',
'parent_url' => $groups_link,
'parent_slug' => $bp->groups->slug,
'screen_function' => 'groups_screen_my_custom_groups',
'position' => 20
));
To make sure my subnav works, my screen_function “groups_screen_my_custom_groups” is a exactly copy of the default “groups_screen_my_groups”. Now the subnav is added, and groups loop show up correctly. But when I select the drop down filter ( “last active”, “most members”, “newly created”, etc), the following error shows up:
404 Not Found – mysite.com/wp-admin/admin-ajax.php”if I set this new subnav as the default by adding the following code in functions.php
$args = array(
'parent_slug' => $bp->groups->slug,
'screen_function' => 'groups_screen_my_custom_groups',
'subnav_slug' => 'my-custom-groups'
);bp_core_new_nav_default($args);
Then the ajax works correctly for my-custom-groups, but it doesn’t work for other subnav items anymore. It seems ajax only works for the default subnav? This is strange.It must be something minor, but I still can’t figure out what’s been wrong after searching everywhere for two days.
Thanks in advance for the help.
Wordpress version: 3.4.2
buddypress version: 1.6.1Topic: How to disable comment?
I am running the latest stable versions of WordPress/BuddyPress on xampp. I am new so please understand that. I would like for the activity to be visible dependent on whether a user is friends. Is this even possible? Thank you!
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?
I have disabled comment on static pages through the Setting, but I still see comment box on my website anyway, especially on the homepage doesn’t look nice? So, what can I do to remove the comment box from pages? Anybody knows how to? I thank you in advance!
My website is: http://buddygalaxy.com/
My wordpress version is: 3.4.2
My buddypress version is: 1.6.1