Minggu, 23 September 2012

widget melayang/floating follower google friend connect twitter and facebook like box

Inilah persembahan 3 in 1 floating widget yang menurut saya merupakan salah satu widget blogger terbaik di penghujung tahun 2011 ini. 3 buah widget melayang
yang digabung dalam 1 gadget ini merupakan sequel jilid 2 dari posting saya sebelumnya Cara Membuat Floating Facebook Like Box dimana dalam gadget ini memuat widget follower blogger (Google Friend Connect), widget update status Twitter dan widget Facebook Like Box sekaligus !! Demo penerapan widget melayang (floating widget) ini bisa sobat lihat disamping sidebar kanan blog ini. Seperti apa Cara membuat widget Follower Blogger, status Twitter dan Facebook Like ini akan kita bedah bersama (hiks..!) dalam tips blogging kali ini.


Cara Membuat Widget Melayang Google Friend Connect, Twitter dan Facebook Like Box :
1.   Login ke dashboard blogger anda, pilih Rancangan > Elemen Laman > Add gadget (HTML/Javascript).
2.       Copy script master widget dibawah ini dan paste pada gadget.

<style type="text/css">
.barrightblogger{ background:url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUn6nz-sF93VVO_chPg6vMg_KJ3TTeovDKWFZH-JNUFbBLFI2IzbLKQGHiE7nik-eFV_6hXrNJVgEuXbRiBLkgI1EmcNKGyxuJjpBkxVEVZ0zzasxyaaQJmHgBr-Gh9QWQkxnzWuTYth8G/');background-repeat:no-repeat;width:39px;height:159px;position:fixed;right:0px;top:50px; z-index:1000;}
.barrightbloggerc{ background:url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjU9L-qkMiKl56e43afOnXJDUCWFwpGfB9Wxale-b76c1Ro5RV4vHrBQzVocUGMWouQwXG8uY3KGByy7nVq6hDPuE4essZiOZPpQfadlOtAAARr4-vqzDhF1TwGCsbHNQABOy5I1IFQmVX1/');background-repeat:no-repeat;width:288px;height:345px;position:fixed;right:0px;top:50px; z-index:1100;}
.barconteblogger{margin:5px 0 0 47px}
.barrighttwitter{background:url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg13fIylcHkz0ofcnwvOKqK8yqEbFeA8dBOhV1C_TDWF1Yfvs-j9hruaMaN7et_rapRwthyphenhyphen-XTzFpnNFW20dRH3RuOZUJ4x1BQg-4UKz6Xsn3PJ-uZL1Aw-UI061kQqNHcM7joO2I1fGbOP/');background-repeat:no-repeat;width:39px;height:159px;position:fixed;right:0px;top:210px;z-index:1000;}
.barrighttwitterc{background:url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDffO5xIwSFI4y_QDtBf48fzOhOI2n4wugNFS_wXWNfU2RCnIGR89LmbDQjt9tlGeH_7UXFDmtSEGzMv30KtC-b6ZX34Kf-YmfEYtKgChyphenhyphenslTN1fEpvoaobQ5kk8EXkAdGVCT8NIOc1DBZ/');background-repeat:no-repeat;width:288px;height:345px;position:fixed;right:0px;top:120px; z-index:1100;}
.barcontetwitter{margin:5px 0 0 47px}
.barrightfacebook{background:url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRxI4L9TWM38nRgjzrHM8QkZKrGBxKTNv1K_CO7jnz9SH7OnDysVBfRGoXx8M93D9OBwXVtCoar1Ij7Uu5DcGSAM_HdL-QoWJDK3P2BKwBy4OEB75VgVX8yW8MFy5suZrTC8kELikgYNZi/');background-repeat:no-repeat;width:39px;height:159px;position:fixed;right:0px;top:370px; z-index:1000;}
.barrightfacebookc{background:url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggZIdddbTyysWgHDqZksxkZ99BNXrhwJN-NGayZN92urSZqHpQpeZ9MD7JEGcdMXYdzHyWOpgoHWlJZghPguSdHbpxxPgFa5_lr_XAqp0uHqn-YqA0KVb4PpHBHD3Z66-Qp5b18iNbzuUP/');background-repeat:no-repeat;width:288px;height:345px;position:fixed;right:0px;top:185px; z-index:1100;}
.barcontefacebook{margin:5px 0 0 47px}
</style>
<div class="barrightblogger" onmouseover="this.className='barrightbloggerc'" onmouseout="this.className='barrightblogger'">
<div class="barconteblogger">
CONTENT BLOGGER HERE
</div>
</div>
<div class="barrighttwitter" onmouseover="this.className='barrighttwitterc'" onmouseout="this.className='barrighttwitter'">
<div class="barcontetwitter">
CONTENT TWITTER HERE
</div>
</div>
<div class="barrightfacebook" onmouseover="this.className='barrightfacebookc'" onmouseout="this.className='barrightfacebook'">
<div class="barcontefacebook">
CONTENT FACEBOOK HERE
</div>
</div>

3.       Kustomisasi widget :
  • Ganti tulisan CONTENT BLOGGER HERE dengan kode HTML Google Friend Connect anda.
  • Ganti tulisan CONTENT TWITTER HERE dengan kode HTML widget status Twitter anda.
  • Ganti tulisan CONTENT FACEBOOK HERE dengan kode HTML Facebook Like Box anda.
4.      Bentuk akhir dari kode script ini ( Final Code ) akan menjadi seperti script widget milik saya dibawah ini :

<style type="text/css">
.barrightblogger{
background:url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUn6nz-sF93VVO_chPg6vMg_KJ3TTeovDKWFZH-JNUFbBLFI2IzbLKQGHiE7nik-eFV_6hXrNJVgEuXbRiBLkgI1EmcNKGyxuJjpBkxVEVZ0zzasxyaaQJmHgBr-Gh9QWQkxnzWuTYth8G/');background-repeat:no-repeat;width:39px;height:159px;position:fixed;right:0px;top:50px; z-index:1000;}
.barrightbloggerc{
background:url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjU9L-qkMiKl56e43afOnXJDUCWFwpGfB9Wxale-b76c1Ro5RV4vHrBQzVocUGMWouQwXG8uY3KGByy7nVq6hDPuE4essZiOZPpQfadlOtAAARr4-vqzDhF1TwGCsbHNQABOy5I1IFQmVX1/');background-repeat:no-repeat;width:288px;height:345px;position:fixed;right:0px;top:50px; z-index:1100;}
.barconteblogger{margin:5px 0 0 47px}
.barrighttwitter{background:url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg13fIylcHkz0ofcnwvOKqK8yqEbFeA8dBOhV1C_TDWF1Yfvs-j9hruaMaN7et_rapRwthyphenhyphen-XTzFpnNFW20dRH3RuOZUJ4x1BQg-4UKz6Xsn3PJ-uZL1Aw-UI061kQqNHcM7joO2I1fGbOP/');background-repeat:no-repeat;width:39px;height:159px;position:fixed;right:0px;top:210px;z-index:1000;}
.barrighttwitterc{background:url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDffO5xIwSFI4y_QDtBf48fzOhOI2n4wugNFS_wXWNfU2RCnIGR89LmbDQjt9tlGeH_7UXFDmtSEGzMv30KtC-b6ZX34Kf-YmfEYtKgChyphenhyphenslTN1fEpvoaobQ5kk8EXkAdGVCT8NIOc1DBZ/');background-repeat:no-repeat;width:288px;height:345px;position:fixed;right:0px;top:120px; z-index:1100;}
.barcontetwitter{margin:5px 0 0 47px}
.barrightfacebook{background:url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRxI4L9TWM38nRgjzrHM8QkZKrGBxKTNv1K_CO7jnz9SH7OnDysVBfRGoXx8M93D9OBwXVtCoar1Ij7Uu5DcGSAM_HdL-QoWJDK3P2BKwBy4OEB75VgVX8yW8MFy5suZrTC8kELikgYNZi/');background-repeat:no-repeat;width:39px;height:159px;position:fixed;right:0px;top:370px; z-index:1000;}
.barrightfacebookc{background:url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggZIdddbTyysWgHDqZksxkZ99BNXrhwJN-NGayZN92urSZqHpQpeZ9MD7JEGcdMXYdzHyWOpgoHWlJZghPguSdHbpxxPgFa5_lr_XAqp0uHqn-YqA0KVb4PpHBHD3Z66-Qp5b18iNbzuUP/');background-
repeat:no-repeat;width:288px;height:345px;position:fixed;right:0px;top:185px; z-index:1100;}
.barcontefacebook{margin:5px 0 0 47px}
</style>
<div class="barrightblogger" onmouseover="this.className='barrightbloggerc'" onmouseout="this.className='barrightblogger'">
<div class="barconteblogger">
<!-- Include the Google Friend Connect javascript library. -->
<script type="text/javascript" src="http://www.google.com/friendconnect/script/friendconnect.js"></script>
<!-- Define the div tag where the gadget will be inserted. -->
<div id="div-5280101236238054965" style="width:225px;border:1px solid #cccccc;"></div>
<!-- Render the gadget into a div. -->
<script type="text/javascript">
var skin = {};
skin['BORDER_COLOR'] = '#cccccc';
skin['ENDCAP_BG_COLOR'] = '#ff9900';
skin['ENDCAP_TEXT_COLOR'] = '#333333';
skin['ENDCAP_LINK_COLOR'] = '#0000cc';
skin['ALTERNATE_BG_COLOR'] = '#ffffff';
skin['CONTENT_BG_COLOR'] = '#ffffff';
skin['CONTENT_LINK_COLOR'] = '#0000cc';
skin['CONTENT_TEXT_COLOR'] = '#333333';
skin['CONTENT_SECONDARY_LINK_COLOR'] = '#7777cc';
skin['CONTENT_SECONDARY_TEXT_COLOR'] = '#666666';
skin['CONTENT_HEADLINE_COLOR'] = '#333333';
skin['NUMBER_ROWS'] = '5';
google.friendconnect.container.setParentUrl('/' /* location of rpc_relay.html and canvas.html */);
google.friendconnect.container.renderMembersGadget(
 { id: 'div-5280101236238054965',
   site: '13497557564014853740&#039; },
  skin);
</script>
</div>
</div>
<div class="barrighttwitter" onmouseover="this.className='barrighttwitterc'" onmouseout="this.className='barrighttwitter'">
<div class="barcontetwitter">
<script src="http://widgets.twimg.com/j/2/widget.js"></script>
<script>
new TWTR.Widget({
  version: 2,
  type: 'profile',
  rpp: 2,
  interval: 30000,
  width: 220,
  height: 220,
  theme: {
    shell: {
      background: '#333333',
      color: '#ffffff'
    },
    tweets: {
      background: '#333333',
      color: '#f3f5f0',
      links: '#eb9f07'
    }
  },
  features: {
    scrollbar: true,
    loop: false,
    live: false,
    behavior: 'all'
  }
}).render().setUser('@alanwijaya').start();
</script>
</div>
</div>
<div class="barrightfacebook" onmouseover="this.className='barrightfacebookc'" onmouseout="this.className='barrightfacebook'">
<div class="barcontefacebook">
<iframe allowtransparency="true" frameborder="0" scrolling="no"
src="http://www.facebook.com/plugins/likebox.php?href=http://www.facebook.com/pages/Share-With-ALAN--5280101236238054965-Blogs/&amp;width=24
0&amp;colorscheme=light&amp;connections=15&amp;stream=false&amp;header=false&amp;height=320" style="border: none; height: 320px;
overflow: hidden; width: 240px;background: #fff;"></iframe>
</div>
</div>

5.     Kalau mau gampang sobat tinggal mengganti ID akun Google Friend Connect, Twitter dan Facebook Like milik saya yang sudah saya tandai dengan tulisan warna merah dengan ID atau kode akun milik anda.
6.      Jika sudah selesai melakukan kustomisasi, Save / Simpan gadget dan lihat hasilnya.

Tidak ada komentar: