Home » Archives for 04/17/09
BlOg... " Bỗng dưng bị ấy...!!! " - Blogspot bị chăn, khắc phục sao???
22:19 |
Tối qua, đang post bài ngon lành bỗng dưng load trang blog mình thì báo Request time out. Tưởng rớt mạng, cũng không phải, load trang blog khác thì cũng bị như trên, tưởng blogger nó bảo trì nên mình vô status.blogger.com xem thấy không có thông báo nào. Thế là cứ tưởng lỗi gì..., đành đi ngủ để sáng mai tính.
Đến mãi sáng nay mới biết blogspot bị chặn, ngồi loay hoay cả mấy tiếng đồng hồ, lục lọi đủ mọi cách để khắc phục. sau đó tìm được 2 phương pháp
1. đổi proxy
2. Đổi địa chỉ DNS
Ban đầu thử đổi proxy, nhưng không đạt đc kết quả gì, vô đc vài phút là ngắt kết nối mạng. Sau đó tìm hiểu qua cách đổi địa chỉ DNS, rồi có kết quả. Nhưng việc đổi địa chỉ DNS cũng ko phải là có kết quả ngay, cũng phải vài lần mình mới tìm ra được địa chỉ DNS đúng. Lúc đầu thử các địa chỉ DNS không đúng, kết quả là không kết nối mạng được.
Như vậy để khắc phục việc ngăn chặn vào blogspot từ nhà cung cấp, các bạn tốt nhất nên đổi địa chỉ DNS.
Ví dụ : địa chỉ DNS của mình là
203.119.36.106
208.67.222.222
mình đổi lại là
208.67.222.222
208.67.220.220
thế là có kết quả.
Xem hình minh họa bên dưới

sửa DNS như sau:

Tiện ích hiển thị bài đăng ngẫu nhiên dạng flash, thay đổi theo thời gian
20:27 |Random Rotating Post Gadget with Excerpt

Xem hình minh họa tiện ích bên dưới:


