Cách tạo pre, code đẹp cho blogspot

7:51 AM |
Hôm nay mình sẽ giới thiệu bạn pre,code đẹp mà mình thích này.
pre { background: url(https://lh6.googleusercontent.com/-JL3xSHJZ7W0/UAfD64wDPBI/AAAAAAAACp0/q4g6ZIdwFIw/s986/note.png) repeat-y scroll 0 0 transparent;   
-webkit-border-radius: 3px;-moz-border-radius: 3px;-ms-border-radius: 3px;-o-border-radius: 3px;border-radius: 3px; -webkit-box-shadow: 0 0 3px #808080 inset, 0 0 1px #FFFFFF;-moz-box-shadow: 0 0 3px #808080 inset, 0 0 1px #FFFFFF; -ms-box-shadow: 0 0 3px #808080 inset, 0 0 1px #FFFFFF; -o-box-shadow: 0 0 3px #808080 inset, 0 0 1px #FFFFFF; box-shadow: 0 0 3px #808080 inset, 0 0 1px #FFFFFF;white-space: pre; white-space: pre-wrap;
padding: 21px 45px 14px;color: #555;font-size: 16px;font-family: Courier New, monospace;width:auto!important;width:96%;overflow:auto;}
code {color: #1D6B9D;font-size: 16px;font-family: Courier New, monospace;}


Read more…

Đồng hồ đếm ngược đến năm 2014 cho blogspot

7:37 AM |
Năm mới 2014 sắp đến rồi, mình xin chúc cho các bạn có một năm mới thật An Khang Thịnh Vượng, tràn đầy sức khỏe, luôn sum vầy bên gia đình và người mình yêu thương nhé.
Và hôm nay mình sẽ hướng dẫn các bạn làm một cái đồng hồ đếm ngược đến năm 2014.
Do mình để trong phần quản lý trang của mình là tiếng anh, nên mình sẽ hướng dẫn bằng tiếng anh luôn, bạn nào không hiểu thì liên hệ mình nha.
Các bạn vào Layout --> Add a Gadget --> HTML/JavaScript và thêm đoạn code bên dưới vào:
<style type="text/css" scoped> 
#times-countdown {
background:#255d90 url(http://4.bp.blogspot.com/-fhJ814QpbUg/UsKCbflIvVI/AAAAAAAAGQA/CERwLJTtcbo/s1600/newyearback2.png)no-repeat top right;
color:white;
font-family:Oswald, Arial, Sans-serif;
font-size:250%;
text-transform:uppercase;
text-align:left;
font-weight:normal;
padding:30px;
border-radius:5px;
}
.times {color:white}
#countdown{background:#df5063;border-radius:4px;padding:5px 20px}
</style>
<div id='times-countdown'>
<span id='countdown'></span>
</div>
<script type='text/javascript'>
//<![CDATA[
// đặt ngày để bắt đầu đếm ngược, ở đây là 1-1-2014
var target_date = new Date("Jan 1, 2014").getTime();

// thêm biến cho các đơn vị thời gian
var days, hours, minutes, seconds;

//đặt id là countdown
var countdown = document.getElementById("countdown");

// cập nhật id "countdown" mỗi 1 giây
setInterval(function () {

// thiết lập cho ngày giờ hiện tại và ngày kết thúc
var current_date = new Date().getTime();
var seconds_left = (target_date - current_date) / 1000;

// tính ngày, giờ, phút và giây
days = parseInt(seconds_left / 86400);
seconds_left = seconds_left % 86400;

hours = parseInt(seconds_left / 3600);
seconds_left = seconds_left % 3600;

minutes = parseInt(seconds_left / 60);
seconds = parseInt(seconds_left % 60);

// thiết lập cho biến countdown hiển thị ra ngoài
countdown.innerHTML = hours + " : "
+ minutes + " : " + seconds + "";

}, 1000);
//]]>
</script>
Bạn có thể thay thế cách hiển thị biến countdown ra bên ngoài bằng cách khác:
countdown.innerHTML = days + " ngày " + hours + " giờ "
+ minutes + " phút " + seconds + " giây là đến năm 2014";
Read more…

Cách tạo trang sitemap đẹp cho blogspot

11:03 PM |
Hi các bạn, hôm nay mình sẽ hướng dẫn các bạn tạo 1 trang sitemap thật đẹp cho blogspot nhé.


Các bạn vào Dashboard -- Pages -- New pages -- Blank Pages
Thêm đoạn code bên dưới vào nội dung trang

<style type='text/css'>.toc-note { margin-bottom:10px; } #bp_toc { width:100%; } .toc-header-col1, .toc-header-col2, .toc-header-col3 { background:#444; padding:10px; border-right:1px solid #fff; border-bottom:1px solid #fff; text-transform:normal; } .toc-header-col2, .toc-header-col3 { width:20%; } .toc-entry-col1, .toc-entry-col2, .toc-entry-col3 { padding:10px; background:#f8f8f8; border-right:1px solid #fff; border-bottom:1px solid #fff; } .toc-header-col1 .title, .toc-header-col2 .title, .toc-header-col3 .title { font:normal normal 14px coustard, patua-one, Arial, helvetica, sans-serif; color:#fff; }  </style>

<div id="bp_toc">
Đang tải dữ liệu... Bạn vui lòng chờ trong giây lát...</div>
<script src="http://bl0g.googlecode.com/files/blog_archive.js" type="text/javascript"></script>
<script src="/feeds/posts/summary?alt=json-in-script&max-results=500&callback=loadtoc" type="text/javascript"></script>

Thế là xong, chúc các bạn thành công
Read more…

Thống kê đơn giản cho blogspot

4:19 AM |
Chào các bạn yêu blogspot. Hôm hay mình sẽ hướng dẫn các bạn làm một cái thống kê đơn giản như các bạn thấy ở YeahVn's blog nhé.


1. Đầu tiên, bạn vào Layout ---> Add a widget ---> thêm vào tiện ích Blog's stats như hình bên dưới:



- Chọn Style như trong hình này nha:


2. Kế tiếp, bạn vào Templates ---> Edit HTML ---> check vào Expand Widget Templates, bạn bấm Ctrl + F để tìm kiếm đoạn mã Stats1 như trong hình:


Các bạn chú ý đoạn mã trong ô vuông màu đỏ nha, đó sẽ là phần mà mình sẽ chỉnh sửa.

3. Thêm đoạn mã dưới đây vào trước thẻ ]]></b:skin> trong giao diện của bạn (bạn có thể chỉnh sửa cho phù hợp với giao diện của bạn)
#Stats1_totalCount{font-size:95%;font-weight:normal;font-family:Verdana;margin-top:-5px;}
#histats_counter,.Staticss{line-height: 1.4em}
4. Tìm đoạn mã
<span class='counter-wrapper text-counter-wrapper' expr:id='data:widget.instanceId + "_totalCount"'/>
và thay thế nó bằng đoạn mã này:
<div class='Staticss'>
- Bài viết: <span id='Stats1_totalPosts' /><br/>
- Nhận xét: <span id='Stats1_totalComments' /><br/>
<div class="statistic" id="histats_counter">
<span></span><br/>
<span></span>
<script type="text/javascript">var _Hasync=_Hasync||[];_Hasync.push(['Histats.start','1,2011409,4,605,110,55,00011101']);_Hasync.push(['Histats.fasi','1']);_Hasync.push(['Histats.track_hits','']);(function(){var hs=document.createElement('script');hs.type='text/javascript';hs.async=true;hs.src=('http://s10.histats.com/js15_as.js');(document.getElementsByTagName('head')[0]||document.getElementsByTagName('body')[0]).appendChild(hs)})();(function(){if(window['Histats'])Histats={hash:{},sc1:function(a){a.replace(/#\d+([^=]+)=(\d+)/g,function(m,k,v){Histats.hash[k]=v})},load_flash:function(){$.each(Histats.hash,function(k){var ind=1,text='- Khách hôm nay';if(k=='Online'){ind=0;text='- Khách đang xem'}else if(k=='Visits'){ind=2;text='- Tổng số truy cập'}$('#histats_counter>span:eq('+ind+')').html(text+': '+this).click(function(){location.href='http://www.123yeu.org'}).css('cursor','pointer')})}};else setTimeout(arguments.callee,100)})();</script>
</div>
- Lượt truy cập: <span class='counter-wrapper text-counter-wrapper' expr:id='data:widget.instanceId + "_totalCount"'/>
</div>
<script type='text/javascript'>
//<![CDATA[
function totalPosts(json){document.getElementById('Stats1_totalPosts').innerHTML=json.feed.openSearch$totalResults.$t};function totalComments(json){document.getElementById('Stats1_totalComments').innerHTML=json.feed.openSearch$totalResults.$t};document.write('<script type=\"text/javascript\" src=\"/feeds/posts/default?alt=json-in-script&max-results=0&callback=totalPosts\"><\/script><script type=\"text/javascript\" src=\"/feeds/comments/default?alt=json-in-script&max-results=0&callback=totalComments\"><\/script>');
//]]>
</script>
5. Sau đó, bạn vào trang http://www.histats.com, đăng ký một tài khoản và tạo cái thống kê, xong bạn lấy mã và để ý đoạn mã như trong hình dưới đây:

Bạn thay id mà mình bôi đỏ ở mã phía trên bằng id của bạn
(['Histats.start','1,2011409,4,605,110,55,00011101'])
Lưu ý: đoạn script này bạn phải vào trang Convert Code để chuyển mã nó (bắt buộc phải chuyển nha), như thế nó mới hoạt động, nếu không sẽ bị lỗi đó.
<script type="text/javascript">var _Hasync=_Hasync||[];_Hasync.push(['Histats.start','1,2011409,4,605,110,55,00011101']);_Hasync.push(['Histats.fasi','1']);_Hasync.push(['Histats.track_hits','']);(function(){var hs=document.createElement('script');hs.type='text/javascript';hs.async=true;hs.src=('http://s10.histats.com/js15_as.js');(document.getElementsByTagName('head')[0]||document.getElementsByTagName('body')[0]).appendChild(hs)})();(function(){if(window['Histats'])Histats={hash:{},sc1:function(a){a.replace(/#\d+([^=]+)=(\d+)/g,function(m,k,v){Histats.hash[k]=v})},load_flash:function(){$.each(Histats.hash,function(k){var ind=1,text='- Khách hôm nay';if(k=='Online'){ind=0;text='- Khách đang xem'}else if(k=='Visits'){ind=2;text='- Tổng số truy cập'}$('#histats_counter>span:eq('+ind+')').html(text+': '+this).click(function(){location.href='http://www.123yeu.org'}).css('cursor','pointer')})}};else setTimeout(arguments.callee,100)})();</script>
</div>

Thế là đã hoàn thành cái thống kê đơn giản mà đẹp theo phong cách của riêng bạn rồi nha, có gì không hiểu thì để comment lại bên dưới, mình sẽ hỗ trợ cho bạn.
Chúc bạn thành công.
Read more…

Slide ảnh đẹp cho Blogspot

4:18 AM |
Hôm nay mình sẽ hướng dẫn bạn thiết kế một slide ảnh đơn giản, nhằm làm cho blog bạn sinh động hơn.

Slide ảnh cho Blogspot
Slide ảnh cho Blogspot

- Bước 1: Bạn thêm đoạn mã dưới đây vào trước thẻ ]]></b:skin> trong template của bạn.

#sidebar-wrapper{width:650px;height:360px;background:#f5f5f5;clear:both;margin:0 auto;overflow:hidden;}
.slide .widget{margin:0;padding:0 0 8px}
#featured{margin:0;padding:10px 10px 0;}
.sliderwrapper{height:300px;position:relative;overflow:hidden;-webkit-box-shadow:0 12px 12px rgba(0,0,0,0.7);-moz-box-shadow:0 12px 12px rgba(0,0,0,0.7);box-shadow:0 12px 12px rgba(0,0,0,0.7)}
.sliderwrapper .contentdiv{visibility:hidden;position:absolute;left:0;top:0;height:100%;padding:0}
.pagination{text-align:right;padding:15px 0 10px}
.pagination a{font-size:11px;color:#989898;background:#5e5e5e;text-shadow:0 2px 2px rgba(0,0,0,0.3);padding:3px 6px}
.pagination a:hover,.pagination a.selected{color:#000;background-color:#eaeaea}
.featuredPost{width:620px;background:#191919;filter:alpha(opacity=75);-moz-opacity:.75;opacity:.75;color:#dedde5;position:absolute;bottom:0;padding:10px 10px 0}
.featuredPost a{color:#fff}
.featuredPost a:hover{color:#dedde5}
.featuredPost h2{font-size:16px;line-height:1;margin:0}
.featuredPost span{font-size:11px}
.featuredPost p{font-size:12px}

- Bước 2: Thêm đoạn mã này vào trước thẻ </head>

<script>
//<![CDATA[
/* Script from:http://simplexdesign.blogspot.com/ */
imgr = new Array();
imgr[0] = "http://2.bp.blogspot.com/-uitX7ROPtTU/Tyv-G4NA_uI/AAAAAAAAFBY/NcWLPVnYEnU/s1600/no+image.jpg";
showRandomImg = true;
aBold = true;
summaryPost = 200;

numposts1 = 5;
label1 = "Love - Life";

function removeHtmlTag(strx,chop){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)}}s=s.join("");s=s.substring(0,chop-1);return s}

function showrecentposts1(json){j=(showRandomImg)?Math.floor((imgr.length+1)*Math.random()):0;img=new Array();for(var i=0;i<numposts1;i++){var entry=json.feed.entry[i];var posttitle=entry.title.$t;var pcm;var posturl;if(i==json.feed.entry.length)break;for(var k=0;k<entry.link.length;k++){if(entry.link[k].rel=='alternate'){posturl=entry.link[k].href;break}}for(var k=0;k<entry.link.length;k++){if(entry.link[k].rel=='replies'&&entry.link[k].type=='text/html'){pcm=entry.link[k].title.split("")[0];break}}

if ("content" in entry) {
var postcontent = entry.content.$t;}
else
if ("summary" in entry) {
var postcontent = entry.summary.$t;}
else var postcontent = "";
postdate = entry.published.$t;
if(j>imgr.length-1) j=0;
img[i] = imgr[j];
s = postcontent ; a = s.indexOf("<img"); b = s.indexOf("src=\"",a); c = s.indexOf("\"",b+5); d = s.substr(b+5,c-b-5);
if((a!=-1)&&(b!=-1)&&(c!=-1)&&(d!="")) img[i] = d;

var month=[1,2,3,4,5,6,7,8,9,10,11,12];var month2=["January","February","March","April","May","Juny","July","August","September","October","November","December"];var day=postdate.split("-")[2].substring(0,2);var m=postdate.split("-")[1];var y=postdate.split("-")[0];for(var u2=0;u2<month.length;u2++){if(parseInt(m)==month[u2]){m=month2[u2];break;
}}

var daystr = day+ ' ' + m + ' ' + y ;
var trtd = '<div class="contentdiv"><div class="sliderPostPhoto"><a href="'+posturl+'"><img width="650" height="350" class="alignnone" src="'+img[i]+'"/></a><div class="sliderPostInfo"></div></div><div class="featuredPost"><h2><a href="'+posturl+'">'+posttitle+'</a></h2><span>'+daystr+'</span><p>'+removeHtmlTag(postcontent,summaryPost)+'...</p></div></div>';
document.write(trtd);
j++;
}}
//]]>
</script>

- Bước 3: Bạn đặt đoạn mã này vào nơi mà bạn muốn hiển thị Slide:

<div id='sidebar-wrapper'>
<div id='featured'>
<div class='sliderwrapper' id='slider1'>
<script>
document.write("<script src=\"/feeds/posts/default/-/"+label1+"?max-results="+numposts1+"&orderby=published&alt=json-in-script&callback=showrecentposts1\"><\/script>");
</script>
</div>
<div class='pagination' id='paginate-slider1'>
</div>
</div>
</div>

- Bước 4: Tiếp tục, bạn thêm đoạn mã dưới đây vào trước thẻ </body>

<script src='http://kute999.googlecode.com/files/imageslider.js'/>
<script>
//<![CDATA[
featuredcontentslider.init({
id: "slider1", //id of main slider DIV
contentsource: ["inline", ""], //Valid values: ["inline", ""] or ["ajax", "path_to_file"]
toc: "#increment", //Valid values: "#increment", "markup", ["label1", "label2", etc]
nextprev: ["Previous", "Next"], //labels for "prev" and "next" links. Set to "" to hide.
enablefade: [true, 0.5], //[true/false, fadedegree]
autorotate: [true, 6000], //[true/false, pausetime]
onChange: function(previndex, curindex){ //event handler fired whenever script changes slide
//previndex holds index of last slide viewed b4 current (1=1st slide, 2nd=2nd etc)
//curindex holds index of currently shown slide (1=1st slide, 2nd=2nd etc)
}
})
//]]>
</script>

Bạn hãy chỉnh sửa CSS lại cho phù hợp với Blog của bạn nha. Chú ý các đoạn mã dưới đây:
showRandomImg = true; // Hiển thị ảnh ngẫu nhiên (true /false)
aBold = true; // In đậm (true /false)
summaryPost = 200; // Số ký tự tóm tắt của bài viết
numposts1 = 5; // Số bài viết hiển thị trên Slide
label1 = "Love - Life"; // Nhãn của bài viết muốn hiển thị trên Slide

Thế là bạn đã tạo được 1 Slide ảnh thật tuyệt cho blog bạn rồi nhé. Chúc các bạn ngày mới vui vẻ.
Read more…

Làm thế nào để in các bài viết trên Blogspot

8:07 PM |
Để thông báo cho độc giả của bạn rằng bài viết của bạn có thể được in có hiệu quả, có thể bạn sẽ muốn thêm một "In" liên kết bên dưới mỗi bài viết của bạn Blogger.
Thực hiện theo các bước sau đây:

1. Đăng nhập vào Bảng điều khiển Blogger.

2. Nhấp vào Thiết kế -> chỉnh sửa HTML -> bấm vào "Mở rộng Mẫu Tiện ích" và tìm kiếm thẻ
</head>

3. Thêm đoạn CSS này vào:
<style media='print' type='text/css'>
#header-wrapper, #header, .header, #sidebar-wrapper, .sidebar, #footer-wrapper, #footer, .date-header, .post-meta-data, .comment-link, .comment-footer, #blog-pager, #backlinks-container, #navbar-section, .subscribe_notice, .noprint {display: none;}
#main-wrapper {width: 95%}
</style>
4. Bây giờ tìm kiếm các mã này:
<p><data:post.body/></p> 
5. Ngay sau dòng mã này hoặc bất kỳ chỗ nào bạn muốn, dán dòng mã sau đây:
<b:if cond='data:blog.pageType == "item"'>
<a href='javascript:window.print()'>Print this post</a>
</b:if>
hoặc
<b:if cond='data:blog.pageType == "item"'>
<a href='javascript:window.print()'><img src='http://i534.photobucket.com/albums/ee345/o0okokojumbo/print.gif' border='0'/></a>
</b:if>
6. Lưu Bản mẫu.

Nếu bạn cần trợ giúp, hãy để lại lời nhắn bên dưới, mình sẽ hỗ trợ cho bạn.

Read more…

Làm hiệu ứng tuyết rơi trên blog

11:44 PM |

Với thủ thuật nhỏ này sẽ trang trí cho blog của bạn thật đẹp mắt với hiệu ứng tuyết rơi vào mùa đông nè.
Các bạn chỉ cần copy code này và dán vào chỗ thẻ </body> hoặc bạn có thể thêm 1 wiget HTML/Javascript và dán code này vào là được.

<script type='text/javascript'>
//<![CDATA[
var snowmax=100
var snowcolor=new Array("#f2f8fa","#eff5f7","#dcedf1","#ffffff")
var snowtype=new Array("Times","Arial","Times","Verdana")
var snowletter="*"
var sinkspeed=0.6
var snowmaxsize=30
var snowminsize=10
// Set 1 for all-over-snowing, set 2 for left-side-snowing
// Set 3 for center-snowing, set 4 for right-side-snowing
var snowingzone=1

// Do not edit below this line
var snow=new Array()
var marginbottom
var marginright
var timer
var i_snow=0
var x_mv=new Array();
var crds=new Array();
var lftrght=new Array();
var browserinfos=navigator.userAgent
var ie5=document.all&&document.getElementById&&!browserinfos.match(/Opera/)
var ns6=document.getElementById&&!document.all
var opera=browserinfos.match(/Opera/)
var browserok=ie5||ns6||opera

function randommaker(range) {
rand=Math.floor(range*Math.random())
return rand
}
function initsnow() {
if (ie5 || opera) {
marginbottom = document.body.scrollHeight
marginright = document.body.clientWidth-15
}
else if (ns6) {
marginbottom = document.body.scrollHeight
marginright = window.innerWidth-15
}
var snowsizerange=snowmaxsize-snowminsize
for (i=0;i<=snowmax;i++) {
crds[i] = 0;
lftrght[i] = Math.random()*15;
x_mv[i] = 0.03 + Math.random()/10;
snow[i]=document.getElementById("s"+i)
snow[i].style.fontFamily=snowtype[randommaker(snowtype.length)]
snow[i].size=randommaker(snowsizerange)+snowminsize
snow[i].style.fontSize=snow[i].size+'px';
snow[i].style.color=snowcolor[randommaker(snowcolor.length)]
snow[i].style.zIndex=1000
snow[i].sink=sinkspeed*snow[i].size/5
if (snowingzone==1) {snow[i].posx=randommaker(marginright-snow[i].size)}
if (snowingzone==2) {snow[i].posx=randommaker(marginright/2-snow[i].size)}
if (snowingzone==3) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/4}
if (snowingzone==4) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/2}
snow[i].posy=randommaker(2*marginbottom-marginbottom-2*snow[i].size)
snow[i].style.left=snow[i].posx+'px';
snow[i].style.top=snow[i].posy+'px';
}
movesnow()
}

function movesnow() {
for (i=0;i<=snowmax;i++) {
crds[i] += x_mv[i];
snow[i].posy+=snow[i].sink
snow[i].style.left=snow[i].posx+lftrght[i]*Math.sin(crds[i])+'px';
snow[i].style.top=snow[i].posy+'px';

if (snow[i].posy>=marginbottom-2*snow[i].size || parseInt(snow[i].style.left)>(marginright-3*lftrght[i])){
if (snowingzone==1) {snow[i].posx=randommaker(marginright-snow[i].size)}
if (snowingzone==2) {snow[i].posx=randommaker(marginright/2-snow[i].size)}
if (snowingzone==3) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/4}
if (snowingzone==4) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/2}
snow[i].posy=0
}
}
var timer=setTimeout("movesnow()",50)
}

for (i=0;i<=snowmax;i++) {
document.write("<span id='s"+i+"' style='position:absolute;top:-"+snowmaxsize+"'>"+snowletter+"</span>")
}
if (browserok) {
window.onload=initsnow
}

//]]>
</script>

Chúc các bạn vui vẻ với thủ thuật nhỏ này.
Read more…

Trang trí blog bạn trong mùa giáng sinh

11:43 PM |

Bạn sẽ trang trí blog của bạn như thế nào để đón giáng sinh?

Có lẽ các bạn sẽ có nhiều cách khác nhau để trang trí blog của bạn đẹp hơn trong mùa Giáng Sinh. Ở đây mình có một thủ thuật nhỏ là sẽ trang trí cho blog của bạn 2 cái chuông giáng sinh thật đẹp ở phía trên cùng của blog.

Các bạn hãy thêm 1 widget HTML/Javascript.Hiệu chỉnh Tiêu đề và dán đoạn mã dưới đây vào phần Nội dung rồi chọn LƯU nha.
Hoặc bạn có thể thêm nó vào trước thẻ </body>.

Hiển thị cả 2 cái chuông bên phía trên góc trái và phải:
<img src="http://2.bp.blogspot.com/_u4gySN2ZgqE/TQ-G1GVAD3I/AAAAAAAABtw/doqIyU32ngs/s1600/christmas-bells-icon.png" style="position:fixed; top: 0px;left:0px;border:none;z-index:5;"/>
<img src="http://3.bp.blogspot.com/_u4gySN2ZgqE/TQ-SkcTSrTI/AAAAAAAABt4/Qqpj5MR3tU8/s1600/christmas-bells-icon-right.png" style="position:fixed; top: 0px;right:0px;border:none;z-index:5;"/>
<img style="position:fixed;z-index:9999;top:0;left:0" src="http://2.bp.blogspot.com/-MJwZ9ghE7xs/UNGCCzjn3CI/AAAAAAAACnY/Dl386KqhKy8/s1600/noel-top-left.png"/>
<img style="position:fixed;z-index:9999;top:0;right:0" src="http://4.bp.blogspot.com/-HsRS8P_Kb3E/UNGCDqVGwBI/AAAAAAAACnk/zAc1zF-ZAy8/s1600/noel-top-right.png"/>

Chúc các bạn có một mùa Giáng Sinh an lành và hạnh phúc bên gia đình nha.
Read more…

Script Định Dạng Target = _blank Cho Các Link Ngoài

11:38 PM |
Trong một website hay blog đương nhiên sẽ có ít hoặc nhiều link liên kết tới các site bên ngoài. Và thường để người đọc không rời khỏi trang của bạn sau khi đã click vào link ra ngoài đó, bạn chọn cách đặt target=_blank vào link đó trong bài viết hoặc trong sườn. Tuy nhiên việc làm đó hơi cực nếu như bài nào bạn cũng làm thế thì rất mất thời gian và công sức!


Đoạn script dưới đây có khả năng nhận dạng các link địa chỉ mà ta không muốn cho khách rời khỏi sau khi click vào đó. Nó sẽ tự động cho target=_blank đối với các trang không có trong danh sách.

<script type='text/javascript'>
//<![CDATA[
function changetargetlink(x){
var a = document.getElementsByTagName('a');
var args = changetargetlink.arguments;
for(var i in a){
a[i].target = "_blank";
a[i].rel = "_blank";
for(var j=0;j<args.length;j++){
if(a[i].href.match(args[j])){
a[i].target = "";
a[i].rel = "";
}}}}
changetargetlink('http://yeah-vn.blogspot.com','yeah-vn.blogspot.com');
//]]></script>

Đặt đoạn code trên vào ngay trên thẻ đóng </body> của trang bạn. Chú ý dòng đã được đánh dấu: http://yeah-vn.blogspot.com có nghĩa là những trang sẽ không mở ở dạng _blank (new tab). Bạn có thể thêm hoặc bớt tùy ý vài địa chỉ nữa như sau:

changetargetlink
('http://yeah-vn.blogspot.com','abc.com','cde.com','....');

Thông thường thì ta sẽ đặt các link cho trang của ta sẽ không mở new tab, còn lại tất cả các trang khác sẽ mở ở new tab, như thế ta sẽ chỉ đặt 1 giá trị cho nó nhẹ:

changetargetlink('http://yeah-vn.blogspot.com');

Hy vọng là script nhỏ này sẽ giúp bạn bớt chút công sức về đặt target cho link của bài viết.
Read more…

Gỡ bỏ dòng Subscribe to: Post (Atom) cho Blogger

11:35 PM |
Nếu bạn thấy dòng liên kết "Đăng ký: Đăng Nhận xét (Atom)" (tiếng Anh: Subscribe to: Posts (Atom)) trong Blogger không cần thiết và làm mất thẩm mỹ, bạn có thể bỏ dòng chữ này bằng 2 cách. Bạn hãy chọn cách thích hợp để thực hiện.


Hướng dẫn

- Bạn vào Thiết kế, chọn Chỉnh sửa HTML, check vào ô Mở rộng mẫu tiện ích.

- Tiếp theo, bạn chỉ cần thực hiện 1 trong 2 cách bên dưới:

Cách 1:

Bấm Ctrl+F để tìm Mã:

]]></b:skin>

Bạn chèn đoạn mã dưới này vào trước ]]></b:skin>:

.feed-links{display:none !important;}

Cách 2:

Bấm Ctrl+F để tìm và xóa mã dưới này:

<b:include data='feedLinks' name='feedLinksBody'/>

- Lưu mẫu để hoàn thành.

Chúc các bạn thành công!
Read more…

Các Thuộc Tính Của Margin

11:21 PM |
Thuộc tính margin sẽ định nghĩa khoảng trắng bao quanh một phần tử HTML. Nó có thể dùng giá trị âm để lồng nội dung vào với nhau. Tương ứng với 4 phía của một phần tử chúng ta có 4 thuộc tính tương ứng. Mặt khác để viết cho gọn chúng ta cũng có thể dùng cách viết giản lược để định nghĩa các giá trị cho thuộc tính margin.

Tương ứng với 4 phía ta có 4 thuộc tính:
margin-top:
margin-right:
margin-bottom:
margin-left:
Để cho gọn chúng ta cũng có thể việt thuộc tính margin dưới dạng shorthand:
div.margin {
margin: 10px 4px 5px 9px; /* top | right | bottom | left*/
}

margin: ALL;
margin: TOPANDBOTTOM LEFTANDRIGHT;
margin: TOP LEFTANDRIGHT BOTTOM;
margin: TOP RIGHT BOTTOM LEFT;

Có nghĩa là nếu sử dụng cái margin: 0 auto; => Top và bottom = 0 , left và right sẽ do browser tự điều chỉnh
Read more…

How to display HTML Code in blogger post

5:30 AM |

CharactersEntity
(
Name Code)
Entity
(Number Code)
Remarks
<&lt;&#60;less-than sign
>&gt;&#62;greater-than sign
&&amp;&#38;and
&quot;&#34;Double quote
±&plusmn;&#177;Plus minus sign
Space&nbsp;&#160;nonbreaking space
©&copy;&#169;copyright
®&reg;&#174;Registered


Read more…

How To Setup Google Apps On Your Website

5:32 AM |
Google Apps is a service from Google for using Google products like mail, docs, calendar etc on your domain name.Google Apps has a free version and you cansignup for that and get the Google products at your domain name. You will get a GMail interface for email handling on your domain. You will be able to use this custom email addresse(yourname@yourdomain.com) on Google Talk or any other Jabber Client.If you bought a Custom Domain from Blogger,then you have already created the Google Appsaccount and so you can ignore this tutorial.


SIGNING UP FOR THE FREE VERSION OF GOOGLE APPS

1. Go to this link http://www.google.com/a/cpanel/domain/new and signup for Google Apps
google-apps
2.When you finish the Signup Process, you will be taken to the Google Apps Dashboard and you will be asked to verify your Domain Ownership.
google-apps-verify-domain-ownership
Choose the method which is appropriate for you. If you are using a Self hosted website, then the HTML File upload method may be easier for you. If you are using a Blogger Custom domain, then you will have to do the CNAME based verification
If you are on a Blogger Custom Domain, you will have to create the verification CNAME from your Domain Control Panel. If you have a self hosted website and you opted for the CNAME based Verification, then make a support ticket with your webhost asking them to create the CNAME for you(that is why the file upload method might be easier for you). Once they have created the CNAME(or you uploaded the file as per the instructions), you can verify your domain ownership.
3.If you already using mail accounts on your host, then make the same accounts again onGoogle APPs. eg: If you are already using an email account (aneesh@yourdomain.com), then make the same user account(Create new Users link) on Google Apps
create-accounts
create-user
Create Accounts for each of your existing @domain email addresses.
4.Now Activate email from your Google APPs Dashboard. Make sure that you have completed Step 3 before doing this.
activate-email
5.You will see some instructions to Create MX Records. If you are using a CPanel Hosting, then login to your CPanel and Click on MX Entry under Email
cpanel-email
Select the Domain of your choice from the Dropdown and delete all existing MX Records for that domain. Add these 5 MX records
PriorityDestination
10ASPMX.L.GOOGLE.COM
20ALT1.ASPMX.L.GOOGLE.COM
20ALT2.ASPMX.L.GOOGLE.COM
30ASPMX2.GOOGLEMAIL.COM
30ASPMX3.GOOGLEMAIL.COM
The Final CPanel MX records will look like
cpanel-email-config
If you are using a Blogger Custom Domain, then you will have to Create these MX entries from your Domain Control Panel. Godaddy provides an automatic configuration tool to create these 5 MX Records.For other Domain Registrars follow the instructions provided in the Activate Email page of Google APPs. Once you are done with creating the MX records Click “I have completed these Steps
image
6.Now you have configured your email. You can now access your email athttp://mail.google.com/a/yourdomain.com . If you want to use a custom url, then you will have to create a corresponding CNAME record. For example if you wish to access your mail at mail.yourdomain.com , then you will have to create a CNAME for mail pointing to ghs.google.com . You can Change to a custom url from the Email Settings in Google Apps Dashboard .Similarly you can assign custom urls to the other Google Apps like Sites and Docs after activating them.

 Bloggerplugins.org
Read more…

QC trai

Bài Ngẫu Nhiên

POPUP