View Full Version: embedding Youtube videos

StockClassPaintball Forum > Forum suggestions and thoughts. > embedding Youtube videos


Title: embedding Youtube videos


Siress - December 17, 2008 04:15 AM (GMT)
Could an admit please toss this code into the server:

<script>
ubb_tag('Youtube','youtube','youtube','<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/<% INNER %>"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/<% INNER %>" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object> ',0,'Embed a youtube video into the post||Insert The Youtube Video ID For Example nDQnpQqJleE');
</script>

or similar...I'm not picky. It should allow this to embed a youtube video:
[youtube]4pXfHLUlZf4[/youtube]

Chemical X - December 18, 2008 05:33 AM (GMT)
Toss it into the code or is there a special location that the code would go to?

Siress - December 18, 2008 05:42 AM (GMT)
This might be easier:
http://www.rockband.com/forums/showthread.php?t=61770

A nice little step-by-step guide for doing it within InvisionFree's controls, I hope. I've never administrated this type of forum.

Siress - December 18, 2008 06:15 AM (GMT)


well..flash tags don't work.

Chemical X - January 10, 2009 07:03 PM (GMT)
I tried to do it again today but I believe those codes work for VBulletin boards. I also dug in on some other info and im still trying to straighten it out. But this isnt a forgotten suggestion, I will figure out if it can be done in IF fo sho.

Chemical X - January 10, 2009 09:45 PM (GMT)
I have looked for IF codes and I cant find any. if you happen along a source or a walkthrough I would be more than happy to give it a try.

Siress - January 10, 2009 09:49 PM (GMT)
I'm going to create a faux forum and see if I can figure it out, as well. If I don't have it before Monday, I probably never will; free time being what it is.

Siress - January 11, 2009 03:48 AM (GMT)
Woot, someone else has already done it and handed it out for free. My google-fu just got +1M, agreed?

Place this:
CODE
<script src="http://re.jcink.com/filehosting/trinigangsta/yt.js"></script>


under the <%BOARD%> in Board Wrappers > Header & Body, just above <%STATS%>.

Finished.

The generous, brilliant proprietor can be found here: http://if.invisionfree.com/topic/357024/1/


EDIT: In case the hosting for the javascript code goes down, here's the raw code:
CODE
if(location.href.match("showtopic"))
{
var z = document.getElementsByTagName("div");
}
else if(location.href.match("Post&CODE"))
{
var z = document.getElementsByTagName("span");
}
for(x=0;x<z.length;x++)
{
if(z[x].className.match("postcolor") && z[x].innerHTML.match(/\[YOUTUBE\](.*)\[\/YOUTUBE\]/))
  {
z[x].innerHTML = z[x].innerHTML.split("[YOUTUBE]").join("<embed src='").split("/watch?v=").join("/v/").split("[/YOUTUBE]").join("' type='application/x-shockwave-flash' wmode='transparent' width='425' height='355'></embed>");
  }
}
var z = document.getElementsByTagName("td");
for(x=0;x<z.length;x++)
{
if(location.href.match("Post&CODE") && z[x].className.match("pformright") && z[x].innerHTML.match("Close all Tags"))
  {
z[x].innerHTML = z[x].innerHTML.split("Close all Tags").join("</a><input type='button' value='YOUTUBE' onclick='addtheyttag()' onmouseover='giveythelp()' class='codebuttons'>&nbsp;<a href='javascript:closeall();'>Close all Tags</a>");
  }
}
function addtheyttag()
{
document.REPLIER.Post.value+="[YOUTUBE][/YOUTUBE]";
}
function giveythelp()
{
document.REPLIER.helpbox.size="100";
document.REPLIER.helpbox.value="Paste full URL of Youtube video between these tags";
}

Chemical X - January 11, 2009 04:17 AM (GMT)
+2 google fu for you my friend.

I searched a ton and improvised codes and nothing seemed to work. I have a test site to try out codes on as id never implement a code change to the SCP.


Thank you very much.
Ben

Siress - January 11, 2009 04:20 AM (GMT)
You're welcome! I was doing all sorts of stuff, had it working on my own but didn't refine it. Then, when searching for a remedy to one of my issues, I found that page. Much more elegant than what I had been working on... I don't feel bad, though. I've only had one class of programing.

I learned a lot while working on this, though. It was fun. B)

Chemical X - January 11, 2009 05:06 AM (GMT)

Chemical X - January 13, 2009 11:29 PM (GMT)
What are the monster videos?

Siress - January 14, 2009 04:11 AM (GMT)
Megavideo? Megavideo.com, 65th most popular website in the world according to Alexa.




Hosted for free by InvisionFree