phpBB

Development Discussion Board

phpBB's testing ground of bleeding edge code
Advanced search

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.1/Ascreaus followed by 3.2/Arsia.

Re: Embed support for phpBB!!!

Postby naderman » Sun Apr 29, 2012 3:28 pm

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.
www.naderman.de
Move your forum to Forumatic - we'll take care of maintenance & spam
User avatar
naderman
Development Team Leader
Development Team Leader
 
Posts: 1650
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany

Re: Embed support for phpBB!!!

Postby VSE+ » Thu Jun 14, 2012 1:19 am

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.
User avatar
VSE+
Registered User
 
Posts: 206
Joined: Mon Mar 08, 2010 9:18 am

Re: Embed support for phpBB!!!

Postby Mess » Thu Jun 14, 2012 1:58 pm

I would love to see auto url into embedded media in phpBB also. I'm using a few mods to achieve this today.
User avatar
Mess
Registered User
 
Posts: 25
Joined: Wed Jun 13, 2012 10:14 am

Re: Embed support for phpBB!!!

Postby agaiz » Thu Jan 10, 2013 9:29 pm

Which mods are you using? Are they publicly available? Thanks :)
agaiz
Registered User
 
Posts: 1
Joined: Thu Jan 10, 2013 8:59 pm

Previous

Return to [3.x] Discussion

Who is online

Users browsing this forum: No registered users and 11 guests