BuddyDev

Search

Replies

  • Participant
    Level: Enlightened
    Posts: 76
    Janet B on in reply to: Social share plugin #37920

    Hello – I have not found one that actually works. Are you aware of one that does?
    The closest is from WBCom, but it simply passes the title of the post, with a link, in box. That’s not a share.

    Do you know of any that actually share a useful preview of the post? I’m looking for something outbound to FB that does something similar to the URL preview for the external sites we reference in a post.

    A social media share should contain a photo and an excerpt at least.

    • This reply was modified 3 years, 8 months ago by Janet B.
  • Participant
    Level: Enlightened
    Posts: 76

    Hello,

    I was able to accomplish this with a small change that allows selection of multiple activity types:

    add_filter( 'bp_after_has_activities_parse_args', function ( $args ) {
            
            $args['action'] =
            array(
                    'activity_update',
                    'rtmedia_update',
                    'activity_comment',
                    'new_blog_post',
                    'new_blog_comment'
                    //'friendship_created'
                    //'created_group'
                    //'joined_group'
            );
    
            return $args;
    } );
  • Participant
    Level: Enlightened
    Posts: 76

    This is the filter I’m using. Is there a better way to accomplish this?

    add_filter( 'bp_after_has_activities_parse_args', function ( $args ) {
    
            /*if ( ! bp_is_group() ) {
                    return $args;
            }*/
    
            $args['action'] = 'activity_update';
    
            return $args;
    } );
  • Participant
    Level: Enlightened
    Posts: 76

    Thanks Brajesh. Yes, there is a filter is functions.php to restrict the activity to updates only, to suppress distracting messages about people joining groups, etc.

    Removing it fixes the problem, but I’m not sure why, since posts with rtMedia in them are still “updates”.

    Janet

  • Participant
    Level: Enlightened
    Posts: 76
    This reply has been marked as private.
  • Participant
    Level: Enlightened
    Posts: 76

    My apologies. An unfortunate and unimportant lack of precision on my part 😉 The “editor” is the text box that one enters an activity post.

    Sadly, there are constant changes. The number of plugins required to create a great site times the increasing rate of change in plugin revisions times and increased rate of change in the php world, wordpress core, etc., means that any WP site is a moving target, hour to hour, if not day to day. As I’m sure you can appreciate, it is difficult to thoroughly test every site every time a minor plugin update occurs. We try to be more careful with major updates.

    But I get burned occasionally. You may recall some initial conversation we had about problems with Activity Plus Reloaded? I have learned since that for some of us, that plugin broke when upgrading from php 7.3 to 7.4 (recent info for me). Trying to find out why is usually fruitless.

    Just since yesterday, there is a BuddyPress revision. Something like that would generally warrant more testing on our part, unless it was a minor bug fix release.

    That said, the site is built almost entirely from plugins written by BD or you personally. Recent plugin updates for this site were primarily some BD revisions, which are more stable than some. There are only a few other plugins. There have been no updates to the rtMedia plugin.

    But I’m not sure how or when it broke because it is easy to miss the error. We’ve focused primarily on failure to fetch and display the URL preview. I should have been more thorough. I don’t have a backup from three months ago, for instance, to compare to.

    However, what is happening now – and was happening when we corresponded on 3/29 (I just checked a backup) is that the URL preview is displayed and the post seems to be accepted. But if you go back to the group or activity stream later, there is nothing there.

    Without using the URL preview (just plain text) the posts work fine.

  • Participant
    Level: Enlightened
    Posts: 76

    Error in post #37737 – Posts WITHOUT a preview work fine…

  • Participant
    Level: Enlightened
    Posts: 76

    Hello,

    I have a new issue. The url link preview is working in the editor, but you cannot save the post. There are no obvious errors displayed and nothing is logged. Posts with a preview work fine. The problem occurs for both admin and other users.

    Please advise.

    Janet

  • Participant
    Level: Enlightened
    Posts: 76
    This reply has been marked as private.
  • Participant
    Level: Enlightened
    Posts: 76
    This reply has been marked as private.