I hope you don't mind, but here's my suggested edit to this modifcation.
What this does is allows the member to add the youtube file without needing to meddle with the 'embed' function. Instead, they simply need the very last portion of the URL.
So, if the URL is
http://www.youtube.com/watch?v=foKKLSGJFxw then any member need only paste the actual file identifier, which is:
foKKLSGJFxw
Whereas previously, they would need to hassle with the embed script, and then manually seek out the embed url:
http://www.youtube.com/v/foKKLSGJFxw
In addition, you may note I have added the &autoplay= function, so now when the member is adding their favourite youtube file, they need to only type
1 for
yes, or
0 to
not autoplay! Again, much simpler for the member.
Seems like an all-around easier way of doing things for the members of the site.
To use my edit, you'll need to change the
memberinfo_block_youtube template in your chosen style:
Code:
<!-- youtube -->
<if condition="$userinfo[field9]">
<div id="youtube" class="tborder content_block">
<h4 class="thead block_title">
<a href="#top" class="collapse_gadget" onclick="return toggle_collapse('youtube')"><img id="collapseimg_youtube" src="images/buttons/collapse_generic.gif" alt="" border="0" /></a>
<a name="albums"></a>
<span class="block_name">YouTube Video</span>
</h4>
<div class="block_content" id="collapseobj_youtube" style="">
<div class="alt1 smallfont block_row"><if condition="$userinfo[field10]">Title: $userinfo[field10]</if></div>
<div class="alt2 block_row block_footer"><object width="240" height="200"><param name="movie" value="<embed src="http://www.youtube.com/v/$userinfo[field9]"></param><param name="wmode" value="transparent"></param>
<embed src="http://www.youtube.com/v/$userinfo[field9]&autoplay=$userinfo[field11]" type="application/x-shockwave-flash" wmode="transparent" width="240" height="200"></embed></object>
</div>
</div>
</div>
</if>
<!-- / youtube -->
For a demonstration of it working,
clicky.