Search Results for 'custom activity page'
-
Search Results
-
Hi,
So i have this script in my /plugins/bp-custom.php file (see below). I was wondering if it is possible to exclude new posts, from posting them on the activity wall, for a certain category. So that (i.e.) new posts that are posted in category_id 2 are not posted on the wall.Any ideas on this?
Here is my script:<?php //Listing activity support function customize_page_tracking_args_listing() { // Check if the Activity component is active before using it. if ( ! bp_is_active( 'activity' ) ) { return; } // Don't forget to add the 'buddypress-activity' support! add_post_type_support( 'listing', 'buddypress-activity' ); /** * Also don't forget to allow comments from the WordPress Edit Page screen * see this screencap https://cldup.com/nsl4TxBV_j.png */ bp_activity_set_post_type_tracking_args( 'listing', array( 'action_id' => 'new_listing', 'bp_activity_admin_filter' => __( 'Post added', 'custom-textdomain' ), 'bp_activity_front_filter' => __( 'Post', 'custom-textdomain' ), 'bp_activity_new_post' => __( '%1$s added a new post called <a href="%2$s">[post]</a>', 'custom-textdomain' ), 'contexts' => array( 'activity', 'member' ), 'comment_action_id' => 'new_listing_comment', 'bp_activity_comments_admin_filter' => __( 'Commented on', 'custom-textdomain' ), 'bp_activity_comments_front_filter' => __( 'Comments on post', 'custom-textdomain' ), 'bp_activity_new_comment' => __( '%1$s commented on <a href="%2$s">a post</a>', 'custom-textdomain' ), 'position' => 100, ) ); } add_action( 'bp_init', 'customize_page_tracking_args_listing', 1000 ); function new_listing_include_post_type_title( $action, $activity ) { if ( empty( $activity->id ) ) { return $action; } if ( 'new_listing' != $activity->type ) { return $action; } preg_match_all( '/<a.*?>([^>]*)<\/a>/', $action, $matches ); if ( empty( $matches[1][1] ) || '[post]' != $matches[1][1] ) { return $action; } $post_type_title = bp_activity_get_meta( $activity->id, 'post_title' ); if ( empty( $post_type_title ) ) { switch_to_blog( $activity->item_id ); $post_type_title = get_post_field( 'post_title', $activity->secondary_item_id ); // We have a title save it in activity meta to avoid switching blogs too much if ( ! empty( $post_type_title ) ) { bp_activity_update_meta( $activity->id, 'post_title', $post_type_title ); } restore_current_blog(); } return str_replace( $matches[1][1], esc_html( $post_type_title ), $action ); } add_filter( 'bp_activity_custom_post_type_post_action', 'new_listing_include_post_type_title', 10, 2 );
Hi, I’m trying to create a custom profile page using visual composer with aditional forms and categories. I’ll like to add the whole buddypress profile page header into a page (cover image, profile picture and buttons: activity, profiles, messages). I found some shortcodes but it only shows parts of the profile.
Hello,
First of all here is my config:
Server vps ssd 8GB ram 3×3.7 ghz apache
Wordpress 4.8.1
Theme Responsive free 2.9Plugins :
Wp rocket cache
Buddypress 2.9
Admin custom login
Advanced ads pro
Responsive menu pro
Ban Hammer
Bp profile search
Buddypress activity shortcode
Buddypress like
Wp foro
Google analytics dashboard
Iq block country
Newsletter
Plugin business directory
Redirection
Secupress
Social Plug
Strong testimonials
Table of content plus
Wordpress database backup
Wp asset cleanup
Wp excerpt generator
Wp testing
Yoast seoDatabase SQL manage on phpmyadmin; modify :
max connection = 502
timeout = 69
table open cache = 71144
max heap table size = 3G
tmp table size = 3G
allowed pack 1 000 000
open files limit = 150 000
myisam_sort_buffer_size = 72M
read_rnd_buffer_size = 24M
join_buffer_size = 32M
query_prealloc_size = 65K
query_alloc_block_size = 128K
table_definition_cache = 71144
thread_stack = 512K
thread_concurrency = 28
read_buffer_size = 36M
query cache min res unit = 512
bulk insert buffer size = 72M
thread_cache_size = 16K
query_cache_limit = 512M
innodb_buffer_pool_size = 3G
query_cache_size= 512M
innodb_log_buffer_size = 32M
sort_buffer_size = 192M
innodb_read_io_threads = 12
innodb_write_io_threads = 12?
innodb_open_files = 1200Members on my buddypress : 1300
monthly visitors : 100 000
monthly pages views : 200 000For several months now, I have activities that disappear completely from my database !!! I checked all the plugins, in case there was a conflict, but everything is ok. So I changed the table type from my MYISAM database to INNODB, but that still has not solved the problem. Same, I have changed many times some sql varibals in phpmyadmin, but nothing works. I also tried the data recovery via the buddypress dashboard, but it does not help! Activities disappear when some members are very active. Bizarre ??? !! So, if people have the solution to my problem, thank you for telling me what to change. Thank you !
Hello there, I have been trying and researching about this for over a week and haven’t been able to figure it out. Any help is much appreciated.
So here is the problem: Any changes that I make to the template files are not mirrored on the site.
What have I have already tried? I hope I have done all the basics correctly.
1. I have a child theme.
2. I have copied the files from: plugins/buddypress/bp-templates/bp-legacy/buddypress… into my child theme. (so my file structure looks like childtheme/buddypress/members/….(everything inside).
3. I am able to style the profile pages using CSS (I add them in my child theme stylesheet.css)What I am not able to do: Any changes I make to the template files are not visible on the website. Let me give an example.
Say I wanted to remove my name (@ajitjohnson) from the profile page.
I locate the header php file, so that is now located at childtheme/buddypress/members/single/member-header.php
Now I remove the following lines,
<?php if ( bp_is_active( ‘activity’ ) && bp_activity_do_mentions() ) : ?>
<h2 class=”user-nicename”>@<?php bp_displayed_user_mentionname(); ?></h2>
<?php endif; ?>I would imagine it should remove my name from the profile page but it doesn’t. May be something else is overriding it?
I have also tried editing the core template files without adding them to the child theme. It still doesn’t work.
Please help. Thank you.
Ps: WordPress version 4.8.1, buddypress version: 2.9, theme: _tk (basic bootstrap theme that I have customised)
Hi,
I want to change the user profile url for the activity stream, so that these are linked to a custom profile page. Ive found the link below, but in my case this only edits the link of the user avatar and not of the in-text link in the activity stream like: %avatar% “user_x just signed up”. Now the %avatar% is linked to the custom profile page but the user_x is still linked to the BP profile page.. How to fix this?function imborx_profile_link( $link ) { global $activities_template; if( $link != bp_loggedin_user_domain() ) $link = esc_url( get_author_posts_url( $activities_template->activity->user_id ) ); return $link; } add_filter( 'bp_get_activity_user_link', 'imborx_profile_link', 15, 1 );
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