<?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>きなこもちのチロルチョコ普及委員会 &#187; php</title>
	<atom:link href="http://chiharaminori.com/archives/category/php/feed" rel="self" type="application/rss+xml" />
	<link>http://chiharaminori.com</link>
	<description>「茅原実里」さんご本人、所属事務所等とは一切関係ありません。</description>
	<lastBuildDate>Sat, 03 Jul 2010 03:36:55 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Conditional GET &amp; XSLT修正</title>
		<link>http://chiharaminori.com/archives/463</link>
		<comments>http://chiharaminori.com/archives/463#comments</comments>
		<pubDate>Fri, 24 Mar 2006 08:11:53 +0000</pubDate>
		<dc:creator>TOSHI</dc:creator>
				<category><![CDATA[MovableType]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://chiharaminori.com/archives/463</guid>
		<description><![CDATA[RSSリーダーをFEEDBRINGERに変えて、descriptionも全部そこで読むようになって、それなら自分のblogのも全部見えたほうがいいよなとFeedBurnerのSummary Burnerをはずしたら、Am [...]]]></description>
			<content:encoded><![CDATA[<p>RSSリーダーをFEEDBRINGERに変えて、descriptionも全部そこで読むようになって、それなら自分のblogのも全部見えたほうがいいよなとFeedBurnerのSummary Burnerをはずしたら、Amazon ECSに使ってるphpソースまで丸見えで俺かっこ悪い状態になってたので、仕方なくFeed元のRSSをphpで生成してみる。<br />
で解決したように見えたんだけど、FeedBurnerを参照しているせんせーの蔵アンテナをふと見たら更新もしてない私のblogが上位に。Apacheのlogみると、どうもちゃんと304を返してないようだ。<a title="Sky and Heart...: エントリーをphpにした後のConditional GET" href="http://masumin.maaya.jp/blog/archives/000166.html">エントリーをphpにした後のConditional GET</a>のコードは埋め込んでるのに&#8230;とおもったら<br />
<a title="PHP で If-Modified-Since に対応してみる -avoidnote-" href="http://www.avoidnote.com/archives/2005/07/modified_since.php">PHP で If-Modified-Since に対応してみる -avoidnote-</a><br />
なんてエントリー発見、なるほどね。このままコードいただきますた。手元でのテストでもちゃんと304返したし多分大丈夫でせう。</p>
<p>ついでにAmazon ECSでげっとしてくるデータの並び順が一定しないので、ASINでsortしてみる。これは参照しているXSLTで、apply-templates内にxslt:sortを突っ込んだだけ。</p>
]]></content:encoded>
			<wfw:commentRss>http://chiharaminori.com/archives/463/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>エントリーをphpにした後のConditional GET</title>
		<link>http://chiharaminori.com/archives/166</link>
		<comments>http://chiharaminori.com/archives/166#comments</comments>
		<pubDate>Thu, 13 Jan 2005 11:00:47 +0000</pubDate>
		<dc:creator>TOSHI</dc:creator>
				<category><![CDATA[MovableType]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://chiharaminori.com/archives/166</guid>
		<description><![CDATA[今まで静的にしか出力してなかったけど、phpを導入したからあらゆるエントリーでLast-Modified無くなってたのに、
「条件付きGET」のススメの話をみて気づいた罠。折角紹介されてるのでやってみようか。
まず、私が [...]]]></description>
			<content:encoded><![CDATA[<p>今まで静的にしか出力してなかったけど、phpを導入したからあらゆるエントリーでLast-Modified無くなってたのに、<br />
<a title="Ogawa::Memoranda: 「条件付きGET」のススメ" href="http://as-is.net/blog/archives/000956.html">「条件付きGET」のススメ</a>の話をみて気づいた罠。折角紹介されてるのでやってみようか。</p>
<p>まず、私がphpでやってる処理だが<br />
・ Amazon ECS 4.0 を使ってASIN決めうちで引き抜いた商品データのURIを、include<br />
・ MTPaginate(月別やカテゴリのアーカイブを分割)<br />
の2つ。どちらも一度出力してしまえば中身が変わることなんてないので、Last-Modified付けたってokだろう。<br />
ということで、(o)さんのエントリーをまんま使わせてもらうことに。「単純なケース」なところのコードを適当な名前でテンプレート・モジュール作って入れてしまって、それを必要なテンプレートでMTInclude使って読み込み、再構築、終了。</p>
]]></content:encoded>
			<wfw:commentRss>http://chiharaminori.com/archives/166/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MTPaginate</title>
		<link>http://chiharaminori.com/archives/137</link>
		<comments>http://chiharaminori.com/archives/137#comments</comments>
		<pubDate>Fri, 03 Dec 2004 07:13:58 +0000</pubDate>
		<dc:creator>TOSHI</dc:creator>
				<category><![CDATA[MovableType]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://chiharaminori.com/archives/137</guid>
		<description><![CDATA[折角phpを入れたので、前に見て入れようかと想ってたMTPaginateを導入してみる。長くなりがちな月別やカテゴリのアーカイブを分割してしまおう。

まずはMTのアーカイブページでphpを使えるようにしなければならない [...]]]></description>
			<content:encoded><![CDATA[<p>折角phpを入れたので、前に見て入れようかと想ってた<a title="MT Extensions: MTPaginate 1.24" href="http://www.nonplus.net/software/mt/MTPaginate.htm">MTPaginate</a>を導入してみる。長くなりがちな月別やカテゴリのアーカイブを分割してしまおう。<br />
<a id="more-137"></a><br />
まずはMTのアーカイブページでphpを使えるようにしなければならない。ぐぐってよく出てくるのはアーカイブの拡張子を.phpに変更する手法だけど、いちいちファイル名を変えるようなマンドイことはしたくないのでいっそ .html の拡張子で使えるように.htaccessで設定してしまう。レンタル鯖だと設定できない人も沢山いそうなので万人にはお勧めできないけど。</p>
<blockquote><p>AddType&nbsp;application/x-httpd-php&nbsp;.html</p></blockquote>
<p>では本命のMTPaginateを導入。pluginをとってきて入れるだけ。後はテンプレに必要な記述を、MTPaginateのWebを参考に設定する。今回はsectionで分けることに(というかwordやbyteで切られても困る)。sectionで分けるといっても、私の場合はスタイルシートの関係から、日毎に区切らないとずれてしまうのでそれを考慮する。例えばカテゴリアーカイブの場合。</p>
<blockquote><p>&lt;MTPaginate&gt;</p>
<p>&lt;MTPaginateIfMultiplePages&gt;<br />&lt;div&nbsp;class=&quot;mtPages&quot;&gt;<br />&nbsp;&nbsp;&lt;h2&gt;Pages&#8230;&lt;/h2&gt;</p>
<p>&nbsp;&nbsp;&lt;p&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;span&nbsp;class=&quot;next&quot;&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;MTPaginateIfFirstPage_&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;#9665;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/MTPaginateIfFirstPage_&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;MTPaginateIfMultiplePages&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;MTPaginateIfLastPage_&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;a&nbsp;href=&quot;&lt;$MTPaginatePreviousPageLink$&gt;&quot;&gt;&amp;#9664;&lt;/a&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/MTPaginateIfLastPage_&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;MTPaginateIfMiddlePage_&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;a&nbsp;href=&quot;&lt;$MTPaginatePreviousPageLink$&gt;&quot;&gt;&amp;#9664;&lt;/a&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/MTPaginateIfMiddlePage_&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;MTPaginateIfAllPages_&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;#9665;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/MTPaginateIfAllPages_&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;/span&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;$MTPaginateNavigator&nbsp;format=&quot;&amp;lt;span&nbsp;class=&amp;quot;text&amp;quot;&amp;gt;%d&amp;lt;/span&amp;gt;&quot;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;format_all=&quot;&amp;lt;span&nbsp;class=\&amp;quot;text\&amp;quot;&amp;gt;&amp;nbsp;All&amp;nbsp;&amp;lt;/span&amp;gt;&quot;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;format_current=&quot;&amp;lt;span&nbsp;class=\&amp;quot;current\&amp;quot;&amp;gt;%d&amp;lt;/span&amp;gt;&quot;&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;/MTPaginateIfMultiplePages&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;span&nbsp;class=&quot;next&quot;&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;MTPaginateIfFirstPage_&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;a&nbsp;href=&quot;&lt;$MTPaginateNextPageLink$&gt;&quot;&gt;&amp;#9654;&lt;/a&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/MTPaginateIfFirstPage_&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;MTPaginateIfLastPage_&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;#9655;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/MTPaginateIfLastPage_&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;MTPaginateIfMiddlePage_&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;a&nbsp;href=&quot;&lt;$MTPaginateNextPageLink$&gt;&quot;&gt;&amp;#9654;&lt;/a&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/MTPaginateIfMiddlePage_&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;MTPaginateIfAllPages_&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;#9655;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/MTPaginateIfAllPages_&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;/span&gt;<br />&nbsp;&nbsp;&lt;/p&gt;<br />&lt;/div&gt;<br />&lt;/MTPaginateIfMultiplePages&gt;</p>
<p>&lt;MTPaginateContent&nbsp;max_sections=&quot;10&quot;&gt;<br />&lt;MTEntries&gt;</p>
<p>&lt;MTDateHeader&gt;<br />&lt;div&nbsp;class=&quot;mtHeading2&quot;&gt;<br />&nbsp;&nbsp;&lt;h2&gt;&lt;$MTEntryDate&nbsp;format=&quot;%x&quot;$&gt;&lt;/h2&gt;<br />&lt;/MTDateHeader&gt;</p>
<p>&#8230;</p>
<p>&lt;MTDateFooter&gt;<br />&lt;/div&gt;<br />&lt;$MTPaginateSectionBreak$&gt;<br />&lt;/MTDateFooter&gt;</p>
<p>&lt;/MTEntries&gt;<br />&lt;/MTPaginateContent&gt;</p>
<p>&lt;/MTPaginate&gt;</p></blockquote>
<p>重要なのはMTPaginateIfMultiplePagesタグの中の設定と、sectionを区切る場所。<br />
MTPaginateIfMultiplePagesタグでページが複数分割される時にページ表示を出す。各ページによって両端に出す三角形の色を変えたり、スタイルシート用にclassつけてるだけ。<br />
MTPaginateContentタグで10sectionを1ページにして、分割する為のindicateになるMTPaginateSectionBreakタグをMTDateFooterタグの中に入れることで、MTPaginate的には日毎にsectionが分割される。ので、実際の表示も、同じ日に複数該当するエントリがあっても同じ1sectionと見られるようにして10section分表示。</p>
<p>&#8230;と書いたけど、上記の話が全部分かる人はちゃんと自分でタグ書いてそう。これコピペして動かなくても知りません。</p>
]]></content:encoded>
			<wfw:commentRss>http://chiharaminori.com/archives/137/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>php4導入、そして挫折&#8230;</title>
		<link>http://chiharaminori.com/archives/131</link>
		<comments>http://chiharaminori.com/archives/131#comments</comments>
		<pubDate>Mon, 29 Nov 2004 10:16:45 +0000</pubDate>
		<dc:creator>TOSHI</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[MovableType]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://chiharaminori.com/archives/131</guid>
		<description><![CDATA[php4をportsから。apache2をソースから入れてるからそのあたりのパラメーターを入れてあげることと、extensionsでgd,mbstringを有効にしてあげることだけ(gdは使うかどうかもわかんないけど
# [...]]]></description>
			<content:encoded><![CDATA[<p>php4をportsから。apache2をソースから入れてるからそのあたりのパラメーターを入れてあげることと、extensionsでgd,mbstringを有効にしてあげることだけ(gdは使うかどうかもわかんないけど</p>
<blockquote><p>#&nbsp;portinstall&nbsp;-M&nbsp;&#39;WITH_APACHE2=yes&nbsp;APXS=/usr/local/apache2/bin/apxs&nbsp;<br />WITH_GD=yes&nbsp;WITH_MBSTRING=yes&#39;&nbsp;lang/php4-extensions</p></blockquote>
<p>で終了。apache再起動して、phpinfoだけなスクリプトで設定確認したり、簡単なmysql用のスクリプト書いて動作確認したり。</p>
<p>phpまで導入した大きな理由は<a title="Ogawa::Memoranda: mt-search.cgiを捨てて簡単メタサーチにしてみよう" href="http://as-is.net/blog/archives/000934.html">簡単メタサーチ</a>だったわけですが&#8230;一応まんま書いて動作はしました。が、リンクの少なさとbotはじきの厳しさからか全然ぐぐる様に嫌われてるわけですよ。しょんぼりmt-search.cgiに戻しましたとさ(´・ω・｀)<br />
次に気になってるのは、MT-3.1新機能のサブカテゴリと、phpを使った?カテゴリページの折り返し。さぁいつになるやら。</p>
]]></content:encoded>
			<wfw:commentRss>http://chiharaminori.com/archives/131/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

