Kunjungi Blog terbaru saya corkismet - Coretan Kang Ismet - dan tinggalkan jejak sobat disana.

Cara Memindahkan Komentar Disqus yang Ada ke Halaman / Domain Lain

How to Set Disqus Configuration Variables.

How to Handle Canonical URL variable and unique identifier variable Disqus - Pada postingan kali ini saya akan menjelaskan Bagaimana cara memindahkan komentar disqus yang sudah ada komentarnya, ke halaman lain atau domain lain.

Mungkin judulnya agak susaha difahami, bahkan saya juga agak bingung menentukan judul 😃. Contohnya saya ingin memindahkan komentar Disqus dari https://www.kang-ismet.com/forum ke subdomain https://tutorial.kang-ismet.com/forum.

Konfigurasi Disqus

Inilah yang diberikan oleh Disqus untuk mengkonfigurasi komentar

<div id="disqus_thread"></div>
<script>
    /**
    *  RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.
    *  LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables    */
    /*
    var disqus_config = function () {
    this.page.url = PAGE_URL;  // Replace PAGE_URL with your page's canonical URL variable
    this.page.identifier = PAGE_IDENTIFIER; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
    };
    */
    (function() { // DON'T EDIT BELOW THIS LINE
    var d = document, s = d.createElement('script');
    s.src = 'https://blogkangismet.disqus.com/embed.js';
    s.setAttribute('data-timestamp', +new Date());
    (d.head || d.body).appendChild(s);
    })();
</script>

Edit Konfigurasi

Sebagai informasi, bahwa https://www.kang-ismet.com/forum adalah hasil route Cloudflare yang aslinya beralamatkan https://www.kang-ismet/p/oot.html.

Ketika Komentar di halaman OOT akan ditampilkan di subdomain https://tutorial.kang-ismet.com/forum, maka langkah yang harus dilakukan adalah

1. Hilangkan comment pada script di atas, scriptnya saya potong biar jelas

<div id="disqus_thread"></div>
<script>
    /**
    *  RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.
    *  LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables    */
    /*
    var disqus_config = function () {
    this.page.url = PAGE_URL;  // Replace PAGE_URL with your page's canonical URL variable
    this.page.identifier = PAGE_IDENTIFIER; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
    };
    */

2. Edit Konfigurasi, jangan lupa gunakan tanda petik pada URL dan IDENTIFIER. Jangan lupa sesuaikan juga username Disqus kalian. Maka hasil ahir menjadi seperti ini

<div id="disqus_thread"></div>
<script>
    /**
    *  RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.
    *  LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables    */

    var disqus_config = function () {
    this.page.url = 'https://kang-ismet.com/p/oot.html'  // Replace PAGE_URL with your page's canonical URL variable
    this.page.identifier = '/p/oot.html' // Replace PAGE_IDENTIFIER with your page's unique identifier variable
    };

    (function() { // DON'T EDIT BELOW THIS LINE
    var d = document, s = d.createElement('script');
    s.src = 'https://blogkangismet.disqus.com/embed.js';
    s.setAttribute('data-timestamp', +new Date());
    (d.head || d.body).appendChild(s);
    })();
</script>

3. Simpan Kode di halaman baru.
Contoh Forum saya di https://tutorial.kang-ismet.com/forum.

Untuk mendapatkan update terbaru di Dasbor Blogger, silahkan ikuti Blog ini

4 komentar

1. Komentar ini, diurutkan dari yang terbaru
2. Tinggalkan komentar sesuai topik tulisan
3. Apabila ada pertanyaan diluar artikel silahkan kunjungi Ruang Obrolan.
4. Centang Beri tahu saya untuk mendapatkan notifikasi via Email ketika ada balasan
Masukkan URL Gambar atau Potongan Kode, atau Quote, lalu klik tombol yang kamu inginkan untuk di-parse. Salin hasil parse lalu paste ke kolom komentar.


image quote pre code
  1. Mas saya wa kok gak bales mas nomor belakang nya 414
    1. hehe maaf mas, kemaren seharian buka WA baru sore, makanya kelewat WA nya
  2. Kang cek email, saya udah kirim via contact
    1. Siap, cek email balasan.. sudah saya reply
Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.