phpBB [video]: universal video bbcode (without code changes)

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

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

Сообщение #1 VEG » 11.05.2012, 17:12

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

We are glad to present you a new universal BBCode "phpBB [video]" which 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

The user copies the URL of the page of the video and inserts it between the [video][/video]:
Код: Выделить всё
[video]http://vimeo.com/40558553[/video]
or (with size specified):
Код: Выделить всё
[video=640,360]http://vimeo.com/40558553[/video]

It is displayed as follows:
phpBB [video]


Supported video services

Currently the following video services are supported:
  • youtube.com (youtu.be) - playlists are also supported
  • vimeo.com
  • vk.com (vkontakte.ru) — the URL from the embed code is required
  • facebook.com
  • dailymotion.com
  • ustream.tv — streams and recorded videos
  • ted.com
  • vine.co
  • coub.com
  • twitch.tv — streams and recorded videos
  • metacafe.com
  • video.yandex.ru — the URL from the embed code is required
  • ign.com
  • pinkbike.com
  • rutube.ru — it is recommended to use the URL from the embed code
  • video.mail.ru
  • video.bigmir.net
  • video.online.ua
  • video.sibnet.ru
  • yapfiles.ru
  • WebM, OGV and MP4 files via HTML5 <video> tag

URLs do not need to be cleaned from the garbage arguments as our [video] will work it out. You can use both the URL of the video page and the URL of the embed code (unless other instructions are given).

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

Automatic installation of [video] and [video=]

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

Manual installation of [video] (with fixed size)

1. Admin panel, tab "Posting", page "BBCodes", add BBCode (if you already have a [video] then delete it).
2. In the field "BBCode usage" enter:
Код: Выделить всё
[video]{URL}[/video]
3. In the field "HTML replacement" enter (you can only change the width and height of the layer!):
Код: Выделить всё
<div class='bbvideo' data-url='{URL}' style='width: 640px; height: 390px; margin: 2px 0; display: inline-block; background: #000; color: #fff; overflow: hidden; vertical-align: bottom;'><div style='height: 100%;'><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><div style='text-align: right; height: 14px; margin-top: -14px; padding-right: 2px; font: 10px/10px Verdana; color: #555;'><a style='color: #105289; text-decoration: none;' href='//phpbbex.com/' target='_blank'>phpBB</a> &#91;video&#93;</div></div>
4. In the field "Help line" enter:
Код: Выделить всё
Insert video: [video]http://youtube.com/url[/video]
5. Set the checkbox "Display on posting" and save the form. Done!

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

1. Admin panel, tab "Posting", page "BBCodes", add BBCode (if you already have a [video=] then delete it).
2. In the field "BBCode usage" enter:
Код: Выделить всё
[video={NUMBER1},{NUMBER2}]{URL}[/video]
3. In the field "HTML replacement" enter (no change!):
Код: Выделить всё
<div class='bbvideo' data-url='{URL}' style='width: {NUMBER1}px; height: {NUMBER2}px; margin: 2px 0; display: inline-block; background: #000; color: #fff; overflow: hidden; vertical-align: bottom;'><div style='height: 100%;'><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><div style='text-align: right; height: 14px; margin-top: -14px; padding-right: 2px; font: 10px/10px Verdana; color: #555;'><a style='color: #105289; text-decoration: none;' href='//phpbbex.com/' target='_blank'>phpBB</a> &#91;video&#93;</div></div>
4. In the field "Help line" enter:
Код: Выделить всё
Insert video: [video=width,height]http://youtube.com/url[/video]
5. Save the form. Done!

Links

phpBB [video] topic on phpbb.com
Russian language support on phpbbex.com
VEG M Онлайн
Автор темы, Администратор
Аватара
Откуда: Finland
Репутация: 1667
С нами: 12 лет 5 месяцев



usatoday.com videos

Сообщение #22 Tahoebuff » 06.05.2013, 05:02

Can you add usatoday.com video's?

ex: http://www.usatoday.com/media/cinematic/video/2126309/trailer-iron-man-3/

Thanks,
Tahoe
Tahoebuff
Гость

Сообщение #23 Rodolphe » 25.05.2013, 17:15

Hello,

Is it possible de modify this great mod to be able to read local files (avi and more) ?

Rodolphe
Rodolphe
Гость

Сообщение #24 VEG » 27.05.2013, 08:54

Rodolphe, you can use it for MP4, MP3, OGG and WebM files. BB [media] plays them via HTML5 player if your browser supports this feature.
VEG M Онлайн
Автор темы, Администратор
Аватара
Откуда: Finland
Репутация: 1667
С нами: 12 лет 5 месяцев

Videos work, but are condensed.

Сообщение #25 Kevin » 04.07.2013, 17:45

Hello,

I just installed this BBCode mod on my 3.0.11 forum. It's an awesome tool - audio works flawlessly, so far, and videos do pull from various sites, like youtube and vimeo, but the script condenses them into a very small frame, inside the larger 640px x 350px frame.

I tried checking the javascript console in chrome, and I got this:

Код: Выделить всё
Blocked a frame with origin "http://player.vimeo.com" from accessing a frame with origin "http://www.aquaticenthusiasts.com". Protocols, domains, and ports must match. swfobject.v2.2.js:1
(anonymous function) swfobject.v2.2.js:1
V swfobject.v2.2.js:1
h swfobject.v2.2.js:1
f swfobject.v2.2.js:1
Blocked a frame with origin "http://player.vimeo.com" from accessing a frame with origin "http://www.aquaticenthusiasts.com". Protocols, domains, and ports must match. swfobject.v2.2.js:1
w swfobject.v2.2.js:1
(anonymous function) swfobject.v2.2.js:1
f

