phpBB [media]: one bbcode for audio, video, maps, panoramas, etc.

Board index phpBBex in English General

Description: General discussion about phpBBex
Moderator: Поддержка

Post #1by VEG » 24.05.2012, 16:23

BBCode: phpBB [audio] | phpBB [video] | phpBB [media]

We are glad to present you a new universal BBCode "phpBB [media]". It's a 2-in-1 bbcode: [video] and [audio]. Moreover it supports embedding of maps, panoramas and other multimedia. It is compatible with both phpBB and phpBBex. To install you do not need to edit any files, it can be added through the admin panel.

Usage example

To ebmed a video the user copies the URL of the page of the video and inserts it between the [media][/media]:
Code: Select all
[media]http://vimeo.com/40558553[/media]
or (with size specified):
Code: Select all
[media=640,360]http://vimeo.com/40558553[/media]
It is displayed as follows:
phpBB [media]


To ebmed an audio the user copies the URL of the page of the audio and inserts it between the [media][/media]:
Code: Select all
[media]http://prostopleer.com/tracks/4796774kBZr[/media]
In the message is displayed as follows:
phpBB [media]


Or this:
Code: Select all
[media]http://soundcloud.com/ronaldjenkees/from-the-arrow-loop[/media]
In the message is displayed as follows:
phpBB [media]


Supported services

Currently the following media services are supported:
  • youtube.com, vimeo.com and all the other video services from phpBB [video]
  • soundcloud.com, promodj.com and all the other audio services from phpBB [audio]
  • maps.google.com (maps, panoramas)
  • 360cities.net (panoramas)
  • dermandar.com (panoramas)
  • picasaweb.google.com (slide show)
  • connect.garmin.com (GPS-tracks)
  • endomondo.com (GPS-tracks)
  • gpsies.com (GPS-tracks)
  • bikemap.net (GPS-tracks)
URLs do not need to be cleaned from the garbage arguments as our [media] will work it out.

It is convenient that our bbcode is updated and new services are supported automatically. If our BBCode doesn't support the needed service, we will be happy to add it. In this topic, please provide the URL of the page of the media with the media service you're interested in and the embed code. It will help us to add support of the service. If the new media service is demanded we will soon add the support to our media bbcode.

Automatic installation of [media] and [media=]

1. Download install_bbmedia.zip (2kb)
2. Extract it to your phpbb directory
3. Run http://yourphpbb/install_bbmedia.php
4. Remove install_bbmedia.php from your phpbb directory

Manual installation of [media] (with fixed size)

1. Admin panel, tab "Posting", page "BBCodes", add BBCode (if you already have a [media] then delete it).
2. In the field "BBCode usage" enter:
Code: Select all
[media]{URL}[/media]
3. In the field "HTML replacement" enter (you can only change the width of the layer!):
Code: Select all
<div class='bbmedia' data-url='{URL}' style='margin: 1px; display: inline-block; vertical-align: bottom;'><div style='width: 200px; height: 40px; border: 1px solid #999; display: table-cell; text-align: center; vertical-align: middle; font: 10px/10px Verdana; color: #555; opacity: 0.5;'><a style='color: #105289; text-decoration: none;' href='http://phpbbex.com/' target='_blank'>phpBB</a> &#91;media&#93;</div><script>if (typeof bbmedia == 'undefined') { bbmedia = true; var e = document.createElement('script'); e.async = true; e.src = 'http://phpbbex.com/api/bbmedia.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(e, s); }</script></div>
4. In the field "Help line" enter:
Code: Select all
Insert audio, video, map, panorama or other multimedia: [media]http://youtube.com/url[/media]
5. Set the checkbox "Display on posting" and save the form. Done!

Manual installation of [media=width,height] (in addition to the previous)

