Search Results for 'custom activity page'
-
Search Results
-
Hello,
The ultimate goal is to mask the content and selector when a member arrives on the page of a public group to which it has not acceded. In fact he will see just the top of the page, and description button to join group
screenshot:
https://framapic.org/j4FYWFvZmHVI/sOyIzEz0Gl7F.pngThe idea is to reach over activities and other menu group visited oblige to register if he sees that description, avatar and the button to join
I found bp_group_is_member to test ()
http://buddypress.wp-a2z.org/oik_api/bp_group_is_member/
If I do not put any argument, I understand that it will test whether the member is party group (and I add the condition to be displayed in a group?I have an error message:
« Fatal error: Call to undefined function bp_group_is_member() in /var/www/../wp-content/plugins/bp-custom.php on line 3 »What I found to achieve the goal:
if ( !bp_group_is_member() || bp_is_active('groups') ) {add_filter( 'bp_after_has_activities_parse_args', 'my_bp_activity_types_non-membre' );} function my_bp_activity_types_non-membre( $retval ) { $retval['action'] = array( //'activity_comment', //'activity_update', //'created_group', //'friendship_created', nouv relation entre membre //'joined_group', //'last_activity', //'new_avatar', //'new_blog_comment', //'new_blog_post', //'new_member', //'updated_profile', //'rtmedia_update' ); return $retval;
Regards
I’m trying to change the way new blog posts are seen on the Site Wide Activity page and I’m halfway there, but having a few issues. Here what I have so far (in bp-custom.php):
<?php // Edits how blog posts appears on activity feed. function bp_full_posts_in_activity_feed( $content, $activity ) { if ( 'new_blog_post' == $activity->type ) { $post = get_post( $activity->secondary_item_id ); if ( 'post' == $post->post_type ) $title = isset( $post->post_title ) ? $post->post_title : ''; $content = apply_filters( 'the_content', $post->post_content ); $author = "<h5 align=center>By Author Name Here</h5>"; } echo "<h2 align=center>" .$title. "</h2>"; echo $author; echo $content; } add_filter( 'bp_get_activity_content_body', 'bp_full_posts_in_activity_feed', 10, 2 );
What I’m trying to do is instead of having the full post I want for the post to break whenever the more tag is used in a post. After the more tag a text or button should appear saying “Read More”. I tried a few things with no success, will appreciate some pointers in the right direction.
Another thing (although not that important) is that instead of having a default text with “By Author Name Here” it would be great if it can print the name of the post author. I tried using get_the_author(), the_author() and the_author_link(), but none of them were able to show the name in the activity feed.
Thanks in advance
Topic: Modifying Activity Page
Site:http://www.vwrx-project.co.uk Using WordPress 4.6 and BuddyPress 2.6.2
I’ve just installed BuddyPress as I want to create a community based website within WordPress.
My end goal is to have a site where multiple users can add content regarding their car project/build, where each update they add is displayed on the homepage of the site, but where viewing a users profile you could, should you wish, view someones project in its entirety with all posts and content or view just the images they’ve uploaded.
I’m in the process of creating my own theme for this website but I’m having a hard to changing anything within BuddyPress.
I’ve copied the entire BuddyPress plugin directory into my theme and then each document I edit I make a note of, so then I can remove any files I haven’t touched. I wanted to start with something simple before moving onto bigger modifications so opted to try and change the Site-Wide Activity title that displays.
I have found bp-activity-actions.php line 450 & class-bp-activity-component.php line 125 and edited, saved and uploaded/overwrote these files into my themes version of Buddypress but can’t get the title to change.
Once I’d done that I was hoping to edit the activity page to remove almost everything, the only part I really wanted to keep was the activity feed itself so that anyone visiting my sites homepage will see the most recent updates etc.
Have I missed/overlooked something silly. I’m more accustomed to creating websites myself with CSS and PHP etc but as I want this site to be easy to use and accessible to multiple people adding content I felt this would be a better route to take.
Hope everybody is doing well.
Im having trouble using a plugin. The plugin is by likebtn.com and allows me to sort activity by most liked content. However it requires modifying a bit of code and im having quite the difficult time. I have tried pasting this line of code into a few different files. Currently im trying to paste it into ‘public_html/wp-content/plugins/buddypress/bp-activity/bp-activity-template.php’. When i try to include it into the PHP file the activity page breaks and a syntax error appears saying there was an unexpected ‘<‘ at the top of the new code. Here is where i pasted the code and the instructions provided by likebtn.comfunction bp_has_activities( $args = '' ) { global $activities_template; // Get BuddyPress. $bp = buddypress(); /* * Smart Defaults. */ //Filtering by Likes.Custom Code. <?php query_posts($query_string . '&meta_key=Likes&orderby=meta_value&meta_type=numeric&order=DESC'); ?> <?php /* Start the Loop */ ?> <?php while ( have_posts() ) : the_post(); ?> <?php get_template_part( 'content', get_post_format() ); ?> <?php endwhile; ?> // User filtering. $user_id = bp_displayed_user_id() ? bp_displayed_user_id() : false;
https://likebtn.com/en/wordpress-like-button-plugin#sort_posts_by_likes
Hi!
First of all thanks for the amazing work you are doing..
In my buddypress installation I’ve a rating associated to each member (each member can rate each other) and I would like to add “rating” to the “order by” option of the member page.Now I can do it with a widget that orders members with the function I report below. But I would like to add the possibility to order members by rating in the “order by” option.
I’ve seen the topic https://buddypress.org/support/topic/adding-new-order-by-on-members-loop/ trying to adapt it to my case, but the order by rating option do not work properly.
It is possible to adapt that solution (or another working) to my case?
Thanks in advance.function prorevs_users_by_rating($limit) { global $wpdb; if (current_user_can('administrator')): $users = $wpdb->get_results( $wpdb->prepare( "SELECT a.ID as id, a.user_login AS name, a.display_name AS displayname, AVG(star) AS rating, COUNT(star) AS reviews FROM {$wpdb->prefix}users AS a LEFT JOIN {$wpdb->prefix}bp_activity AS b ON a.ID = b.usercheck WHERE (b.is_activated is null or b.is_activated=1) GROUP BY id ORDER BY rating DESC LIMIT %d", $limit ) ); else: $users = $wpdb->get_results( $wpdb->prepare( "SELECT a.ID as id, a.user_login AS name, a.display_name AS displayname, AVG(star) AS rating, COUNT(star) AS reviews FROM {$wpdb->prefix}users AS a LEFT JOIN {$wpdb->prefix}bp_activity AS b ON a.ID = b.usercheck WHERE (b.is_activated is null or b.is_activated=1) GROUP BY id ORDER BY rating DESC LIMIT %d", $limit ) ); endif; return prorevs_print_users($users); } function prorevs_users_by_rating_shortcode($atts) { extract(shortcode_atts(array('limit' => 10), $atts)); return prorevs_users_by_rating($limit); }
Hi Guys
Im using custom post activities to pull in rss feeds into user activity feeds. I use wp rss aggregator and feedtopost to create a custom posts feed from other social networks which i can then assign to individual members. So at the moment I have pull in the feed excerpt as a title and the featured image into the feed using this code<?php // Don't forget to add the 'buddypress-activity' support! add_post_type_support( 'social_feed', '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( 'social_feed', array( 'component_id' => buddypress()->blogs->id, 'action_id' => 'new_social_feed', 'bp_activity_admin_filter' => __( 'My Social Feed', 'custom-domain' ), 'bp_activity_front_filter' => __( 'Social Feed', 'custom-domain' ), 'contexts' => array( 'activity', 'member' ), 'activity_comment' => true, 'bp_activity_new_post' => __( '%1$s posted a new <a href="%2$s">Social Media Update</a>', 'custom-textdomain' ), 'bp_activity_new_post_ms' => __( '%1$s posted a new <a href="%2$s">Social Media Update</a>, on his profile', 'custom-textdomain' ), 'position' => 100, ) ); } add_action( 'init', 'customize_page_tracking_args', 1000 ); // Adds title of custom Blog Post Type instead of excerpt function record_cpt_activity_content( $cpt ) { if ( 'new_social_feed' === $cpt['type'] ) { $cpt['content'] = get_the_title(); } return $cpt; } add_filter('bp_after_activity_add_parse_args', 'record_cpt_activity_content'); // Adds custom blog featured image to activity feed function record_cpt_activity_content_featured_image( $cpt ) { if ( 'new_social_feed' === $cpt['type'] ) { global $wpdb, $post, $bp; $theimg = wp_get_attachment_image_src( get_post_thumbnail_id( bp_get_activity_secondary_item_id() ) ); $cpt['content'] .= '<img src="' . $theimg[0] . '" width="160px" height="30px">'; } return $cpt; } add_filter('bp_after_activity_add_parse_args', 'record_cpt_activity_content_featured_image'); ?>
This works well but i would like to add a link back to the original social media post.I have setup wp rss aggregator to add the original link as the permalink for each of the custom posts.So I wanted to know how to work the permalink in so the title and image are linked back to the original post.
ThanksHi there,
I was just wondering if you could help me; I’m trying to start a Buddypress sub-community on my existing website. We currently have a user system that enables the use of our services; however I was trying to create a forum as a sub-page on our website and a community from that. I realised, however, that WP was finding it difficult to distinguish users on our current system with users of Buddypress. Is there a way of creating a completely separate user-type for Buddypress, so as to prevent cross-over from our two systems?
I want to work towards:
-Different details required for our user system than Buddypress
-Different menu items for our users than for forum users
-Our user details and activity goes into a massive database; however I don’t want this to be impacted by the forum usersThanks a lot for your help!
Running: WordPress 4.5.3 on Customizr theme
Buddypress 2.6.2I’m going to design & develop a theme for BuddyPress to help pay the bills around here.
The theme will be made open-source until I have an audience then I may put a price on the theme to maintain it and help pay my bills.
This is my research before embarking on the project. I’d really appreciate the help.
Should I make a light or dark theme?
What components are most important, I will build in this order and release for testing once each component is functional. Please order accordingly.
1. Activity Stream
2. Member Profiles
3. Member Directory
4. Group Pages
5. Group Directory
6. Network
7. BBPress ForumsAre you interested in being a beta tester? You will get access to the theme files to use in your own projects in return.
What customisations would you like built in? Things like custom logos, and colours? That type of thing.
How many custom navs are required?
Do you want full WordPress support for posts and pages? Things like post format, post thumnbails and HTML5 when and where possible.
What about templates, would you like an optional custom front-page?
Anything else you feel like discussing please do so.
After the theme gets off the ground I may decide to release it as a premium theme to help pay the bills, but for now I’m looking for an audience to get started with.
Lastly, I was going to blog about the progress in my site buddycore.com to keep anyone who is interested up to date.
Thanks for your help.
Hi,
I am using WP 4.6.1 in a network site, directory install using a Divi child theme. I have BuddyPress 2.6.2 with BuddyBlock, BuddyPress Cover Photo, BuddyPress Group Email Subscription and BuddyPress Group Tags. No bbPress.
I would like to make all posts and comments in a group visible to anyone who joins the group. At the moment group members can only see the posts and comments of their friends.
This implies that if a new member wants to see all the activity in a group, they have to send friend requests to everyone in the group.
I believe this should be done in bp-custom.php with code something like the following. I don’t know if I should be using the ‘has_groups’ or ‘has_activites’ loop or some other loop. I confirmed that bp_is_group_single does target the page in question because I could change the per_page entries successfully.
Thanks for any suggestions,
David Tuttle