Lagi berkunjung ke blognya Nyahoo ngeliat ada sidebar dengan judul New Update (Berita Baru Dari Blog Kita Dengan Tampilan Text Slide Show Gitu ) Jadi Pengen, Terus iseng Klik Kana di blognya View Source dan cari New Update
Dapet Kodenya
<h2 class='title'>News Update</h2>
<div class='widget-content'>
<script type="text/javascript">
var cssfeed=new gfeedrssticker("example1", "example1class", 4000, "_new")
cssfeed.addFeed("Bambang Oke", "http://www.bambangoke.blogspot.com/rss.xml") //Specify "label" plus URL to RSS feed
cssfeed.addFeed("Photoshop", "http://www.bambangoke.blogspot.com/rss.xml") //Specify "label" plus URL to RSS feed
cssfeed.displayoptions("date label snippet ") //show the specified additional fields
cssfeed.setentrycontainer("DIV") //Wrap each entry with a DIV tag
cssfeed.filterfeed(10, "date") //Show 10 entries, sort by date
cssfeed.entries_per_page(1)
cssfeed.init()
</script>
</div>
Terus Aku Buka Bloger Home kemudian Kilk Layout, Add Page Element, Html/Java script
Kemudian Aku Paste Kode tersebut, Save. Tapi yang keluar hanya judulnya new Update Dan isinya Kosong :(. Liat2 Lagi ada script lain yang di butuhkan. Yaitu Pake java scipt dari gAjax RSS Ticker (hosted)Author: Dynamic Drive
Description: gAjax RSS Ticker is a flexible RSS ticker that's extremely easy to set up to boot. Using the gAjax RSS Displayer script engine, there's nothing to install or host on your server. Furthermore, you can display results from multiple feeds intermixed, sort them in a variety of ways, specify how many entries to show at once, what portion of each entry to show etc.
Here's a summary of the features of this script:
* Uses the gAjax RSS Displayer engine and Google Ajax Feed API to host/cache the desired RSS feeds, so you don't have to install or host anything on your own server.
* Specify multiple RSS feeds to display, with the results intermixed.
* Sort the results either by "date", "title", or a custom "label" assigned to each feed (ie: "Digg" then "Slashdot").
* Set the number of total RSS entries to show. If multiple feeds are specified, that number is spread out evenly amongst the feeds.
* Set the number of RSS entries to show at once (default is 1).
* Specify which portions of each RSS entry to show, such as its "label", "date", "description", "snippet" and more.
* Supports multiple gAjax RSS ticker instances on the same page.
Saya Akan Jelaskan Langkah-langkahnya :
1. Masuk Ke Layout Blogger, Klik Edit HTML cari Kode ]]></b:skin>
Kemudian Copy Paste Tepat di bawahnya Kode Berikut Ini
</script><script src='http://www.google.com/jsapi?key=YOUR-API-KEY' type='text/javascript'>
</script>
<script src='http://bambangeko05.googlepages.com/gfeedfetcher.js' type='text/javascript'/>
<script src='http://bambangeko05.googlepages.com/gajaxticker.js' type='text/javascript'>/***********************************************
* gAjax RSS Feeds Displayer- (c) Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/</script>
<style type='text/css'>.labelfield{ /*CSS for label field in general*/
color:brown;
font-size: 90%;
}.datefield{ /*CSS for date field in general*/
color:gray;
font-size: 90%;
}#example1 li{ /*CSS specific to demo 1*/
margin-bottom: 4px;
}#example2 div{ /*CSS specific to demo 2*/
margin-bottom: 5px;
}#example2 div a{ /*CSS specific to demo 2*/
text-decoration: none;
}#example3 a{ /*CSS specific to demo 3*/
color: #D80101;
text-decoration: none;
font-weight: bold;
}#example3 p{ /*CSS specific to demo 3*/
margin-bottom: 2px;
}code{ /*CSS for insructions*/
color: red;
}</style>
YOUR-API-KEY bisa di dapat di Alamat INI kemudian gantikan code YOUR-API-KEY dengan Kode yang di berikan.
Kemudian Klik Simpan Template.
Kembali Ke Layout Elemen Halaman, Klik Tambah Elemen Halaman
Isi Judulnya dengan "News Update"
Dan Kontennya dengan
<script type="text/javascript">
var newsfeed=new gfeedrssticker("example3", "example3class", 2500, "_new")
newsfeed.addFeed("Bambang Oke", "http://www.bambangoke.blogspot.com/rss.xml") //Specify "label" plus URL to RSS feed
newsfeed.displayoptions("datetime snippet") //show the specified additional fields
newsfeed.setentrycontainer("p") //Display each entry as a paragraph
newsfeed.filterfeed(20, "date") //Show 8 entries, sort by date
newsfeed.entries_per_page(1)
newsfeed.init() //Always call this last
</script>
Ganti yang di tebalkan dengan Alamat Blog Anda
Tutorialnya dari sini Dinamic Drive
Thanks......By : Bembenk
COMMENTS :
0 comment to “Membuat Side Bar News Update Dengan gAjax RSS Ticker”
Post a Comment