<?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>Toro_Unit</title>
	<atom:link href="http://www.torounit.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.torounit.com</link>
	<description>Toro_UnitのWebデザイン､Webプログラミング、Linux などのことについての備忘録です。</description>
	<lastBuildDate>Wed, 09 May 2012 01:00:12 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Theme Test Driveが便利だった。</title>
		<link>http://www.torounit.com/blog/2012/05/09/1299/</link>
		<comments>http://www.torounit.com/blog/2012/05/09/1299/#comments</comments>
		<pubDate>Wed, 09 May 2012 01:00:12 +0000</pubDate>
		<dc:creator>Toro_Unit</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPressプラグイン]]></category>

		<guid isPermaLink="false">http://www.torounit.com/?p=1299</guid>
		<description><![CDATA[Theme Test Drive « WordPress Plugins WordPressでのサイトをリニューアルするときや、テスト用環境が用意できないときなんかにとても便利でした。 使い方はUseageのところで、テーマを選択して、『Enable Theme Drive』をクリックすると、デフォルトだと管理者でログインしているとき、そのテーマが適用された状態で表示されます。 ユーザーレベルは1…]]></description>
			<content:encoded><![CDATA[<p><a title="Theme Test Drive « WordPress Plugins" href="http://wordpress.org/extend/plugins/theme-test-drive/" target="_blank">Theme Test Drive « WordPress Plugins</a></p>
<p>WordPressでのサイトをリニューアルするときや、テスト用環境が用意できないときなんかにとても便利でした。<img class="aligncenter size-full wp-image-1300 colorbox-1299" title="themetestdrive" src="http://www.torounit.com/wp-content/uploads/2012/05/themetestdrive.png" alt="" width="452" height="567" /></p>
<p>使い方はUseageのところで、テーマを選択して、『Enable Theme Drive』をクリックすると、デフォルトだと管理者でログインしているとき、そのテーマが適用された状態で表示されます。</p>
<p>ユーザーレベルは10がデフォルトですが、これを7とかにすると、編集者のユーザーでもそのテーマが適用される用になったりします。</p>
<p>また、Easy Theme Installationのとこのテキストボックスにテーマのzipが配布されているURLを入力して、Install Themeをクリックすると、テーマがインストールできます。テストしたいテーマの配布元が解ってる場合は便利かも知れません。</p>
<p>テーマの設定画面のプレビューでも確認出来るのですが、パーマリンク周りはいわゆるクリーンURLにならなかったりだとか、色々制約があるので、Theme Test Driveを活用すると、テーマがホントに適用された状態での確認が出来るので、WordPressサイトのリニューアルとかはかなり効率よくなると思います。</p>
<p>特にWordPressでブログをやってる場合は、テスト環境を用意するのも手間なので、なかなか便利に使えるプラグインですよー。</p>
<div id="crp_related"><ul><li><a href="http://www.torounit.com/blog/2012/01/17/1167/" rel="bookmark" class="crp_title">WordPressにショッピングサイトにするプラグインWelcart</a></li><li><a href="http://www.torounit.com/blog/2010/12/28/448/" rel="bookmark" class="crp_title">WordPressのテーマの作り方その１</a></li><li><a href="http://www.torounit.com/blog/2011/12/05/1063/" rel="bookmark" class="crp_title">Custom Post Type Permalinksを公式ディレクトリに公開しました。</a></li><li><a href="http://www.torounit.com/blog/2012/01/04/1156/" rel="bookmark" class="crp_title">WordPressのサイドメニューに『カテゴリ別の新規追加』を追加をするプラグイン &#8220;Category Post&#8221; を公式ディレクトリに公開しました。</a></li><li><a href="http://www.torounit.com/blog/2012/02/08/1226/" rel="bookmark" class="crp_title">IllustratorだってWEBできるんです！！！</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.torounit.com/blog/2012/05/09/1299/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom Post Type Permalinks 0.7.8をリリースしました。</title>
		<link>http://www.torounit.com/blog/2012/04/18/1295/</link>
		<comments>http://www.torounit.com/blog/2012/04/18/1295/#comments</comments>
		<pubDate>Wed, 18 Apr 2012 01:00:54 +0000</pubDate>
		<dc:creator>Toro_Unit</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Custom Post Type Permalinks]]></category>

		<guid isPermaLink="false">http://www.torounit.com/?p=1295</guid>
		<description><![CDATA[ブログを1ヶ月半もサボってました。個人的なバタバタなどが続いたので、なかなかかけませんでした。とりあえず、生存はしてます！ そして、Custom Post Type Permalinksをアップデートしました。内容はバグフィックスです。 ちょっとこちらのミスで、間違ってバグのあるままリリースされてしまいました。気をつけます。 そんなわけで、今後ともよろしくお願いします。m(_ _)m Custom…]]></description>
			<content:encoded><![CDATA[<p>ブログを1ヶ月半もサボってました。個人的なバタバタなどが続いたので、なかなかかけませんでした。とりあえず、生存はしてます！</p>
<p>そして、<a href="http://www.torounit.com/plugins/custom-post-type-permalinks/" title="Custom Post Type Permalinks">Custom Post Type Permalinks</a>をアップデートしました。内容はバグフィックスです。</p>
<p>ちょっとこちらのミスで、間違ってバグのあるままリリースされてしまいました。気をつけます。</p>
<p>そんなわけで、今後ともよろしくお願いします。m(_ _)m</p>
<div id="crp_related"><ul><li><a href="http://www.torounit.com/blog/2012/01/16/1189/" rel="bookmark" class="crp_title">Custom Post Type Permalinks　0.7.4.1をリリースしました。</a></li><li><a href="http://www.torounit.com/blog/2011/12/05/1063/" rel="bookmark" class="crp_title">Custom Post Type Permalinksを公式ディレクトリに公開しました。</a></li><li><a href="http://www.torounit.com/blog/2011/11/14/1008/" rel="bookmark" class="crp_title">Custom Post Type Permalinks 0.4.5をリリースしました。</a></li><li><a href="http://www.torounit.com/blog/2011/12/30/1143/" rel="bookmark" class="crp_title">Custom Post Type Permalinks 0.7.3 をリリースしました。</a></li><li><a href="http://www.torounit.com/blog/2012/01/20/1192/" rel="bookmark" class="crp_title">Custom Post Type Permalinks 0.7.5.1をリリースしました。</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.torounit.com/blog/2012/04/18/1295/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>「チュートリアルで作成したブログにタグ機能を実装するチュートリアル」をcakePHP2.0でやってみた。</title>
		<link>http://www.torounit.com/blog/2012/02/28/1281/</link>
		<comments>http://www.torounit.com/blog/2012/02/28/1281/#comments</comments>
		<pubDate>Tue, 28 Feb 2012 01:00:16 +0000</pubDate>
		<dc:creator>Toro_Unit</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[cakePHP]]></category>

		<guid isPermaLink="false">http://www.torounit.com/?p=1281</guid>
		<description><![CDATA[元ネタはこれ。チュートリアルで作成したブログにタグ機能を実装するチュートリアル &#8211; 「最果て」の支部 cakePHPを最近触りだしたのですが、巷にcakePHP1系の情報があふれているのでなかなか大変な今日この頃です。 とりあえず、cakePHP2.0のブログチュートリアルにタグ機能を実装してみました。 やっていることは元ネタと変わらないので、そちらを読みつつやっていければと思います。…]]></description>
			<content:encoded><![CDATA[<p>元ネタはこれ。<a href="http://d.hatena.ne.jp/nori0620/20071123/1195801255" target="_blank">チュートリアルで作成したブログにタグ機能を実装するチュートリアル &#8211; 「最果て」の支部</a></p>
<p>cakePHPを最近触りだしたのですが、巷にcakePHP1系の情報があふれているのでなかなか大変な今日この頃です。</p>
<p>とりあえず、cakePHP2.0の<a href="http://book.cakephp.org/2.0/ja/tutorials-and-examples/blog/blog.html" target="_blank">ブログチュートリアル</a>にタグ機能を実装してみました。</p>
<p>やっていることは元ネタと変わらないので、そちらを読みつつやっていければと思います。</p>
<section>
<h1>テーブルの作成</h1>
<p>タグ機能みたいな、複数の値と複数の値を関連づけるような機能（この場合だと複数の記事が一つのタグに所属する&#038;複数のタグが一つの記事に所属する）は、一筋縄ではいかないようです。投稿を管理するテーブルにタグを管理するフィールドを作って、タグのテーブルにもその逆を作って、そこにカンマ区切りとかjsonとかで・・・・とか、どう考えても無茶が過ぎるし、SQLで対処できなくなりますよね。</p>
<p>なので、タグと投稿を関連づけるための別のテーブルを用意します。WordPressだと、term_relationshipsっていうテーブルが有るのですが、それと同じ事をやろうというわけ。</p>
<p>それをcakePHPではhasAndBelongsToMany通称HABTMと言う機能で実装できるようです。</p>
<p>なので、まずその二つのテーブルを作成します。</p>
<pre class="brush: sql; title: ; notranslate">
CREATE TABLE `tags` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `tag` varchar(100) default NULL,
  PRIMARY KEY  (`id`)
)
</pre>
<pre class="brush: sql; title: ; notranslate">
CREATE TABLE `posts_tags` (
  `post_id` int(10) unsigned NOT NULL default '0',
  `tag_id` int(10) unsigned NOT NULL default '0',
  PRIMARY KEY  (`post_id`,`tag_id`)
)
</pre>
<p>HABTMのテーブル名は、関連づけるテーブル1_テーブル2、フィールド名も、テーブル1の単数形_idで作成するようにと規約にあるようなので、その方がベターだと思われます。</p>
</section>
<section>
<h1>モデルの作成</h1>
<p>Tag.phpをModelディレクトリ内に作成します。<br />
この中にタグの追加、編集などを行うメソッド(parseTags)を定義します。これをコントローラーで呼ぶ訳ですね。</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
class Tag extends AppModel {
	public $name = 'Tag';

	public $hasAndBelongsToMany = array(
		'Post' =&gt; array(
			'className' =&gt; 'Post',
			'joinTable' =&gt; 'posts_tags',
			'foreignKey' =&gt; 'tag_id',
			'associationForeignKey' =&gt; 'post_id'
		)
	);

	public function parseTags($tagString) {
		$ids = array();

		$tags = explode(',',trim($tagString));

		foreach ($tags as $tag):
			if(!empty($tag)){
				//DBからタグに対応する列を取得
				$tag = trim($tag);
				$this-&gt;unbindModel(array('hasAndBelongsToMany' =&gt; array('Post')));
				$tagRow = $this-&gt;findByTag($tag);

				if(is_array($tagRow)){
					//タグが登録済の処理
					if(in_array($tagRow['Tag']['id'], $ids)){
						continue;
					}
					$ids[] = $tagRow['Tag']['id'];
				}else {
					$newTag['Tag']['tag'] = $tag;
					$newTag['Tag']['id'] = &quot;&quot;;
					$this-&gt;save($newTag);
					$ids[] = $this-&gt;getLastInsertID();
				}
			}

		endforeach;

		return $ids;
	}
}
</pre>
<p>$hasAndBelongsToMany繋ぐテーブルを定義します。<br />
結合とかはこれだけで勝手にやってくれる模様。</p>
<p>次いで、Post.php。<br />
$hasAndBelongsToManyを定義するのは一緒。<br />
Tag.phpでは書いてあった、&#8217;foreignKey&#8217;と&#8217;associationForeignKey&#8217;が書いてません。ただ、デフォルト値でforeignKeyは現在のモデル名_id,associationForteignKeyは外部モデル名_idになるようですので問題ないようです。<br />
ここで、findAllByTagsというデータベースからあるタグがついた記事のデータを持ってくるメソッドと、それの数を数えるfindCountByTagsというメソッドの二つを用意します。</p>
<pre class="brush: php; title: ; notranslate">
class Post extends AppModel {
	public $name = 'Post';

	public $validate = array(
		'title' =&gt; array(
			'rule' =&gt; 'notEmpty'
		),
		'body' =&gt; array(
			'rule' =&gt; 'notEmpty'
		)
	);

	public $hasAndBelongsToMany = array(
		'Tag' =&gt; array(
			'className' =&gt; 'Tag',
			'order' =&gt; 'tag'
		)
	);

	public function findCountByTags($tags = array(), $criteria = null) {
		if(count($tags) &lt;= 0){
			return 0;
	}
		if(!empty($criteria)) {
			$criteria = 'AND'.$criteria;
		}

		$prefix = $this-&gt;tablePrefix;
		$count = $this-&gt;query(
			&quot;SELECT COUNT('Post.id') AS count FROM
			(SELECT Post.id, COUNT(DISTINCT tags.tag) AS uniques
			FROM {$prefix}posts Post, {$prefix}posts_tags posts_tags, {$prefix}tags tags
			WHERE Post.id = posts_tags.Post_id
				AND tags.id = posts_tags.tag_id
				AND tags.tag IN ('&quot;.implode(&quot;', '&quot;, $tags).&quot;') $criteria
			GROUP BY posts_tags.Post_id
			HAVING uniques = &quot;.count($tags).&quot;) x&quot; );

		return $count[0][0]['count'];
	}

	public function findAllByTags($tags = array(), $limit = 50, $page = 1, $criteria = null){
		if(count($tags) &lt;= 0){
			return 0;
		}
		if(!empty($criteria)) {
			$criteria = 'AND'.$criteria;
		}

		$prefix = $this-&gt;tablePrefix;
		$offset = $limit * ($page-1);
		$posts = $this-&gt;query(
			&quot;SELECT
			Post.id,
			Post.title,
			Post.created,
			COUNT(DISTINCT tags.tag) AS uniques
					FROM
					{$prefix}posts Post,
					{$prefix}posts_tags posts_tags,
					{$prefix}tags tags
					WHERE Post.id = posts_tags.Post_id
					AND tags.id = posts_tags.tag_id
					AND tags.tag IN ('&quot;.implode(&quot;', '&quot;, $tags).&quot;') $criteria
					GROUP BY posts_tags.Post_id
					HAVING uniques = '&quot;.count($tags).&quot;'
					ORDER BY Post.created DESC
					LIMIT $offset, $limit&quot;
		);

		return $posts;
	}
}
</pre>
</section>
<section>
<h1>コントローラーの作成、編集</h1>
<p>PostController.phpでは、<br />
まず、add,editにタグを追加、編集する機能を追加。元記事では、$this->dataとなっていますが、cakePHP2.0の場合は$this->request->dataとしないとエラーになります。なりました。</p>
<p>そして、tagアクションの追加。ここで、先ほどPostモデルで作ったメソッドが使われるわけですね。</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
class PostsController extends AppController {
	public $name = 'Posts';
	public $uses = array('Post','Tag');
	public $helper = array('Html','Form');
	public $components = array('Session');

	public function index() {
		//全てのデータの読み出し
		$posts = $this-&gt;Post-&gt;find('all');
		$this-&gt;set('posts',$posts);
	}

	public function view($id = null) {
		//単一投稿の表示
		$this-&gt;Post-&gt;id = $id;
		$post = $this-&gt;Post-&gt;read();
		$this-&gt;set('post',$post);
	}

	public function add() {
		if($this-&gt;request-&gt;is('post')){//$_POSTの判定

			//タグのパース
			if(!empty($this-&gt;request-&gt;data['Post']['Tags'])){
				$this-&gt;request-&gt;data['Tag']['Tag'] = $this-&gt;Post-&gt;Tag-&gt;parseTags($this-&gt;data['Post']['Tags']);
			}

			if($this-&gt;Post-&gt;save($this-&gt;request-&gt;data)){
				$this-&gt;Session-&gt;setFlash('投稿が保存されました');
				$this-&gt;redirect(array('action'=&gt;'index'));//indexへリダイレクト
			}
			else {
				$this-&gt;Session-&gt;setFlash('投稿が保存できませんでした');
			}
		}
	}

	public function edit($id = null) {
		$this-&gt;Post-&gt;id = $id;
		if($this-&gt;request-&gt;is('get')){
			//読み出し
			$this-&gt;request-&gt;data = $this-&gt;Post-&gt;read();//データの取得

			//タグの取得
			if(count($this-&gt;request-&gt;data['Tag'])){
				$tags = '';
				foreach ($this-&gt;request-&gt;data['Tag'] as $tag) {//一行ずつ取り出す
					$tags .= $tag['tag'].&quot;,&quot;;
				}
				$this-&gt;request-&gt;data['Post']['Tags'] = substr($tags, 0 ,-1);//最後のカンマを取り除いてViewにデータを投げる
			}
		}
		else {

			if(!empty($this-&gt;data['Post']['Tags'])){
				$this-&gt;request-&gt;data['Tag']['Tag'] = $this-&gt;Post-&gt;Tag-&gt;parseTags($this-&gt;data['Post']['Tags']);
			}

			if($this-&gt;Post-&gt;save($this-&gt;request-&gt;data)){
				$this-&gt;Session-&gt;setFlash('投稿を更新しました');
				$this-&gt;redirect(array('action'=&gt; 'index'));
			}else{
				$this-&gt;Session-&gt;setFlash('更新できませんでした');
			}
		}
	}

	public function delete($id) {
		if($this-&gt;request-&gt;is('get')){
			//GETならエラー
			throw new MethodNotAllowedException();
		}

		if($this-&gt;Post-&gt;delete($id)){
			$this-&gt;Session-&gt;setFlash('ID:'.$id.'の投稿を削除しました');
			$this-&gt;redirect(array('action'=&gt;'index'));
		}
	}

	public function tag($tag = null) {
		$tags = array();
		App::uses('Sanitize', 'Utility');
		$this-&gt;Sanitize = new Sanitize;

		if(isset($this-&gt;params['pass'])){

			foreach($this-&gt;params['pass'] as $tag):
				$this-&gt;Sanitize-&gt;paranoid($tag, array(' '));
				$tags[] = $tag;
			endforeach;

		}
		$paging['url'] = '/posts/tag'. implode('/', $tags);
		$paging['total'] = $this-&gt;Post-&gt;findCountByTags($tags);
		if($paging['total'] &gt; 0){
			$posts = $this-&gt;Post-&gt;findAllByTags($tags);
			$this-&gt;set('posts',$this-&gt;Post-&gt;findAllByTags($tags));
			$this-&gt;render('index');
		}
		else {
			//タグの記事が無い場合の処理。記事が見つかりませんでしたみたいな。
			//exit;
		}
	}

}
</pre>
</section>
<section>
<h1>Viewの編集</h1>
<p>とりあえず、add.ctpとedit.ctpにタグ用のテキストボックスを追加。</p>
<pre class="brush: php; title: ; notranslate">
echo $this-&gt;Form-&gt;input('Tags', array('size' =&gt; '40'));
</pre>
<p>edit.ctpはこんな感じ。add.ctpは省略。</p>
<pre class="brush: php; title: ; notranslate">
&lt;h1&gt;Edit Post&lt;/h1&gt;
&lt;?php
echo $this-&gt;Form-&gt;create('Post', array('action' =&gt; 'edit'));
	echo $this-&gt;Form-&gt;input('title');
	echo $this-&gt;Form-&gt;input('body', array('rows' =&gt; '3'));
	echo $this-&gt;Form-&gt;input('Tags', array('size' =&gt; '40'));
	echo $this-&gt;Form-&gt;input('id', array('type' =&gt; 'hidden'));
echo $this-&gt;Form-&gt;end('Save Post');
?&gt;
</pre>
<p>ここまででちゃんと動くはず！</p>
</section>
<section>
<h1>タグクラウドの作成</h1>
<p>ここではタグクラウドをTagsController.phpに作成です。タグクラウド(ﾟ⊿ﾟ)ｲﾗﾈって人は別に作らないでいいと思います。</p>
<pre class="brush: php; title: ; notranslate">

class TagsController extends AppController {

	public $name = &quot;Tags&quot;;

	public function tagcloudbox(){
		$prefix = $this-&gt;Tag-&gt;tablePrefix;
		$tagsData = $this-&gt;Tag-&gt;query(
			&quot;SELECT tags. * , count(posts_tags.tag_id) PostCount
				FROM {$prefix}tags tags
				LEFT JOIN {$prefix}posts_tags posts_tags ON tags.id = posts_tags.tag_id
				GROUP BY tags.id
				ORDER BY tags.tag&quot;
		);

		$this-&gt;set('tags', $tagsData);

		$PostCounts = array();

		if(is_array($tagsData) &amp;&amp; count($tagsData) &gt; 0) {
			foreach($tagsData as $tagDetails):
				$PostCounts[] = $tagDetails[0]['PostCount'];
			endforeach;
		}
		else {
			$PostCounts[] = 0;
		}

		$maxQuantity = max($PostCounts);
		$minQuantity = min($PostCounts);

		$spread = $maxQuantity - $minQuantity;

		if($spread == 0){
			$spread = 1;
		}

		$this-&gt;set('spread', $spread);
		$this-&gt;set('minQuantity', $minQuantity);
		$this-&gt;set('browsing', 'Tags');

	}
}
</pre>
<p>んで、View/Tags/tagcloudbox.ctpを作成</p>
<pre class="brush: php; title: ; notranslate">
&lt;div id=&quot;sidecontent&quot;&gt;
	&lt;h2&gt;Tag&lt;/h2&gt;
	&lt;?php
	$step = (30-10) /$spread;

	foreach($tags as $tag):
		$fontSize = 10 + ($tag[0]['PostCount'] - $minQuantity) * $step;
	endforeach;

	echo $this-&gt;Html-&gt;Link($tag['tags']['tag'], array('action' =&gt; 'tag','controller' =&gt; 'posts',$tag['tags']['tag']), array('title' =&gt; $tag[0]['PostCount'].'Photos','rel' =&gt; 'tag', 'style' =&gt; 'font-size:'.$fontSize.'px')).' ';

	?&gt;
&lt;/div&gt;
</pre>
<p>ここでは普通にViewにしてありますが、エレメントにしてあげて、他のViewから呼んであげるとかの使い方が良さそうです。<br />
</section>
<p>とりあえず何とかcakePHP2.0で実装できました。<br />
ちょっとできる人になった気分！笑<br />
まぁ、タグって結構需要はあると思うので、こんな感じで実装できました！ってだけのエントリーなんですけどね。</p>
<p>posts/tag/tag1/tag2/tag3<br />
みたいな絞り込みもできるようです。</p>
<p>ただ、この<a href="http://d.hatena.ne.jp/nori0620/20071123/1195801255" target="_blank">元ネタ</a>のcheesecake-photoblogのライセンスはGPLv2ですので、当然このエントリーのコードもGPLv2です。使う際はご注意下さい。</p>
<div id="crp_related"><ul><li><a href="http://www.torounit.com/blog/2012/01/27/1207/" rel="bookmark" class="crp_title">Topsyから特定のURLに関するつぶやきをWordPressっぽく取得できるClassを書いてみた。</a></li><li><a href="http://www.torounit.com/blog/2011/05/10/710/" rel="bookmark" class="crp_title">Drupal7で営業日カレンダーのブロックモジュールを作ってみた。</a></li><li><a href="http://www.torounit.com/blog/2011/12/02/1040/" rel="bookmark" class="crp_title">jQuery.uploadを使った、画像のサムネイルを表示するフォームのデモを作りました。</a></li><li><a href="http://www.torounit.com/blog/2011/01/24/538/" rel="bookmark" class="crp_title">WordPressのテーマの作り方その４</a></li><li><a href="http://www.torounit.com/blog/2012/01/25/1205/" rel="bookmark" class="crp_title">WordPressで管理画面外から投稿を追加するwp_insert_post()と、編集するwp_update_post()、削除するwp_delete_post()</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.torounit.com/blog/2012/02/28/1281/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom Post Type Permalinks 0.7.6をリリースしました。</title>
		<link>http://www.torounit.com/blog/2012/02/24/1285/</link>
		<comments>http://www.torounit.com/blog/2012/02/24/1285/#comments</comments>
		<pubDate>Fri, 24 Feb 2012 08:21:38 +0000</pubDate>
		<dc:creator>Toro_Unit</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Custom Post Type Permalinks]]></category>

		<guid isPermaLink="false">http://www.torounit.com/?p=1285</guid>
		<description><![CDATA[Custom Post Type Permalinksをアップデートしました。 アップデート内容は 親ページが存在する場合のスラッグの追加 バグフィックス となっております。 ただし、既知の不具合として、 &#8216;hierarchical&#8217; => trueなカスタム投稿タイプと、&#8217;hierarchical&#8217; => trueなカスタム分類を関連づけている そ…]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.torounit.com/plugins/custom-post-type-permalinks/" title="Custom Post Type Permalinks">Custom Post Type Permalinks</a>をアップデートしました。</p>
<p>アップデート内容は</p>
<ul>
<li>親ページが存在する場合のスラッグの追加</li>
<li>バグフィックス</li>
</ul>
<p>となっております。</p>
<p>ただし、既知の不具合として、</p>
<ol>
<li>&#8216;hierarchical&#8217; => trueなカスタム投稿タイプと、&#8217;hierarchical&#8217; => trueなカスタム分類を関連づけている</li>
<li>その投稿タイプパーマリンクにカスタム分類を設定している</li>
<li>記事が親カテゴリを持つカテゴリ(ターム)に所属している</li>
</ol>
<p>の3つを満たすと、記事にアクセスできなくなるという問題があります。</p>
<p>また、パーマリンクの設定が旨く反映されない場合、一度、WordPressのデフォルトのカスタム構造をデフォルトに戻したあと、また再設定すると直ることが多いです。</p>
<p>近々マニュアルを整備します。正直こんなに色々使ってもらえるとは思ってなかったので・・・</p>
<p>とりあえず、<a href="https://twitter.com//Toro_Unit" target="_blank">Twitter</a>でも<a href="http://www.facebook.com/torounit" target="_blank">Facebook</a>でも<a href="http://www.torounit.com/contact/" title="Contact">メールフォーム</a>でも質問などには答えますので、お急ぎの方は個人的にコンタクト下さいm(_ _)m</p>
<div id="crp_related"><ul><li><a href="http://www.torounit.com/blog/2012/01/20/1192/" rel="bookmark" class="crp_title">Custom Post Type Permalinks 0.7.5.1をリリースしました。</a></li><li><a href="http://www.torounit.com/blog/2011/12/30/1143/" rel="bookmark" class="crp_title">Custom Post Type Permalinks 0.7.3 をリリースしました。</a></li><li><a href="http://www.torounit.com/blog/2011/12/05/1063/" rel="bookmark" class="crp_title">Custom Post Type Permalinksを公式ディレクトリに公開しました。</a></li><li><a href="http://www.torounit.com/blog/2011/12/15/1095/" rel="bookmark" class="crp_title">Custom Post Type Permalinks 0.7 をリリースしました。</a></li><li><a href="http://www.torounit.com/blog/2012/04/18/1295/" rel="bookmark" class="crp_title">Custom Post Type Permalinks 0.7.8をリリースしました。</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.torounit.com/blog/2012/02/24/1285/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>portfolio作りました。</title>
		<link>http://www.torounit.com/blog/2012/02/23/1282/</link>
		<comments>http://www.torounit.com/blog/2012/02/23/1282/#comments</comments>
		<pubDate>Thu, 23 Feb 2012 04:01:03 +0000</pubDate>
		<dc:creator>Toro_Unit</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.torounit.com/?p=1282</guid>
		<description><![CDATA[友人に、「ポートフォリオないの？」って言われたのをこのあいだ思い出して、とりあえず、hashChangeとかjQuery,JavaScript周りの練習にちょうど良いネタだなと思いとりあえず、作ってみました。手段のために目的を探している感が強いですが・・・ http://www.torounit.com/portfolio/ 中身も頑張って増やしていきます！ ねこつい （http://neko.t…]]></description>
			<content:encoded><![CDATA[<p>友人に、「ポートフォリオないの？」って言われたのをこのあいだ思い出して、とりあえず、hashChangeとかjQuery,JavaScript周りの練習にちょうど良いネタだなと思いとりあえず、作ってみました。手段のために目的を探している感が強いですが・・・</p>
<p><a href="http://www.torounit.com/portfolio/">http://www.torounit.com/portfolio/</a></p>
<p>中身も頑張って増やしていきます！</p>
<div id="crp_related"><ul><li><a href="http://www.torounit.com/blog/2011/12/12/1093/" rel="bookmark" class="crp_title">ねこつい （http://neko.torounit.com/） をアップデートしました。</a></li><li><a href="http://www.torounit.com/blog/2012/01/04/1148/" rel="bookmark" class="crp_title">昨年の人気記事</a></li><li><a href="http://www.torounit.com/blog/2011/11/04/971/" rel="bookmark" class="crp_title">Custom Post Type Permalinks 0.3をリリースしました。</a></li><li><a href="http://www.torounit.com/blog/2011/01/12/479/" rel="bookmark" class="crp_title">CMS Made Simpleを試す</a></li><li><a href="http://www.torounit.com/blog/2010/09/13/198/" rel="bookmark" class="crp_title">Trac Lightingを導入する</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.torounit.com/blog/2012/02/23/1282/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Served from: www.torounit.com @ 2012-05-19 23:33:41 -->
