Hôm nay mình xin hướng dẫn các bạn đoạn code mình sữ dụng cho AUTO LINK như mình đang dùng ở đây :D rất tiện cho các bạn nhưng khổ một điều đó là thêm từng link một rất bất tiện cho các bạn. Full template cho các bạn check thử nhé. Các bạn cũng lưu ý luôn đây là template blogger nhé :D chứ không phải Javascript bình thường nhé ^^
<?xml version="1.0" encoding="UTF-8" ?>
<html xmlns='http://www.w3.org/1999/xhtml' xmlns:b='http://www.google.com/2005/gml/b' xmlns:data='http://www.google.com/2005/gml/data' xmlns:expr='http://www.google.com/2005/gml/expr'>
<head>
<b:include data='blog' name='all-head-content'/>
<b:if cond='data:blog.pageTitle == data:blog.title'>
<title><data:blog.pageTitle/></title>
<b:else/>
<title><data:blog.pageName/> | <data:blog.title/></title>
</b:if>
<!-- / All In One Seo Pack by http://bloggersviet.blogspot.com/ -->
<b:if cond='data:blog.metaDescription != ""'>
<meta expr:content='data:blog.metaDescription' name='description'/>
<meta expr:content='data:blog.pageName' name='description'/>
</b:if>
<b:if cond='data:blog.pageType == "archive"'>
<meta content='noindex, nofollow' name='robots'/>
<b:else/>
<b:if cond='data:blog.pageType == "index"'>
<b:if cond='data:blog.url == data:blog.homepageUrl'>
<meta expr:content='data:blog.metaDescription' name='keywords'/>
<meta content='index, follow' name='robots'/>
</b:if> <b:else/>
<b:if cond='data:blog.pageTitle != data:blog.title'>
<meta expr:content='data:blog.metaDescription' name='keywords'/>
</b:if></b:if>
<!-- / All In One Seo by http://bloggersviet.blogspot.com/ -->
<meta content='index, follow' name='robots'/>
<meta content='global' name='distribution'/>
<meta content='6 days' name='revisit'/>
<meta content='6 days' name='revisit-after'/>
<meta content='document' name='resource-type'/>
<meta content='all' name='audience'/>
<meta content='general' name='rating'/>
<meta content='all' name='robots'/>
<meta content='vi-vn' name='language'/>
<meta content='VietNam' name='country'/>
<link href='https://plus.google.com/+VănHùngvn/about' rel='author'/>
<link href='https://plus.google.com/+VănHùngvn/posts' rel='publisher'/></b:if>
<!-- / All In One Seo Pack Blogger SEO Plugin by http://bloggersviet.blogspot.com/ -->
<b:skin><![CDATA[
/*
Gửi đến các bố RIP code. Cái code nó đơn giản chả có gì khó khăn với mấy bố.
Nên mong mấy bố có RIP thì để lại cho em cái nguồn. Mất công em design Ạ
info: BomKhung.Com
Flatform Type: Blogger
Facebook: http://link.vnsys.info/go/fb
Twitter : http://link.vnsys.info/go/twitter
GooglePlus: http://link.vnsys.info/go/gplus
*/
::-webkit-scrollbar {
-webkit-appearance: none;
width: 7px;
}
::-webkit-scrollbar-thumb {
border-radius: 4px;
background-color: rgba(0,0,0,.5);
-webkit-box-shadow: 0 0 1px rgba(255,255,255,.5);
}
body {
background: #000 url(http://nuocnangluong.com.vn/home_files/green-background-pictures-17225-17781-hd-wallpapers.jpg) fixed bottom center no-repeat;
margin:0;
color:#FFFFFF;
font:x-small Georgia Serif;
font-size:14px;
text-align: center;
font-family: 'Arial','Open Sans',sans-serif;
font-size: 17px;
}
]]></b:skin>
<style>
.info, .tips, .warning {
line-height: 22px;
min-height: 38px;
padding-left: 10px;
padding: 10px 12px 12px 68px;
margin: 5px 0;
}
.info {
background: #e0e5eb url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJaaY3Ina-_HI_dalXGoDB5r47NXoekBXasG_fpYhUuhD4EGuTN73xiBOxcXmRO4aLFAcmWNWT4Ws-B4xbQUcsFSwhT67Bo5_GDNXQMauenxthbKdYRuuEo-k2pMvGN6AtMikvwa0YZb0/s1600/info.png') no-repeat 12px 8px;
color: #222
}
.tips {
background: #3B5998 url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1Rr5xEIljnAfEjHikMqFTOY99c-cebCQ0uWdsdQJm23NQtpkYYofdUV_631TVSvi8XZ1-fM4IleEDMpmG_hl2hlfNEf0S15VfHe_rIReu21KVFj6UFrYxUQWTes2mDU4hAEaTtg9Ahjo/s1600/tips.png') no-repeat 12px 8px;
color: #fff;
width:500px;
margin:auto;
}
.warning {
background: #db6161 url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5fBjFzudfWhGsaaex_L_BubFomXiMc5vueSyC4NBsEDiXf93O70HCJMOTBCPE_Sk80fWvNdz5rLtoKZaDrOObBXhHDxqquEXFDDm1mLkrDj3PBSTtEaU0dcgIcV6fq_SpiBy0BjMPgrk/s1600/warning.png') no-repeat 12px 8px;
color: #fff;
width:500px;
margin:auto;
}
.button{
background:#efefef;
border:1px solid #ddd;
margin:0 auto;
padding:5px 18px;
font:14px Arial;
font-weight:700;
color:#333;
text-align:center;
display:inline-block;
border-radius:3px;
cursor:pointer;
}
a:link {
text-decoration: underline;
}
a:visited {
text-decoration: underline;
}
a:hover {
text-decoration: underline;
}
a:active {
text-decoration: underline;
}
</style>
</head>
<!-- Don't Ctrl + U and right -->
<script type='text/javascript'>
document.onkeydown = function (cc) {
if(cc.which == 85){
return false;
}
if(cc.which == 80){
return false;
}
}
</script>
<body oncontextmenu='return false;'>
<b:section class='main' id='main' showaddelement='yes'/>
<!-- Please Keep The Credits -->
<b:if cond='data:blog.url == data:blog.homepageUrl'>
<script type='text/javascript'>
var d='<data:blog.url/>';
d=d.replace(/.*\/\/[^\/]*/, '');
location.href = 'http://www.bomkhung.net';
</script>
<!--
<center>
<img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGIHQfI6hnAJ37qoZ-BFbKnckIW_K8RgBVd7gmgmrUEzcDfE0qdJ6avK8mh2gO4p61oFTDFyIqjv4D8LRNeHlhLe5pOvRBP9NzU1OpHmBSB8ctQGVOQUDfoEfKszrwmTuIo1n2DqmUI8s/s1600/404+error+page+1.jpg'/>
<h3>Your requested page was not found</h3>
<p>Sorry, we cannot find the page that you are looking for. It might have been removed, had its name changed, or is temporarily unavailable.<br/>
Please check that the Web site address is spelled correctly.</p>
<a class='button' href='http://link.vnsys.info/go/trangchu'>Go Home</a>
</center> -->
<b:else/>
<!-- Chuyển hướng Link -->
<script language='javascript'>
//<![CDATA[
var key = window.location.href.split("go/")[1].replace("/","")
var urls={
'fb':'https://www.facebook.com/vietnamios',
'gplus':"https://plus.google.com/+VănHùngvn",
'trangchu':'http://www.bomkhung.com',
'zalo':'https://dl.dropboxusercontent.com/u/114501587/com.zing.zalp.apk',
'twitter':"https://twitter.com/timcancoem92",
'iblogclean-demo':'http://iblogclean.blogspot.com/',
'iblogclean-download':'https://www.dropbox.com/s/i9dcydvqa4jy98x/iBlogclean%20Responsive%20Blogger%20Templates.rar?dl=0',
'jalantikus-demo':'http://themejalantikus.blogspot.com/',
'jalantikus-download':'https://www.dropbox.com/s/ytgqdjgtz839tsn/JalanTikus%20Responsive%20Blogger%20Templates.rar?dl=0',
'viennamag-demo':'http://anotherpulse.blogspot.com/',
'viennamag-download':'https://www.dropbox.com/s/izqbysfkb1pntp7/Vienna%20Mag%20Responsive%20Magazine%20Templates.rar?dl=0',
'bloggingtem-demo':'http://blogging-soratemplates.blogspot.com/',
'bloggingtem-download':'https://www.dropbox.com/s/8ztq77w1r1pcy6p/Blogging%20Blogger%20Templates.rar?dl=0',
'charitymag-demo':'http://charityblogtheme.blogspot.com/',
'charitymag-download':'https://www.dropbox.com/s/tv1x7gx5szkl9h5/Charity%20Mag%20Blogger%20Templates.rar?dl=0',
'tailieuvn-download':'https://drive.google.com/file/d/0B1QXA5e3bnBlM2Z4R3dOb1lxM2c/view?usp=sharing',
'Viennalite-demo':'http://femart86.blogspot.com/',
'Viennalite-download':'https://www.dropbox.com/s/usq1pl6s4cgapjt/Vienna%20Lite%20Responsive%20Blogger%20Templates.rar?dl=0',
'personal-demo':'http://personal-ar-themes.blogspot.com/',
'personal-download':'https://www.dropbox.com/s/5nyjiwxb6ac6r12/Personal%20Responsive%20Blogger%20Templates.rar?dl=0',
'TwitterViewer':'https://drive.google.com/file/d/0B1QXA5e3bnBlNGNNUk56RHczQnc/view?usp=sharing',
'FBSpamWall':'https://drive.google.com/file/d/0B1QXA5e3bnBlWHV0YUxFZnZPMUk/view?usp=sharing',
'subfeed':'http://feedly.com/i/subscription/feed/http://feeds.feedburner.com/bomkhungblogger',
'subemail':'https://feedburner.google.com/fb/a/mailverify?uri=bomkhungblogger&loc=en_US',
'pagebomkhung':'http://facebook.com/bomkhungblogger',
'VIPHDViet-download':'https://drive.google.com/file/d/0B1QXA5e3bnBlQ1hsSlVlZFRuOG8/view?usp=sharing' ,
'freessl':'https://drive.google.com/file/d/0B-1Mm6WAgxkfLWpwZW5mZ3QtWWc/view?usp=docslist_api' ,
'gossy':'http://glossy-soratemplates.blogspot.com.br/' ,
'download-gossy':'https://app.box.com/s/pnzmx6o3d6kevf839xj1kjeflps6wmy3' ,
'borno':'http://borneonotes.blogspot.co.id/',
'download-borno':'https://drive.google.com/file/d/0B-1Mm6WAgxkfZDhkRnNTQm1NZE0/view?usp=docslist_api',
'tendo':'http://tendotemplate.blogspot.co.id/',
'download-tendopro':'https://drive.google.com/file/d/0B-1Mm6WAgxkfMVBuMGd3Rm92ZlU/view?usp=docslist_api' ,
'magone':'http://magonedemo.blogspot.com/',
'bomkhung':'http://blog.bomkhung.net/',
'buymagone':'https://drive.google.com/file/d/0B9G76NVvuRo-N09jLWVpYUNvNUE/view'
/* Add Thêm dữ liệu nếu cần - AutoLinkSever1*/
}
if(key){
if(urls[key]){
window.location.href=urls[key]
}else{
document.write("<center><br/><br/><h1>Your requested page was not found</h1><p>Sorry, we cannot find the page that you are looking for. It might have been removed, had its name changed, or is temporarily unavailable<br/>Please check that the Web site address is spelled correctly.</p><a class='button' href='http://link.bomkhung.com/gchu'>Go Home</a></center>")
}
}
/* document.write("<div class='warning'>Link ref <b>"+key+"</b> Không còn trong dữ liệu <br/>Chúng tôi rất tiếc link bạn tìm không tồn tại hoặc đã bị xóa khỏi hệ thống !<br/><br/> <a class='button' href='http://link.vnsys.info/go/trangchu'>Trở Về Trang Chủ</a></div>");
*/
//]]>
</script>
</b:if>
</body>
</html>
Các bạn nên lưu ý những phần mình bôi đỏ nhé :D đó là phần mình cần thay thế cho phù hợp :D
Post a Comment
+ Hiện tại HungCoder.Com đang cập nhật giao diện cho trang blog này. Nên sẽ có một số lỗi xãy ra khi các bạn xem blog này.