<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>GoodUse &#187; widget</title>
	<atom:link href="http://g.azucar.jp/category/wordpress/widget/feed" rel="self" type="application/rss+xml" />
	<link>http://g.azucar.jp</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Thu, 09 Sep 2010 13:13:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>googleで共有した記事のタイトルとコメントをサイドバーに表示する</title>
		<link>http://g.azucar.jp/google%e3%81%a7%e5%85%b1%e6%9c%89%e3%81%97%e3%81%9f%e8%a8%98%e4%ba%8b%e3%81%ae%e3%82%bf%e3%82%a4%e3%83%88%e3%83%ab%e3%81%a8%e3%82%b3%e3%83%a1%e3%83%b3%e3%83%88%e3%82%92%e3%82%b5%e3%82%a4%e3%83%89</link>
		<comments>http://g.azucar.jp/google%e3%81%a7%e5%85%b1%e6%9c%89%e3%81%97%e3%81%9f%e8%a8%98%e4%ba%8b%e3%81%ae%e3%82%bf%e3%82%a4%e3%83%88%e3%83%ab%e3%81%a8%e3%82%b3%e3%83%a1%e3%83%b3%e3%83%88%e3%82%92%e3%82%b5%e3%82%a4%e3%83%89#comments</comments>
		<pubDate>Sat, 15 Nov 2008 02:55:45 +0000</pubDate>
		<dc:creator>focajun</dc:creator>
				<category><![CDATA[widget]]></category>

		<guid isPermaLink="false">http://it81.wordpress.com/2008/11/15/google%e3%81%a7%e5%85%b1%e6%9c%89%e3%81%97%e3%81%9f%e8%a8%98%e4%ba%8b%e3%81%ae%e3%82%bf%e3%82%a4%e3%83%88%e3%83%ab%e3%81%a8%e3%82%b3%e3%83%a1%e3%83%b3%e3%83%88%e3%82%92%e3%82%b5%e3%82%a4%e3%83%89/</guid>
		<description><![CDATA[widget製作の練習用にgoogle readerで共有した記事のタイトルとコメントをサイドバーに表示するwidgetをを作ってみた。最新１０件のタイトルとコメントを表示するだけだが、いろいろ応用は可能と思われる。

&#60;?php/*Plugin Name: GoogleMyRssPlugin URI: Description: Google Rss FeedAuthor: junichi okaVersion: 1Author URI: */ 
function widget_GoogleMyRss() {
$req = &#8216;http://www.google.com/reader/public/atom/user/01295298658934015356/label/.wmd&#8217;;
&#160;&#160;&#160; $xml = simplexml_load_file($req) or die(&#8220;fault&#8221;);&#160;&#160;&#160; $ret = &#8216;&#60;li class=&#8221;gnews&#8221;&#62;&#60;h2&#62;World Music News&#60;/h2&#62;&#60;ul&#62;&#8217;;
&#160;&#160;&#160; for( $c=0; $c&#60;10 ; $c++){&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $ret .= &#8216;&#60;li&#62;&#8217;;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $ret .= &#8216;&#60;a href=&#8221;&#8216;.$xml-&#62;entry[$c]-&#62;link[href].&#8217;&#8221; target=&#8221;_blank&#8221;&#62;&#8217;.$xml-&#62;entry[$c]-&#62;title.&#8217;&#60;/a&#62;&#8217;;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $ret .= &#8216;&#60;span&#62;&#8217;.substr($xml-&#62;entry[$c]-&#62;published, 0, 10).&#8217;&#60;/span&#62;&#8217; ;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $html=ereg_replace(&#8216;&#60;/blockquote&#62;.*&#8217;, &#8216;&#60;/blockquote&#62;&#8217;,$xml-&#62;entry[$c]-&#62;content);&#160;&#160;&#160;&#160;&#160;&#160;&#160; $html=ereg_replace(&#8216;&#60;blockquote&#62;.*&#60;br&#62;&#8217;,'&#60;blockquote&#62;&#8217;,$html);&#160;&#160;&#160;&#160;&#160;&#160;&#160; $ret .= $html.&#8217;&#60;/li&#62;&#8217;;&#160;&#160;&#160; [...]]]></description>
			<content:encoded><![CDATA[<p>widget製作の練習用にgoogle readerで共有した記事のタイトルとコメントをサイドバーに表示するwidgetをを作ってみた。最新１０件のタイトルとコメントを表示するだけだが、いろいろ応用は可能と思われる。<br />
<blockquote>
<p>&lt;?php<br />/*<br />Plugin Name: GoogleMyRss<br />Plugin URI: <br />Description: Google Rss Feed<br />Author: junichi oka<br />Version: 1<br />Author URI: <br />*/ </p>
<p>function widget_GoogleMyRss() {
<p>$req = &#8216;<a href="http://www.google.com/reader/public/atom/user/01295298658934015356/label/.wmd';">http://www.google.com/reader/public/atom/user/01295298658934015356/label/.wmd&#8217;;</a>
<p>&nbsp;&nbsp;&nbsp; $xml = simplexml_load_file($req) or die(&#8220;fault&#8221;);<br />&nbsp;&nbsp;&nbsp; $ret = &#8216;&lt;li class=&#8221;gnews&#8221;&gt;&lt;h2&gt;World Music News&lt;/h2&gt;&lt;ul&gt;&#8217;;
<p>&nbsp;&nbsp;&nbsp; for( $c=0; $c&lt;10 ; $c++){<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $ret .= &#8216;&lt;li&gt;&#8217;;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $ret .= &#8216;&lt;a href=&#8221;&#8216;.$xml-&gt;entry[$c]-&gt;link[href].&#8217;&#8221; target=&#8221;_blank&#8221;&gt;&#8217;.$xml-&gt;entry[$c]-&gt;title.&#8217;&lt;/a&gt;&#8217;;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $ret .= &#8216;&lt;span&gt;&#8217;.substr($xml-&gt;entry[$c]-&gt;published, 0, 10).&#8217;&lt;/span&gt;&#8217; ;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $html=ereg_replace(&#8216;&lt;/blockquote&gt;.*&#8217;, &#8216;&lt;/blockquote&gt;&#8217;,$xml-&gt;entry[$c]-&gt;content);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $html=ereg_replace(&#8216;&lt;blockquote&gt;.*&lt;br&gt;&#8217;,'&lt;blockquote&gt;&#8217;,$html);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $ret .= $html.&#8217;&lt;/li&gt;&#8217;;<br />&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp; $ret .= &#8216;&lt;/ul&gt;&lt;/li&gt;&#8217;;<br />&nbsp;&nbsp;&nbsp;&nbsp; echo $ret;
<p>}<br />function GoogleMyRss_init()<br />{<br />&nbsp; register_sidebar_widget(__(&#8216;GoogleMyRss&#8217;), &#8216;widget_GoogleMyRss&#8217;);<br />}<br />add_action(&#8220;plugins_loaded&#8221;, &#8220;GoogleMyRss_init&#8221;);<br />?&gt;</p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://g.azucar.jp/google%e3%81%a7%e5%85%b1%e6%9c%89%e3%81%97%e3%81%9f%e8%a8%98%e4%ba%8b%e3%81%ae%e3%82%bf%e3%82%a4%e3%83%88%e3%83%ab%e3%81%a8%e3%82%b3%e3%83%a1%e3%83%b3%e3%83%88%e3%82%92%e3%82%b5%e3%82%a4%e3%83%89/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
