BuddyDev

Search

Replies

  • Participant
    Level: Enlightened
    Posts: 56
    Andy on #5924

    Thanks Brajesh. I’ve tried supercache in the past which improved the performance of my BuddyPress website. But because BuddyPress is a community plugin where there is constant activity, I decided not to use it until I’m more knowledgeable about improving the performance of BuddyPress. Let us know if you come up with a good combination to get improved performance.

  • Participant
    Level: Enlightened
    Posts: 56
    Andy on #4362

    I made a variable error with my code, this is the correct code:

    
    // filter acivities in order from most favorited to least favorited
    	function my_filter_activity( $loop ) { 
    
    		if ( bp_is_current_action( 'custom-page'' )) {
    		
    			$loop['meta_query'] = array(
    				array(
    					'key'     => 'favorite_count',
    					'value'   => 1,
    					'type'    => 'numeric',
    					'compare' => '>='
    				),
    			);
    		}
    
    		return $loop;
    	}
    	add_filter( 'bp_after_has_activity_parse_args', 'my_filter_activity' );
    
    • This reply was modified 5 years, 5 months ago by Andy.
    • This reply was modified 5 years, 5 months ago by Andy.
  • Participant
    Level: Enlightened
    Posts: 56
    Andy on #3167

    Thanks for the interest in this idea. I would so love to see this plugin if you decide to go ahead with it.

    Yeah, I’m not great with code, my code skills were mainly picked up from looking at how WordPress works and learning basic PHP.

    I’ll leave the real code innovation to you.

    • This reply was modified 5 years, 8 months ago by Andy.
  • Participant
    Level: Enlightened
    Posts: 56
    Andy on #3156

    Thanks, I will take a look at that file to see if I can work it out. I’m using the activity loop file for the main activity areas so the ajax load more activities works for that. The ajax load more activities would be great to work with the shortcode plugin for other areas of my website, but it’s not a big issue for me at the moment.

    • This reply was modified 5 years, 8 months ago by Andy.
  • Participant
    Level: Enlightened
    Posts: 56
    Andy on #1879

    I definitely will.

    Also one other thing about custom activity pages – similar to your recent blog post. I noticed there is one more thing Buddypress doesn’t load on custom activity pages – the scripts for the load newest button (that “Load Newest” button at the top when new content is detected). This would be another cool blog post if you ever find the answer to this.

  • Participant
    Level: Enlightened
    Posts: 56
    Andy on #1855

    Hi Brajesh,
    I tested this with the most basic setup it can have:
    – Install Worpdpress
    – disabled, removed plugins
    – enable twenty fifteen theme
    – install Buddypress
    – Associate a page for the activity stream in settings>buddypress>pages
    – Set that page as the homepage in settings>reading

    This problem still happens. setting any other page as the front page is fine, but setting Buddypress components as front page this problem happens. This used used to work for me though.

    I can usually work these small problems out, but I can’t get it to work at the most basic setup. I’ve got no idea what the problem is.

    But because WP and Buddypress is so flexible, there are some ways to work around this. Instead of the ‘home’ class, I can use the frontpage page-id class, and for the conditional, maybe something like is_activity_directory() && ! is_search().

    But I’ve now created a custom page including the activity-loop and activity-post by code, similar to the file in activity/index.php. This works, I can use the is_front_page() conditional and ‘home’ CSS class with this. doing it this way means I also have to add your mention auto suggestions code snippet for the homepage 🙂

    • This reply was modified 6 years ago by Andy.
    • This reply was modified 6 years ago by Andy.
    • This reply was modified 6 years ago by Andy.
  • Participant
    Level: Enlightened
    Posts: 56
    Andy on #1841

    Thanks Brajesh.

    I tried it on a fresh install with the latest WP and latest BuddyPress 2.4 with no plugins except BuddyPress. I’m not sure why it is not working for me anymore, but at least I know it should be working so I’ll see if I can work out what the problem is.

  • Participant
    Level: Enlightened
    Posts: 56
    Andy on #1771

    Hi Brajesh

    This worked. Thank you.

    Yes, I’ve read a similar issue with image cropping on the BuddyPress forums, and the code you provided I think would solve others cover image issues too, so I think it will be beneficial for BuddyPress to add those 3 or 4 lines of code to their core.

    I’ve got everything perfect now though, thanks for your help 🙂

    • This reply was modified 6 years ago by Andy.
  • Participant
    Level: Enlightened
    Posts: 56
    Andy on #1765

    And yes, adding multiple versions of the header image to avoid wastage bandwidth also sounds a great idea.

    • This reply was modified 6 years ago by Andy.
    • This reply was modified 6 years ago by Andy.
    • This reply was modified 6 years ago by Andy.
  • Participant
    Level: Enlightened
    Posts: 56
    Andy on #1760

    And just to add a few more things:
    background-position: center;
    background-size: cover;
    padding-bottom: value%; // value% depends on the image ratio you have.

    These are the three main things to control my responsiveness.

    But I added a few extras to crop the image –

    For desktop screen, it shows the full image width but I cropped the top and bottom by adding height:value; because 1500px by 500px comes out a bit large in height.

    At screen size ~ 990px I removed the height and added the padding-bottom, this then shows the parts we cropped and it now shows the full image and it will respond all the way down showing the full image.

    But at about 600px screen size, the 3:1 ratio might start looking a bit small in height, so you can optionally crop the left and right of the image by adding a higher percentage value for padding-bottom: value%;

    • This reply was modified 6 years ago by Andy.
    • This reply was modified 6 years ago by Andy.
    • This reply was modified 6 years ago by Andy.
    • This reply was modified 6 years ago by Andy.