<?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>Chibiの覚え書き &#187; 自分用覚え書き記事</title>
	<atom:link href="http://ilovechibi.net/category/%e8%87%aa%e5%88%86%e7%94%a8%e8%a6%9a%e3%81%88%e6%9b%b8%e3%81%8d%e8%a8%98%e4%ba%8b/feed" rel="self" type="application/rss+xml" />
	<link>http://ilovechibi.net</link>
	<description>web制作とかcssとかデザインとか色々～な覚え書き</description>
	<lastBuildDate>Tue, 05 Jan 2010 01:44:23 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>wordpress:Similar Posts（Post-Plugin Library）の色々</title>
		<link>http://ilovechibi.net/200912/294.html</link>
		<comments>http://ilovechibi.net/200912/294.html#comments</comments>
		<pubDate>Thu, 10 Dec 2009 05:33:26 +0000</pubDate>
		<dc:creator>chibi</dc:creator>
				<category><![CDATA[Wordpress応用]]></category>
		<category><![CDATA[プラグイン]]></category>
		<category><![CDATA[自分用覚え書き記事]]></category>
		<category><![CDATA[Post-Plugin Library]]></category>
		<category><![CDATA[Similar Posts]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpressタグ]]></category>

		<guid isPermaLink="false">http://ilovechibi.net/?p=294</guid>
		<description><![CDATA[覚え書き。
Similar Posts内でのphpの使用とif文の書き方。

自分用記事です。
phpの書き方
そのまんま{php}

{php:$i = 0;}

とか。{php:~~~;}になって、{}内では{}と: [...]]]></description>
			<content:encoded><![CDATA[<p>覚え書き。<br />
Similar Posts内でのphpの使用とif文の書き方。<br />
<span id="more-294"></span><br />
自分用記事です。</p>
<h4>phpの書き方</h4>
<p>そのまんま{php}</p>
<pre class="brush: php;">
{php:$i = 0;}
</pre>
<p>とか。{php:~~~;}になって、{}内では{}と:が使えない。</p>
<h4>IF文の書き方</h4>
<p>クセ有り。あんまり使えない。</p>
<pre class="brush: php;">
{if:$i = 0:yes:no}
</pre>
<p>形式的には{if:条件:true:false}というか{}内でのphpが使えない！？のか分からないので、上記のphp使った方がマシ。</p>
<h4>まとめ</h4>
<p>phpでifを使う場合。<br />
2行に分けると挙動がおかしいので、基本1行で。IF文も1行で行う。ただし、:(コロン)や{}が使えないのでtrue,false用を別々に書く必要有り。<br/><br />
ソースサンプル。カスタムキー(thum)に挿入した画像URLを取得し、thum内が空の場合はデフォルト画像URLを出力。</p>
<pre class="brush: php;">
&lt;img src=&quot;{php:$normal = ''. get_bloginfo('stylesheet_directory') .'/img/normal.jpg';$thumb=get_post_meta($result-&gt;ID, 'thum', true);if ($thumb)echo $thumb.' ';if ($thumb == '')echo $normal.' ';}&quot; alt=&quot;{title}&quot;&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://ilovechibi.net/200912/294.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
