Skip to:
Content
Pages
Categories
Search
Top
Bottom

Issues inserting/embedding videos


  • mannmithund
    Participant

    @mannmithund

    Hello there

    I fail in inserting / embedding an m4v video into a forum posts. Posts show text and images as intended, but for videos, just the smart tag is shown:

    [video width="640" height="640" m4v="video.m4v"][/video]
    

    What am I doing wrong?
    I run wordpress 4 and bbpress 2.5.4

    Help is much appreciated.

    – MannMitHund

Viewing 15 replies - 1 through 15 (of 15 total)

  • jessy
    Participant

    @jessy-marco

    If your theme support this shortcode on posts and pages we can assume your shortcode is working fine, but bbPress is for security reasons blocking.

    Place this code into functions.php

    function jm_bbp_shortcodes( $content, $reply_id ) {
    	return video( $content );
    }
    add_filter('bbp_get_reply_content', 'jm_bbp_shortcodes', 10, 2);
    add_filter('bbp_get_topic_content', 'jm_bbp_shortcodes', 10, 2);

    Let me know if you need help.


    mannmithund
    Participant

    @mannmithund

    Thank you.

    The theme supports videos, i.e. no issues to add them to regular blog posts.

    Added the code, this results in Fatal error: Call to undefined function video().


    mannmithund
    Participant

    @mannmithund

    btw: embedding youtube videos doesn’t work either


    jessy
    Participant

    @jessy-marco

    Install plugin bbPress2 shortcode whitelist

    And to settings write video


    mannmithund
    Participant

    @mannmithund

    Awesome!

    Video is now embedded. However, if a bbpress post contains text followed by the video, the text is not displyed, only the video. In pure text posts, nothing is displayed at all…

    Any other ideas?

    – MannMitHund


    jessy
    Participant

    @jessy-marco

    Install plugin bbPress2 shortcode whitelist.

    just write string: video into that small text area


    mannmithund
    Participant

    @mannmithund

    Now we are talking!

    Thank you very much for the support.


    jessy
    Participant

    @jessy-marco

    You have to paste content – text and below video, above the video.


    jessy
    Participant

    @jessy-marco

    Do you really need this shortcode? I am sorry about this, but for many reasons it is enough to use just video from youtube, because, if you will use the video than you will need CDN also. And this shortcode in my opition do not have nice css stylesheet.


    jessy
    Participant

    @jessy-marco

    iframe tag is styled nicely, works for text content below and up.


    mannmithund
    Participant

    @mannmithund

    All good for me. Thanks again!


    fabianno0572
    Participant

    @fabianno0572

    Hi, May I know where can I get Function.php file? I couldn’t find it. And is it necessary to paste the code below into the file?

    function jm_bbp_shortcodes( $content, $reply_id ) {
    return video( $content );
    }
    add_filter(‘bbp_get_reply_content’, ‘jm_bbp_shortcodes’, 10, 2);
    add_filter(‘bbp_get_topic_content’, ‘jm_bbp_shortcodes’, 10, 2);

    This post happened 2 years ago. Is there anything new that I need to do?


    fabianno0572
    Participant

    @fabianno0572

    Hello,
    Any reply? Have you seen this post?

    Hi @fabianno0572,

    The best way to put extra functions is in a functions.php in a child theme.

    Some is explained here: https://codex.bbpress.org/functions-files-and-child-themes-explained/


    jkin
    Participant

    @jkin

    Hi, I put all my functions into snippet, and the snippet works fine for me.

    However, in order to solve the video problem, which shows only code in the front page, (yet, it shows at the backend without problem), I tried to put the above code into the snippet, the result is that all contents in the bbpress forum went disappeared.

    Could anyone advise what to do next?

    The video code is like below.

    [video width="640" height="640" mp4="URL../wp-content/uploads/2017/10/video.mp4"][/video]

Viewing 15 replies - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.
Skip to toolbar