Một số đặc điểm của tiện ích:
1. Hiện thị 1 bài viết tại 1 thời điểm.
2. Liên kết tới bài viết.
3. Show bài viết dạng flash.
4. Cứ 5s chuyển sang bài viết khác. (thời gian do mình cài đặt).
5. Ứng dụng tiện ích của Google AJAX.
6. Có thể sử dụng trên nền tảng blog khác.
Lưu ý: trước khi thực hiện bạn phải đăng kí cho mình một code bên Google AJAX, vào đây để đăng kí. Và blog bạn phải có 1 link feed.
Bây giờ bắt đầu thủ thuật:
1. Đăng nhập blog
2. Tạo 1 widget HTML/Javascript
3. Dán code bên dứới vào (có thể modify lại theo ý mình)
<style type="text/css">
.gfg-root {
width : 100%;
height : auto;
position : relative;
overflow : hidden;
text-align : center;
font-family: "Arial", sans-serif;
font-size: 20px;
border: 1px solid #BCCDF0;
}
.gfg-title {
font-size: 24px;
font-weight : bold;
color : #3366cc;
background-color: #E5ECF9;
line-height : 1.4em;
overflow : hidden;
white-space : nowrap;
}
.gfg-title a {
color : #3366cc;
}
.gfg-subtitle {
font-size: 20px;
font-weight : bold;
color : #3366cc;
background-color: #E5ECF9;
line-height : 1.4em;
overflow : hidden;
white-space : nowrap;
margin-bottom : 0px;
}
.gfg-subtitle a {
color : #3366cc;
display:none !important;
}
.gfg-entry {
background-color : white;
width : 100%;
height : 6.9em;
position : relative;
overflow : hidden;
text-align : left;
margin-top : 3px;
}
/* To allow correct behavior for overlay */
.gfg-root .gfg-entry .gf-result {
position : relative;
background-color : white;
width : auto;
height : 100%;
padding-left : 20px;
padding-right : 5px;
}
.gfg-list {
position : relative;
overflow : hidden;
text-align : left;
margin-bottom : 5px;
display:none !important;
}
.gfg-listentry {
line-height : 1.5em;
overflow : hidden;
white-space : nowrap;
text-overflow : ellipsis;
-o-text-overflow : ellipsis;
padding-left : 15px;
padding-right : 5px;
margin-left : 5px;
margin-right : 5px;
}
.gfg-listentry-odd {
background-color : #F6F6F6;
}
.gfg-listentry-even {
}
.gfg-listentry-highlight {
background-image : url('garrow.gif');
background-repeat: no-repeat;
background-position : center left;
}
/*
* FeedControl customizations.
*/
.gfg-root .gfg-entry .gf-result .gf-title {
font-size: 24px;
line-height : 1.2em;
overflow : hidden;
white-space : nowrap;
text-overflow : ellipsis;
-o-text-overflow : ellipsis;
margin-bottom : 2px;
}
.gfg-root .gfg-entry .gf-result .gf-snippet {
height : 3.8em;
color: #000000;
margin-top : 3px;
}
/*
* Easy way to get horizontal mode, applicable via js options to gadget.
*/
.gfg-horizontal-container {
position : relative;
}
.gfg-horizontal-root {
height : 1.5em;
_height : 100%;
position : relative;
white-space : nowrap;
overflow : hidden;
text-align : center;
font-family: "Arial", sans-serif;
font-size: 13px;
border: 1px solid #AAAAAA;
padding : 5px;
margin-right : 80px;
}
.gfg-horizontal-root .gfg-title {
font-weight : bold;
background-color: #FFFFFF;
line-height : 1.5em;
overflow : hidden;
white-space : nowrap;
float : left;
padding-left : 10px;
padding-right : 12px;
border-right: 1px solid #AAAAAA;
}
.gfg-horizontal-root .gfg-title a {
color : #444444;
text-decoration : none;
}
.gfg-horizontal-root .gfg-entry {
width : auto;
height : 1.5em;
position : relative;
overflow : hidden;
text-align : left;
margin-top : 0px;
margin-left : 0px;
padding-left : 10px;
}
/* To allow correct behavior for overlay */
.gfg-horizontal-root .gfg-entry .gf-result {
position : relative;
background-color : white;
width : 100%;
height : 100%;
line-height : 1.5em;
overflow : hidden;
white-space : nowrap;
}
.gfg-horizontal-root .gfg-list {
display : none;
}
/*
* FeedControl customizations.
*/
.gfg-horizontal-root .gfg-entry .gf-result .gf-snippet,
.gfg-horizontal-root .gfg-entry .gf-result .gf-author {
display : none;
}
.gfg-horizontal-root .gfg-entry .gf-result .gf-title {
color: #0000cc;
margin-right : 3px;
float : left;
}
.gfg-horizontal-root .gfg-entry .gf-result .gf-spacer {
float : left;
}
.gfg-horizontal-root .gfg-entry .gf-result .gf-spacer,
.gfg-horizontal-root .gfg-entry .gf-result .gf-relativePublishedDate {
display : block;
color: #AAAAAA;
}
.gfg-branding {
white-space : nowrap;
overflow : hidden;
text-align : left;
position : absolute;
right : 0px;
top : 0px;
width : 80px;
}
.gfg-collapse-open, .gfg-collapse-closed {
background-repeat : no-repeat;
background-position : center;
cursor : pointer;
float : right;
width : 17px;
height : 20px;
}
.gfg-collapse-open {
background-image : url('arrow_open.gif');
}
.gfg-collapse-closed {
background-image : url('arrow_close.gif');
}
.gfg-collapse-href {
float : left;
}
.clearFloat {
clear : both;
}
body {
background-color: white;
color: black;
font-family: Arial;
font-size: small;
margin: 0;
}
#feedGadget {
margin-top : 5px;
margin-left: auto;
margin-right: auto;
width : 440px;
font-size: 16px;
color: #9CADD0;
}
</style>
<script src="http://www.google.com/jsapi/?key=PUT_AJAX_KEY_HERE"
type="text/javascript"></script>
<script src="http://www.google.com/uds/solutions/dynamicfeed/gfdynamicfeedcontrol.js" type="text/javascript"></script>
<script type="text/javascript">
function showGadget() {
var feeds = [
{title:'title',
url:'http://MYBLOG.blogspot.com/atom.xml?redirect=false&start-index=1&max-results=999'},
];
new GFdynamicFeedControl(feeds, 'feedGadget',
{numResults : 1000, stacked : true,
title: "BLOG_TITLE ~ Random Posts."});
}
google.load("feeds", "1");
google.setOnLoadCallback(showGadget);
</script>
►Chú ý các đọan code màu đỏ :
1. PUT_AJAX_KEY_HERE : code KEY mà bạn có được sau khi đăng kí bên Google AJAX.
2. http://YourBLOG.blogspot.com/atom.xml?redirect=false&start-index=1&max-results=999 : YourBLOG = tên blog của bạn. Lưu ý ở đây sử dụng link Feed Atom, bạn nào đã tạo link feed của FeedBurner thì có thể sử dụng link feed này. Nếu chưa có thì vào đây tạo. Và nó sẽ có dạng như thế này http://YOurBLOG.blogspot.com/feeds/posts/default?alt=json-in-script&max-results=999
3. BLOG_TITLE ~ Random Posts. : tựa đề mà bạn muốn hiển thị cho tiện ích.
Chúc các bạn thành công.
Tiện ích hiển thị bài viết trong blog dạng Tab Cuộn
09:26 |Table of Contents Autoscroll Gadget
[FD'BlOg] - Tiện ích sẽ hiển thị các bài viết trong blog (đầy đủ thông tin : tựa đề, ngày đăng, nhã...). Và các bài viết sẽ tự động di chuyển trong khung xác định trước, giúp tiết kiệm không gian cho blog của bạn.Bây giờ ta bắt đầu:
1. Đăng nhập blog
2. Tạo 1 Widget HTML/Javascript ở nơi bạn muốn hiển thị tiện ích này.
3. Dán đọan code sau vào:
<script type="text/javascript">
var speed = 2;
function init(){
var el = document.getElementById("marquee_replacement");
el.style.overflow = 'hidden';
scrollFromBottom();
}
var go = 0;
function scrollFromBottom(){
var el = document.getElementById("marquee_replacement");
if(el.scrollTop >= el.scrollHeight-150){
el.scrollTop = 0;
};
el.scrollTop = el.scrollTop + speed;
if(go == 0){
setTimeout("scrollFromBottom()",50);
};
}
function stop(){
go = 1;
}
function startit(){
go = 0;
scrollFromBottom();
}
</script>
<script style="text/javascript" src="http://data.fandung.com/js/TableOfContentsJS.js"></script>
<script src="http://www.fandung.com/feeds/posts/default?alt=json-in-script&max-results=999&callback=loadtoc"></script>
<script type="text/javascript">showToc();</script>
<style type="text/css">
#marquee_replacement{
border:1px solid #000;
width:100%;
height:250px;
overflow:auto;
background:#fff;
}
#marquee_replacement p.spacer{
height:150px;
}
</style>
<div id="marquee_replacement" onmouseover="stop();" onmouseout="startit();">
<div id="toc">
►Chú ý đọan code màu đỏ:
http://www.fandung.com/feeds/posts/default?alt=json-in-script&max-results=999&callback=loadtoc
- Nếu bạn muốn hiển thị hết tất cả bài viết trong blog của bạn thì sửa số 999 càng lớn càng tốt(tùy theo số lượng bài viết có trong blog của bạn), nếu muốn hiển thị 1 số bài viết nhất định thì sửa số lại. Ví dụ hiển thị 30 bài viết thì ta sửa code lại là :
http://www.fandung.com/feeds/posts/default?alt=json-in-script&max-results=30&callback=loadtoc