Blogger Recent Posts Slider Widget - [FlexSlider] [Quick Guide]


<script type=”text/javascript”>
  $(window).load(function()
    $(‘.flexslider’).flexslider(
   animation: “slide”,
        directionNav: false,
       touch: true, 
       slideshowSpeed: 2500,
      pauseOnHover: true,
     animationSpeed: 700,
    );
  );
</script>
<h2 class=”mbtslides-title”>Recent Posts Slider</h2>
<div class=”flexslider”>
<ul class=”slides”>


<script type=”text/javascript”>
//################### Defaults
var ListBlogLink = “http://mybloggertricks.com“;
var ListCount = 6;
var ListLabel = “SEO”;
var TitleCount = 66;
var ImageSize = 150;
//################### Function Start
function mbtslider(json)
for (var i = 0; i < ListCount; i++)
 
//################### Variables Declared
var listing= ListImage = ListUrl = ListTitle = ListImage = ListContent = ListConten = ListAuthor = ListTag = ListDate = ListUpdate = ListComments = thumbUrl = TotalPosts = sk = AuthorPic= ListMonth = Y = D = M = m = YY = DD = MM = mm = TT =  “http://www.mybloggertricks.com/”;


//################### Category
if (json.feed.entry[i].category != null)

for (var k = 0; k < json.feed.entry[i].category.length; k++)
ListTag += “<a href=”http://www.mybloggertricks.com/”+ListBlogLink+”/search/label/”+json.feed.entry[i].category[k].term+”http://www.mybloggertricks.com/”>”+json.feed.entry[i].category[k].term+”</a>”;
if(k < json.feed.entry[i].category.length-1)
ListTag += “http://www.mybloggertricks.com/”;


//################### URL
for (var j = 0; j < json.feed.entry[i].link.length; j++)
      if (json.feed.entry[i].link[j].rel == ‘alternate’)
        break;
     
   
ListUrl= “http://www.mybloggertricks.com/”http://www.mybloggertricks.com/” + json.feed.entry[i].link[j].href + “http://www.mybloggertricks.com/”http://www.mybloggertricks.com/”;


//################### Info
TotalPosts = json.feed.openSearch$totalResults.$t;
if (json.feed.entry[i].title!= null)

ListTitle= json.feed.entry[i].title.$t.substr(0, TitleCount);

if (json.feed.entry[i].thr$total)

ListComments= “<a href=”http://www.mybloggertricks.com/”+json.feed.entry[i].link[j].href+”#comment-form’>”+json.feed.entry[i].thr$total.$t+”</a>”;

ListAuthor= json.feed.entry[i].author[0].name.$t.split(“http://www.mybloggertricks.com/”);
ListAuthor=ListAuthor.slice(0, 1).join(“http://www.mybloggertricks.com/”);


AuthorPic = json.feed.entry[i].author[0].gd$image.src;


//################### Date Format


ListMonth= [“Jan”, “Feb”, “Mar”, “Apr”, “May”, “Jun”, “Jul”, “Aug”, “Sep”, “Oct”, “Nov”, “Dec”];


ListDate= json.feed.entry[i].published.$t.substring(0,10);


                         Y = ListDate.substring(0, 4);
                        m = ListDate.substring(5, 7);
                         D = ListDate.substring(8, 10);
                         M = ListMonth[parseInt(m – 1)];                       


ListUpdate= json.feed.entry[i].updated.$t.substring(0, 16);


                         YY = ListUpdate.substring(0, 4);
                        mm = ListUpdate.substring(5, 7);
                         DD = ListUpdate.substring(8, 10);
                         TT = ListUpdate.substring(11, 16);
                         MM = ListMonth[parseInt(mm – 1)];   


//################### Thumbnail Check
// YouTube scan


if (json.feed.entry[i].content.$t.match(/youtube.com.*(?v=


<!– #### Invoking the Callback Function #### –>


document.write(“<script src=”http://www.mybloggertricks.com/”+ListBlogLink+”/feeds/posts/default/-/”+ListLabel+”?alt=json-in-script&callback=mbtslider’></”+”script>”);
</script>
</ul></div>


No comments:

Powered by Blogger.