Related Post Keren..! |
Related Post ini selain menggunakan thumbnail juga memakai style Marquee plus toolltip, widget ini juga dapat bergulir (berjalan) dan bergerak jauh sisi ke sisi, dan uniknya adalah judul posting akan muncul pada tooltip.
Silahkan lihat demo di sini .
langkah-langkah Pembuatan:
1. Login ke akun blog sahabat, lalu pilih Rancangan.
2. Pilih Edit HTML, backup template anda terlebih dahulu, jaga-jaga kalau terjadi erorr
3. Centang pada Expand Widget Templates
3. Centang pada Expand Widget Templates
4. Cari kode </head>, untuk memudahkan gunakan Ctrl F
5. Simpan Kode dibawah ini, diatas kode yang tadi, kode </head>
<b:if cond='data:blog.pageType == "item"'>
<style type='text/css'>
#related-posts {float:center;height:100%;min-height:100%;padding-top:5px;padding-left:5px;}
#related-posts h2{font-size: 1.6em;font-weight: bold;color:#000;font-family:Arial, Georgia;margin-bottom:0.75em;margin-top: 0em;padding-top: 0em;}
#related-posts a{-webkit-transition: background 1s ease, color 1s ease;-moz-transition: background 1s ease, color 1s ease;-o-transition: background 1s ease, color 1s ease;}
#related-posts a:hover{background-color:#d4eaf2;-webkit-transition: background 1s ease, color 1s ease;-moz-transition:background 1s ease, color 1s ease;-o-transition:background 1s ease, color 1s ease;-webkit-border-radius: 5px;-moz-border-radius:5px;border-radius:5px;-o-border-radius:5px;}
.tooltip{width: 115px; color:#000;font:lighter 12px/1.3 Arial,sans-serif;text-decoration:none;text-align:left}
.tooltip span.top{padding:20px 5px 0;background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIz32ee_bwDkWPBalCHaWGZ5XQtIbR3aKO9UO1CKkYWyB6JngQSnvF5TGXqi7gIZjoW0lUGsnSNw1IGcRUrIPm9z0jyfAEfBO0T5I9yEPIF97JXYJko7tJ7FJYweRIVkk1SrvIIrsT3Nk/s1600/bt.png) no-repeat top;}
.tooltip b.bottom{padding:2px 5px 6px;color:#548912;background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIz32ee_bwDkWPBalCHaWGZ5XQtIbR3aKO9UO1CKkYWyB6JngQSnvF5TGXqi7gIZjoW0lUGsnSNw1IGcRUrIPm9z0jyfAEfBO0T5I9yEPIF97JXYJko7tJ7FJYweRIVkk1SrvIIrsT3Nk/s1600/bt.png) no-repeat bottom;}
</style>
<script type='text/javascript'>window.onload=function(){enableTooltips("calcList")};imgBT=new Image();imgBT.src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBFdlCpa326Zj21XCtGjfKpVuyWLRf6NQab1lAmjh4lryyfE1V4kbBVdukDS8y4CFYUODiVSCthm5VeBGx2QLC9lrzX33ZrmxhaOHFtBIFij0dLPMkw6scM5AfsO_HGB2UcBQVi4vhKvI/s1600/noimage.jpg';</script>
<script src='http://dvslabs.googlecode.com/files/rp-bubbled-thumbnails.js' type='text/javascript'></script>
</b:if>
6. Selanjutnya, cari kode <div class='post-footer-line post-footer-line-1'> atau <p class='post-footer-line post-footer-line-1'><style type='text/css'>
#related-posts {float:center;height:100%;min-height:100%;padding-top:5px;padding-left:5px;}
#related-posts h2{font-size: 1.6em;font-weight: bold;color:#000;font-family:Arial, Georgia;margin-bottom:0.75em;margin-top: 0em;padding-top: 0em;}
#related-posts a{-webkit-transition: background 1s ease, color 1s ease;-moz-transition: background 1s ease, color 1s ease;-o-transition: background 1s ease, color 1s ease;}
#related-posts a:hover{background-color:#d4eaf2;-webkit-transition: background 1s ease, color 1s ease;-moz-transition:background 1s ease, color 1s ease;-o-transition:background 1s ease, color 1s ease;-webkit-border-radius: 5px;-moz-border-radius:5px;border-radius:5px;-o-border-radius:5px;}
.tooltip{width: 115px; color:#000;font:lighter 12px/1.3 Arial,sans-serif;text-decoration:none;text-align:left}
.tooltip span.top{padding:20px 5px 0;background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIz32ee_bwDkWPBalCHaWGZ5XQtIbR3aKO9UO1CKkYWyB6JngQSnvF5TGXqi7gIZjoW0lUGsnSNw1IGcRUrIPm9z0jyfAEfBO0T5I9yEPIF97JXYJko7tJ7FJYweRIVkk1SrvIIrsT3Nk/s1600/bt.png) no-repeat top;}
.tooltip b.bottom{padding:2px 5px 6px;color:#548912;background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIz32ee_bwDkWPBalCHaWGZ5XQtIbR3aKO9UO1CKkYWyB6JngQSnvF5TGXqi7gIZjoW0lUGsnSNw1IGcRUrIPm9z0jyfAEfBO0T5I9yEPIF97JXYJko7tJ7FJYweRIVkk1SrvIIrsT3Nk/s1600/bt.png) no-repeat bottom;}
</style>
<script type='text/javascript'>window.onload=function(){enableTooltips("calcList")};imgBT=new Image();imgBT.src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBFdlCpa326Zj21XCtGjfKpVuyWLRf6NQab1lAmjh4lryyfE1V4kbBVdukDS8y4CFYUODiVSCthm5VeBGx2QLC9lrzX33ZrmxhaOHFtBIFij0dLPMkw6scM5AfsO_HGB2UcBQVi4vhKvI/s1600/noimage.jpg';</script>
<script src='http://dvslabs.googlecode.com/files/rp-bubbled-thumbnails.js' type='text/javascript'></script>
</b:if>
7. Simpan Kode dibawah ini, dibawah kode yang tadi, kode <div class='post-footer-line post-footer-line-1'> atau <p class='post-footer-line post-footer-line-1'>
<b:if cond='data:blog.pageType == "item"'>
<div id='related-posts'>
<b:loop values='data:post.labels' var='label'>
<b:if cond='data:label.isLast != "true"'>
</b:if>
<b:if cond='data:blog.pageType == "item"'>
<script expr:src='"/feeds/posts/default/-/" + data:label.name + "?alt=json-in-script&callback=related_results_labels_thumbs&max-results=12"' type='text/javascript'/></b:if></b:loop>
<h3>Related Posts</h3>
<marquee align='center' behavior='alternate' direction='left' onmouseout='this.start()' onmouseover='this.stop()' scrollamount='2' width='100%'>
<script type='text/javascript'>
var currentposturl="<data:post.url/>";
var maxresults=10;
var relatedpoststitle="";
removeRelatedDuplicates_thumbs();
printRelatedLabels_thumbs();
</script></marquee>
</div><div style='clear:both'/>
</b:if>
8. Simpan dan lihat hasilnya<div id='related-posts'>
<b:loop values='data:post.labels' var='label'>
<b:if cond='data:label.isLast != "true"'>
</b:if>
<b:if cond='data:blog.pageType == "item"'>
<script expr:src='"/feeds/posts/default/-/" + data:label.name + "?alt=json-in-script&callback=related_results_labels_thumbs&max-results=12"' type='text/javascript'/></b:if></b:loop>
<h3>Related Posts</h3>
<marquee align='center' behavior='alternate' direction='left' onmouseout='this.start()' onmouseover='this.stop()' scrollamount='2' width='100%'>
<script type='text/javascript'>
var currentposturl="<data:post.url/>";
var maxresults=10;
var relatedpoststitle="";
removeRelatedDuplicates_thumbs();
printRelatedLabels_thumbs();
</script></marquee>
</div><div style='clear:both'/>
</b:if>
Sahabat dapat menetapkan jumlah maksimum posting terkait sampai dengan 20 posting, hanya mengubah nomor berwarna merah (10) dan menyesuaikannya seperti yang Sahabat suka.
Selamat mencoba.
Sumber http://www.intert3chmedia.net/
No comments:
Post a Comment