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

Список разделов phpBBex in English General

Описание: General discussion about phpBBex
Модератор: Поддержка

Сообщение #1 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]:
Код: Выделить всё
[media]http://vimeo.com/40558553[/media]
or (with size specified):
Код: Выделить всё
[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]:
Код: Выделить всё
[media]http://soundcloud.com/ronaldjenkees/from-the-arrow-loop[/media]
It 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:
Код: Выделить всё
[media]{URL}[/media]
3. In the field "HTML replacement" enter (you can only change the width of the layer!):
Код: Выделить всё
<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='//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 = '//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:
Код: Выделить всё
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:
Код: Выделить всё
[media={INTTEXT}]{URL}[/media]
3. In the field "HTML replacement" enter (no change!):
Код: Выделить всё
<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='//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 = '//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:
Код: Выделить всё
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
Автор темы, Администратор
Аватара
Возраст: 34
Откуда: Минск, Беларусь
Репутация: 1635
С нами: 9 лет 7 месяцев

Сообщение #2 LGC Forsaken CX » 27.11.2012, 08:25

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

Сообщение #3 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
Автор темы, Администратор
Аватара
Возраст: 34
Откуда: Минск, Беларусь
Репутация: 1635
С нами: 9 лет 7 месяцев

Сообщение #4 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
Новичок
Репутация: 0
С нами: 8 лет 8 месяцев

Сообщение #5 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
Автор темы, Администратор
Аватара
Возраст: 34
Откуда: Минск, Беларусь
Репутация: 1635
С нами: 9 лет 7 месяцев

Сообщение #6 Velhym » 05.04.2013, 22:56

Thanks, that worked! Great mod. :)
Velhym
Новичок
Репутация: 0
С нами: 8 лет 8 месяцев

Сообщение #7 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):

Код: Выделить всё
<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
Новичок
Репутация: 0
С нами: 8 лет 3 месяца

Сообщение #8 VEG » 16.09.2013, 13:41

BB [media] now supports gpsies.com. Example:
Код: Выделить всё
[media]http://www.gpsies.com/map.do?fileId=gcfinrpqcyaxofvu[/media]

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

Добавлено спустя 3 часа 24 минуты:
DREGS, I've decided to do it now :) BB [media] now supports ted.com, vine.co and coub.com.
С наилучшими пожеланиями, Евгений
VEG M
Автор темы, Администратор
Аватара
Возраст: 34
Откуда: Минск, Беларусь
Репутация: 1635
С нами: 9 лет 7 месяцев

Youtube Playlist

Сообщение #9 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
Гость

Сообщение #10 VEG » 16.10.2013, 13:25

vBBANKs:Is there anyway i can add a playlist?
You can embed any playlist from the YouTube.
С наилучшими пожеланиями, Евгений
VEG M
Автор темы, Администратор
Аватара
Возраст: 34
Откуда: Минск, Беларусь
Репутация: 1635
С нами: 9 лет 7 месяцев

Сообщение #11 VEG » 04.11.2013, 20:53

BB [media] now supports bikemap.net. Example:
Код: Выделить всё
[media]http://www.bikemap.net/en/route/2347329-test/[/media]
С наилучшими пожеланиями, Евгений
VEG M
Автор темы, Администратор
Аватара
Возраст: 34
Откуда: Минск, Беларусь
Репутация: 1635
С нами: 9 лет 7 месяцев

Сообщение #12 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...

Код: Выделить всё
[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?

Добавлено спустя 2 часа 15 минут:
Figure it out. It doesn't like spaces in the file name. I removed them and it works perfect.
Lonewolf147
Гость

Сообщение #13 VEG » 29.01.2014, 08:52

Lonewolf147, replace spaces to %20 in the URL.
С наилучшими пожеланиями, Евгений
VEG M
Автор темы, Администратор
Аватара
Возраст: 34
Откуда: Минск, Беларусь
Репутация: 1635
С нами: 9 лет 7 месяцев

Сообщение #14 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:

Код: Выделить всё
[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!
Вложения

[Расширение js было запрещено, вложение больше недоступно.]

Cloudwalker
Новичок
Репутация: 0
С нами: 7 лет 9 месяцев

Сообщение #15 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
Гость

Сообщение #16 VEG » 07.04.2014, 00:33

I'll test and fix it soon.
С наилучшими пожеланиями, Евгений
VEG M
Автор темы, Администратор
Аватара
Возраст: 34
Откуда: Минск, Беларусь
Репутация: 1635
С нами: 9 лет 7 месяцев

Сообщение #17 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
Автор темы, Администратор
Аватара
Возраст: 34
Откуда: Минск, Беларусь
Репутация: 1635
С нами: 9 лет 7 месяцев

Сообщение #18 Neon » 04.05.2014, 00:00

Can you add Dropbox please..

.wmv
Neon
Гость

Сообщение #19 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
Автор темы, Администратор
Аватара
Возраст: 34
Откуда: Минск, Беларусь
Репутация: 1635
С нами: 9 лет 7 месяцев

Сообщение #20 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:
Изображение

while the "Manual installation of [media]" throws an access denied error:
Изображение
(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
Новичок
Репутация: 0
С нами: 7 лет 5 месяцев

След.

Вернуться в General