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 3 years, 1 month ago.
- AuthorPosts
- July 8, 2021 at 1:22 am #33859
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.netJuly 8, 2021 at 7:59 am #33860Hi,
It is intended, for the activity type results the user avatars are requested.
Best,
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.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
July 8, 2021 at 6:39 pm #33865Hi 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,
TimAttachments:
You must be logged in to view attached files.July 9, 2021 at 8:02 am #33871Thank 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 :)
July 10, 2021 at 12:24 am #33887Hi 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.
July 12, 2021 at 9:07 am #33900Hm, 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 :)
- AuthorPosts
You must be logged in to reply to this topic.