1. Admin panel, tab "Posting", page "BBCodes", add BBCode (if you already have a [media=] then delete it).
2. In the field "BBCode usage" enter:
Code: Select all
[media={INTTEXT}]{URL}[/media]
3. In the field "HTML replacement" enter (no change!):
Code: Select all
<div class='bbmedia' data-url='{URL}' data-args='{INTTEXT}' style='margin: 1px; display: inline-block; vertical-align: bottom;'><div style='width: 200px; height: 40px; border: 1px solid #999; display: table-cell; text-align: center; vertical-align: middle; font: 10px/10px Verdana; color: #555; opacity: 0.5;'><a style='color: #105289; text-decoration: none;' href='http://phpbbex.com/' target='_blank'>phpBB</a> &#91;media&#93;</div><script>if (typeof bbmedia == 'undefined') { bbmedia = true; var e = document.createElement('script'); e.async = true; e.src = 'http://phpbbex.com/api/bbmedia.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(e, s); }</script></div>
4. In the field "Help line" enter:
Code: Select all
Insert audio, video, map, panorama or other multimedia: [media=height,width]http://youtube.com/url[/media]
5. Save the form. Done!

Links

phpBB [media] topic on phpbb.com
Russian language support on phpbbex.com
С наилучшими пожеланиями, Евгений
VEG M
Topic author, Администратор
Avatar
Age: 30
Location: Минск, Беларусь
Reputation: 1574
With us: 5 years 7 months

Post #2by LGC Forsaken CX » 27.11.2012, 08:25

can u make it compatible with pornhub.com
LGC Forsaken CX
Гость

Post #3by VEG » 27.11.2012, 13:57

Of course I can do it but I doubt the legality. I'll think about it and maybe I'll do it as an option.
С наилучшими пожеланиями, Евгений
VEG M
Topic author, Администратор
Avatar
Age: 30
Location: Минск, Беларусь
Reputation: 1574
With us: 5 years 7 months

Post #4by Velhym » 05.04.2013, 19:56

In the older version of this tag linked on phpbb, the bbmedia.js was included for being able to run on your local server.

I was wondering if that was still possible? I have some super paranoid members who don't want to authorize an external site just to use the newer media tag.
Velhym
Новичок
Reputation: 0
With us: 4 yaers 7 months

Post #5by VEG » 05.04.2013, 22:12

Velhym, you can simply copy new bbmedia.js to your server. Also you can use bbmedia.php for automatic updates of your copy of bbmedia.js.
С наилучшими пожеланиями, Евгений
VEG M
Topic author, Администратор
Avatar
Age: 30
Location: Минск, Беларусь
Reputation: 1574
With us: 5 years 7 months

Post #6by Velhym » 05.04.2013, 22:56

Thanks, that worked! Great mod. :)
Velhym
Новичок
Reputation: 0
With us: 4 yaers 7 months

Post #7by DREGS » 06.09.2013, 23:53

Would you please consider adding support for Vine videos?

Here is their embed code (with a random video selected):

Code: Select all
<iframe class="vine-embed" src="https://vine.co/v/hJv7diq01Zi/embed/simple" width="600" height="600" frameborder="0"></iframe><script async src="//platform.vine.co/static/scripts/embed.js" charset="utf-8"></script>

In this example "hJv7diq01Zi" is the identified, obviously.
DREGS
Новичок
Reputation: 0
With us: 4 yaers 2 months

Post #8by VEG » 16.09.2013, 13:41

BB [media] now supports gpsies.com. Example:
Code: Select all
[media]http://www.gpsies.com/map.do?fileId=gcfinrpqcyaxofvu[/media]

DREGS, I'll add support of the Vine in a week.

Added after 3 hours 24 minutes:
DREGS, I've decided to do it now :) BB [media] now supports ted.com, vine.co and coub.com.
С наилучшими пожеланиями, Евгений
VEG M
Topic author, Администратор
Avatar
Age: 30
Location: Минск, Беларусь
Reputation: 1574
With us: 5 years 7 months

Youtube Playlist

Post #9by vBBANKs » 15.10.2013, 21:53

Would first like to say that this bbcode worked great thank you so much.

Is there anyway i can add a playlist?
vBBANKs
Гость

Post #10by VEG » 16.10.2013, 13:25

vBBANKs wrote:Is there anyway i can add a playlist?
You can embed any playlist from the YouTube.
С наилучшими пожеланиями, Евгений
VEG M
Topic author, Администратор
Avatar
Age: 30
Location: Минск, Беларусь
Reputation: 1574
With us: 5 years 7 months

Post #11by VEG » 04.11.2013, 20:53

