Embed support for phpBB!!!

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The next feature release of phpBB 3 will be 3.3/Proteus.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.2.x. If you need support for phpBB 3.2.x please visit the 3.2.x Support Forum on phpbb.com.

If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
User avatar
naderman
Consultant
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany
Contact:

Re: Embed support for phpBB!!!

Post by naderman »

Looks like that original jquery plugin is rather unmaintained and broken. However there is a maintained improved fork of the plugin here: https://github.com/starfishmod/jquery-oembed-all

It was rather easy to add to phpBB. Just placed the CSS file and the jquery.oembed.js files into the assets dir. Then loaded the js before </body> and the CSS in head and added this piece of js code to make it work:

Code: Select all

(function($) {
	$(document).ready(function() {
		$(".content .postlink").oembed(null, {
			embedMethod: "append",
			maxWidth: 1024,
			maxHeight: 768,
		});
    });
})(jQuery);
This replaces postlinks directlry with videos etc. which breaks paragraphs, so the embedMethod will have to be improved to append after paragraph or at end of post for this to be usable.

User avatar
VSE
Extension Customisations
Extension Customisations
Posts: 674
Joined: Mon Mar 08, 2010 9:18 am

Re: Embed support for phpBB!!!

Post by VSE »

I think this would be a great addition. To have URLs be transformed into the embedded content they point to without the need for using BBcodes is a great and modern thing.

I don't however, see any problem with this implementation. If somebody puts a URL in the middle of a paragraph, I would not expect the embedded media to be smack in the middle of the paragraph. I think it is fine that the embedded content is on its own "line"... Besides, it just means users have to be sensible when they compose their posts.

I think it would be very intrusive to try and force all embedded media to the bottom of a post or paragraph as suggested. That would make it very hard to compose a post where you may want to provide before and after commentary around your embedded media. It would also make it hard to maintain this script in the event of updates to the original script...which are inevitable as more and more media content sites are adopting oEmbed.

Hope to see this or some form of auto-url-into-embedded-media-transformation become a default part of phpBB.
Has an irascible disposition.

User avatar
Mess
Registered User
Posts: 199
Joined: Wed Jun 13, 2012 10:14 am

Re: Embed support for phpBB!!!

Post by Mess »

I would love to see auto url into embedded media in phpBB also. I'm using a few mods to achieve this today.

agaiz
Registered User
Posts: 1
Joined: Thu Jan 10, 2013 8:59 pm

Re: Embed support for phpBB!!!

Post by agaiz »

Which mods are you using? Are they publicly available? Thanks :)

Post Reply