<?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/"
		xmlns:xhtml="http://www.w3.org/1999/xhtml"
>

<channel>
	<title>プレゼン資料 &#187; WordCamp Tokyo 2009</title>
	<atom:link href="http://presen.php-web.net/category/wordcamp-tokyo-2009/feed/" rel="self" type="application/rss+xml" />
	<link>http://presen.php-web.net</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Sat, 04 Dec 2010 12:41:36 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://presen.php-web.net/category/wordcamp-tokyo-2009/feed/" />
		<item>
		<title>テーマの一部として導入</title>
		<link>http://presen.php-web.net/2009/as-theme-functions/</link>
		<comments>http://presen.php-web.net/2009/as-theme-functions/#comments</comments>
		<pubDate>Sat, 28 Mar 2009 03:42:31 +0000</pubDate>
		<dc:creator>presenadmin</dc:creator>
				<category><![CDATA[WordCamp Tokyo 2009]]></category>

		<guid isPermaLink="false">http://presen.php-web.net/?p=86</guid>
		<description><![CDATA[利用するテーマの functions.php テーマ変更&#8658;ショートコード無効 利用するテーマのディレクトリにある functions.php (テーマの関数を格納する場所) でショートコードを定義することができ &#8230; <a href="http://presen.php-web.net/2009/as-theme-functions/">続きを読む <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<ul>
<li>利用するテーマの functions.php</li>
<li>テーマ変更&rArr;ショートコード無効</li>
</ul>
<p><span id="more-86"></span></p>
<hr />
利用するテーマのディレクトリにある functions.php (テーマの関数を格納する場所) でショートコードを定義することができる。</p>
<p>この場合、テーマを変更すると、functions.php に書いたショートコードが無効になる。</p>
]]></content:encoded>
			<wfw:commentRss>http://presen.php-web.net/2009/as-theme-functions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://presen.php-web.net/2009/as-theme-functions/" />
	</item>
		<item>
		<title>プラグインとして導入</title>
		<link>http://presen.php-web.net/2009/shortcode-as-plugin/</link>
		<comments>http://presen.php-web.net/2009/shortcode-as-plugin/#comments</comments>
		<pubDate>Sat, 28 Mar 2009 03:19:26 +0000</pubDate>
		<dc:creator>presenadmin</dc:creator>
				<category><![CDATA[WordCamp Tokyo 2009]]></category>

		<guid isPermaLink="false">http://presen.php-web.net/?p=85</guid>
		<description><![CDATA[wp-content/plugins へアップロード 管理画面で有効化 プラグインとして導入する場合は、通常のプラグインと同様に、プラグインディレクトリ (wp-content/plugins) へアップロードする。 管 &#8230; <a href="http://presen.php-web.net/2009/shortcode-as-plugin/">続きを読む <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<ul>
<li>wp-content/plugins へアップロード</li>
<li>管理画面で有効化</li>
</ul>
<p><span id="more-85"></span></p>
<hr />
プラグインとして導入する場合は、通常のプラグインと同様に、プラグインディレクトリ (wp-content/plugins) へアップロードする。</p>
<p>管理画面から有効化を選択すると、利用可能になる。</p>
]]></content:encoded>
			<wfw:commentRss>http://presen.php-web.net/2009/shortcode-as-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://presen.php-web.net/2009/shortcode-as-plugin/" />
	</item>
		<item>
		<title>ショートコードにする</title>
		<link>http://presen.php-web.net/2009/add-shortcode/</link>
		<comments>http://presen.php-web.net/2009/add-shortcode/#comments</comments>
		<pubDate>Wed, 25 Mar 2009 23:08:21 +0000</pubDate>
		<dc:creator>presenadmin</dc:creator>
				<category><![CDATA[WordCamp Tokyo 2009]]></category>

		<guid isPermaLink="false">http://presen.php-web.net/?p=92</guid>
		<description><![CDATA[add_shortcode(ショートコード名, 関数名) ショートコード名: qrcode 記事中の名前 関数名: qrcode_output_func 定義した関数の名前 関数を定義しただけでは、ショートコードとして認 &#8230; <a href="http://presen.php-web.net/2009/add-shortcode/">続きを読む <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<ul>
<li>add_shortcode(ショートコード名, 関数名)</li>
<li>ショートコード名: qrcode 記事中の名前</li>
<li>関数名: qrcode_output_func 定義した関数の名前</li>
</ul>
<p><span id="more-92"></span></p>
<hr />
関数を定義しただけでは、ショートコードとして認識されない。</p>
<p><tt>add_shortcode</tt> を使用する。</p>
]]></content:encoded>
			<wfw:commentRss>http://presen.php-web.net/2009/add-shortcode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://presen.php-web.net/2009/add-shortcode/" />
	</item>
		<item>
		<title>ショートコード属性の処理</title>
		<link>http://presen.php-web.net/2009/attributes/</link>
		<comments>http://presen.php-web.net/2009/attributes/#comments</comments>
		<pubDate>Wed, 25 Mar 2009 01:22:07 +0000</pubDate>
		<dc:creator>presenadmin</dc:creator>
				<category><![CDATA[WordCamp Tokyo 2009]]></category>

		<guid isPermaLink="false">http://presen.php-web.net/?p=91</guid>
		<description><![CDATA[shortcode_atts( array( &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#8216;size&#8217; => &#8217;15 &#8230; <a href="http://presen.php-web.net/2009/attributes/">続きを読む <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<ul>
<li>shortcode_atts( array(<br />
	&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8216;size&#8217; => &#8217;150&#8242;,<br />
	&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8216;errorlv&#8217; => &#8216;L&#8217;,<br />
	&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ), $atts ));</li>
<li>array(属性 => デフォルト値)</li>
<li>$atts は投稿で指定された生データ<br />
        &#91;qrcode <font color="blue">size=&#8221;200&#8243;</font>&#93;</li>
<li>shortcode_atts でデータ処理</li>
<ol>
<li>余計な属性を削除</li>
<li>未指定ならデフォルト値付与</li>
</ol>
</ul>
<p><span id="more-91"></span></p>
<hr />
array(ショートコード属性, デフォルト値) でデフォルト値を設定する。属性は複数でも良い。属性が無い場合は、array() にする。</p>
<p>$atts は、投稿記事で [コード 属性1=値1 属性2=値2] のように指定した属性と値の配列。</p>
<p>$atts の生データがショートコード実行に適切とは限らないので、shortcode_atts で処理する。</p>
]]></content:encoded>
			<wfw:commentRss>http://presen.php-web.net/2009/attributes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://presen.php-web.net/2009/attributes/" />
	</item>
		<item>
		<title>ソース紹介</title>
		<link>http://presen.php-web.net/2009/source-qrcode/</link>
		<comments>http://presen.php-web.net/2009/source-qrcode/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 01:03:32 +0000</pubDate>
		<dc:creator>presenadmin</dc:creator>
				<category><![CDATA[WordCamp Tokyo 2009]]></category>

		<guid isPermaLink="false">http://presen.php-web.net/?p=89</guid>
		<description><![CDATA[function qrcode_output_func( $atts, $content = null ) { extract( shortcode_atts( array( 'size' =&#62; '150', 'e &#8230; <a href="http://presen.php-web.net/2009/source-qrcode/">続きを読む <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<pre style="font-size: xx-large;">function qrcode_output_func( $atts, $content = null ) {
	extract( shortcode_atts( array(
					'size' =&gt; '150',
					'errorlv' =&gt; 'L',
					), $atts ));
	if ( "" == $content ) {
		$content = get_permalink();
	}
	return '&lt;img src="http://chart.apis.google.com/chart?chs=' . $size . 'x' . $size . '&#038;cht=qr' . '&#038;chld=' . $errorlv . '&#038;chl=' . rawurlencode($content) . '">';
}
add_shortcode( 'qrcode', 'qrcode_output_func' );
</pre>
<p><span id="more-89"></span></p>
]]></content:encoded>
			<wfw:commentRss>http://presen.php-web.net/2009/source-qrcode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://presen.php-web.net/2009/source-qrcode/" />
	</item>
		<item>
		<title>作り方</title>
		<link>http://presen.php-web.net/2009/howto/</link>
		<comments>http://presen.php-web.net/2009/howto/#comments</comments>
		<pubDate>Mon, 23 Mar 2009 06:53:26 +0000</pubDate>
		<dc:creator>presenadmin</dc:creator>
				<category><![CDATA[WordCamp Tokyo 2009]]></category>

		<guid isPermaLink="false">http://presen.php-web.net/?p=84</guid>
		<description><![CDATA[function 関数名($atts, $content = null) { extract(shortcode_atts(array(デフォルト値の定義), $atts )) PHP (WP 関数を含む) で処理 re &#8230; <a href="http://presen.php-web.net/2009/howto/">続きを読む <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<ul>
<li>function 関数名($atts, $content = null) {</li>
<li>extract(shortcode_atts(array(デフォルト値の定義), $atts ))</li>
<li>PHP (WP 関数を含む) で処理</li>
<li>return 戻り値</li>
<li>add_shortcode(ショートコード名, 関数名)</li>
</ul>
<p><span id="more-84"></span></p>
<hr />
関数の定義は PHP のフォーマットにしたがう。<tt>$atts</tt> は属性、<tt>$content</tt> は中身 (&#91;ショートコード&#93;ココ&#91;/ショートコード&#93;)。</p>
<p><tt>shortcode_atts</tt> は、ショートコードの属性を処理する関数。属性が指定されなければデフォルト値を用いる。想定外の属性は削除する。</p>
<p><tt>return</tt> でショートコード実行時に値を返す。</p>
<p><tt>add_shortcode</tt> で、ショートコード名 (&#91;ココ&#93;) を定義する。</p>
]]></content:encoded>
			<wfw:commentRss>http://presen.php-web.net/2009/howto/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://presen.php-web.net/2009/howto/" />
	</item>
		<item>
		<title>ログインユーザーにのみ表示</title>
		<link>http://presen.php-web.net/2009/logged_in/</link>
		<comments>http://presen.php-web.net/2009/logged_in/#comments</comments>
		<pubDate>Sun, 22 Mar 2009 03:38:43 +0000</pubDate>
		<dc:creator>presenadmin</dc:creator>
				<category><![CDATA[WordCamp Tokyo 2009]]></category>

		<guid isPermaLink="false">http://presen.php-web.net/?p=77</guid>
		<description><![CDATA[is_user_logged_in() (準)会員制サイト ex. 会員は割引価格 &#91;sc_is_user_logged_in&#93;メンバー限定メッセージ &#91;/sc_is_user_logged_in &#8230; <a href="http://presen.php-web.net/2009/logged_in/">続きを読む <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<ul>
<li>is_user_logged_in()</li>
<li>(準)会員制サイト</li>
<li>ex. 会員は割引価格</li>
</ul>
<p><span id="more-77"></span></p>
<hr />
&#91;sc_is_user_logged_in&#93;メンバー限定メッセージ &#91;/sc_is_user_logged_in&#93;</p>
<p>ショートコードを無効にすると、生テキストがそのまま表示される。重大な情報の場合は、WP 本体のパスワード機能や、<tt>.htaccess</tt> 等を利用したほうが良い。</p>
<p>このように、訪問者によって、表示するページを臨機応変に変更できるのは、動的生成のメリット。</p>
<pre>
function sc_is_user_logged_in_func( $atts, $content = null ) {
	extract( shortcode_atts( array(
					), $atts ));
	if ( is_user_logged_in() ) {
		return do_shortcode($content);
	} else {
        return "Sorry, logged in member only.";
	}
}
add_shortcode( 'sc_is_user_logged_in', 'sc_is_user_logged_in_func' );
</pre>
<p>詳細は<a href="http://plugin.php-web.net/wp/kasutamu-firudo-no-deta-hyouji">カスタムフィールド／ログインしているユーザーに表示</a>を参照。</p>
]]></content:encoded>
			<wfw:commentRss>http://presen.php-web.net/2009/logged_in/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://presen.php-web.net/2009/logged_in/" />
	</item>
		<item>
		<title>カスタムフィールドとショートコード</title>
		<link>http://presen.php-web.net/2009/customfield_shortcode/</link>
		<comments>http://presen.php-web.net/2009/customfield_shortcode/#comments</comments>
		<pubDate>Tue, 17 Mar 2009 14:52:51 +0000</pubDate>
		<dc:creator>presenadmin</dc:creator>
				<category><![CDATA[WordCamp Tokyo 2009]]></category>

		<guid isPermaLink="false">http://presen.php-web.net/?p=80</guid>
		<description><![CDATA[カスタムフィールド: データを MYSQL データベースに格納するのに便利 ショートコード: データを取り出すのに便利]]></description>
			<content:encoded><![CDATA[<p><img src="http://presen.php-web.net/wp-content/uploads/2009/03/customfield.jpg" alt="customfield" title="customfield" width="868" height="425" class="alignnone size-full wp-image-82" /><br />
<span id="more-80"></span></p>
<hr />
カスタムフィールド: データを MYSQL データベースに格納するのに便利<br />
ショートコード: データを取り出すのに便利</p>
]]></content:encoded>
			<wfw:commentRss>http://presen.php-web.net/2009/customfield_shortcode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://presen.php-web.net/2009/customfield_shortcode/" />
	</item>
		<item>
		<title>カスタムフィールドの値を取得</title>
		<link>http://presen.php-web.net/2009/customfield/</link>
		<comments>http://presen.php-web.net/2009/customfield/#comments</comments>
		<pubDate>Tue, 17 Mar 2009 12:33:11 +0000</pubDate>
		<dc:creator>presenadmin</dc:creator>
				<category><![CDATA[WordCamp Tokyo 2009]]></category>

		<guid isPermaLink="false">http://presen.php-web.net/?p=62</guid>
		<description><![CDATA[&#91;sc_post_custom key=&#8221; &#8220;&#93; key=フィールドキー フィールド値を表示 値が複数のとき separator=区切り WordPress の便利な機能「カスタム &#8230; <a href="http://presen.php-web.net/2009/customfield/">続きを読む <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<ul>
<li>&#91;sc_post_custom key=&#8221; &#8220;&#93;</li>
<li>key=フィールドキー</li>
<li>フィールド値を表示</li>
<ul>
<li>値が複数のとき</li>
<li>separator=区切り</li>
</ul>
</ul>
<p><span id="more-62"></span><br />
<a href="http://presen.php-web.net/wp-content/uploads/2009/03/custom-field.jpg" rel="lightbox[0]"><img src="http://presen.php-web.net/wp-content/uploads/2009/03/custom-field-180x180.jpg" alt="custom-field" title="custom-field" width="180" height="180" class="alignnone size-thumbnail wp-image-65" /></a><br />
<a href="http://presen.php-web.net/wp-content/uploads/2009/03/custom-field-big.jpg" rel="lightbox[0]"> </a><br />
<a href="http://presen.php-web.net/wp-content/uploads/2009/03/filed-data.jpg" rel="lightbox[0]"> </a><br />
<a href="http://presen.php-web.net/wp-content/uploads/2009/03/custom-field-outputsmall.jpg" rel="lightbox[0]"><img src="http://presen.php-web.net/wp-content/uploads/2009/03/custom-field-outputsmall-180x180.jpg" alt="custom-field" title="custom-field" width="180" height="180" class="alignnone size-thumbnail wp-image-65" /></a><br />
<a href="http://presen.php-web.net/wp-content/uploads/2009/03/custom-field-output.jpg" rel="lightbox[0]"> </a></p>
<hr />
WordPress の便利な機能「<a href="http://wp.kyoto-math.jp/how_to_customfield.html">カスタムフィールド</a>」と連携。(最近 Movable Type にも実装されたらしい)</p>
<pre>
function sc_post_custom_func( $atts, $content = null ) {
	extract( shortcode_atts( array(
					'key' => '',
					'separator' => ', ',
					), $atts ));
	if ( is_array(post_custom($key)) ) {
		return implode($separator,post_custom($key));
	} else {
		return post_custom($key);
	}
}
add_shortcode( 'sc_post_custom', 'sc_post_custom_func' );
</pre>
<p>詳細は<a href="http://plugin.php-web.net/wp/kasutamu-firudo-no-deta-hyouji">カスタムフィールドのデータ表示</a>を参照。</p>
]]></content:encoded>
			<wfw:commentRss>http://presen.php-web.net/2009/customfield/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://presen.php-web.net/2009/customfield/" />
	</item>
		<item>
		<title>アマゾンのリンク作成</title>
		<link>http://presen.php-web.net/2009/amazon/</link>
		<comments>http://presen.php-web.net/2009/amazon/#comments</comments>
		<pubDate>Tue, 17 Mar 2009 10:32:30 +0000</pubDate>
		<dc:creator>presenadmin</dc:creator>
				<category><![CDATA[WordCamp Tokyo 2009]]></category>

		<guid isPermaLink="false">http://presen.php-web.net/?p=71</guid>
		<description><![CDATA[リンクを自動表示 アマゾンのサイトへ行く 検索語を入力 HTML タグ取得 ブログに貼り付ける 検索語を指定してアマゾンアソシエイトリンクを生成する。amazon リンク作成 でダウンロード可能。 &#91;sc_ama &#8230; <a href="http://presen.php-web.net/2009/amazon/">続きを読む <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<ul>
<li>リンクを自動表示</li>
<ol>
<li>アマゾンのサイトへ行く</li>
<li>検索語を入力</li>
<li>HTML タグ取得</li>
<li>ブログに貼り付ける</li>
</ol>
</ul>
<p><a href="http://presen.php-web.net/wp-content/uploads/2009/03/amazon-edit.jpg" rel="lightbox[amazon]"><img src="http://presen.php-web.net/wp-content/uploads/2009/03/amazon-edit-180x180.jpg" alt="amazon-edit" title="amazon-edit" width="180" height="180" class="alignnone size-thumbnail wp-image-73" /></a><br />
<a href="http://presen.php-web.net/wp-content/uploads/2009/03/amazon.jpg" rel="lightbox[amazon]"><img src="http://presen.php-web.net/wp-content/uploads/2009/03/amazon-180x180.jpg" alt="amazon-edit" title="amazon-edit" width="180" height="180" class="alignnone size-thumbnail wp-image-73" /></a><br />
<span id="more-71"></span></p>
<hr />
検索語を指定してアマゾンアソシエイトリンクを生成する。<a href="http://plugin.php-web.net/wp/amazon">amazon リンク作成</a> でダウンロード可能。</p>
<p>&#91;sc_amazon&#93;検索語&#91;/sc_amazon&#93; のように記述する。複数語の場合は半角スペースで区切る。</p>
<p>オプション属性でリンクの大きさや、文字、背景、リンクの色等が設定可能。</p>
]]></content:encoded>
			<wfw:commentRss>http://presen.php-web.net/2009/amazon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://presen.php-web.net/2009/amazon/" />
	</item>
	</channel>
</rss>

