How to embed Youtube vids / change image size

Started by Admin, June 21, 2015, 01:33:25 PM

Previous topic - Next topic

0 Members and 67 Guests are viewing this topic.

Admin

June 21, 2015, 01:33:25 PM Last Edit: November 08, 2015, 08:25:56 AM by squid
I just installed a specific BB code for Youtube videos that works with regular Youtube links.


[youtube]{youtube link}[/youtube]
[youtube width=x height=y]{youtube link}[/youtube]
[yt]{youtube ID}[/yt]
[yt {parameters}]{youtube ID}[/yt]
[yt_user]{username}[/yt_user]
[yt_user {parameters}]{username}[/yt_user]
[yt_search]{search query}[/yt_search]
[yt_search {parameters}]{search query}[/yt_search]

where width and height is specified by x and y.  If width and height aren't specified, default size is 640x400.

The yt_user bbcode will show videos by the specified YouTube username.

The yt_search bbcode will show videos matching the provided search phrase.

Substituting http://youtube.com, http://www.youtube-nocookies.com, http://youtu.be, and http://www.youtu.be also works.  https:// works instead of http://.

    Optional parameters and values for all YouTube bbcodes are:

    • width = Specifies the width of the iframe area.
    • height = Specifies the height of the iframe area.
    • start = Specifies the number of seconds into the video to start at.
    • end = Specifies the number of seconds into the video to stop at.
    • autoplay = 1, yes, on or true
    • color = red or white
    • theme = dark or light
    • loop = 1, yes, on or true
    • controls = 0, no, off, hide or false
    • showinfo = 0, no, off, hide or false
    • privacy = 1, yes, on or true
License
Copyright (c) 2015, Douglas Orend
All rights reserved.



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



If you want to customize the image size in a post you have to add width=##, height=## or both to the img-code.


Example of regular img-code
[img]http://i.minus.com/iXBDkR0wBKcfS.gif[/img]
Result:



Example of img-code with customized width
[img width=100]http://i.minus.com/iXBDkR0wBKcfS.gif[/img]



Example of img-code with customized width AND height
[img width=400 height=550]http://i.minus.com/iXBDkR0wBKcfS.gif[/img]

MelMel


Admin


JaMuzik

How do you do autoplay and start time? Same as before?

Admin

June 22, 2015, 06:25:18 AM #4 Last Edit: June 26, 2015, 04:17:21 PM by squid
Quote from: JaMuzik on June 21, 2015, 07:02:35 PM
How do you do autoplay and start time? Same as before?
Yes
Add ?autoplay=1&start=22


[youtube autoplay=1 start=22]https://www.youtube.com/watch?v=RokWWGERs_8[/youtube]

Admin

June 22, 2015, 12:22:10 PM #5 Last Edit: June 22, 2015, 12:23:55 PM by squid
If you want to customize the image size in a post you have to add width=##, height=## or both to the img-code.


Example of regular img-code
[img]http://i.minus.com/iXBDkR0wBKcfS.gif[/img]
Result:



Example of img-code with customized width
[img width=100]http://i.minus.com/iXBDkR0wBKcfS.gif[/img]



Example of img-code with customized width AND height
[img width=400 height=550]http://i.minus.com/iXBDkR0wBKcfS.gif[/img]

Admin


Jon


Stewie