Youtube and BB code

You can talk about anything here (but respect the rules)
LA-MJ
Posts: 776
Joined: 20 Dec 2013 16:07
Donation rank:

31 May 2015 00:24

mbman212 wrote:to get the link to work, remove the s from the link. it should be http (s is for secure things).
what?!

youtube uses https for a few years now I think
Last edited by plykkegaard on 09 Jun 2015 18:17, edited 1 time in total.
Reason: Changed subject from Re: Bug in map Iceland? to Youtube and BB code

User avatar
mbman212
Posts: 3356
Joined: 15 Aug 2014 09:15
Donation rank:
Location: Tampere, Finland
Contact:

31 May 2015 12:18

Yes, but forums don't usually form the link, if it's "https". The "s" is there for security things (e. g. encrypted connection).

That's why I recommend to remove the "s" or find a link "youtu.be", which makes the link to work as an Internet link.
#8 Forum Spammer

ETS2 v1.38.1.15, ProMods 2.5x, DLC content

12,50% explored
Driven km 67,200
2957 hours of ETS2

ATS v1.38x, DLC content

29,46% explored
Driven mi 19,000
271 hours of ATS

Image
Image
Image

User avatar
ScuL
Founder
Posts: 10596
Joined: 31 Jul 2013 23:51
Location: Auckland, New Zealand

01 Jun 2015 06:23

LA-MJ wrote:
mbman212 wrote:to get the link to work, remove the s from the link. it should be http (s is for secure things).
what?!

youtube uses https for a few years now I think
The BBcode script cannot detect HTTPS links
I am Image Dutch living in Image New Zealand and I speak Image EN Image DE Image SE Image FR
Image

LA-MJ
Posts: 776
Joined: 20 Dec 2013 16:07
Donation rank:

01 Jun 2015 09:14

ScuL wrote:
LA-MJ wrote:
mbman212 wrote:to get the link to work, remove the s from the link. it should be http (s is for secure things).
what?!

youtube uses https for a few years now I think
The BBcode script cannot detect HTTPS links
That script sucks anyway due to lack of 'allowfullscreen'. You could fix everything with 2 lines of code btw

User avatar
plykkegaard
Posts: 2551
Joined: 19 Sep 2014 19:18
Donation rank:
Location: Jylland
Contact:

01 Jun 2015 09:26

What do you want the most? Nice and shiny map upgrades or some bbcode which is just nice to have for your convenience?
You have to set priority on the workload and bbcode changes is at the bottom of the list even when it takes a couple of minutes to test'n'change
3D Artist - Moderator - Beta tester

User avatar
mbman212
Posts: 3356
Joined: 15 Aug 2014 09:15
Donation rank:
Location: Tampere, Finland
Contact:

01 Jun 2015 09:37

Sorry, plykkegaard.

I wasn't here to argue with anyone, just giving a tip how to get YouTube links to work.
#8 Forum Spammer

ETS2 v1.38.1.15, ProMods 2.5x, DLC content

12,50% explored
Driven km 67,200
2957 hours of ETS2

ATS v1.38x, DLC content

29,46% explored
Driven mi 19,000
271 hours of ATS

Image
Image
Image

User avatar
plykkegaard
Posts: 2551
Joined: 19 Sep 2014 19:18
Donation rank:
Location: Jylland
Contact:

01 Jun 2015 09:48

Which is perfectly fine and very nice of you
3D Artist - Moderator - Beta tester

User avatar
ScuL
Founder
Posts: 10596
Joined: 31 Jul 2013 23:51
Location: Auckland, New Zealand

01 Jun 2015 12:35

BB trigger:

Code: Select all

[youtube]http://{TEXT1}.youtube.com/watch?v={TEXT2}[/youtube]
BB result:

Code: Select all

<object width="480" height="360"><param name="movie" value="http://{TEXT1}.youtube.com/v/{TEXT2}&hl=en&fs=1&ap=&fmt=22"></param><param name="wmode" value="transparent"></param><embed src="http://{TEXT1}.youtube.com/v/{TEXT2}&hl=en&fs=1&ap=&fmt=22" type="application/x-shockwave-flash" wmode="transparent" width="480" height="360"></embed></object>
Good luck :)

Please note that the BB trigger will refuse to work if you change http into https, and the given link is the opposite :P
PS: full screen is on (fs=1)
I am Image Dutch living in Image New Zealand and I speak Image EN Image DE Image SE Image FR
Image

LA-MJ
Posts: 776
Joined: 20 Dec 2013 16:07
Donation rank:

02 Jun 2015 07:38

fs=1 does nothing on chrome when the container has no allowfullscreen and flash sucks anyway
------------------

Well.. I would personally use regex like a pro*

But since BB code apparently is too dumbed down for that you need to make do with what you have

Code: Select all

[youtube]{IDENTIFIER1}://{IDENTIFIER2}.youtube.com/watch?v={IDENTIFIER3}[/youtube]

Code: Select all

<iframe src="https://www.youtube.com/embed/{IDENTIFIER3}?feature=oembed" frameborder="0" allowfullscreen="" width="480" height="360"></iframe>
You could also use protocol-relative url (//) but I feel https is the way to go. Same thing applies to ditching flash.

* in case you are wondering:

Code: Select all

^(?:https?://)?(?:\w{2,3}\.)?(?:youtu\.be/|youtube\.\w{2,3}(?:/embed/|/v/|/watch\?(?:.+?&)?v=))([\w\d-]{11})(?:.*)$

User avatar
plykkegaard
Posts: 2551
Joined: 19 Sep 2014 19:18
Donation rank:
Location: Jylland
Contact:

02 Jun 2015 07:46

Tested? If not I can check it tonight
3D Artist - Moderator - Beta tester



Post Reply

Return to “Off-topic”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 21 guests