Home Forums Plugins Support Vidi – Video WordPress plugin Buddypress Activity Video Bug

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #12576
    grpetz
    Supported

    I just purchased your plugin. After uploading a video from submit video page. It shows on the activity feed of buddypress that the video is uploaded by the member but no video is displayed and only plain text shows that says “what you need”, no video thumbnail or title of video or description, etc.

    I can click on the video link and the video is working.

    How do I disable the activity feed post of new video for user or fix it to show correct info with video thumbnail and link to video with thumbnail and not this silly “what you need” text showing for every video uploaded.

    Thank you very much.

    #12577
    grpetz
    Supported

    I found this in the code on line 713 of buddypress-functions.php

    if ( ! function_exists( ‘haru_video_activity_content’ ) ) {
    function haru_video_activity_content( $cpt ) {
    if ( ‘new_video’ === $cpt[‘type’] ) {
    $cpt[‘content’] = ‘what you need’;
    }

    return $cpt;
    }

    I am not a coder, but how to fix this to show thumbnail and clickable title of video?

    Thank you 🙂

    #12580

    Hi,
    Thanks for contacting us and choosing our product!
    It seems you don’t have any content in the content of the video and it causes the issue:
    https://prnt.sc/fLNdcntNgpjR
    In this case you can change the code of function haru_video_activity_content() to this:

    if ( ! function_exists( 'haru_video_activity_content' ) ) {
        function haru_video_activity_content( $cpt ) {
            if ( 'new_video' === $cpt['type'] ) {
                if ( $cpt['secondary_item_id'] ) {
                    $video_title = get_the_title( $cpt['secondary_item_id'] );
                    $video_url = get_the_permalink( $cpt['secondary_item_id'] );
                }
    
                if ( ! $cpt['content'] ) {
                    $cpt['content'] .= '<a href="' . $video_url . '" target="_blank">' . $video_title . '</a>';
                }
            }
         
            return $cpt;
        }
    
        add_filter( 'bp_before_activity_add_parse_args', 'haru_video_activity_content' );
    }

    So if you have video content it will show. If not have it will show video title & link to the video. Currently we researching about show the thumbnail.
    Hope this helps!

    ****
    Regards,
    HaruTheme

    #12614
    grpetz
    Supported

    Thank you Haru for the prompt response with this code replacement. However, it still does not show any video title or link in the activity feed. After replacing the code it now only shows the text (content) that I put in the description for the video.

    I have replaced this:

    if ( ! function_exists( ‘haru_video_activity_content’ ) ) {
    function haru_video_activity_content( $cpt ) {
    if ( ‘new_video’ === $cpt[‘type’] ) {
    $cpt[‘content’] = ‘what you need’;
    }

    return $cpt;
    }

    add_filter( ‘bp_before_activity_add_parse_args’, ‘haru_video_activity_content’ );
    }

    with this:

    if ( ! function_exists( ‘haru_video_activity_content’ ) ) {
    function haru_video_activity_content( $cpt ) {
    if ( ‘new_video’ === $cpt[‘type’] ) {
    if ( $cpt[‘secondary_item_id’] ) {
    $video_title = get_the_title( $cpt[‘secondary_item_id’] );
    $video_url = get_the_permalink( $cpt[‘secondary_item_id’] );
    }

    if ( ! $cpt[‘content’] ) {
    $cpt[‘content’] .= ‘‘ . $video_title . ‘‘;
    }
    }

    return $cpt;
    }

    add_filter( ‘bp_before_activity_add_parse_args’, ‘haru_video_activity_content’ );
    }

    #12615

    Hi,
    If you have description, it will show description only because show title in the last of the description is not logic.
    If you don’t have description it will show title with link of the video.
    Hope this helps!

    ****
    Regards,
    HaruTheme

    #12616
    grpetz
    Supported

    Ok, thank you, however when I try to upload the video with no description it will not let me upload and says a description is required. Can you make the code where the logic is it always shows title and link first, before description? Appreciate your wonderful support.

    p.s. I am not getting your replies to my e-mail and the ‘notify me of follow-up’ is checked.

    #12617

    Hi,
    Please try to use this code:

    if ( ! function_exists( 'haru_video_activity_content' ) ) {
        function haru_video_activity_content( $cpt ) {
            if ( 'new_video' === $cpt['type'] ) {
               if ( $cpt['secondary_item_id'] ) {
                    $video_title = get_the_title( $cpt['secondary_item_id'] );
                    $video_url = get_the_permalink( $cpt['secondary_item_id'] );
                    $cpt['content'] = '<a href="' . $video_url . '" target="_blank">' . $video_title . '</a> ' . $cpt['content'];
               }
            }
         
            return $cpt;
        }
    
        add_filter( 'bp_before_activity_add_parse_args', 'haru_video_activity_content' );
    }

    Hope this helps!

    ****
    Regards,
    HaruTheme

    #12618
    grpetz
    Supported

    Yes! Thank you. That works to put title of video as a clickable link and then content description following that link.

    I have an idea for you and maybe this is possible to add to this code:

    When I paste in the activity feed the direct full hyperlink to the newly posted video such as https://www.mywebsite.com/video/my-new-video then it automatically pulls up the featured image of video and creates a beautiful looking post for users to click.

    I know you said you was trying to work on a way to add the image, and was wondering if this is idea is a solution that might work? Just make the code fully insert the entire website hyperlink to the video? Wonder if that would cause it to pull up the image?

    Appreciate your wonderful help! I plan to leave a super review. I have a few more items needing help with that I will start on another topic post.

    #12625

    Hi,
    Sorry but currently we don’t support this feature.
    We’ll list this in suggestion list and will research when we have effort for it.

    ****
    Regards,
    HaruTheme

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

You must be logged in to reply to this topic.