Sunday, 18 May 2014
YOUTUBE VIDEO COVER EFFECT JAVA CODE TEMPLATE


--------------------------------------------------------------------------------------------------------
COPY AND PASTE BELOW CODE
----------------------------------------------------------------------------------------------------------
<html>
<head>
<b:include data='blog' name='all-head-content'/>
<b:if cond='data:blog.pageType == "index"'>
<title><data:blog.pageTitle/></title>
<b:else/>
<title><data:blog.pageName/> - <data:blog.title/></title>
</b:if>
<b:skin><![CDATA[/*
-----------------------------------------------
Blogger Template Style
Name: YOUTUBE VIDEO COVER EFFECT CODE
Design by : FBGadgets
URL : http://fbgadgets.blogspot.co.uk/
----------------------------------------------- */
/* Content
----------------------------------------------- */
body {
background:$bgcolor;
margin:0;
color:RED
font:x-small Georgia Serif;
font-size/* */:/**/small;
font-size: /**/small;
text-align: center;
background-color:#000000;
background-image: url(http://stuff.pyzam.com/layouts/img/l/o/nvloveintheair.jpg);
background-attachment: fixed;
background-position: center ;
background-repeat: repeat;
}
]]></b:skin>
<!-- = / conditional statement / = -->
<b:if cond='data:blog.pageType != "item"'>
<b:if cond='data:blog.pageType != "static_page"'>
<style>
.post {
float:left;
max-width: 100%;
width:280px;
height: auto;
float:left;
margin:10px 15px 0 5px;
overflow:hidden;
position:relative;
border: 1px solid #9B1212;
}
.post h3 {
position: relative;
background-color:Black;
height:20px
font-size:20px
}
.post h3 a {
display:block;
color: Red;
text-decoration: none;
}
.post img {
background-repeat:no-repeat;
background-position: bottom center;
height:180px;
margin-bottom:8000px;
margin-left:15px;
margin-top:0;
border: none;
padding-bottom:3px;
width:250px;
}
.post-body {
font-size: 0px;
overflow:hidden;
height:180px;
}
.post-footer {
line-height: 1.4em;
font-size: 0.9em;
margin:12px;
border-top:1px solid #bbb;
}
</style>
</b:if>
</b:if>
<script type='text/javascript'>var thumbnail_mode = "no-float" ;
img_thumb_height = '300px';
img_thumb_width = '100%';
</script>
<script type='text/javascript'>
//<![CDATA[
function createSummaryAndThumb(pID,pLink,pAuthor,pDate,pComments,pTitle,pLabelz){
var div = document.getElementById(pID);
var imgtag = "";
var dates = pDate;
var comments = pComments;
var labels = pLabelz;
var titles = pTitle ;
var authors = pAuthor;
var links = pLink ;
if(titles=="" || titles==" "){
titles="No Title";
}
if(labels=="" || labels==" "){
labels="Unlabelled";
}
var img = div.getElementsByTagName("img");
if(img.length<=0) {
imgtag = '<div class="ch-info" ><span ><a href="'+links+'" ><img class="summary-image ch-info-front" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcCuR6q9-11iuF0bnE-bfiy-V3V0FpS6Z2wMf4Z8p_Hmv1AT83TJz8YY-TcFpyi2camx3QHoMa5-bzIF6Og_WtE6o_F8_gj6Dq90H9LSQYRk0dn3KJ4iWtG5UPJhn8mCJDwB_NaPeCgpll/s1600/FBGadgets.jpg" width="'+img_thumb_width+'" height="'+img_thumb_height+'" /></a></span>';
}
if(img.length>=1) {
imgtag = '<div class="ch-info" ><span ><a href="'+links+'" ><img class="summary-image ch-info-front" src="'+img[0].src+'" width="'+img_thumb_width+'" height="'+img_thumb_height+'" /></a></span>';
}
var summary = imgtag ;
div.innerHTML = summary;
}
//]]>
</script>
</head>
<body>
<div id='outer-wrapper'>
<div id='main-wrapper'>
<b:section class='main' id='main' showaddelement='no'>
<b:widget id='Blog1' locked='true' title='Blog Posts' type='Blog'>
<b:includable id='main' var='top'>
<div class='blog-posts hfeed'>
<b:loop values='data:posts' var='post'>
<b:include data='post' name='post'/>
</b:loop>
</div>
</b:includable>
<b:includable id='backlinkDeleteIcon' var='backlink'/>
<b:includable id='backlinks' var='post'/>
<b:includable id='comment-form' var='post'/>
<b:includable id='commentDeleteIcon' var='comment'/>
<b:includable id='comment_count_picker' var='post'/>
<b:includable id='comment_picker' var='post'/>
<b:includable id='comments' var='post'/>
<b:includable id='feedLinks'/>
<b:includable id='feedLinksBody' var='links'/>
<b:includable id='iframe_comments' var='post'/>
<b:includable id='mobile-index-post' var='post'/>
<b:includable id='mobile-main' var='top'/>
<b:includable id='mobile-nextprev'/>
<b:includable id='mobile-post' var='post'/>
<b:includable id='nextprev'/>
<b:includable id='post' var='post'>
<div class='post'>
<a expr:name='data:post.id'/>
<b:if cond='data:post.title'>
<h3>
<b:if cond='data:post.link'>
<a expr:href='data:post.link' expr:title='"Read more to " + data:post.title' rel='bookmark' target='_blank'><data:post.title/></a>
<b:else/>
<b:if cond='data:post.url'>
<a expr:href='data:post.url' expr:title='"Read more to " + data:post.title' rel='bookmark' target='_blank'><data:post.title/></a>
<b:else/>
<data:post.title/>
</b:if>
</b:if>
</h3>
</b:if>
<div class='post-body'>
<b:if cond='data:blog.pageType != "item"'>
<div class='summarized' expr:id='"summary" + data:post.id'><data:post.body/></div>
<script type='text/javascript'>
createSummaryAndThumb("summary<data:post.id/>","<data:post.url/>","<data:post.author/>","<data:post.timestamp/>","<span class='cmt_count_iframe_holder' expr:data-count='data:post.numComments' expr:data-onclick='data:post.addCommentOnclick' expr:data-post-url='data:post.url' expr:data-url='data:post.canonicalUrl'/>","<data:post.title/>","<b:if cond='data:post.labels'><b:loop values='data:post.labels' var='label'><b:if cond='data:label.isLast == "true"'><a expr:href='data:label.url + "?&amp;max-results=6"' rel='tag'><data:label.name/></a></b:if></b:loop></b:if>");
</script>
</b:if>
<data:post.body/>
</div>
</div>
</b:includable>
<b:includable id='postQuickEdit' var='post'/>
<b:includable id='shareButtons' var='post'/>
<b:includable id='status-message'/>
<b:includable id='threaded-comment-form' var='post'/>
<b:includable id='threaded_comment_js' var='post'/>
<b:includable id='threaded_comments' var='post'/>
</b:widget>
</b:section>
</div>
</div>
<div id='footer-wrapper'>
<b:section class='footer' id='footer'/>
</div>
</body>
</html>
------------------------------------------------------------------------------------------------------------
OR USE THIS SHORT CODE
------------------------------------------------------------------------------------------------------------
<html>
<head>
<b:include data='blog' name='all-head-content'/>
<b:if cond='data:blog.pageType == "index"'>
<title><data:blog.pageTitle/></title>
<b:else/>
<title><data:blog.pageName/> - <data:blog.title/></title>
</b:if>
<b:skin><![CDATA[/*
-----------------------------------------------
Blogger Template Style
Name: YOUTUBE VIDEO COVER EFFECT CODE
Design by : FBGadgets
URL : http://fbgadgets.blogspot.co.uk/
----------------------------------------------- */
/* Content
----------------------------------------------- */
body {
background:$bgcolor;
margin:0;
color:RED
font:x-small Georgia Serif;
font-size/* */:/**/small;
font-size: /**/small;
text-align: center;
background-color:#000000;
background-image: url(http://stuff.pyzam.com/layouts/img/l/o/nvloveintheair.jpg);
background-attachment: fixed;
background-position: center ;
background-repeat: repeat;
}
]]></b:skin>
<!-- = / conditional statement / = -->
<b:if cond='data:blog.pageType != "item"'>
<b:if cond='data:blog.pageType != "static_page"'>
<style>
.post {
float:left;
max-width: 100%;
width:280px;
height: auto;
float:left;
margin:10px 15px 0 5px;
overflow:hidden;
position:relative;
border: 1px solid #9B1212;
}
.post h3 {
position: relative;
background-color:Black;
height:20px
font-size:20px
}
.post h3 a {
display:block;
color: Red;
text-decoration: none;
}
.post img {
background-repeat:no-repeat;
background-position: bottom center;
height:180px;
margin-bottom:8000px;
margin-left:15px;
margin-top:0;
border: none;
padding-bottom:3px;
width:250px;
}
.post-body {
font-size: 0px;
overflow:hidden;
height:180px;
}
.post-footer {
line-height: 1.4em;
font-size: 0.9em;
margin:12px;
border-top:1px solid #bbb;
}
</style>
</b:if>
</b:if>
<script type='text/javascript'>var thumbnail_mode = "no-float" ;
img_thumb_height = '300px';
img_thumb_width = '100%';
</script>
<script type='text/javascript'>
//<![CDATA[
function createSummaryAndThumb(pID,pLink,pAuthor,pDate,pComments,pTitle,pLabelz){
var div = document.getElementById(pID);
var imgtag = "";
var dates = pDate;
var comments = pComments;
var labels = pLabelz;
var titles = pTitle ;
var authors = pAuthor;
var links = pLink ;
if(titles=="" || titles==" "){
titles="No Title";
}
if(labels=="" || labels==" "){
labels="Unlabelled";
}
var img = div.getElementsByTagName("img");
if(img.length<=0) {
imgtag = '<div class="ch-info" ><span ><a href="'+links+'" ><img class="summary-image ch-info-front" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcCuR6q9-11iuF0bnE-bfiy-V3V0FpS6Z2wMf4Z8p_Hmv1AT83TJz8YY-TcFpyi2camx3QHoMa5-bzIF6Og_WtE6o_F8_gj6Dq90H9LSQYRk0dn3KJ4iWtG5UPJhn8mCJDwB_NaPeCgpll/s1600/FBGadgets.jpg" width="'+img_thumb_width+'" height="'+img_thumb_height+'" /></a></span>';
}
if(img.length>=1) {
imgtag = '<div class="ch-info" ><span ><a href="'+links+'" ><img class="summary-image ch-info-front" src="'+img[0].src+'" width="'+img_thumb_width+'" height="'+img_thumb_height+'" /></a></span>';
}
var summary = imgtag ;
div.innerHTML = summary;
}
//]]>
</script>
</head>
<body>
<div id='outer-wrapper'>
<div id='main-wrapper'>
<b:section class='main' id='main' showaddelement='no'>
<b:widget id='Blog1' locked='true' title='Blog Posts' type='Blog'>
<b:includable id='main' var='top'>
<div class='blog-posts hfeed'>
<b:loop values='data:posts' var='post'>
<b:include data='post' name='post'/>
</b:loop>
</div>
</b:includable>
<b:includable id='backlinkDeleteIcon' var='backlink'/>
<b:includable id='backlinks' var='post'/>
<b:includable id='comment-form' var='post'/>
<b:includable id='commentDeleteIcon' var='comment'/>
<b:includable id='comment_count_picker' var='post'/>
<b:includable id='comment_picker' var='post'/>
<b:includable id='comments' var='post'/>
<b:includable id='feedLinks'/>
<b:includable id='feedLinksBody' var='links'/>
<b:includable id='iframe_comments' var='post'/>
<b:includable id='mobile-index-post' var='post'/>
<b:includable id='mobile-main' var='top'/>
<b:includable id='mobile-nextprev'/>
<b:includable id='mobile-post' var='post'/>
<b:includable id='nextprev'/>
<b:includable id='post' var='post'>
<div class='post hentry' itemscope='itemscope' itemtype='http://schema.org/BlogPosting'>
<a expr:name='data:post.id'/>
<b:if cond='data:post.title'>
<b:if cond='data:blog.pageType == "item"'>
<style>
.post {
border-bottom:1px dotted #ccc;
}
</style>
<h3 class='post-title entry-title' itemprop='name'>
<b:if cond='data:post.link'>
<a expr:href='data:post.link'><data:post.title/></a>
<b:else/>
<b:if cond='data:post.url'>
<b:if cond='data:blog.url != data:post.url'>
<a expr:href='data:post.url'><data:post.title/></a>
<b:else/>
<data:post.title/>
</b:if>
<b:else/>
<data:post.title/>
</b:if>
</b:if>
</h3>
</b:if>
<b:if cond='data:blog.pageType == "static_page"'>
<h3 class='post-title entry-title' itemprop='name'>
<b:if cond='data:post.link'>
<a expr:href='data:post.link'><data:post.title/></a>
<b:else/>
<b:if cond='data:post.url'>
<b:if cond='data:blog.url != data:post.url'>
<a expr:href='data:post.url'><data:post.title/></a>
<b:else/>
<data:post.title/>
</b:if>
<b:else/>
<data:post.title/>
</b:if>
</b:if>
</h3>
</b:if>
</b:if>
<div class='post-header'>
<b:if cond='data:blog.pageType == "item"'>
<div class='post-header-line-1'>
<span class='post-author vcard'>
<b:if cond='data:top.showAuthor'>
<data:top.authorLabel/>
<b:if cond='data:post.authorProfileUrl'>
<span class='fn'>
<a expr:href='data:post.authorProfileUrl' itemprop='author' rel='author' title='author profile'>
<data:post.author/>
</a>
</span>
<b:else/>
<span class='fn'><data:post.author/></span>
</b:if>
</b:if>
</span> | <span class='post-timestamp'>
<b:if cond='data:top.showTimestamp'>
<data:top.timestampLabel/>
<b:if cond='data:post.url'>
<a class='timestamp-link' expr:href='data:post.url' itemprop='url' rel='bookmark' title='permanent link'><abbr class='published' expr:title='data:post.timestampISO8601' itemprop='datePublished'><data:post.timestamp/></abbr></a>
</b:if>
</b:if>
</span> | <span class='post-comment-link'>
<b:if cond='data:post.allowComments'>
<a class='comment-link' expr:href='data:post.addCommentUrl' expr:onclick='data:post.addCommentOnclick'><b:if cond='data:post.numComments == 1'>1 <data:top.commentLabel/><b:else/><data:post.numComments/> <data:top.commentLabelPlural/></b:if></a>
</b:if>
</span>
</div>
</b:if>
</div>
<div class='post-body entry-content' expr:id='"post-body-" + data:post.id' itemprop='articleBody'>
<b:if cond='data:blog.pageType == "static_page"'><br/>
<data:post.body/>
<b:else/>
<b:if cond='data:blog.pageType != "item"'>
<div expr:id='"summary" + data:post.id'><data:post.body/></div>
<script type='text/javascript'>createSummaryAndThumb("summary<data:post.id/>","<data:post.url/>","<data:post.title/>");
</script>
<div style='clear: both;'/>
</b:if>
<b:if cond='data:blog.pageType == "item"'><data:post.body/>
</b:if>
</b:if>
<div style='clear: both;'/> <!-- clear for photos floats -->
</div>
<b:if cond='data:post.hasJumpLink'>
<div class='jump-link' style='display:none;'>
<a expr:href='data:post.url + "#more"' expr:title='data:post.title'><data:post.jumpText/></a>
</div>
</b:if>
<div class='post-footer'>
<b:if cond='data:blog.pageType == "item"'>
<div class='post-footer-line post-footer-line-1'> <span class='post-icons'>
<!-- email post links -->
<b:if cond='data:post.emailPostUrl'>
<span class='item-action'>
<a expr:href='data:post.emailPostUrl' expr:title='data:top.emailPostMsg'>
<img alt='' class='icon-action' height='13' src='http://img1.blogblog.com/img/icon18_email.gif' width='18'/>
</a>
</span>
</b:if>
<!-- quickedit pencil -->
<b:include data='post' name='postQuickEdit'/>
</span> <div class='post-share-buttons goog-inline-block'>
<b:if cond='data:post.sharePostUrl'>
<b:include data='post' name='shareButtons'/>
</b:if>
</div> </div>
<div class='post-footer-line post-footer-line-2'><span class='post-labels'>
<b:if cond='data:post.labels'>
<data:postLabelsLabel/>
<b:loop values='data:post.labels' var='label'>
<a expr:href='data:label.url' rel='tag'><data:label.name/></a><b:if cond='data:label.isLast != "true"'>,</b:if>
</b:loop>
</b:if>
</span>
<!-- Feature added by BTemplates.com -->
<b:if cond='data:top.showReactions'>
<span class='reaction-buttons'>
<table border='0' cellpadding='0' cellspacing='0' width='100%'><tr>
<td class='reactions-label-cell' nowrap='nowrap' valign='top' width='1%'>
<span class='reactions-label'>
<data:top.reactionsLabel/></span> </td>
<td><iframe allowtransparency='true' class='reactions-iframe' expr:src='data:post.reactionsUrl' frameborder='0' name='reactions' scrolling='no'/></td>
</tr></table>
</span>
</b:if>
</div>
<div class='post-footer-line post-footer-line-3'><span class='post-location'>
<b:if cond='data:top.showLocation'>
<b:if cond='data:post.location'>
<data:postLocationLabel/>
<a expr:href='data:post.location.mapsUrl' target='_blank'><data:post.location.name/></a>
</b:if>
</b:if>
</span> </div>
</b:if>
<b:if cond='data:blog.pageType != "item"'>
<div class='post-labels' style='text-align:center;'>
<b:if cond='data:post.labels'>
<b:loop values='data:post.labels' var='label'>
<a expr:href='data:label.url' rel='tag'><data:label.name/></a><b:if cond='data:label.isLast != "true"'>,</b:if>
</b:loop>
</b:if>
</div>
</b:if>
</div>
</div>
</b:includable>
<b:includable id='postQuickEdit' var='post'/>
<b:includable id='shareButtons' var='post'/>
<b:includable id='status-message'/>
<b:includable id='threaded-comment-form' var='post'/>
<b:includable id='threaded_comment_js' var='post'/>
<b:includable id='threaded_comments' var='post'/>
</b:widget>
</b:section>
</div>
</div>
<div id='footer-wrapper'>
<b:section class='footer' id='footer'/>
</div>
</body>
</html>
UPPER JAVA CODE U CAN CODE WRITE IN THIS WAY
BUT IN THIS WAY ONLY EMPTY POST AUTO READ MORE LINK WORK
AND IMAGE AUTO READ MORE LINK DOES NOT WORK
-----------------------------------------------------------------------------------------------------------
<script type='text/javascript'>var thumbnail_mode = "no-float" ;
summary_noimg = 0;
summary_img = 0;
img_thumb_height = 150;
img_thumb_width = 570;
</script>
<script type='text/javascript'>
//<![CDATA[
function removeHtmlTag(strx,chop){
if(strx.indexOf("<")!=-1)
{
var s = strx.split("<");
for(var i=0;i<s.length;i++){
if(s[i].indexOf(">")!=-1){
s[i] = s[i].substring(s[i].indexOf(">")+1,s[i].length);
}
}
strx = s.join("");
}
chop = (chop < strx.length-1) ? chop : strx.length-2;
while(strx.charAt(chop-1)!=' ' && strx.indexOf(' ',chop)!=-1) chop++;
strx = strx.substring(0,chop-1);
return strx+'...';
}
function createSummaryAndThumb(pID){
var div = document.getElementById(pID);
var imgtag = "";
var img = div.getElementsByTagName("img");
if(img.length<=0) {
imgtag = '<span style="float:left; padding:0px 10px 5px 0px;"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8EgSNMk3cxYzIK88RHb0f-vnzJL4QHwwA1WsPskcWbwMjHd3UO1jpNIfiVrojnN6pH8csylnojVb2z9qTecWgjxQ__9o596UTVgmfkieiGVxmBBpcahEXaQZmHKYmAQ5Yu0TfyarY6UI/s0/thumbnail.jpg" width="'+img_thumb_width+'px" height="'+img_thumb_height+'px"/></span>';
var summ = summary_noimg;
}
if(img.length>=1) {
imgtag = '<span style="float:left; padding:0px 10px 5px 0px;"><img src="'+img[0].src+'" width="'+img_thumb_width+'px" height="'+img_thumb_height+'px"/></span>';
summ = summary_img;
}
var summary = imgtag + '<div>' + removeHtmlTag(div.innerHTML,summ) + '</div>';
div.innerHTML = summary;
}
//]]>
</script>
</head>
<b:includable id='post' var='post'>
<b:if cond='data:blog.pageType != "item"'>
<a expr:href='data:post.url'><div expr:id='"summary" + data:post.id'><data:post.body/></div></a><script type='text/javascript'>createSummaryAndThumb("summary<data:post.id/>");</script>
</b:if>
READ MORE:
http://fbgadgets.blogspot.co.uk/2014/05/blog-post-thumbnails-with-cover-effect_17.html
http://fbgadgets.blogspot.co.uk/2014/01/youtube-video-and-empty-post-suport.html
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment