// jQuery plugin - Dolphin RSS Aggregator (function($){ $.fn.dolRSSFeed = function() { return this.each( function(){ var $Cont = $(this); var iRSSID = parseInt( $Cont.attr( 'rssid' ) || 0 ); if( !iRSSID ) return false; var iMaxNum = parseInt( $Cont.attr( 'rssnum' ) || 0 ); var iMemID = parseInt( $Cont.attr( 'member' ) || 0 ); $.getFeed( { url: 'get_rss_feed.php?ID=' + iRSSID + '&member=' + iMemID , success: function(feed) { if( window.console ) console.log( feed ); var sCode = '
'; var iCount = 0; for( var iItemId = 0; iItemId < feed.items.length; iItemId ++ ) { var item = feed.items[iItemId]; var oDate = new Date( item.updated ); var sDate = oDate.toLocaleString(); sCode += '
' + '' + '
' + '' + ( sClockIcon != undefined ? ( ' ' ) : '' ) + sDate + '' + '
' + '
' + item.description + '
' + '
'; iCount ++; if( iCount == iMaxNum ) break; } sCode += '
' + '' + feed.title + '' + '
' + '
'; $Cont.html( sCode ); } } ); } ); }; })(jQuery);