I was able to use another bbcode for youtube without this problem, but I would definitely like to offer my users more video options.

My forum is located here: http://www.aquaticenthusiasts.com/forum
The exact location of the problem thread is here (I've been testing): http://www.aquaticenthusiasts.com/forum/viewtopic.php?f=3&t=5

If you'd like to test out the script for yourself, I have a test account setup as well:
username = test
password = test123

Thanks in advance for your help. If I can get this to work, it'll definitely make a great addition to the forum.

P.S - I posted this on the phpBB forum, as well, but figured I would have better luck going to the source. Thanks guys!
Kevin
Гость

Сообщение #26 VEG » 04.07.2013, 19:37

Kevin, please try to use the new version of the bbmedia.js (v1.39 [04.07.2013]).
VEG M Онлайн
Автор темы, Администратор
Аватара
Откуда: Finland
Репутация: 1667
С нами: 12 лет 5 месяцев

Сообщение #27 Kevin » 05.07.2013, 18:50

That did it! Thanks Veg, really appreciate it.
Kevin
Гость

Twitch

Сообщение #28 mohawk411 » 21.08.2013, 19:59

Hi Veg,

Great mod, well done.
Is there a way to get twitch to display a html5 version of their videos for phpbb in this mod?
When I view a twitch video on the website its flash only so it shows a blank space in the post it is in.
mohawk411
Гость

Сообщение #29 VEG » 22.08.2013, 21:58

mohawk411, hello. I'm sorry, but I can't find a html5 version of embedding code on their website.
VEG M Онлайн
Автор темы, Администратор
Аватара
Откуда: Finland
Репутация: 1667
С нами: 12 лет 5 месяцев

Support for ign video

Сообщение #30 mohawk411 » 23.08.2013, 17:12

Hi VEG,

I checked their website and they haven't launched a html version yet. They are working on it at the moment, so thats good.
Is it possible to add support for IGN videos, a lot of our community watch their videos, example http://ie.ign.com/videos/2013/08/20/gamescom-titanfall-stage-demonstation

Thank you kindly.

Добавлено спустя 5 минут 32 секунды:
Sorry I forgot the embed code

<iframe src="http://widgets.ign.com/video/embed/content.html?url=http://www.ign.com/videos/2013/08/20/gamescom-titanfall-stage-demonstation" width="468" height="263" scrolling="no" frameborder="0" allowfullscreen></iframe>
mohawk411
Гость

Сообщение #31 VEG » 05.09.2013, 22:14

mohawk411, phpBB [media] now supports ign.com.
VEG M Онлайн
Автор темы, Администратор
Аватара
Откуда: Finland
Репутация: 1667
С нами: 12 лет 5 месяцев

Сообщение #32 VEG » 16.09.2013, 17:04

1. phpBB [media] now supports ted.com:
Код: Выделить всё
[media]http://www.ted.com/talks/terry_moore_why_is_x_the_unknown.html[/media]

2. phpBB [media] now supports vine.co:
Код: Выделить всё
[media]https://vine.co/v/hJv7diq01Zi[/media]

3. phpBB [media] now supports coub.com:
Код: Выделить всё
[media]http://coub.com/view/83y722o[/media]

4. Support of video.google.com was removed because of this service is discontinued by the Google.
VEG M Онлайн
Автор темы, Администратор
Аватара
Откуда: Finland
Репутация: 1667
С нами: 12 лет 5 месяцев

Сообщение #33 VEG » 04.11.2013, 20:52

1. phpBB [video] now supports pinkbike.com and mpora.com. Examples:
Код: Выделить всё
[media]http://www.pinkbike.com/video/334644/[/media]
[media]http://mpora.com/videos/AAdmfn0s5c12[/media]

For example, the first video would be embedded like this:
phpBB [media]
VEG M Онлайн
Автор темы, Администратор
Аватара
Откуда: Finland
Репутация: 1667
С нами: 12 лет 5 месяцев

Сообщение #34 fourrureclub » 23.11.2013, 17:52

FANTASTIC MOD !! It works with HostGator hosted website, which wasn't the case of the previous video bbcode I used :)

Would you add support for porn hosted videos ?
I think about porntube.com, tube8.com, xvideos.com, youporn.com, porntube.com, pornhub.com...

It would be absolutly GREAT ;)
fourrureclub
Репутация: 0
С нами: 10 лет 10 месяцев

Сообщение #35 mohawk411 » 27.11.2013, 17:43

Hi again VEG,

Thank you so much for adding ign video. That really greatly helped.
mohawk411
Гость

error

Сообщение #36 deepaklost » 05.12.2013, 22:05

phpBB [media]
deepaklost
Гость

Сообщение #37 VEG » 06.12.2013, 10:57

deepaklost, for vk.com you have to use URL from the embed code.
VEG M Онлайн
Автор темы, Администратор
Аватара
Откуда: Finland
Репутация: 1667
С нами: 12 лет 5 месяцев

Сообщение #38 in4fun2 » 07.01.2014, 16:43

After installing your script via auto-install the video window just shows a static black screen.
2 minutes later the whole board is down and only shows a white screen.

Could you help me out how to reverse what the auto-installer did?
in4fun2
Гость

Сообщение #39 VEG » 09.01.2014, 17:25

This auto-installer can't break your board. It only adds one record into the phpbb_bbcodes table.
VEG M Онлайн
Автор темы, Администратор
Аватара
Откуда: Finland
Репутация: 1667
С нами: 12 лет 5 месяцев

1cnv

Сообщение #40 wallart » 23.02.2014, 12:14

Hello.

Can you add the site To play Video's please:
http://www.freeintertv.com/

Thank you in Advance.
wallart.
wallart
Гость

Пред.След.

Вернуться в General