YouTube tag

Voice your opinions, concerns and suggestions on how to make the Transport Tycoon Forums better.

Moderator: General Forums Moderators

Post Reply
User avatar
XeryusTC
Tycoon
Tycoon
Posts: 15415
Joined: 02 May 2005 11:05
Skype: XeryusTC
Location: localhost

YouTube tag

Post by XeryusTC »

The YouTube tag doesn't work if your URL isn't of a specific format. Even just using https instead of http makes it break, it also doesn't like it if you have parameters in the URL (which I can understand). Could you fix it so it at least accepts https Owen? Pretty please, with a cherry on top :)
Don't panic - My YouTube channel - Follow me on twitter (@XeryusTC) - Play Tribes: Ascend - Tired of Dropbox? Try SpiderOak (use this link and we both get 1GB extra space)
Image
OpenTTD: manual #openttdcoop: blog | wiki | public server | NewGRF pack | DevZone
Image Image Image Image Image Image Image
User avatar
orudge
Administrator
Administrator
Posts: 25137
Joined: 26 Jan 2001 20:18
Skype: orudge
Location: Banchory, UK
Contact:

Re: YouTube tag

Post by orudge »

Not with any great ease, unfortunately - specifically, not without breaking all existing [youtube] tags. I could change it so that you just had to enter [youtube]youtube_id[/youtube], but as I say, that would break all existing references. I'd have to run a search and replace on every post in the forum DB to fix that, which I'd probably prefer not to do.

It may be possible to at least make it accept the 's' in 'https', but I'd have to do some experimenting with that.
User avatar
XeryusTC
Tycoon
Tycoon
Posts: 15415
Joined: 02 May 2005 11:05
Skype: XeryusTC
Location: localhost

Re: YouTube tag

Post by XeryusTC »

Well, my main 'problem' is that it doesn't accept the s in https, so if you could fix that it would be very nice. That it doesn't accept parameters isn't that bad IMO, just a minor inconvenience.
Don't panic - My YouTube channel - Follow me on twitter (@XeryusTC) - Play Tribes: Ascend - Tired of Dropbox? Try SpiderOak (use this link and we both get 1GB extra space)
Image
OpenTTD: manual #openttdcoop: blog | wiki | public server | NewGRF pack | DevZone
Image Image Image Image Image Image Image
User avatar
Pyoro
Tycoon
Tycoon
Posts: 2558
Joined: 17 Oct 2008 12:17
Location: Virgo Supercluster

Re: YouTube tag

Post by Pyoro »

Shouldn't be too difficult; something like this maybe?
[youtube]{IDENTIFIER2}://www.youtube.com/watch?v={IDENTIFIER1}[/youtube]

<object width="425" height="344"><param name="movie" value="{IDENTIFIER2}://www.youtube.com/v/{IDENTIFIER1}&rel=en& ... ram><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="{IDENTIFIER2}://www.youtube.com/v/{IDENTIFIER1}&rel=en& ... 2=0xd4d4d4" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2822
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: YouTube tag

Post by ChillCore »

I was just about to report this ...
May as well give this thread a little bump instead of making a new topic.
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
User avatar
orudge
Administrator
Administrator
Posts: 25137
Joined: 26 Jan 2001 20:18
Skype: orudge
Location: Banchory, UK
Contact:

Re: YouTube tag

Post by orudge »

HTTPS:



Gopher:



The youtube tag now always links to http://, but accepts anything://www.youtube.com/. I could make it link to https, but for the moment I'll stick to http.
User avatar
jonty-comp
Tycoon
Tycoon
Posts: 2542
Joined: 22 Oct 2005 16:05
Location: Chesterfield, England
Contact:

Re: YouTube tag

Post by jonty-comp »

That's certainly an improvement, but could you make it protocol-relative? I've got SSL Enforcer turned on and Google Chrome blocks the youtube embeds as they come from an external non-secure domain. As per http://paulirish.com/2010/the-protocol-relative-url/ you can replace the "http://" or "https://" with just "//" and any browser that supports RFC standards (read: anything from the last 15 years except IE6, and I bet youtube embeds don't work in that anyway) will request the embed using the same protocol that the page was loaded as. It's rather clever. :D
User avatar
orudge
Administrator
Administrator
Posts: 25137
Joined: 26 Jan 2001 20:18
Skype: orudge
Location: Banchory, UK
Contact:

Re: YouTube tag

Post by orudge »

Ah yes, I forgot about //. Well, I've done that now.

The Google ads will still give you a warning though I'm afraid (if you're not using evil ad-blocking software) as, in their infinite wisdom, Google still haven't provided a secure version of their adverts yet.
User avatar
jonty-comp
Tycoon
Tycoon
Posts: 2542
Joined: 22 Oct 2005 16:05
Location: Chesterfield, England
Contact:

Re: YouTube tag

Post by jonty-comp »

Perfect. :) Pity about Google's JavaScript, but presumably as more sites go SSL-enabled they'll sort it out at their end.
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2822
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: YouTube tag

Post by ChillCore »

Thank you. :)
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
User avatar
kamnet
Moderator
Moderator
Posts: 8582
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: YouTube tag

Post by kamnet »

Can this also be modified to support YouTube's newer http://youtu.be/ shortcut links?
User avatar
orudge
Administrator
Administrator
Posts: 25137
Joined: 26 Jan 2001 20:18
Skype: orudge
Location: Banchory, UK
Contact:

Re: YouTube tag

Post by orudge »

Unfortunately not, not with any great ease at least. I'm not sure if they would even work in an embed tag.
Post Reply

Return to “Forum Suggestions and Feedback”

Who is online

Users browsing this forum: No registered users and 20 guests