Wednesday, 21 May 2014

RANDOM/RECENT/FEATURED POST SLIDER IN BLOG

RANDOM/RECENT/FEATURED POST SLIDER IN BLOG




-----------------------------------------------------------------------------------------------------------
COPY AND PASTE BELOW CODE
------------------------------------------------------------------------------------------------------------


<html>
<head>
<b:include data='blog' name='all-head-content'/>
<b:if cond='data:blog.pageType == &quot;index&quot;'>
<title><data:blog.pageTitle/></title>
<b:else/>
<title><data:blog.pageName/> - <data:blog.title/></title>
</b:if>
<b:skin><![CDATA[/*
-----------------------------------------------
Blogger Template Style
Name: BLOG POST THUMBNAILS WITH SLIDER EFFECT
- Support Video Thumbnail
Design by : FBGadgets
URL : http://fbgadgets.blogspot.co.uk/
----------------------------------------------- */


body {
background-image: url(http://stuff.pyzam.com/layouts/img/l/o/nvloveintheair.jpg);
background-attachment: fixed;
background-position: center ;
background-repeat: repeat;
}
a:link {
color:$linkcolor;
text-decoration:none;
}


/* WRAPPER
----------------------------------------------- */
#outer-wrapper {
width: 1000px;
margin:0 auto;
padding:0px;
text-align:$startSide;
color: #2D3132;
font-family: Georgia,"Times New Roman",Times,serif;
font-size: 13px;
}
#content-wrapper {
background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXgPKVS9G6hd92qUnPwYW9N-RYM8-ucF55iuTPT29KfkMN8dL1vBQJTQV82rAH-DsYD18VBF34H4hKZx5BsO56m-F3GqpvfWuCf5jsER76XSmSEeM2ZKFnDBwE2g-Ga1I3mroRw20kgNY/s1600/bgr_body.gif) repeat-y scroll 0 0 transparent;
width: 100%;
}
#main-wrapper {
float: left;
padding: 20px 43px 0 58px;
width: 524px;
}
/* START
--------------------------------------------------------------------
Easy Slider
--------------------------------------------------------------------
EasySlider
*/
.crosscol {
font-family: Verdana,Geneva,sans-serif;
overflow: hidden;
padding: 0 0 55px 40px;
width: 488px;
}
#slider-wrapper {
height: 180px;
position: relative;
width: 488px;
overflow: hidden;
}
#slide-container {
height:230px;
position:relative;
width: 100%;
overflow:hidden;
}
#slider {
width: 100%;
height: 220px;
margin: 0px auto 5px;
padding:0px;
left:0px;
overflow-x:hidden;
overflow-y:hidden;
position:relative;
}
.slide-desc {
padding: 0;
margin:0;
position:absolute;
z-index:0;
height: 220px;
width:310px;
overflow:hidden;
line-height: 1.4em;
right:0;
}
.slide-desc h2{
color: #2D3132;
font-size: 13px;
line-height: 1.1em;
font-weight:bold;
padding:0;
margin:0;
border:none;
background:none;
display: block;
}
.slide-desc h2:hover{
text-decoration: underline;
}
.crosscol .widget-content {position:relative;}
#slider ul, #slider li,
#slider2 ul, #slider2 li{
margin:0;
padding:0;
list-style:none;
width: 488px;
}
#slider img {
border: 3px solid #BEDDE4;
float: left;
height: 136px;
margin: 0 10px 0 0;
width: 157px;
}
#slider2{margin-top:1em;}
#slider li, #slider2 li{
height:220px;
overflow:hidden;
}
#nextBtn, #slider1next{
z-index: 0;
text-indent: -9999px;
}
#prevBtn, #slider1prev {
z-index: 0;
text-indent: -9999px;
}
#nextBtn a, #slider1next a {
background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqFfBo7APj_TAnCxMQUr9kiDA8FYZgE3racQqVf5NYPJy9ig1tHsfAA789911J71ixFfWj1RsBzaB75310VJRVhbhsXVbihNAR_PKHHuDl7aAjyYCtkwfHAXhbX2aDaanuANw3f3gx3Sk/s1600/next.png) no-repeat scroll center top transparent;
bottom: 0px;
cursor: pointer;
float: left;
height: 25px;
left: 35px;
position: absolute;
width: 25px;
}
#prevBtn a, #slider1prev a {
background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6Qz7LAcjFLF32zJAP7LjkakJPcakpgQnPnauEutTn0vOkrlVPVgMQbOOZYPgEiWKwLnM05KRFIL8DjgGsHrZyYO4oAa6oAE88Q1B_mWsKfjzBKmN_4ZQXYmSG5akUGzNLeAxUfL0teFY/s1600/prev.png) no-repeat scroll center top transparent;
bottom: 0px;
cursor: pointer;
float: left;
height: 25px;
left: 0px;
position: absolute;
width: 25px;
}
#prevBtn a:hover, #nextBtn a:hover,
#slider1next a:hover, #slider1prev a:hover {
background-position: center bottom;
}
#body_top {
background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgudbdPVhNvsq21wjziI1b-S0H6DkHvrv_dygDW8KjmvHpcroccrCY_OSSwrnbdFRr7EYRx43cHbq3XlJX6XpKPnuASDeJFOOVJVL_WaSwtEOMPwCMMeDlK8HXy4t-eMjkjn_xU5Xu9oWI/s1600/bgr_body_top_home.gif) no-repeat scroll 0 0 transparent;
overflow: hidden;
padding: 14px 0 40px;
width: 100%;
}

]]></b:skin>

