vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Miscellaneous Hacks - Updated bbcode_video template with available HTML5 Players (https://vborg.vbsupport.ru/showthread.php?t=283594)

BirdOPrey5 05-27-2012 10:00 PM

Updated bbcode_video template with available HTML5 Players
 
1 Attachment(s)
Brought to you by BirdOPrey5
http://www.birdoprey5.com/


NEW- April 5, 2013- Updated Facebook to HTML5, flash player stopped working!

The template bbcode_video is the one that decides what embed code is used for the built in video embedding sites.

This template relies mostly on Flash- only YouTube was ever updated to HTML5 in the stock bbcode_video template of VB 4.2.0.

This new edit has HTML5 Players available for Vimeo and Dailymotion as well. It also has the code there that was to help IE6 compatibility removed as 4.2.0 officially dropped support for IE6 anyway.

I have also made some of the video screens larger where appropriate.

The benefits of HTML5 players is they will work on iPads, iPhones, and all current Android/mobile devices. Flash does not.

To use this simply copy the code below and paste it into your template bbcode_video, deleting what used to be there.

If you have any trouble simply "revert" the template back to the original.

Repeat the above for each style you have.

New bbcode_video template (Tested on 4.2.0):

Code:

<vb:if condition="$provider == 'hulu'">

<object width="512" height="288">
<param name="movie" value="http://www.hulu.com/embed/{vb:raw code}"></param>
<param name="allowFullScreen" value="true"></param>
<embed src="http://www.hulu.com/embed/{vb:raw code}" type="application/x-shockwave-flash"  width="512" height="288" allowFullScreen="true"></embed>
</object>

<vb:elseif condition="$provider == 'youtube'" />

<iframe class="restrain" title="YouTube video player" width="640" height="390" src="//www.youtube.com/embed/{vb:raw code}?wmode={vb:raw wmode}" frameborder="0" allowfullscreen></iframe>

<vb:elseif condition="$provider == 'youtube_share'" />
<iframe class="restrain" title="YouTube video player" width="640" height="390" src="//www.youtube.com/embed/{vb:raw code}?wmode={vb:raw wmode}" frameborder="0"></iframe>

<vb:elseif condition="$provider == 'vimeo'" />

<iframe src="http://player.vimeo.com/video/{vb:raw code}?portrait=0" width="640" height="360" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>

<vb:elseif condition="$provider == 'dailymotion'" />

<iframe frameborder="0" width="640" height="390" src="http://www.dailymotion.com/embed/video/{vb:raw code}"></iframe>
       
<vb:elseif condition="$provider == 'metacafe'" />

<object class="restrain" type="application/x-shockwave-flash" width="640" height="380" data="http://www.metacafe.com/fplayer/{vb:raw code}.swf">
        <param name="movie" value="http://www.metacafe.com/fplayer/{vb:raw code}.swf" />
        <param name="wmode" value="{vb:raw wmode}" />
</object>

<vb:elseif condition="$provider == 'google'" />

<object class="restrain" type="application/x-shockwave-flash" width="400" height="326" data="http://video.google.com/googleplayer.swf?docid={vb:raw code}">
        <param name="movie" value="http://video.google.com/googleplayer.swf?docid={vb:raw code}" />
        <param name="wmode" value="{vb:raw wmode}" />
</object>
       
<vb:elseif condition="$provider == 'facebook'" />

<iframe src="https://www.facebook.com/video/embed?video_id={vb:raw code}" width="720" height="450" frameborder="0"></iframe>

</vb:if>

The above has all known/available HTML5 players, but Flash players where HTML5 is not yet available.

------------------------------------------------------

Please "Mark as Installed" if you use this. :)
Donations always appreciated. :up:
Nominate MOTM if you LOVE it! ;)

Boofo 05-28-2012 05:58 PM

Will vB be updating that template with this code?

ibrahimkoky 05-28-2012 05:59 PM

thank you tagged ;)

BirdOPrey5 05-28-2012 06:31 PM

Quote:

Originally Posted by Boofo (Post 2333970)
Will vB be updating that template with this code?

http://tracker.vbulletin.com/browse/VBIV-15191

I would not hold my breath...

Boofo 05-28-2012 06:44 PM

Voted! ;)

BirdOPrey5 05-28-2012 07:19 PM

Ah now I get it Boofo.

CharlieDelta 05-28-2012 07:55 PM

Thanks BOP!!

billstelling 06-02-2012 03:29 PM

nice one! installed..

BirdOPrey5 06-02-2012 05:58 PM

Thanks. Please use the "Mark as Installed" option in the top post.

Sunka 06-03-2012 03:53 AM

Installed.

With BOP5 Mods, you have no other option than install https://vborg.vbsupport.ru/external/2012/06/15.gif

Thanks BOP5 https://vborg.vbsupport.ru/external/2012/06/16.gif

Toorak Times 08-12-2012 04:15 PM

Could I add the vBTube links as an option here as well as Vimeo??

doctorsexy 08-13-2012 07:59 AM

Great...installed..:up:

BirdOPrey5 08-14-2012 11:41 AM

Quote:

Originally Posted by Toorak Times (Post 2356454)
Could I add the vBTube links as an option here as well as Vimeo??

No, you'd need additional code to handle such links. Look for the AME3 mod.

BirdOPrey5 04-05-2013 09:39 PM

Updated today because Facebook Flash player has stopped working, breaking Facebook video embeds on all VB 4.x forums that have not been updated to the latest version, as you can do by using this template edit.

ibrahimkoky 04-06-2013 12:33 AM

Updated
Thank you

Toorak Times 04-06-2013 05:13 AM

Thanks BOP, just did this for my 4.2, cheers

Toorak Times 04-06-2013 05:16 AM

Quote:

Originally Posted by BirdOPrey5 (Post 2356870)
No, you'd need additional code to handle such links. Look for the AME3 mod.


So AME will do it? I love the mod but not working on iPhones and pads is a real bummer

BirdOPrey5 04-06-2013 11:23 AM

AME will allow you to add additional video sites.

This mod will allow youtube, facebook, vimeo, daily motion to work on mobile devices/iOS.

CuteC@t 05-02-2013 08:43 AM

Installed
Thank you for being so kind !

Toorak Times 05-02-2013 12:03 PM

BOP, can you include the vBTube to this list...pleaseeee???

BirdOPrey5 05-02-2013 08:01 PM

It's not a matter of me including it- Adding other sites/types here won't let them work. The only video sites it will look for are the built in sites (YouTube, Vimeo, etc..)

There is a mod, Automatic Media Embedder 3 that will let you add additional sites.

Be sure to read the whole thread because IIRC there are several manual fixes you need to make to get it working with 4.2.x.

final kaoss 07-20-2013 05:46 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2333981)

Thanks, voted.

cflyrun 01-27-2015 06:46 PM

Excellent and quick fix, now users on ipad can view vimeo videos :)

Toorak Times 02-17-2015 06:34 AM

The following error occurred when attempting to evaluate this template:
Unclosed Tag
This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.

Hi BOP, just tried to upload this and I got this warning. Anything to worry about mate?

BirdOPrey5 02-17-2015 09:16 AM

Yes, you shouldn't get that.

Make sure you deleted all the old content and make sure you copied all the new content. Note the code box you are copying from is more than the text you see, you need to scroll down in the code box to get all the code.

Make sure you are running VB 4.x. This only works on 4.x, not 5.x.

Toorak Times 02-17-2015 02:40 PM

Yeah works cool love the share options at the top of the player. Yeah you were right I didn't have all the code

http://www.tooraktimes.com.au/conten...-The-Delltones

hazem_aliraqi 07-19-2015 11:34 AM

thank you bop

akz645 08-04-2015 06:26 PM

Anybody know how to make the youtube video's fullscreen from the website?

Edit: Thanks BOP5.

P.S= Working on vBulletin 4.2.3

BirdOPrey5 08-05-2015 07:40 AM

I've edited the code in the first post so that the YouTube code will now allow the full screen button to show.

akz645 08-05-2015 11:14 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2552129)
I've edited the code in the first post so that the YouTube code will now allow the full screen button to show.

Thanks :)

Do you know how to add facebook videos?
Example: https://www.facebook.com/WilliamSing...3926357545620/

I have FB platform enabled.

https://vborg.vbsupport.ru/showthread.php?t=318877
^ I used that to create a BB code & edited the same template (just the FB code part).

However, I don't want it as a BB code. I want it to work straight from the video bb code & I don't want to just paste the ID of the video, but instead the entire link.

Any idea how?

e24h 08-06-2015 02:20 AM

Thanks BOP!!

BirdOPrey5 08-06-2015 09:14 AM

Quote:

Originally Posted by akz645 (Post 2552184)
Thanks :)

Do you know how to add facebook videos?
Example: https://www.facebook.com/WilliamSing...3926357545620/

I have FB platform enabled.

https://vborg.vbsupport.ru/showthread.php?t=318877
^ I used that to create a BB code & edited the same template (just the FB code part).

However, I don't want it as a BB code. I want it to work straight from the video bb code & I don't want to just paste the ID of the video, but instead the entire link.

Any idea how?

There were some problems with the Facebook video in the latest versions of 4.x. I have instructions for fixing the bug in the bug report here- http://tracker.vbulletin.com/browse/VBIV-15670

