Skip to:
Content
Pages
Categories
Search
Top
Bottom

Issues inserting/embedding videos

  • @mannmithund

    Participant

    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 16 replies - 1 through 16 (of 16 total)
  • @jessy-marco

    Participant

    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

    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

    btw: embedding youtube videos doesn’t work either

    @jessy-marco

    Participant

    Install plugin bbPress2 shortcode whitelist

    And to settings write video

    @mannmithund

    Participant

    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-marco

    Participant

    Install plugin bbPress2 shortcode whitelist.

    just write string: video into that small text area

    @mannmithund

    Participant

    Now we are talking!

    Thank you very much for the support.

    @jessy-marco

    Participant

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

    @jessy-marco

    Participant

    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-marco

    Participant

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

    @mannmithund

    Participant

    All good for me. Thanks again!

    @fabianno0572

    Participant

    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

    Hello,
    Any reply? Have you seen this post?

    @casiepa

    Moderator

    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

    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]

    @mastababa

    Participant

    Shoutout for plugin bbPress2 shortcode whitelist.

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