04 November 2010

Blogspot - Recent Posts with Thumbnails Widget

Widget thành phẩm sẽ trông như hình bên dưới:

Các bước thực hiện:

1. Đăng nhập vào blogger
2. Go to Layout » Add a gadget » html/javascript
3. Copy và paste đoạn code bên dưới vào:


 <script language="JavaScript">

imgr = new Array();

imgr[0] = "http://i43.tinypic.com/orpg0m.jpg";

imgr[1] = "http://i43.tinypic.com/orpg0m.jpg";

imgr[2] = "http://i43.tinypic.com/orpg0m.jpg";

imgr[3] = "http://i43.tinypic.com/orpg0m.jpg";

imgr[4] = "http://i43.tinypic.com/orpg0m.jpg";
showRandomImg = true;

boxwidth = 298;

cellspacing = 8;

borderColor = "#ffffff";

bgTD = "#000000";

thumbwidth = 40;

thumbheight = 40;

fntsize = 12;

acolor = "#666";

aBold = true;

icon = " ";

text = "comments";

showPostDate = false;

summaryPost = 40;

summaryFontsize = 10;

summaryColor = "#666";

icon2 = " ";

numposts = 5;

home_page = "http://baotinhoc.blogspot.com/";

</script>

<script src="http://myblogtalk.com/bloggertemplates/js/recentposts_thumbnail.js" type="text/javascript"></script>
Nên thay imgr[0] đến imgr[4] bằng link ảnh của bạn!

Giải thích các thông số
 
boxwidth - Width of the widget
 cellspacing - Space between cells (default one is good)
 
borderColor - Border color (add the background color of your template to perfectly blend it in the template)

 
thumbwidth & thumbheight - Width and Height of the thumbnail (default are good)

 fntsize - Font size of the title
 acolor - Color of the title
 aBold - you want bold titles? (true or false)

numposts - How many posts you want to show?

 
home_page : 
http://baotinhoc.blogspot.com/ (change this to your blog url)
Script này đang được lưu trữ tại server( http://myblogtalk.com/bloggertemplates/js/recentposts_thumbnail.js ).
Khuyên bạn nên tải về và upload lên host của chính mình (google for free javascripts hosts) và thay đổi bằng liên kết của chính bạn cho an toàn sau này.

4. Nhấp SAVE để hoàn tất.