{PHẦN MỀM - TOOLS MIỄN PHÍ}

Friday, October 4, 2013

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

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>
>>> Download code tại đây.

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!

1 comments:

  1. Cảm ơn bạn đã chia sẻ thông tin !
    ......................................
    LAPTOP ĐẠI DƯƠNG
    118/17 Trần Quang Diệu, P.14, Q.3, HCM
    Hotline: 0906.112.812 - 0909730124 (A MINH)
    Click xem chi tiết:
    hoặc Thu mua laptop cu gia cao tai tphcm

    Click xem chi tiết: Thu mua laptop cũ giá cao tại TPHCM hoặc Thu mua laptop cu gia cao tai tphcm

    ReplyDelete

 
Copyright © . TẢI PHẦN MỀM, ỨNG DỤNG - Posts · Comments
Theme Template by BTDesigner · Powered by Blogger