Page 1 of 1

PrettyPhoto youtube movie clip

Posted: 31 May 2012, 19:02
by Theriddler
I created this for our forum and wanted to share it with you.
Hope you like it.

BBCode:

Code: Select all

[youtube]{IDENTIFIER}[/youtube]
HTML Replacement:

Code: Select all

<style type="text/css">
.roundall {
    border-radius: 4px 4px 4px 4px;
}
.youtube_video {
    background: url("/images/video.png") no-repeat scroll 0 0 #313131;
    border: 1px none;
    margin: 6px 0 12px 20px;
    padding: 40px 8px 8px;
    text-align: center;
    width: 160px;
}
</style>
<div class="youtube_video roundall">
<a href="http://www.youtube.com/watch?v={IDENTIFIER}" rel="prettyPhoto" title="">
<img class="roundall" alt="" src="http://i.ytimg.com/vi/{IDENTIFIER}/default.jpg" />
</a>
<br />
<script type="text/javascript">
  function youtubeFeedCallback( data )
  {
    document.writeln( '<font color="#FFFFFF"><b>Titel:</b> ' + data.entry[ "title" ].$t + '</font><br/>' );
  }
</script>
<script type="text/javascript" src="http://gdata.youtube.com/feeds/api/videos/{IDENTIFIER}?v=2&alt=json-in-script&callback=youtubeFeedCallback"></script>
</div>
Save the following picture in the root /images:
Image

The result:
Image

PrettyPhoto youtube movie clip

Posted: 01 Jun 2012, 10:56
by jabhi
any demo please...