Features Title Here. Consectetur adipisicing elit sed

Features Content Here. Sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

[Thủ thuật Blogspot] Tự động tạo liên kết trong cho blogspot [tự động bắt link]

Thứ Sáu, 4 tháng 10, 2013

[Thủ thuật Blogspot] Tự động tạo liên kết trong cho blogspot (tự động bắt link )


Liên kết trong là liên kết giữa các bài viết trên website thông qua các từ khóa. Liên kết trong giúp tăng thời gian lưu lại trên web của người đọc, giúp cải thiện SEO on page và có thể kiếm tiền từ textlinks với adf.ly.

Để tạo khả năng tự động bắt link có thêm nhiều liên kết trong cho blogspot bạn có thể làm :

Bước 1: Bạn vào Mẫu => Chỉnh sửa HTML => Chọn Mở rộng Mẫu Tiện ích.

Bước 2 : Thêm mã sau vào trước thẻ </head>

<script type='text/javascript'>//<![CDATA[function doHighlight(a,c,f){for(var d="",b=-1,g=c.toLowerCase(),e=a.toLowerCase();0<a.length;)b=e.indexOf(g,b+1),0>b?(d+=a,a=""):a.lastIndexOf(">",b)>=a.lastIndexOf("<",b)&&e.lastIndexOf("/script>",b)>=e.lastIndexOf("<script",b)&&(d+=a.substring(0,b)+'<a title="'+a.substr(b,c.length)+'" alt="'+a.substr(b,c.length)+'" href="'+f+'">'+
a.substr(b,c.length)+"</a>",a=a.substr(b+c.length),e=a.toLowerCase(),b=-1);return d} function highlightSearchTerms(a,c,f,d){searchArray=c?[a]:a.split(" ");
div=document.getElementById(d);a=div.innerHTML;
for(c=0;c<searchArray.length;c++)a=doHighlight(a,searchArray[c],f);div.innerHTML=a;return!0};//]]>
</script>


Bước 3: Tìm dòng và thay thế: <data:post.body/>

Bằng đoạn code sau :

<div expr:id='"summary" + data:post.id'><data:post.body/></div><!-- textlink --><script type='text/javascript'>highlightSearchTerms('lập trình',true,'http://adf.ly/T2dpC','summary<data:post.id/>');highlightSearchTerms('tài liệu',true,'http://adf.ly/PfKy3','summary<data:post.id/>');
highlightSearchTerms('ICT',true,'http://adf.ly/PfKy3','summary<data:post.id/>');highlightSearchTerms('kiếm tiền',true,'http://adf.ly/PfJrE','summary<data:post.id/>');
highlightSearchTerms('lập trình C',true,'http://adf.ly/T2dpC','summary<data:post.id/>');highlightSearchTerms('C++',true,'http://adf.ly/T2dpC ','summary<data:post.id/>');highlightSearchTerms('Java',true,'http://adf.ly/T2dpC ','summary<data:post.id/>');highlightSearchTerms('PHP',true,'http://adf.ly/T2dpC ','summary<data:post.id/>');highlightSearchTerms('C#',true,'http://adf.ly/T2dpC ','summary<data:post.id/>');highlightSearchTerms('ASP.Net',true,'http://adf.ly/T2dpC ','summary<data:post.id/>');highlightSearchTerms('Android',true,'http://adf.ly/T2dpC ','summary<data:post.id/>');highlightSearchTerms('VB',true,'http://adf.ly/T2dpC ','summary<data:post.id/>');highlightSearchTerms('CSS',true,'http://adf.ly/T2dpC ','summary<data:post.id/>');highlightSearchTerms('js',true,'http://adf.ly/T2dpC ','summary<data:post.id/>');highlightSearchTerms('Assembly',true,'http://adf.ly/T2dpC','summary<data:post.id/>');
highlightSearchTerms('Programming',true,'http://adf.ly/T2dpC','summary<data:post.id/>');
highlightSearchTerms('J2ME',true,'http://adf.ly/T2dpC','summary<data:post.id/>');
highlightSearchTerms('J2EE',true,'http://adf.ly/T2dpC','summary
<data:post.id/>');highlightSearchTerms('code',true,'http://adf.ly/T2dpC','summary<data:post.id/>');
highlightSearchTerms('tool',true,' http://adf.ly/WceeG','summary<data:post.id/>');highlightSearchTerms('công cụ',true,' http://adf.ly/WceeG ','summary<data:post.id/>');</script>

Lưu ý: Mỗi dòng highlighSearchTerms là một textlink ứng với cụm từ mà bạn muốn đặt textlink.

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


[http://kiem-tien-online-tai-nha.blogspot.com]

0 nhận xét:

Đăng nhận xét