MyBB Community Forums

Full Version: Peertube Embed
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
PeerTube, developed by Framasoft, is the free and decentralized alternative to video platforms, providing you over 400.000 videos published by 60.000 users and viewed over 15 million times.

https://joinpeertube.org/


WARNING: In my case, I'm using Rin editor, so this method is only for Rin. Ckeditor and default editor method is not provided, so you should do it at your own risk. Now, lets do it:

This adds a new entry for Peertube in the video dropdown.

Open /jscripts/rin/editor/plugins/video/dialogs/video.js

Find "items:[" and insert after: 

[RinEditor.Peertube,"peertube"],

Now, we are updating our language files in all themes. For example, in the default theme is located at /inc/languages/english/global.lang.php
Around line 212 insert:

$l['editor_peertube'] = "Peertube";

Do the same in whatever language file you're using.

Now lets configure our regex into the Admin panel -> Setup -> Custom MyCode -> Add MyCode

Regex:
\[video=peertube\](https\:\/\/.*?\/videos\/)watch(\/.{36})\[\/video\]

Replace:
<iframe width="560"  height="315" src="$1embed$2" frameborder="0" allowfullscreen></iframe>

Be sure you reconstruct and reload the cache and clean your browser cache, just in case you have issues
.
And that's it. You now may copy/paste the main URL of your videos from whatever existent instance of Peertube (please, don't use the "Share" links provided, but the main link).

Cheers