You need to be logged into the vBulletin Community Forum first as a licensed user before you can view that link.

akz645 08-06-2015 03:03 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2552216)
There were some problems with the Facebook video in the latest versions of 4.x. I have instructions for fixing the bug in the bug report here- http://tracker.vbulletin.com/browse/VBIV-15670

You need to be logged into the vBulletin Community Forum first as a licensed user before you can view that link.

Code:

https://www.facebook.com/video/video.php?v=1944005363878
Your example video works.

I did the XML edit to and went too Debug mode and rebuilt BB Video.

But this still doesn't work:
Code:

https://www.facebook.com/WilliamSinge/videos/10153926357545620
If I manually change to this:
[video=facebook;10153926357545620]https://www.facebook.com/WilliamSinge/videos/10153926357545620/[/video]
Then it works.
Note: My video URL setup is different from Lynne.

The difference between your working URL example & my video is this:
- video.php?v=
- videos/
&
- video/
- WilliamSinge/

So the coding should account for both cases of it to work (I think).

BirdOPrey5 08-06-2015 03:10 PM

I see, seems the real name in the URL is causing the issue- that's going to require separate custom code to deal with- that is beyond the scope of this template edit.

akz645 08-06-2015 03:18 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2552254)
I see, seems the real name in the URL is causing the issue- that's going to require separate custom code to deal with- that is beyond the scope of this template edit.

Yeah, but also this:
Quote:

Originally Posted by akz645 (Post 2552252)
The difference between your working URL example & my video is this:
- video.php?v=
- videos/
&
- video/
- WilliamSinge/

Code:

https://www.facebook.com/video/video.php?v=1944005363878
Code:

https://www.facebook.com/WilliamSinge/videos/10153926357545620

Stratis 07-24-2017 05:38 AM

Do we must change http to https ? where is needed ?
Example: http://www.hulu.com is now https://www.hulu.com

My forum is https

Thanks

BirdOPrey5 07-24-2017 10:12 AM

Yes you can do that.

Though I'm not sure Hulu embedding works anymore. It would be fine for YouTube and sites still working.

Stratis 07-24-2017 03:23 PM

Ok, changed... Actually Dailymotion videos did not show up in pages (white space only).
So any one else use this must change too. Do not forget must not change all to https, only if they have change to.

This is all reαdy code.
Code:

<vb:if condition="$provider == 'hulu'">
<object width="512" height="288">
<param name="movie" value="https://www.hulu.com/embed/{vb:raw code}"></param>
<param name="allowFullScreen" value="true"></param>
<embed src="https://www.hulu.com/embed/{vb:raw code}" type="application/x-shockwave-flash"  width="512" height="288" allowFullScreen="true"></embed>
</object>
<vb:elseif condition="$provider == 'youtube'" />
<iframe class="restrain" title="YouTube video player" width="640" height="390" src="//www.youtube.com/embed/{vb:raw code}?wmode={vb:raw wmode}" frameborder="0" allowfullscreen></iframe>
<vb:elseif condition="$provider == 'youtube_share'" />
<iframe class="restrain" title="YouTube video player" width="640" height="390" src="//www.youtube.com/embed/{vb:raw code}?wmode={vb:raw wmode}" frameborder="0"></iframe>
<vb:elseif condition="$provider == 'vimeo'" />
<iframe src="https://player.vimeo.com/video/{vb:raw code}?portrait=0" width="640" height="360" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
<vb:elseif condition="$provider == 'dailymotion'" />
<iframe frameborder="0" width="640" height="390" src="https://www.dailymotion.com/embed/video/{vb:raw code}"></iframe>
 
<vb:elseif condition="$provider == 'metacafe'" />
<object class="restrain" type="application/x-shockwave-flash" width="640" height="380" data="http://www.metacafe.com/fplayer/{vb:raw code}.swf">
 <param name="movie" value="http://www.metacafe.com/fplayer/{vb:raw code}.swf" />
 <param name="wmode" value="{vb:raw wmode}" />
</object>
<vb:elseif condition="$provider == 'google'" />
<object class="restrain" type="application/x-shockwave-flash" width="400" height="326" data="https://video.google.com/googleplayer.swf?docid={vb:raw code}">
 <param name="movie" value="https://video.google.com/googleplayer.swf?docid={vb:raw code}" />
 <param name="wmode" value="{vb:raw wmode}" />
</object>
 
<vb:elseif condition="$provider == 'facebook'" />
<iframe src="https://www.facebook.com/video/embed?video_id={vb:raw code}" width="720" height="450" frameborder="0"></iframe>
</vb:if>

:)


All times are GMT. The time now is 11:49 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04343 seconds
  • Memory Usage 1,829KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_code_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (38)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete