Activity Page Photos Not Showing

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Activity Page Photos Not Showing

This topic contains 5 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 3 years, 1 month ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #33859
    wtsgradio23
    wtsgradio23
    Participant

    Hello,
    I purchased the Pro version today to try and index my buddypress/buddyboss website. You program is the only program i’ve been able to find that indexes the Buddypress Activity posts and makes them searchable.

    I’ve added the shortcode search menu to the top of the left sidebar on the activity page, however i’m not able to get any pictures to show up when the search result is located. The search result either shows my Buddypress Avatar and a blank photo next to it or it will display my Avatar along with the link but no photo. I’ve read the troubleshooting page and all chmod permissions are 755.

    Thank you for your time and for your excellent program.
    Regards,
    Tim Glore
    WTSG Radio Network
    wtsg.net

    #33860
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    It is intended, for the activity type results the user avatars are requested.
    Do the activities have the images embedded, or are they attached to them somehow?
    I might be able to suggest a custom code to fetch the images, but I am not sure if it is possible at all – as activities work much differently from other result types.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #33865
    wtsgradio23
    wtsgradio23
    Participant

    Hi Ernest,

    Yes the images are embedded after copying and pasting the url into the Buddyboss Activity feed. I’ve attached 2 files to this reply. The first is a screen capture video mp4 file showing the process of entering the url into the activity feed. The second is a screen capture showing the photo has downloaded into the media gallery. I hope this is useful.

    As you will see on the video, when a search query is entered, no picture is present. Only my avatar and the link to the story.

    Thank you for your time, Ernest. Very much appreciate any help or advice you can give.
    Regards,
    Tim

    Attachments:
    You must be logged in to view attached files.
    #33871
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Thank you!

    Well, in that case there is a custom code worth trying. I could not find much information about this on the buddypress API, so this may not work at all.

    add_filter( 'asp_results', 'asp_fetch_image_from_activity', 10, 1 );
    function asp_fetch_image_from_activity( $results ) {
    	foreach ($results as $k => &$r ) {
    		if ( $r->content_type == 'bp_activity') {
    			$activity = bp_activity_get_specific( array( 'activity_ids' => $r->id ) );
    			$activity = $activity['activities'][0];
    			$im = asp_get_image_from_content($activity->action);
    			if ( $im != '' ) {
    				$r->image = $im;
    			}
    		}
    	}
    	return $results;
    }

    Try adding this code to the functions.php file in your theme/child theme directory – make sure to have a full server back-up first for safety. For more details you can check the safe coding guidelines.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #33887
    wtsgradio23
    wtsgradio23
    Participant

    Hi Ernest,

    Thank you for the code. I added it to the functions.php file but unfortunately it did not work. 🙁 It was the same as before.

    #33900
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hm, I don’t know then 🙁

    If you want, you can add temporary FTP access, I can try debugging the code to see if there is anything else I can do.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.