BB [media] now supports bikemap.net. Example:
Code: Select all
[media]http://www.bikemap.net/en/route/2347329-test/[/media]
С наилучшими пожеланиями, Евгений
VEG M
Topic author, Администратор
Avatar
Age: 30
Location: Минск, Беларусь
Reputation: 1574
With us: 5 years 7 months

Post #12by Lonewolf147 » 25.01.2014, 07:30

Hey VEG, love the code! Got a question about linking directly to an MP3 file though.

When I put an audio file on my server and link directly too it with the MEDIA brackets, all that displays is the code. Here's what I'm trying...

Code: Select all
[media]http://wolfslair.dns2go.com/SHARE/Powerpuff Girls - Bubbles & Mojo Jojo.mp3[/media]

and this is how it is displaying

[media]http://wolfslair.dns2go.com/SHARE/Powerpuff Girls - Bubbles & Mojo Jojo.mp3[/media]

Are there only certain servers I can directly link to like this? Or perhaps because there are spaces in the file name?

Added after 2 hours 15 minutes:
Figure it out. It doesn't like spaces in the file name. I removed them and it works perfect.
Lonewolf147
Гость

Post #13by VEG » 29.01.2014, 08:52

Lonewolf147, replace spaces to %20 in the URL.
С наилучшими пожеланиями, Евгений
VEG M
Topic author, Администратор
Avatar
Age: 30
Location: Минск, Беларусь
Reputation: 1574
With us: 5 years 7 months

Post #14by Cloudwalker » 10.02.2014, 12:50

Would you consider embedding youtube videos in such a way that initially it shows only photo and loads player upon click? I have the script in attachment that does this for my forum - I forgot where I found it but it makes loading topics with lot's of videos much faster since player code is loaded on demand.

BBCode is simple:

Code: Select all
[youtube]{TEXT1}v={IDENTIFIER}{TEXT2}[/youtube]


<div class="youtube" id="{IDENTIFIER}" style="width: 800px; height: 450px;"></div>
<script src="/youtube.js"></script>

Great work BTW!
Attachments
youtube.js
(3.26 KiB) Downloaded 556 times
Cloudwalker
Новичок
Reputation: 0
With us: 3 yaers 9 months

Post #15by notworkingwithbeta » 06.04.2014, 23:09

Not working yet with the beta 3.1.0-b2 but the vids and one audio. Google maps doesnt work at all.
notworkingwithbeta
Гость

Post #16by VEG » 07.04.2014, 00:33

I'll test and fix it soon.
С наилучшими пожеланиями, Евгений
VEG M
Topic author, Администратор
Avatar
Age: 30
Location: Минск, Беларусь
Reputation: 1574
With us: 5 years 7 months

Post #17by VEG » 09.04.2014, 12:00

notworkingwithbeta, I've tested it and as I can see BB [media] works perfectly in phpBB 3.1. Check your installation. Maybe you have JavaScript errors on your pages. You have to fix it.
С наилучшими пожеланиями, Евгений
VEG M
Topic author, Администратор
Avatar
Age: 30
Location: Минск, Беларусь
Reputation: 1574
With us: 5 years 7 months

Post #18by Neon » 04.05.2014, 00:00

Can you add Dropbox please..

.wmv
Neon
Гость

Post #19by VEG » 05.05.2014, 13:39

Neon, unfortunately, it's not possible. WMV can't be played by modern browsers. You have to use *.webm or *.mp4.
С наилучшими пожеланиями, Евгений
VEG M
Topic author, Администратор
Avatar
Age: 30
Location: Минск, Беларусь
Reputation: 1574
With us: 5 years 7 months

Post #20by eirki » 26.06.2014, 14:26

I am having no luck at all getting these to work.

The "Automatic installation of [media] and [media=]" only produces this result:
Image

while the "Manual installation of [media]" throws an access denied error:
Image
(My server host is Swedish so there is some non-English text. The English text in italics is the translation of the Swedish text in bold. The red boxes only obscure the url of the forum.)

Does anybody have an idea how I can get these to work? Thanks.
eirki
Новичок
Reputation: 0
With us: 3 yaers 4 months

Next

Return to General



Who is online (over the past 10 minutes)

Users browsing this forum: 1 guest

cron