Search Results for 'custom activity page'
-
Search Results
-
Hi, I am struggling to get a profile page as it shows 404 error. Also notification and other profile related pages show 404 error. Have deactivated all plugins to test if any code conflict but that also didn’t resolve the issue.
Links to pages:Profile page
Activity:profile activity
Notification:notificationAll other pages related to profile that showup on right corner when the member is signed in show 404 error.
wordpress version:4.8
Buddypress version:2.8.2
Also have installed bbpress:2.5.12
Wordpress Theme: customizr child themePlease help and thanks in advance.
Hello, I have been using buddyPress Version 2.7.4. After updating to version 2.8.2, I get this error Fatal error: Call to undefined function bp_is_front_page() in ……/wp-content/plugins/bp-custom.php on line 17 here is my code in the bp-custom.php `<?php
// hacks and mods will go here
/* Redirects to profile upon login */
add_action(‘login_form’, ‘redirect_after_login’);
function redirect_after_login()
{
global $redirect_to;
if (!isset($_GET[‘redirect_to’]))
{
$redirect_to = get_option(‘activity’);
// sample-page = your page name after site_url
} }function bp_help_redirect_to_profile(){
global $bp;if( is_user_logged_in() && bp_is_front_page() )
bp_core_redirect( get_option(‘home’) . ‘/members/’ . bp_core_get_username( bp_loggedin_user_id() ) . ‘/activity’ );}
add_action( ‘get_header’, ‘bp_help_redirect_to_profile’,1);
add_action(‘wp_logout’,’go_home’);
function go_home(){
wp_redirect( home_url() );
exit();
}add_action( ‘bp_complete_signup’, ‘buddydev_redirect_after_signup’ );
function buddydev_redirect_after_signup() {
$page = wp_redirect( get_option(‘siteurl’) . ‘/profile’ );
bp_core_redirect( site_url( $page ) );
}?>` Help me what has happened and how can I correct this Error?
Hi,
I have a social networking site that is intended for subscribers to share only with his/her friends. Therefore, I would like to remove the options for them to be able to select where they want to post their activity. I would like to remove all options for where to post activity updates and I would like it to always post to the friends feed. Also, I would like it to post to the activity page if they are in the activity page and to post to whatever group they are in when they do a post from that page.
Is this something that I would accomplish by removing lines of code from files, by adding custom CSS, or by adding a function in the functions.php file?
Website: http://www.tacklebox.fish
WP Version: 4.7.5
BP Version: 2.8.2
Theme: Buddy (themeforest)Please let me know if these is anything I can do to accomplish this.
Thanks in Advance!
BuddyHello everyone,
Currently im using Bp Portfolio plugin and on my activity stream, when subscribers update on their latest portfolio didn’t show up on the stream. (Only for admin role it works fine)
So, i added custom post type for the portfolio on custom.php, here are the code:
add_post_type_support( ‘bb_project’, ‘buddypress-activity’ ); function customize_page_tracking_args() {
// Check if the Activity component is active before using it.
if ( ! bp_is_active( ‘activity’ ) ) { return; }bp_activity_set_post_type_tracking_args(
‘page’, array( ‘action_id’ => ‘new_blog_page’,
‘bp_activity_admin_filter’ => __( ‘Published a new page’, ‘boss’ ),
‘bp_activity_front_filter’ => __( ‘Pages’, ‘boss’ ),
‘contexts’ => array( ‘activity’, ‘member’ ), ‘activity_comment’ => true,
‘bp_activity_new_post’ => __( ‘%1$s posted a new page‘, ‘boss’ ), ‘bp_activity_new_post_ms’ => __( ‘%1$s posted a new page, on the site %3$s’, ‘boss’ ), ‘position’ => 100, ) ); }add_action( ‘bp_init’, ‘customize_page_tracking_args’ );
It works however it didn’t display the featured image for the portfolio. Maybe im missing some code here plus im not really good at php.
Is there any help for me to fix this?
Really this makes no sense to me.
I created a custom template for a page im working on and copied over the change.avatars.php to the custom page..
Should work in theory, at least I thought.But the upload or crop didnt work.
The dotted box wasn’t even there.So I ended up creating a index-action-change-avatar.php file and placed it in the BuddyPress/members/single directory and copied the change.avatars.php code over.
And also added general-after-wrap and general-before-wrap to the file.Then back to my custom.php template file I added
<meta http-equiv="refresh" content="0; url=<?php echo bp_loggedin_user_domain();?>profile/change-avatar/" />
So now my custom page template looks like this before it gets redirected.
Then after the redirect the page looks like this.
I wanted my custom page to look like the 2nd pic.
Now if I remove the index-action-change-avatar.php file it would just redirect me to the normal user profile page to upload the Avatar.
But I didn’t want that for this custom page I am doing.So now that I added the index-action-change-avatar.php file it will just override the default change-avatar.php as its expected to do but unfortunately that means when a user clicks on his profile settings and selects upload avatar it would direct them to the index-action-change-avatar.php file that has some changed settings I’ve added.
This is what I was trying to do.
Step 1-user registers on homepage.
Step 2-user is redirected to the check email for activation page.
Step 3-user clicks activation link within their email.
Step 4-user is redirected to my custom page notifying account is activated.Now on step 4 I was going to add the option to upload their avatar or just continue.
Now what I could do is just add a href link that would redirect them to their profile to upload but it would defeat the purpose of what I was aiming for.
Another option i might just do is after activation have them auto logged in and redirected to the activity page then from there I’ll add a tour of the website.
I’ve been having an issue with my activity feed where the first activity’s time since permalink comes back as site.com/activity/p/321 even when it is a blog post activity or custom post type activity. As soon as it becomes the second item in the loop, it goes back to normal permalink where it comes back as the site.com/?p=123 or site.com/2017/04/post-name/comment-page-1#comment-123.
Does this sound familiar.
I am running BP on the primary site of a Multisite installation.
Hey all I’m attempting to modify the content returned by BuddyPress’ default ‘@’ mention notification. I’m using this as part of a custom profile page and would like to modify the “username mentioned you’ text to something more personalized based on post type.
// Change mention output function format_mention_notifications( $action, $item_id, $secondary_item_id, $total_items, $format = 'string', $component_action, $component_name, $notification_id) { if ( $component_action === 'new_at_mention') { // User mentioned notification $mentioned_source_type = get_post_type($item_id); $username = wl_get_username($secondary_item_id); $mention_avatar = wl_get_avatar($secondary_item_id); $mention_title = ''; $mention_text = $username; if ($mentioned_source_type == 'topic') { $mention_title = bbp_get_topic_title( $item_id ); $mention_text .= ' mentioned you in the forum post '; $mention_source_link = ''; // link to topic } else if ($mentioned_source_type == 'reply') { $parent_topic_id = bbp_get_reply_topic_id( $item_id ); $mention_title = bbp_get_topic_title( $parent_topic_id ); $mention_text .= ' mentioned you in their response to the forum post '; $mention_source_link = bbp_get_reply_url( $item_id ); // link to reply } else if ($mentioned_source_type == 'comment') { $comment = get_comment($item_id); $mention_text .= ' mentioned you in their comment'; $mention_source_link = get_comment_link($comment); } else { $mention_avatar = ''; $mention_title = get_the_title($item_id); $mention_text = 'You were mentioned in '; $mention_source_link = get_permalink($item_id); } $mention_source_link = wp_nonce_url( add_query_arg( array( 'action' => 'read', 'notification_id' => $notification_id), $mention_source_link ), 'bp_notification_mark_read_' . $notification_id); // WordPress Toolbar if ( 'string' === $format ) { $return = apply_filters( 'bp_activity_single_at_mentions_notification', '<a href="' . esc_url( $mention_source_link ) . '" title="New mention">'. $mention_avatar . esc_html( $mention_text ) . '<span class="activity-title">'.$mention_title.'</span></a>', (int) $total_items, $mention_text, $mention_source_link ); // Deprecated BuddyBar } else { $return = apply_filters( 'bp_activity_single_at_mentions_notification', array( 'text' => $mention_text . $mention_title, 'link' => $mention_source_link ), $mention_source_link, (int) $total_items, $mention_text, $mention_title ); } } return $return; } add_filter( 'bp_notifications_get_notifications_for_user', 'format_mention_notifications', 100, 8 );
What I’ve tried so far:
– Changing the priority of the filter
– Moving my logic into theactivity_format_notifications
action with various different priorities
– All of the above in a custom plugin file, bp-custom.php, and my themes’ function.php fileI’ve used a similar filter for custom notifications and that aspect works great. I just can’t seem to override the default content with my own. My thoughts are that the the filters/actions run too late to be noticed by BuddyPress.
Many thanks for your help.
I am using visual composer for all my pages, but the buddypress pages are empty when i edit them and none of changes i make there shows up on said bp pages eg. members. Can i call a complete bubbypress page on to a new page ? with php maybe? or create a shortcode? Then i could still ad a heading above and style with vc custom css? i got activity feed to work like that with the help of 2 plugins. the other short code plugins do not give me the full bp page elements on my new page. Is there any way to do this? Help would be grately appreciated. Hope this makes sense. 🙂
Regards
LCTopic: BP 2.8.2 – Activity Problem
hello support team,
I’m facing a problem after updating buddypress to 2.8.2. Once I submit any text into activity stream it shows the website in an IFRAME, see the screenshot below plz. Can provide login if that helps.
Screenshot: http://nimb.ws/ufhcbA
Also when I’m trying to upload an image into activity stream, or trying to upload an image in Groups avatar or cover photo or my individual cover photo, it says “An error occured. Please try again later”. It was working all fine 2 days ago & after the buddypress update it doesn’t seems to work.
I’m using:-
WP 4.7.3
BP 2.8.2
BBpress 2.5.12
rtMedia for WordPress, BuddyPress and bbPress 4.3.1
Gravity Forms 2.0.6.9 – For customized registration page
Gravity Forms User Registration Add-On 3.3.9 – For mapping user registration with WP & BP fields.Please help!
Thanks,
SiddI search for a plugin or code.
I wish a notification in the administration of the keywords I would have chosen, without deleting his keywords in the front office. This feature must work with all buddypress, message, activity, group, and custom pages.
I use WordPress 4.7 and BuddyPress 2.7.4. I have Woffice theme based on Unyson.
Thank you in advance for your help
Excuse me if this request is in the wrong place:
I have added a working custom date field to my activity page by editing the post-form.php and the the bp-custom.php. This is in my bp-custom.php:
// CUSTOM DATE FIELD function add_date_to_activity( $content, $user_id, $activity_id ) { bp_activity_update_meta( $activity_id,'thedate', $_POST['thedate'] ); } add_action( 'bp_activity_posted_update', 'add_date_to_activity', 10, 3 ); function my_datemeta() { $my_datemeta = bp_activity_get_meta( bp_get_activity_id(),'thedate' ); if (is_user_logged_in()) : { echo "<span class='datefont'>" . $my_datemeta . "</span></br>"; } endif; } add_action( 'bp_activity_entry_meta','my_datemeta' );
Now I am trying to sort the posted activities by this date field instead of the standard sort by activity-id’s. Is there any way to override the standard sort function?
Thanks in advance, i’d be happy to share more information if necessary
Topic: New Theme for Free
I’ve been developing a new theme called Centro which supports the core functionality of WordPress & BuddyPress.
It’s currently still in development but has been released and is available on GitHub.
You can view a demo on buddycore or here also and a download is available via GitHub.
Issues will be answered and resolved via GitHub.
Enjoy! Happy New Year!
**********************
Some Features
**********************
Colour customizations in wp-admin.
Support for posts and pages
Archive pages for search and taxonomies
Post thumbnails and post formats
Post commentsActivity streams
Member profiles
– xProfile
– Settings
– Friends
– PMs
– Notifications
– MultisiteRegistration
– Basic member
— With blog creationResponsive
HTML5
Cross Browser (IE10+)*************************
Group support will definitely be added in the next updates
Plan to add support for BBPress and possibly WooCommerceAll of this depends on how many people are using the theme and feature requests from users.
The problem:
I want to display different types of names on the updates in the activity stream like:
– first name + last name for updates which the user posts on their stream
– username/display name when there are updates in groupsi have written the following code:
/** * Get the fullname of the current member in the loop. * * Full name is, by default, pulled from xprofile's Full Name field. * When this field is empty, we try to get an alternative name from the * WP users table, in the following order of preference: display_name, * user_nicename, user_login. * * @return string The user's fullname for display. */ function bp_get_member_name_custom() { global $members_template, $bp; // print_r($members_template->member->id); $firstname= bp_get_profile_field_data('field=vorname&user_id='.$members_template->member->id); $lastname= bp_get_profile_field_data('field=nachname&user_id='.$members_template->member->id); if(!empty($firstname) || !empty($firstname)){ $fullname = $firstname.' '.$lastname ; return apply_filters( 'bp_get_member_name_custom',$fullname ); }else{ $name_stack = array( 'display_name', 'user_nicename', 'user_login' ); foreach ( $name_stack as $source ) { if ( !empty( $members_template->member->{$source} ) ) { // When a value is found, set it as fullname and be done with it. $members_template->member->fullname = $members_template->member->{$source}; break; } } return apply_filters( 'bp_get_member_name_custom', $members_template->member->fullname ); } /** * Filters the display name of current member in the loop. * * @since 1.2.0 * * @param string $fullname Display name for current member. */ } add_filter( 'bp_get_member_name_custom', 'wp_filter_kses' ); add_filter( 'bp_get_member_name_custom', 'stripslashes' ); add_filter( 'bp_get_member_name_custom', 'strip_tags' ); add_filter( 'bp_get_member_name_custom', 'esc_html' ); // full name to all memebr list add_filter('bp_get_member_name','bp_get_member_name_custom'); // Fullname in group memeber list function bp_get_group_member_link_custom() { global $members_template, $bp; $firstname= bp_get_profile_field_data('field=vorname&user_id='.$members_template->member->id); $lastname= bp_get_profile_field_data('field=nachname&user_id='.$members_template->member->id); if(!empty($firstname) || !empty($firstname)){ $fullname = $firstname.' '.$lastname ; return apply_filters( 'bp_get_group_member_link_custom', '<a href="' . bp_core_get_user_domain( $members_template->member->user_id, $members_template->member->user_nicename, $members_template->member->user_login ) . '">' . $fullname . '</a>' ); }else{ $name_stack = array( 'display_name', 'user_nicename', 'user_login' ); foreach ( $name_stack as $source ) { if ( !empty( $members_template->member->{$source} ) ) { // When a value is found, set it as fullname and be done with it. $members_template->member->fullname = $members_template->member->{$source}; break; } } return apply_filters( 'bp_get_group_member_link_custom', '<a href="' . bp_core_get_user_domain( $members_template->member->user_id, $members_template->member->user_nicename, $members_template->member->user_login ) . '">' . $members_template->member->display_name . '</a>' ); } } add_filter('bp_get_group_member_link','bp_get_group_member_link_custom'); /** * Fetch the display fullname for a user. * * @param int|string|bool $user_id_or_username User ID or username. * @return string|bool The display name for the user in question, or false if * user not found. */ function bp_core_get_user_displayname_custom( $user_id_or_username ) { if ( empty( $user_id_or_username ) ) { return false; } // return $user_id_or_username; if ( ! is_numeric( $user_id_or_username ) ) { $user_id = bp_core_get_userid( $user_id_or_username ); } else { $user_id = $user_id_or_username; } if ( empty( $user_id ) ) { return false; } global $bp; $firstname= bp_get_profile_field_data('field=vorname&user_id='.$user_id); $lastname= bp_get_profile_field_data('field=nachname&user_id='.$user_id); // return $user_id; if(!empty($firstname) || !empty($firstname)){ $fullname = $firstname.' '.$lastname ; return apply_filters( 'bp_core_get_user_displayname_custom', $fullname, $user_id ); }else{ $display_names = bp_core_get_user_displaynames( array( $user_id ) ); if ( ! isset( $display_names[ $user_id ] ) ) { $fullname = false; } else { $fullname = $display_names[ $user_id ]; } return apply_filters( 'bp_core_get_user_displayname_custom', $fullname, $user_id ); } } add_filter( 'bp_core_get_user_displayname_custom', 'strip_tags', 1 ); add_filter('bp_core_get_user_displayname_custom'); add_filter('bp_core_get_user_displayname','bp_core_get_user_displayname_custom'); // Fullname on profile page on other member add_filter('bp_displayed_user_fullname','bp_core_get_user_displayname_custom');
which is creating the following output on my site:
It was working before updating to WordPress 4.7.
Can anyone help since i can’t find a solution or error?
Or am i thinking to complicated?i’m currently working on:
Wordpress Version 4.7.
Buddypress Version 2.7.4
BP Xprofile Member Type Field Version 1.0.2Hello, sorry for my bad english but I’m Italian. I want to create a sub-menu under the menu Activity (and this is ok) and view a template’s page when I click on the sub-menu. I can not do this last step: associate the template. If I make an item (not sub) it’s work but if I make the sub-item don’t work.
I think that the error is on this line:
bp_core_load_template( apply_filters( 'bp_core_template_plugin','members/single/swap' ) );
And where do I put the file swap.php? in which folder? Thank you
This is my code:function bpfr_custom_profile_sub_nav() { global $bp; $parent_slug = 'activity'; //Add subnav item bp_core_new_subnav_item( array( 'name' => __( 'Swap' ), 'slug' => 'swap', 'parent_url' => $bp->displayed_user->domain . $parent_slug.'/', 'parent_slug' => $parent_slug, //'parent_slug' => $bp->slug 'screen_function' => 'swapluisa', 'position' => 1, ) ); } add_action( 'bp_setup_nav', 'bpfr_custom_profile_sub_nav' ); function swapluisa() { //add title and content here - last is to call the members plugin.php template add_action( 'bp_template_title', 'my_groups_page_function_to_show_screen_title' ); add_action( 'bp_template_content', 'my_groups_page_function_to_show_screen_content' ); bp_core_load_template( apply_filters( 'bp_core_template_plugin','members/single/swap' ) ); } add_action( 'bp_setup_nav', 'my_bp_nav_adder', 50 ); function my_groups_page_function_to_show_screen_title() { echo 'My new Page Title'; } function my_groups_page_function_to_show_screen_content() { echo 'My Tab content here'; }
Topic: new query arg
This code allows you to sort activity from most favorited activity to least favorited activity.
class BP_Loop_Filters { // Constructor public function __construct() { $this->setup_filters(); } // Filters private function setup_filters() { add_filter( 'bp_activity_get_user_join_filter', array( $this, 'order_by_most_favorited' ), 10, 6 ); add_filter( 'bp_activity_paged_activities_sql', array( $this, 'order_by_most_favorited'), 10, 2 ); // Maybe Fool Heartbeat Activities! //add_filter( 'bp_before_activity_latest_args_parse_args', array( $this, 'maybe_fool_heartbeat' ), 10, 1 ); } /** * Ninja Warrior trick to reorder the Activity Loop * orders by most likes highest to least */ public function order_by_most_favorited( $sql = '', $select_sql = '', $from_sql = '', $where_sql = '', $sort = '', $pag_sql = '' ) { $r = $select_sql; if ( empty( $r['meta_query'] ) || ! is_array( $r['meta_query'] ) ) { return $sql; } else { $meta_query_keys = wp_list_pluck( $r['meta_query'], 'key' ); if ( ! in_array( 'favorite_count', $meta_query_keys ) ) { return $sql; } preg_match( '/\'favorite_count\' AND CAST\((.*) AS/', $sql, $match ); if ( ! empty( $match[1] ) ) { $sql = str_replace( 'ORDER BY a.date_recorded', 'ORDER BY '. $match[1] .' + 0', $sql ); } } return $sql; } } // 1, 2, 3 go ! function bp_loop_filters() { return new BP_Loop_Filters(); } add_action( 'init', 'bp_loop_filters' );
with query args like this:
// order activity by favorited. $query_args = array( 'meta_query' => array( array( 'key' => 'favorite_count', 'value' => 1, 'type' => 'numeric', 'compare' => '>=' ), ), );
Does anyone know how to add a new parameter argument for this? instead of
favorite_count
, I would like something likeorderby_favorite_count
.The reason is, I’ve got custom pages where I like to manipulate the activity loop in a variety of ways, and if I don’t use that
class BP_Loop_Filters
, then this query args code:$query_args = array( 'meta_query' => array( array( 'key' => 'favorite_count', 'value' => 1, 'type' => 'numeric', 'compare' => '>=' ), ), );
will get activities that have been favorited at least x amount of times, but ordered by date_recorded.
So I would like to be able to
1. order activities from most favorited, to least favorited, and
2. order activities by date with activities that has been favorited at least x amount of times.At the moment I can only do one or the other.
Any help appreciated.