Wednesday 11 April 2012

Cara Memasang Facebook Like Otomatis di Posting Blogger/Blogspot

Ada beberapa jenis Facebook like button. Berikut preview plus script-scriptnya yang dibuat untuk Blogger/Blogspot:

Standard Facebook Like Button

 <!-- Tombol Facebook Like  -->

<b:if cond='data:blog.pageType == &quot;item&quot;'>

<iframe allowTransparency='true' expr:src='&quot;http://www.facebook.com/plugins/like.php?href=&quot; + data:post.url + &quot;&amp;send=false&amp;layout=standard&amp;show_faces=false&amp;width=450&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=35&quot;' frameborder='0' scrolling='no' style='border:none; overflow:hidden; width:450px; height:35px;'/>

</b:if>

<!-- Facebook Like http://deejayhan.blogspot.com -->

Box Count Facebook Like Button

 

<!-- Tombol Facebook Like  -->

<b:if cond='data:blog.pageType == &quot;item&quot;'>

<iframe allowTransparency='true' expr:src='&quot;http://www.facebook.com/plugins/like.php?href=&quot; + data:post.url + &quot;&amp;send=false&amp;layout=box_count&amp;show_faces=false&amp;width=55amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=65&quot;' frameborder='0' scrolling='no' style='border:none; overflow:hidden; width:55px; height:65px;'/>

</b:if>

<!-- Facebook Like http://deejayhan.blogspot.com -->

Button Count Facebook Like Button

 

 

<!-- Tombol Facebook Like  -->

<b:if cond='data:blog.pageType == &quot;item&quot;'>

<iframe allowTransparency='true' expr:src='&quot;http://www.facebook.com/plugins/like.php?href=&quot; + data:post.url + &quot;&amp;send=false&amp;layout=button_count&amp;show_faces=false&amp;width=90&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=21&quot;'        frameborder='0' scrolling='no' style='border:none; overflow:hidden; width:90px; height:21px;'/>

                    </b:if>

                    <!-- Facebook Like http://deejayhan.blogspot.com -->  

Kostumisasi widget Facebook like: 

a. Secara default, Tombol Facebook like akan muncul disisi kiri. Oleh karena itu, jika ingin menampilkannya di sisi kanan (seperti yang di blog ini), kita dapat menambahkan CSS styling, float ke kanan, dan untuk memberi batas dengan posting ditambahkan padding plus value-nya lalu memasukkan styling tersebut di dalam tag div.

            <div style='padding:4px; float: right;'> 

           </div>

 Cara menyisipkannya:

<!-- Tombol Facebook Like  -->

<b:if cond='data:blog.pageType == &quot;item&quot;'>

<div style='padding:4px; float: right;'> 

<iframe allowTransparency='true' expr:src='&quot;http://www.facebook.com/plugins/like.php?href=&quot; + data:post.url + &quot;&amp;send=false&amp;layout=button_count&amp;show_faces=false&amp;width=90&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=21&quot;' frameborder='0' scrolling='no' style='border:none; overflow:hidden; width:90px; height:21px;'/>

</div>

</b:if>

<!-- Facebook Like http://deejayhan.blogspot.com -->

b. Jika ingin mengubah tampilan Facebook like menjadi gelap (dark), ubah value pada colorscheme=light, ganti light dengan dark colorscheme=dark.

Cara memasang Facebook Like di Blogger:

1. Masuk ke dashboard > Design/Rancangan > Edit HTML.

2. Klik/check "Expand Widget Templates"

3. Pilih salah satu script/kode dari jenis Facebook Like di atas, lalu:

4. Jika ingin memasang button di atas posting, cari <div class='post-header-line-1'/> atau <div class='post-body'> (gunakan Ctrl+F) dan paste kode tersebut tepat di BAWAH-nya. Jika kedua kode tersebut tidak ketemu, letakkan kode di ATAS <data:post.body/>.

5. Jika ingin memasang button di bawah posting, cari  <data:post.body/> (gunakan Ctrl+F) dan paste kode tersebut tepat di BAWAH-nya.

6.  Save template.

Selamat mencoba

No comments:

Post a Comment