Skip to main content

Membuat Recent Comment Hanya Nama

Maksud Membuat Recent Comment Hanya Nama sesuai judul di atas maksudnya adalah menghilangkan tanggal posting, judul posting, dan isi komentar itu sendiri. Jadi dalam membuat recent comment hanya nama ini untuk menampilkan link nama komentator.

Sebagai contoh lihat gambar di bawah ini :


recent comment hanya nama dan url

Nah untuk membuatnya, silakan Login ke Blogger>>Design>>Add HTML. (atau lebih mudahnya kita tambahkan widget seperti biasa) Kemudian pastekan di dalamnya kode di bawah ini :

<script>// ----------------------------------------
// SHOW RECENT COMMENTS
// ----------------------------------------
// This functions takes a blogger-feed in JSON
// format and displays it.
//
// Version: 1.0
// Date:    2006-12-01
// Author:  Hans Oosting
// URL:     beautifulbeta.blogspot.com
// ----------------------------------------

function showrecentcomments(json) {
  for (var i = 0; i < numcomments; i++) {
    var entry = json.feed.entry[i];
    var alturl;

    if (i == json.feed.entry.length) break;
    for (var k = 0; k < entry.link.length; k++) {
      if (entry.link[k].rel == 'alternate') {
        alturl = entry.link[k].href;
        break;
      }
    }
   alturl = alturl.replace("#", "#comment-");
   var postlink = alturl.split("#");
   postlink = postlink[0];
   var linktext = postlink.split("/");
   linktext = linktext[5];
   linktext = linktext.split(".html");
   linktext = linktext[0];
   var posttitle = linktext.replace(/-/g," ");
   posttitle = posttitle.link(postlink);
   var commentdate = entry.published.$t;
   var cdyear = commentdate.substring(0,4);
   var cdmonth = commentdate.substring(5,7);
   var cdday = commentdate.substring(8,10);
   var monthnames = new Array();
   monthnames[1] = "Jan";
   monthnames[2] = "Feb";
   monthnames[3] = "Mar";
   monthnames[4] = "Apr";
   monthnames[5] = "May";
   monthnames[6] = "Jun";
   monthnames[7] = "Jul";
   monthnames[8] = "Aug";
   monthnames[9] = "Sep";
   monthnames[10] = "Oct";
   monthnames[11] = "Nov";
   monthnames[12] = "Dec";
   var comment = entry.content.$t;
   var re = /<\S[^>]*>/g;
   comment = comment.replace(re, "");
   if (showcommentdate == true) document.write('Tanggal ' + cdday + ' '+ monthnames[parseInt(cdmonth,10)] + ' ' + cdyear + ' ');
   document.write('<a href="' + alturl + '">' + entry.author[0].name.$t + '</a> ');
   if (showposttitle == true) document.write(' pada ' + posttitle);
   document.write('<br/>')
  }

}</script><script style="text/javascript">var numcomments = 5;var showcommentdate = false;var showposttitle = false;var numchars = false;var standardstyling = false;</script> <script src="http://sejutatrik.blogspot.com/feeds/comments/default?alt=json-in-script&callback=showrecentcomments"></script>

Keterangan :
var numcomments = 5;            Jumlah komentar yang tampil
var showcommentdate = false; Tampilan tanggal komentar (ganti false dengan true untuk menampilkan)
var showposttitle = false;         Tampilan judul komentar(ganti false dengan true untuk menampilkan)
var numchars = false;               Rincian untuk komentar(ganti false dengan angka jumlah karakter komentar)
var standardstyling = false;       Tampilan komentar standar
ganti http://sejutatrik.blogspot.com/ dengan url blog sobat.

Kelebihan dari membuat recent comment hanya nama ini adalah kita tidak menggunakan javascript dari url blog lain. Jadi loading menjadi lebih cepat. Bukankah loading yang cepat salah satu kriteria blog itu SEO Friendly? Semoga menjadi telaah kita bersama. Nah akhir kata selamat mencoba.
Happy Blogging!
by. Sejuta Trik Blogger

Popular posts from this blog

Profile Biodata Foto Renie Arumsari

Biodata Renie Arumsari Nama Lengkap : Agustina Renie Arum Sari Nama Lain : Renie Arumsari Asal : Yogyakarta Kebangsaan : Indonesia Pekerjaan : Aktris, Model, MC Twitter : https://twitter.com/rerenie Instagram : https://www.instagram.com/renieas Prestasi Renie Arumsari Putri Pariwisata Indonesia DIY 2017 Putri Pariwisata Indonesia Best National Costume Putri Pariwisata Indonesia Putri Bunga Miss Tea Indonesia 2017 Miss Jogjatronik Sahabat Larissa Puteri Bandara 2013 Duta Bandara Adisutjipto Sinetron Renie Arumsari 2018 – Orang Ketiga, sebagai Kartika – SCTV Sitkom : 2015 – Kos-kosan Jogja, sebagai Gendhis View this post on Instagram A post shared by Renie Arumsari (@renieas) on Jun 21, 2019 at 10:03pm PDT View this post on Instagram A post shared by Renie Arumsari (@renieas) on May 30, 2019 at 2:47am PDT ...

Read Solo Leveling Chapter 103 English Translate

Read Manhwa Solo Leveling Chapter 103 English translation . Since a portal connecting our world to a world full of monsters and creatures of all kinds appeared, some people have acquired powers and the ability to hunt them: they are called hunters. The protagonist of the story, Sung Jin-Woo, is the weakest of the rank E hunters and barely stronger than a normal human. He is nicknamed by his fellow hunters as "the weakest". One day, he and other hunters find themselves trapped in an extremely dangerous dungeon, and only a few of them survive and manage to escape. Sung Jin-Woo himself hardly survives and is the only who completes all the trials in this dungeon. He then turns into a "player" who can now see an interface showing him quests. Will he succeed in becoming the most powerful hunter? Read Solo Leveling Chapter 103 Not released yet release date : January 2020 You may also like : Manhwa similiar to solo leveling Read solo leveling 103 s...

Read Manga Solo leveling 104 English Translation

Solo Leveling is a Korean novel manhwa written by Chu-Gong, It was serialized in Papyrus and later in KakaoPage and concluded with 14 volumes and 270 chapters. In April 13, 2018, a webtoon serialization started in Korean mobile site KakaoPage drawn by artists Hyeon - Gun and Jang Sung-Rak. Read Manhwa Manga Solo Leveling 104 capitulo 104 Kyoukai tells Ten to move so she can save Shin. Banyou starts yelling at the HSU for not chasing Riboku but Mouten and Ouhon can read the situation and they head where the soldiers are gathered. Ten asks what Kyoukai's going to do and she says that she knows of a 1000 year old technique that shares life forces but she hasn't tried it before and has never seen it actually work. But she says there's no other way. Flashback: Kyoukai is attempting this technique on a dead bird and Kyoushou asks her why she's trying such a dangerous technique. She says that since it's a technique that tries to bring the dead back t...