Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / How To Embed YouTube Videos

Author
Message
Aaron Miller
19
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 2nd Sep 2012 12:02
Hello. I've seen this quite a bit here. Someone says "I don't know how to embed YouTube videos so here's some raw text or a link to the video." Since it's not really documented anywhere in plane sight (and people don't care to look), here's my attempt at making that knowledge a little bit easier to find.

Given a YouTube link, like "http://www.youtube.com/watch?v=okqEVeNqBhc" you would take the value set after the v key (the boldface text above) and put that between "youtube" tags.

So, this bbcode
[[/i]youtube]okqEVeNqBhc[[i]/youtube]
will output the following:


TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 2nd Sep 2012 12:55
And if you ever have a link like this one:

http://www.youtube.com/watch?v=Sf8cM7f6P2I&feature=my_liked_videos&list=LL8BQXHNFTAVHglcsd35iiSw

You'll want to copy only the section between the equals sign and the &:

http://www.youtube.com/watch?v=Sf8cM7f6P2I&feature=my_liked_videos&list=LL8BQXHNFTAVHglcsd35iiSw

So you get this:

[[/i]youtube]Sf8cM7f6P2I[[i]/youtube]



TheComet

"if you don't understand recursion than you probably don't understand recursion." ~Jerico2day
Dark Frager
15
Years of Service
User Offline
Joined: 16th Mar 2010
Location: The Void.
Posted: 2nd Sep 2012 12:56
Dammit! I knew I was doing it correctly but I didn't know what part of the link to put in, I always put in the whole watch?v= part aswell.

Thanks for this

Oh come on. We're trying to talk with sigs here and you rudely interrupt.
CoffeeGrunt
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 2nd Sep 2012 15:40
This should probably get stickied, it's a common thing that a lot of people seem to have issues with.
Aaron Miller
19
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 3rd Sep 2012 06:43
IMO this should be stickied, but I might be a bit biased, lol!

BlackFox
FPSC Master
17
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 3rd Sep 2012 07:09 Edited at: 3rd Sep 2012 07:10
Quote: "IMO this should be stickied, but I might be a bit biased, lol!"


It is stickied...here. Right under the section question Q: How do I place a YouTube video in my post?.


Twitter: @NFoxMedia
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 3rd Sep 2012 07:56
People don't read stickies... At least I don't, it took me a week to figure out where Carnage by Fallout went to.

TheComet

"if you don't understand recursion than you probably don't understand recursion." ~Jerico2day
Isocadia
15
Years of Service
User Offline
Joined: 24th Jul 2009
Location:
Posted: 3rd Sep 2012 08:09
How about a new button next to the code button in the message window
Aaron Miller
19
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 3rd Sep 2012 08:31
Quote: "It is stickied...here."

Okay, that's not the best place for this recurring theme considering it's in FPSC chat and not a more general board, like this one. Plus it's buried in there.

Quote: "People don't read stickies..."

I tend to read them once then never look again.

Quote: "How about a new button next to the code button in the message window"

That'd be nice. I don't know what the status is on this website's maintenance... Does anyone know who (if anyone) is currently maintaining the forum code?

Jeku
Moderator
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Vancouver, British Columbia, Canada
Posted: 3rd Sep 2012 09:39
Quote: "Does anyone know who (if anyone) is currently maintaining the forum code?"


Mostly Paul, and rarely myself. I did the YouTube embed code and the syntax highlighting code, but not much after that. I should work on it some more


Senior Developer - CBS Interactive Music Group
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 3rd Sep 2012 11:25
While we're discussing potential new features, It'd be nice to also be able to embed SoundCloud.

TheComet

"if you don't understand recursion than you probably don't understand recursion." ~Jerico2day
Jeku
Moderator
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Vancouver, British Columbia, Canada
Posted: 3rd Sep 2012 22:07
Quote: "While we're discussing potential new features, It'd be nice to also be able to embed SoundCloud."


Amen to that. I'll try to see what I can do


Senior Developer - CBS Interactive Music Group
Aaron Miller
19
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 3rd Sep 2012 22:21
On the topic of features... Any chance of tables?

[table][tr][td]Row 1 - Clm 1[/td][td]Row 1 - Clm 2[/td][/tr]
[tr][td=2]Row 2 - Columns 1 and 2[/td][/tr]
[tr][td]Row 3 - Column 1[/td][td]Row 3 - Column 2[/td][/tr][/table]

I can see that being useful for organizing WIP and PA posts a bit more.

Also, [hr] ?

Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 3rd Sep 2012 23:57
Jeku, how does the forum ensure that tags are closed? Say I left a quote open, it doesn't screw up the entire thread, how? xD


They see me coding, they hating. http://indi-indicium.blogspot.co.uk/
CoffeeGrunt
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 4th Sep 2012 03:07
Maybe he just ends each post with </Quote> </Code> etc, etc...
Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 4th Sep 2012 03:33
Would that work? For example, what if the tag hadn't been opened? A bunch of closing tags without openers can't be good, or what if there's two unclosed quotes?


They see me coding, they hating. http://indi-indicium.blogspot.co.uk/
CoffeeGrunt
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 4th Sep 2012 03:49
Then Jeku personally slaps the guy who did it.
Diggsey
19
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 4th Sep 2012 04:23
HTML uses angle brackets instead of square brackets, so when the system replaces say [[/i]b] ... [[/i]/b] with <b> ... </b> it only does the replacement if there is a matching closing tag. Unclosed tags remain as [[/i]b] which doesn't cause a problem.

[b]
Aaron Miller
19
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 4th Sep 2012 05:16
Oh? My signature shouldn't be bold. [b]

Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 4th Sep 2012 05:20
So does the forum code just run through the post looking for the closing tag?


They see me coding, they hating. http://indi-indicium.blogspot.co.uk/
Aaron Miller
19
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 4th Sep 2012 05:22
The forum code would have to run through the post to figure out how to parse it anyway, but no. If you look at the source of the page (view page source), you'll see it's handled by divs. Divs appear to get their own style, which overrides existing tags.

Jeku
Moderator
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Vancouver, British Columbia, Canada
Posted: 4th Sep 2012 07:27
If I remember correct the code does regular expression matching across the posts for the opening and closing tag, and grabs the match and replaces it with the appropriate style. It should be easy to incorporate Sound Cloud!


Senior Developer - CBS Interactive Music Group
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 4th Sep 2012 11:10
@ Aaron

That's a nice trick you used to bypass the tags. [b[/i]]Huh, why isn't this bold?[/b[i]]

And why is my signature in a quote?

TheComet[quote]

"if you don't understand recursion than you probably don't understand recursion." ~Jerico2day
Aaron Miller
19
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 4th Sep 2012 11:25
Quote: "[[/i]b]Huh, why isn't this bold?[[i]/b]"

Because you did this:
[[[/i]i][[i]/i]b]Huh, why isn't this bold?[[[/i]i][[i]/i]/b]

TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 5th Sep 2012 13:50 Edited at: 5th Sep 2012 13:51
And you did that because you did this:
[[[i[/i]][/i[i]]i][[i[/i]][/i[i]]/i]b]Huh, why isn't this bold?[[[i[/i]][/i[i]]i][[i[/i]][/i[i]]/i]/b]



TheComet

"if you don't understand recursion than you probably don't understand recursion." ~Jerico2day

Login to post a reply

Server time is: 2025-05-18 15:14:54
Your offset time is: 2025-05-18 15:14:54