XF 2.3 A working BBCode for Mbed videos from custom urls?

Bubstar

Member
Hi there!

Does anyone can help me with a working BBCode for embeding videos from custom urls for example
Code:
[video]https://site.com/video.mp4[/video]
I had this on my older PhpBB board but now I can't find the way to make it working on Xenforo.
I've tried the following :

Code:
<xf:if is="$videoUrl">
    <xf:macro template="video_embed" name="video" arg-videoUrl="{$videoUrl}" />
</xf:if>

But that's desn't working. Also the Xenforo Media plugin supports just limited number of sites but not custom urls.

So any help please?
 
Solution
You can set up a similar custom BBCode, but XF uses {text} (and {option}) rather than {URL} or custom placeholders. I've attached an example you can import and modify to suit your needs.
Ok I've tried everything, no luck.
So I would like to ask if anyone can just help with a simple code that works, I've look everywhere and I've found 5 or 6 different but none works , so please help.
 
Ok think I've found the problem.
I've run my older phpbbsite on my local server, I've took the BBcode setup for direct links embeding which is absolutely simple as you can see :

Code:
<video src="{URL}" style="width:100%;max-width:720px" controls>
Your browser does not support the video tag.
</video>

Example usage:
Code:
[mp4]{URL}[/mp4]

Example output :
Code:
[mp4]http://example.com/video.mp4[/mp4]

But what did I found?

The Xenforo doesn't use the option {URL} as usual, it use it as path of the main site, so if you write

Makefile:
[mp4]https://externalsite.com/video.mp4[/mp4]

In result you actually got :

Code:
[mp4]https://yoursite.com/%7BURL%7D

Where %7BURL%7D is actually {URL} but the {} are readed as url address symbols.

So idk if that can be solved, but in fact the same BBCode works fine on PHPBB3.
 
You can set up a similar custom BBCode, but XF uses {text} (and {option}) rather than {URL} or custom placeholders. I've attached an example you can import and modify to suit your needs.
 

Attachments

Solution
Back
Top Bottom