<b:if cond='data:blog.pageType == &quot;item&quot;'>
<style>
#body_top {
background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgudbdPVhNvsq21wjziI1b-S0H6DkHvrv_dygDW8KjmvHpcroccrCY_OSSwrnbdFRr7EYRx43cHbq3XlJX6XpKPnuASDeJFOOVJVL_WaSwtEOMPwCMMeDlK8HXy4t-eMjkjn_xU5Xu9oWI/s1600/bgr_body_top_home.gif) no-repeat scroll 0 0 transparent;
overflow: hidden;
padding: 14px 0 40px;
width: 100%;
}
</style>
</b:if>

</head>

<body>

<div id='outer-wrapper'>
<div id='body_top'>
<div id='main-wrapper'>

<div class='crosscol' id='crosscol-wrapper'>
<div class='widget-content'>
&lt;div id=&quot;slider-wrapper&quot;&gt;
&lt;div id=&quot;slider&quot;&gt;
&lt;script style=&quot;text/javascript&quot;&gt;
var showpostthumbnails_gal = true;
var showpostsummary_gal = true;
var random_posts = false;
var numchars_gal = 150;
var numposts_gal = 10;
function showgalleryposts(json) {
var numPosts = json.feed.openSearch$totalResults.$t;
var indexPosts = new Array();
document.write(&#39;&lt;ul style=&quot;overflow:hidden;&quot;&gt;&#39;);
for (var i = 0; i &lt; numPosts; ++i) {
indexPosts[i] = i;
}
if (random_posts == true){
indexPosts.sort(function() {return 0.5 - Math.random()});
}
if (numposts_gal &gt; numPosts) {
numposts_gal = numPosts;
}
for (i = 0; i &lt; numposts_gal; ++i) {
var entry_gal = json.feed.entry[indexPosts[i]];
var posttitle_gal = entry_gal.title.$t;
for (var k = 0; k &lt; entry_gal.link.length; k++) {
if ( entry_gal.link[k].rel == &#39;alternate&#39;) {
posturl_gal = entry_gal.link[k].href;
break;
}
}
if (&quot;content&quot; in entry_gal) {
var postcontent_gal = entry_gal.content.$t
}
s = postcontent_gal;
a = s.indexOf(&quot;&lt;img&quot;);
b = s.indexOf(&quot;src=\&quot;&quot;, a);
c = s.indexOf(&quot;\&quot;&quot;, b + 5);
d = s.substr(b + 5, c - b - 5);
if ((a != -1) &amp;&amp; (b != -1) &amp;&amp; (c != -1) &amp;&amp; (d != &quot;&quot;)) {
var thumburl_gal = d
} else var thumburl_gal = &#39;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1Iay4C8vszTdzmquHqn_lYno5UvUZDxEyCKWHqRwqrs3ldaLk4dhEciBoLrbx2YrSE1Z2Cim_on3xw46ANulC76NvahzY11W754Ehh7Fs7ZrFs4q42yrSDvk5ocourfibDcUFvUSqKLg/s1600/39130-bigthumbnail.jpg&#39;;
document.write(&#39;&lt;li&gt;&lt;div id=&quot;slide-container&quot;&gt;&lt;span class=&quot;slide-desc&quot;&gt;&lt;a href=&quot;&#39; + posturl_gal + &#39;&quot;&gt;&lt;h2 style=&quot;margin:0px 0px;&quot;&gt;&#39;);
document.write(posttitle_gal + &#39;&lt;/h2&gt;&lt;/a&gt;&#39;);
var re = /&lt;\S[^&gt;]*&gt;/g;
postcontent_gal = postcontent_gal.replace(re, &quot;&quot;);
if (showpostsummary_gal == true) {
if (postcontent_gal.length &lt; numchars_gal) {
document.write(postcontent_gal);
document.write(&#39;&lt;/span&gt;&#39;)
} else {
postcontent_gal = postcontent_gal.substring(0, numchars_gal);
var quoteEnd_gal = postcontent_gal.lastIndexOf(&quot; &quot;);
postcontent_gal = postcontent_gal.substring(0, quoteEnd_gal);
document.write(postcontent_gal + &#39;...&#39;);
document.write(&#39;&lt;/span&gt;&#39;)
}
}
document.write(&#39;&lt;a href=&quot;&#39; + posturl_gal + &#39;&quot;&gt;&lt;img src=&quot;&#39; + thumburl_gal + &#39;&quot; width=&quot;180px&quot; height=&quot;180px&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&#39;);
document.write(&#39;&lt;/li&gt;&#39;);
}
document.write(&#39;&lt;/ul&gt;&#39;);

}
&lt;/script&gt;

&lt;script style=&quot;text/javascript&quot;&gt;
var numposts_gal = 6;
var numchars_gal = 300;
var random_posts = true; // random posts
&lt;/script&gt;
&lt;!-- replace with your web address (marked with red color) --&gt;
&lt;script src=&quot;/feeds/posts/default?orderby=published&amp;alt=json-in-script&amp;callback=showgalleryposts&amp;max-results=999999&quot;&gt;&lt;/script&gt;
&lt;/div&gt;
&lt;/div&gt;
</div>
</div>


<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-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'>
<data:post.body/>
</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>

</div> <!-- end outer-wrapper -->
 
</body>
</html>

0 comments:

Post a Comment

:) :)) ;(( :-) =)) ;( ;-( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ $-) (b) (f) x-) (k) (h) (c) cheer
Click to see the code!
To insert emoticon you must added at least one space before the code.

FB Gadgets | Template Designed by Fatakat PhotosCoolBThemes.com
Code by : paid web directory

https://www.google.co.uk/search?q=site%3Ablogspot.com+fbgadgets