Just another free Blogger theme

Tuesday, March 26, 2013

Pada postingan sebelumnya, saya sudah menjelaskan cara menambah kolom di bawah postingan. Perbedaannya pada postingan yang terdahulu adalah letak kolom berada di bawah kotak komentar atau diatas footer. Dan pada tutorial kali ini letak kolom persis di bawah postingan dan mempunyai dua buah kolom yaitu kolom kotak berlangganan artikel dan related post (artikel terkait) seperti terlihat pada gambar di bawah ini.

Dari gambar diatas terdapat 2 (dua) kolom yang satu kolom Feed RSS dan satu lagi kolom Related Post (Artikel Terkait). Itulah pembahasan kita kali ini yaitu cara menambah dua molom di bawah postingan. Adapun langkah-langkah pembuatannya adalah sebagai berikut:
  1. Login ke Blogger/Blogspot => Rancangan/Layout => Edit HTML, Download Template Lengkap dan beri tanda centang Expand Template Widget;
  2. Cari kode ]]></b:skin> ;
  3. Di atas kode ]]></b:skin> letakkan kode di bawah ini:
    #related{background:#eee url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvVFLgE8LrtL1bbCDV-PKWGmedZgUKOAPSXBS-trTyvsvYtK2udCt1ID0FbcpwUY8xC7R6QjtCUcv-d0mzMiaj8Zs6ESk5rAM2M11TvI01kGSwZ5l3hfBvgyD6ClpMDuYCj11QVYToec0/) 45% 0 repeat-y;border:1px solid #ddd;color:#000;margin:0 0 10px;padding:15px}
    #related .related-posts{font-weight:400;width:53%;float:right}
    #related .related-posts p{margin:0}
    #related .related-posts h3,#related .related-posts h2,#related .related-posts h1{font-size:12pt;letter-spacing:0;margin:0}
    #related .related-posts ol{font-weight:400;margin:2px 0 0}
    #related .subscribe{width:43%;float:left;color:#000}
    #related .subscribe p.intro{font-weight:400}
    #related .subscribe p.feed{margin-bottom:10px;font-weight:700;padding-left:21px;background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuU0UOeg3Lq-IJ-8hKK31xILpbQFQHz1c25T7ndZoM2x_lTtfE5GDrYw0mng4WrYYfYIDpKnUjXiWRQP6qKCcdOtI1LfHYLnRbSN8TmSzbiwVthkPxnn9qQOqRnUwUHdLqM2MF7m1r7W4/) 0 50% no-repeat;vertical-align:middle}
    #related .subscribe form{margin:0;padding:0}
    .clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden}
    .clearfix{display:inline-block}
  4. Cari kode di bawah ini:
    <b:if cond='data:blog.pageType == &quot;item&quot;'><data:post.body/> </b:if>
  5. Letakkan kode di bawah ini diantara kode: <b:if cond='data:blog.pageType == &quot;item&quot;'><data:post.body/> dan kode: </b:if> :
    <div class='clearfix' id='related'>
    <div class='subscribe'>
    <p class='feed'>
    <a href='http://disini letakkan Link Feed anda/feeds/posts/default'>Berlangganan via RSS Feed</a></p><p class='intro'>disini letakkan kode Form Berlangganan Anda</p></div>
    <div class='related-posts'>disini letakan kode Related Post Anda</div></div>
  6. Ganti teks warna merah dengan Link Feed dan kode Form Berlangganan serta Kode Related Post yang Anda punya. Untuk lebih jelas perhatikan contoh di bawah ini:
    <b:if cond='data:blog.pageType == &quot;item&quot;'><data:post.body/>

    <div class='clearfix' id='related'>
    <div class='subscribe'>
    <p class='feed'>
    <a href='http://blogcapoenk.blogspot.com/feeds/posts/default'>Berlangganan via RSS Feed</a></p>
    <p class='intro'><form action='http://feedburner.google.com/fb/a/mailverify' method='post' onsubmit='window.open(&apos;http://feedburner.google.com/fb/a/mailverify?uri=BlogCapoenk&apos;, &apos;popupwindow&apos;, &apos;scrollbars=yes,width=200,height=170&apos;);return true' style='border: 1px solid rgb(204, 204, 204); padding: 3px; text-align: center;' target='popupwindow'><p>Jika Anda Menyukai Artikel Blog ini, Masukan Alamat Email Anda Pada Kolom di Bawah, Maka Anda Akan Mendapatkan Kiriman Email Setiap Kali Ada Posting Baru. Terima Kasih Atas Partisifasinya</p><p><input name='email' style='width: 140px;' type='text'/></p><input name='uri' type='hidden' value='BlogCapoenk'/><input name='loc' type='hidden' value='en_US'/><input type='submit' value='Subscribe'/><p>Delivered by <a href='http://feedburner.google.com/' target='_blank'>FeedBurner</a></p><p><a href='http://feeds.feedburner.com/BlogCapoenk'><img alt='Feed Reader' height='26' src='http://feeds.feedburner.com/~fc/BlogCapoenk?bg=99CCFF&amp;fg=444444&amp;anim=0' style='border:0' width='88'/></a></p></form> </p></div>

    <div class='related-posts'><b:if cond='data:blog.pageType == &quot;item&quot;'><div class='rbbox'><div style='margin:0; padding-left:10px;'><div id='albri'/><script type='text/javascript'>var homeUrl3 = &quot;<data:blog.homepageUrl/>&quot;;var maxNumberOfPostsPerLabel = 2;var maxNumberOfLabels = 8;maxNumberOfPostsPerLabel = 12;maxNumberOfLabels = 3;function listEntries10(json) {var ul = document.createElement(&#39;ul&#39;);var maxPosts = (json.feed.entry.length &lt;= maxNumberOfPostsPerLabel) ?json.feed.entry.length : maxNumberOfPostsPerLabel;for (var i = 0; i &lt; maxPosts; i++) {var entry = json.feed.entry[i];var alturl;for (var k = 0; k &lt; entry.link.length; k++) {if (entry.link[k].rel == &#39;alternate&#39;) {alturl = entry.link[k].href;break;}}var li = document.createElement(&#39;li&#39;);var a = document.createElement(&#39;a&#39;);a.href = alturl;if(a.href!=location.href) {var txt = document.createTextNode(entry.title.$t);a.appendChild(txt);li.appendChild(a);ul.appendChild(li);}}for (var l = 0; l &lt; json.feed.link.length; l++) {if (json.feed.link[l].rel == &#39;alternate&#39;) {var raw = json.feed.link[l].href;var label = raw.substr(homeUrl3.length+13);var k;for (k=0; k&lt;20; k++) label = label.replace(&quot;%20&quot;, &quot; &quot;);var txt = document.createTextNode(label);var h = document.createElement(&#39;b&#39;);h.appendChild(txt);var div1 = document.createElement(&#39;div&#39;);div1.appendChild(h);div1.appendChild(ul);document.getElementById(&#39;albri&#39;).appendChild(div1);}}}function search10(query, label) {var script = document.createElement(&#39;script&#39;);script.setAttribute(&#39;src&#39;, query + &#39;feeds/posts/default/-/&#39;+ label +&#39;?alt=json-in-script&amp;callback=listEntries10&#39;);script.setAttribute(&#39;type&#39;, &#39;text/javascript&#39;);document.documentElement.firstChild.appendChild(script);}var labelArray = new Array();var numLabel = 0;<b:loop values='data:posts' var='post'><b:loop values='data:post.labels' var='label'>textLabel = &quot;<data:label.name/>&quot;;var test = 0;for (var i = 0; i &lt; labelArray.length; i++)if (labelArray[i] == textLabel) test = 1;if (test == 0) {labelArray.push(textLabel);var maxLabels = (labelArray.length &lt;= maxNumberOfLabels) ?labelArray.length : maxNumberOfLabels;if (numLabel &lt; maxLabels) {search10(homeUrl3, textLabel);numLabel++;}}</b:loop></b:loop></script></div><script type='text/javascript'>RelPost();</script></div></b:if> </div>
    </div>

    </b:if>
  7. Simpan Template, selesai!!!


  • Digg
  • Delicious
  • Facebook
  • Mixx
  • Google
  • Furl
  • Reddit
  • StumbleUpon
  • Technorati

  • Categories:


    Hai,.. I am just an ordinary man who just might share the knowledge that I know ahead of you, No one is more perfect. Always keep learning and sharing of knowledge, Just be Yourself and be The Unique that makes them know who you are.!! pengembarabiru.blogspot.com

    0 komentar:

    Read latest headlines in your favorite news reader
    Sign up for our email news letter

    blog