
YouTube tag
Moderator: General Forums Moderators
YouTube tag
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)

OpenTTD: manual #openttdcoop: blog | wiki | public server | NewGRF pack | DevZone

OpenTTD: manual #openttdcoop: blog | wiki | public server | NewGRF pack | DevZone







- orudge
- Administrator
- Posts: 25213
- Joined: 26 Jan 2001 20:18
- Skype: orudge
- Location: Banchory, UK
- Contact:
Re: YouTube tag
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.
It may be possible to at least make it accept the 's' in 'https', but I'd have to do some experimenting with that.
Re: YouTube tag
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)

OpenTTD: manual #openttdcoop: blog | wiki | public server | NewGRF pack | DevZone

OpenTTD: manual #openttdcoop: blog | wiki | public server | NewGRF pack | DevZone







Re: YouTube tag
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>
[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>
Re: YouTube tag
I was just about to report this ...
May as well give this thread a little bump instead of making a new topic.
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.
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.
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.
- orudge
- Administrator
- Posts: 25213
- Joined: 26 Jan 2001 20:18
- Skype: orudge
- Location: Banchory, UK
- Contact:
Re: YouTube tag
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.
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.
- jonty-comp
- Tycoon
- Posts: 2542
- Joined: 22 Oct 2005 16:05
- Location: Chesterfield, England
- Contact:
Re: YouTube tag
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. 

- orudge
- Administrator
- Posts: 25213
- Joined: 26 Jan 2001 20:18
- Skype: orudge
- Location: Banchory, UK
- Contact:
Re: YouTube tag
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.
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.
- jonty-comp
- Tycoon
- Posts: 2542
- Joined: 22 Oct 2005 16:05
- Location: Chesterfield, England
- Contact:
Re: YouTube tag
Perfect.
Pity about Google's JavaScript, but presumably as more sites go SSL-enabled they'll sort it out at their end.

Re: YouTube tag
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.
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.
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.
Re: YouTube tag
Can this also be modified to support YouTube's newer http://youtu.be/ shortcut links?
Do you like drones, quadcopters & flying toys? Check out Drone Strike Force!

Base Music Sets: OpenMSX | Scott Joplin Anthology | Traditional Winter Holiday Music | Modern Motion Music
Other Projects: 2CC Trams | Modern Waypoints | Sprite Sandbox & NewGRF Releases | Ideabox | Town Names | Isle of Sodor Scenario | Random Sprite Repository
Misc Topics: My Screenshots | Forgotten NewGRFs | Unfinished Graphics Sets | Stats Shack | GarryG's Auz Sets

Base Music Sets: OpenMSX | Scott Joplin Anthology | Traditional Winter Holiday Music | Modern Motion Music
Other Projects: 2CC Trams | Modern Waypoints | Sprite Sandbox & NewGRF Releases | Ideabox | Town Names | Isle of Sodor Scenario | Random Sprite Repository
Misc Topics: My Screenshots | Forgotten NewGRFs | Unfinished Graphics Sets | Stats Shack | GarryG's Auz Sets
- orudge
- Administrator
- Posts: 25213
- Joined: 26 Jan 2001 20:18
- Skype: orudge
- Location: Banchory, UK
- Contact:
Re: YouTube tag
Unfortunately not, not with any great ease at least. I'm not sure if they would even work in an embed tag.
Who is online
Users browsing this forum: No registered users and 3 guests