Support ⇒ Dragonfly CMS v10 ⇒ Video bbcode broken? ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum IndexDragonfly CMS v10

Video bbcode broken? Reply to topic


If I try to use the video button, when I enter the video URL and press OK, nothing happens.
Also, using the tags manually doesn't seem to work, at least for photobucket videos:

Test Signature

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):

Last edited by hybrid on Wed Mar 30, 2016 10:51 pm; edited 2 times in total


Just noticed that mp4 is not part of the bbcode.

Test Signature

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


I've added some photobucket bbcode for now, but I'm pretty sure the video tag should be able to handle this?
# [photobucketvid width= height=]
			$patterns[] = "#\[photobucketvid width=([0-6]?[0-9]?[0-9]) height=([0-4]?[0-9]?[0-9])\](http:\/\/.*photobucket.com\/albums\/.*)([^ \?&="\n\r\t<]*?(\.(mp4)))\[\/photobucketvid\]#si";
			$replacements[] = '<embed width="\\1" height="\\2" type="application/x-shockwave-flash" allowFullscreen="true" allowNetworking="all" wmode="transparent" src="http://static.photobucket.com/player.swf" flashvars="file=\\3\\4">';

Test Signature

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):

Last edited by hybrid on Thu Mar 31, 2016 12:02 am; edited 2 times in total


Ok, I have now changed mine to this:

# [video width= height= loop= ] and [/video] code..
			$patterns[] = "#\[video width=([0-6]?[0-9]?[0-9]) height=([0-4]?[0-9]?[0-9])\]([\w]+?://[^ \?&="\n\r\t<]*?(\.(avi|mpg|mpeg|wmv|mp4)))\[/video\]#si";
			$replacements[] = '<video width="\\1" height="\\2"controls><source src="\\3" type="video/mp4">Sorry; your browser doesnt support HTML5 video in WebM with VP8 or MP4 with H.264.
  			<!-- You can embed a Flash player here, to play your mp4 video in older browsers -->
			<embed width="\\1" height="\\2" type="application/x-shockwave-flash" allowFullscreen="true" allowNetworking="all" wmode="transparent" src="http://static.photobucket.com/player.swf" flashvars="file=\\3">
			</video>';


Seems to work in Firefox and IE, but obviously the non-html5 player is coming from photobucket.

There is still the issue that entering a URL into the video button does nothing.

Test Signature

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):

Last edited by hybrid on Thu Mar 31, 2016 12:29 am; edited 1 time in total


I will do some tests here with Big Buck Bunny

MP4


OGG


WebM

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Fedora 25 / Apache 2.4.27 / MariaDB 10.1.26 / PHP 7.1.10 / Mercurial

Last edited by DJ Maze on Sat Dec 10, 2016 7:48 pm; edited 4 times in total


Actually, just looking at my code - it really needs to split the file extension into another variable so we can use it in the type= value.

Test Signature

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


It works now, see change at: bitbucket.org/dragonfl...11ca0fccee

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Fedora 25 / Apache 2.4.27 / MariaDB 10.1.26 / PHP 7.1.10 / Mercurial

Last edited by DJ Maze on Thu Mar 31, 2016 8:37 am; edited 1 time in total


Thanks, will do an update tonight and switch over to your code.

Test Signature

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


Changed it a bit to make it responsive. If width/height is not given it uses width=100%

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Fedora 25 / Apache 2.4.27 / MariaDB 10.1.26 / PHP 7.1.10 / Mercurial

Last edited by DJ Maze on Thu Mar 31, 2016 9:27 am; edited 1 time in total


Wow, that makes for some big videos!
Also, the video button still doesn't seem to be working for me (on this site too).

Test Signature

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


Fixed the bbcode.js 👍

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Fedora 25 / Apache 2.4.27 / MariaDB 10.1.26 / PHP 7.1.10 / Mercurial

Last edited by DJ Maze on Thu Mar 31, 2016 1:42 pm; edited 1 time in total


I dont see bbcode.php in my includes/classes, nor do I have a directory for dragonfly in my includes directory.

I do see bbcode.inc in my themes/dragonfly directory - am I needing to install a module or block for this to have this video playing feature?

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
[ Linux / Apache 2.2.8 / MySQL 5.0.45 / PHP 5.2.6 / CPG 8.2b - 9.3.4.1]


Nevermind - just realized this is for 10x and I'm on a 9.4 version.

duh alyssa!

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
[ Linux / Apache 2.2.8 / MySQL 5.0.45 / PHP 5.2.6 / CPG 8.2b - 9.3.4.1]

All times are UTC


Jump to: