- This topic has 5 replies, 2 voices, and was last updated 3 years, 2 months ago by Ernest Marcinko.
-
AuthorPosts
-
July 8, 2021 at 1:22 am #33859wtsgradio23Participant
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 #33860Ernest MarcinkoKeymasterHi,
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.July 8, 2021 at 6:39 pm #33865wtsgradio23ParticipantHi 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,
TimJuly 9, 2021 at 8:02 am #33871Ernest MarcinkoKeymasterThank 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.
July 10, 2021 at 12:24 am #33887wtsgradio23ParticipantHi 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 #33900Ernest MarcinkoKeymasterHm, 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.
-
AuthorPosts
- You must be logged in to reply to this topic.