<?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>TAN LABO</title>
	<atom:link href="http://tan2net.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://tan2net.com</link>
	<description>tanの備忘録</description>
	<lastBuildDate>Wed, 20 Jan 2010 01:34:47 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>WordPressで404.phpを作成した際の設定</title>
		<link>http://tan2net.com/?p=77</link>
		<comments>http://tan2net.com/?p=77#comments</comments>
		<pubDate>Wed, 20 Jan 2010 01:34:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[全般]]></category>

		<guid isPermaLink="false">http://www.tan2net.com/?p=77</guid>
		<description><![CDATA[				WordPressで404.phpを設置したあとに、そのままだと上手くエラーページを表示してくれない場合があるんです。
				Google先生に尋ねたところ、Hinemosuさんのページで紹介されていました。（ [...]]]></description>
			<content:encoded><![CDATA[				<p>WordPressで404.phpを設置したあとに、そのままだと上手くエラーページを表示してくれない場合があるんです。<br />
				Google先生に尋ねたところ、<a href="http://www.hide10.com/?p=11111" target="_blank">Hinemosuさんのページ</a>で紹介されていました。（ありがとうございます）</p>
				<p>その時のために、.htaccessファイル等を編集する方法</p>
				<p>.htaccessファイルの先頭に、以下のコードを追加します。</p>
				<pre class="brush:text">ErrorDocument 404 /index.php?error=404
</pre>
				<p>またarchive.php、page.php、single.phpがある場合は、各ファイルの「&lt; ?php get_header(); ?&gt;」の前にいかのコードを記述します。</p>
				<pre class="brush:php">
&#60;?php if (!have_posts()) {
header("HTTP/1.1 404 Not Found");
include (TEMPLATEPATH . '/404.php');
return; } ?&#62;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://tan2net.com/?feed=rss2&amp;p=77</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPressで会員サイトを作るときのログイン画面を表示させるプラグイン</title>
		<link>http://tan2net.com/?p=74</link>
		<comments>http://tan2net.com/?p=74#comments</comments>
		<pubDate>Tue, 19 Jan 2010 01:08:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[プラグイン]]></category>

		<guid isPermaLink="false">http://www.tan2net.com/?p=74</guid>
		<description><![CDATA[				WordPressで会員制サイトを作成したい場合や、制作途中でまだ公開したくないけどサーバーで表示を確認したいときに、ユーザーしかサイトを見られないようにするためのプラグインが「Members Only」というプ [...]]]></description>
			<content:encoded><![CDATA[				<p>WordPressで会員制サイトを作成したい場合や、制作途中でまだ公開したくないけどサーバーで表示を確認したいときに、ユーザーしかサイトを見られないようにするためのプラグインが「Members Only」というプラグインです。</p>
				<p><a href="http://wordpress.org/extend/plugins/members-only/" target="_blank">プラグインをこちらからダウンロードします。</a></p>
				<p>ダウンロードしたファイルを解凍して、サーバーのPluginフォルダに置きます。</p>
				<p>WordPressにて、プラグインを有効化して、「設定」-「Members Only」をクリックします。</p>
				<p><a href="http://www.tan2net.com/wp-content/uploads/membersonly.gif"><img class="alignnone size-medium wp-image-75" title="membersonly" src="http://www.tan2net.com/wp-content/uploads/membersonly-300x136.gif" alt="" width="300" height="136" /></a></p>
				<p>設定画面のMembers Only？のところが最初チェックが外れていますので、チェックをつけて画面したの【Update Option】ボタンをクリックすればOKです。</p>
]]></content:encoded>
			<wfw:commentRss>http://tan2net.com/?feed=rss2&amp;p=74</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPressのページに.htmlをつけてくれるプラグイン</title>
		<link>http://tan2net.com/?p=71</link>
		<comments>http://tan2net.com/?p=71#comments</comments>
		<pubDate>Mon, 18 Jan 2010 05:19:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[プラグイン]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://www.tan2net.com/?p=71</guid>
		<description><![CDATA[				WordPressでページを作成して、そのページ内のname属性とかにリンクを張りたい場合、パーマリンクがXXX.html
				になっていないと、&#60;a href=&#8221;hoge.html#hog [...]]]></description>
			<content:encoded><![CDATA[				<p>WordPressでページを作成して、そのページ内のname属性とかにリンクを張りたい場合、パーマリンクがXXX.html<br />
				になっていないと、&lt;a href=&#8221;hoge.html#hogehoge&#8221;&gt;って感じでリンクを張れないんですよね。<br />
				どうしようかと調べていましたら、ページのスラッグに自動的に.htmlをつけてくれるプラグインがありました。<br />
				同じこと考える人はいるもんですね。（ありがたい、ありがたい）<br />
				「.html on PAGES」というプラグインをダウンロードします。<br />
				<a href="http://wordpress.org/extend/plugins/html-on-pages/">ダウンロードはこちらから</a><br />
				あとは通常のプラグインと同じくpluginフォルダにアップロードして、管理画面から有効化してあげるだけです。<br />
				スラッグを書くときに.htmlとか入れなくていいです。例えばスラッグが「hoge」なら、そのページのパーマリンクが自動的にhoge.htmlに替わってくれます。</p>
]]></content:encoded>
			<wfw:commentRss>http://tan2net.com/?feed=rss2&amp;p=71</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress のパーマリンク設定とsingleページ</title>
		<link>http://tan2net.com/?p=67</link>
		<comments>http://tan2net.com/?p=67#comments</comments>
		<pubDate>Sat, 05 Dec 2009 23:41:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[パーマリンク]]></category>

		<guid isPermaLink="false">http://www.tan2net.com/?p=67</guid>
		<description><![CDATA[				WordPressでパーマリンクを設定しているときに、SEOとかでよく
				
/%category%/%post_id%.html
/%category%/%post_id%/

				などの表記をするので [...]]]></description>
			<content:encoded><![CDATA[				<p>WordPressでパーマリンクを設定しているときに、SEOとかでよく</p>
				<pre class="brush:php;">
/%category%/%post_id%.html
/%category%/%post_id%/
</pre>
				<p>などの表記をするのですが、サイトを作成していてsingleページへリンクが飛ばない現象が起きたので、忘れないようにメモ。<br />
				個別の記事を表示させて、コメント欄を表示させたいのに、</p>
				<pre class="brush:php;">
/%category%/%post_id%/
</pre>
				<p>だと、何故か個別ページに飛ばず、indexページが表示されてしまいます。何故だろう？</p>
				<pre class="brush:php;">
/%category%/%post_id%.html
</pre>
				<p>とすると、single.phpが適用されます。<br />
				もう少し勉強が必要だ。</p>
]]></content:encoded>
			<wfw:commentRss>http://tan2net.com/?feed=rss2&amp;p=67</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPressにおける写真の配置</title>
		<link>http://tan2net.com/?p=65</link>
		<comments>http://tan2net.com/?p=65#comments</comments>
		<pubDate>Thu, 26 Nov 2009 02:23:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[全般]]></category>

		<guid isPermaLink="false">http://www.tan2net.com/?p=65</guid>
		<description><![CDATA[				WordPressで写真を投稿すると、文字の回り込みを指定できるようになってると思います。
				テーマとかを変更していて、そのまま使っていると編集画面ではきちんと回り込んでくれる文字も、実際ブラウザで確認する [...]]]></description>
			<content:encoded><![CDATA[				<p>WordPressで写真を投稿すると、文字の回り込みを指定できるようになってると思います。</p>
				<p>テーマとかを変更していて、そのまま使っていると編集画面ではきちんと回り込んでくれる文字も、実際ブラウザで確認すると全然回り込んでくれていないので、フォーラムにて教えていただきました。</p>
				<pre class="brush:css;">
img.centered {
display: block;
margin-left: auto;
margin-right: auto;
}

img.alignright {
padding: 4px;
margin: 0 0 2px 7px;
display: inline;
}

img.alignleft {
padding: 4px;
margin: 0 7px 2px 0;
display: inline;
}

.alignright {
float: right;
}

.alignleft {
float: left
}
</pre>
				<p>デフォルトのテーマのCSSのようですが、これをテーマにあった形（そのままでも）で使うときちんと回り込んでくれます。</p>
]]></content:encoded>
			<wfw:commentRss>http://tan2net.com/?feed=rss2&amp;p=65</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPressパーマリンクの設定</title>
		<link>http://tan2net.com/?p=60</link>
		<comments>http://tan2net.com/?p=60#comments</comments>
		<pubDate>Thu, 26 Nov 2009 02:03:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[全般]]></category>

		<guid isPermaLink="false">http://www.tan2net.com/?p=60</guid>
		<description><![CDATA[				WordPressのパーマリンクの設定は、SEOの観点からも変更した方がいいみたいです。
				設定は簡単で、管理画面の【設定】－【パーマリンク設定】からカスタム構造のラジオボタンをクリックし、
				/%c [...]]]></description>
			<content:encoded><![CDATA[				<p>WordPressのパーマリンクの設定は、SEOの観点からも変更した方がいいみたいです。</p>
				<p>設定は簡単で、管理画面の【設定】－【パーマリンク設定】からカスタム構造のラジオボタンをクリックし、</p>
				<pre class="brush:html">/%category%/%post_id%.html</pre>
<p>上記のような記述をすればOKです。</p>
<p>気をつけなくてはいけないのは.htaccessファイルです。</p>
<p>こちらを作成して、Wordpressをアップロードしたルート（wp-adminフォルダとかwp-contentフォルダがあるところ）に保存し、パーミッションを606か、666に変更しておきます。</p>
<p>パーマリンクの設定を更新すると、.htaccessファイルが更新されます。</p>
]]></content:encoded>
			<wfw:commentRss>http://tan2net.com/?feed=rss2&amp;p=60</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPressのデータベースを定期的にバックアップするプラグイン</title>
		<link>http://tan2net.com/?p=56</link>
		<comments>http://tan2net.com/?p=56#comments</comments>
		<pubDate>Wed, 25 Nov 2009 04:44:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[プラグイン]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://www.tan2net.com/?p=56</guid>
		<description><![CDATA[				WordPressのデータベースを自動でバックアップしてくれ、しかもそれをメールで配信してくれるプラグインを導入。
				WP-DB-Backupプラグイン
				
				 プラグインをダウンロード
			 [...]]]></description>
			<content:encoded><![CDATA[				<p>WordPressのデータベースを自動でバックアップしてくれ、しかもそれをメールで配信してくれるプラグインを導入。</p>
				<p>WP-DB-Backupプラグイン</p>
				<ul>
				<li> <a href="http://wordpress.org/extend/plugins/wp-db-backup/">プラグインをダウンロード</a></li>
				<li>解凍後、wp-db-backup.php、wp-db-backup-ja.moをpluginフォルダにアップロード</li>
				<li>管理画面のプラグインで有効化</li>
				</ul>
				<p><img class="alignnone size-full wp-image-57" title="WP-DB-Backup設定画面" src="http://www.tan2net.com/wp-content/uploads/wpdbbackup.gif" alt="WP-DB-Backup設定画面" width="341" height="454" /></p>
				<p>定期バックアップの項目で、スケジュール：毎日1回、メールアドレスを設定して、定期バックアップボタンをクリック。</p>
				<p>時間を変更する際の書式は</p>
				<p>2009/11/26 Thursday 04:00:00</p>
				<p>とするようです。</p>
]]></content:encoded>
			<wfw:commentRss>http://tan2net.com/?feed=rss2&amp;p=56</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XREAでWordPress自動アップグレード失敗</title>
		<link>http://tan2net.com/?p=28</link>
		<comments>http://tan2net.com/?p=28#comments</comments>
		<pubDate>Mon, 16 Nov 2009 05:16:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.tan2net.com/?p=28</guid>
		<description><![CDATA[				XREAを使用していて、Wordpressの自動アップグレードに失敗した場合は、/wp-admin/.htaccessに以下のコードを追加してアップロードすれば解決されます。
				深い雪さんのWordPres [...]]]></description>
			<content:encoded><![CDATA[				<p>XREAを使用していて、Wordpressの自動アップグレードに失敗した場合は、/wp-admin/.htaccessに以下のコードを追加してアップロードすれば解決されます。<br />
				深い雪さんの<a href="http://blog.deepsnow.biz/archives/2009/08/wordpress-%E3%82%A2%E3%83%83%E3%83%97%E3%82%B0%E3%83%AC%E3%83%BC%E3%83%89%E5%A4%B1%E6%95%97.html">WordPressアップグレード失敗</a>記事に紹介されていました。</p>
				<pre>&#60;files async-upload.php&#62;
AddHandler application/x-httpd-phpcgi .php
&#60;/files&#62;
&#60;Files plugin-install.php&#62;
AddHandler application/x-httpd-phpcgi .php
&#60;/Files&#62;
&#60;Files update.php&#62;
AddHandler application/x-httpd-phpcgi .php
&#60;/Files&#62;
&#60;Files update-core.php&#62;
AddHandler application/x-httpd-phpcgi .php
&#60;/Files&#62;</pre>
]]></content:encoded>
			<wfw:commentRss>http://tan2net.com/?feed=rss2&amp;p=28</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPressで会員専用ページを作る</title>
		<link>http://tan2net.com/?p=26</link>
		<comments>http://tan2net.com/?p=26#comments</comments>
		<pubDate>Mon, 16 Nov 2009 04:34:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[プラグイン]]></category>

		<guid isPermaLink="false">http://www.tan2net.com/?p=26</guid>
		<description><![CDATA[				会員専用ページにしたくてよいプラグインを探していましたら、Angsuman’s Authenticated WordPress Pluginというプラグインがありましたので、早速適用。
				設置はいつものプラ [...]]]></description>
			<content:encoded><![CDATA[				<p>会員専用ページにしたくてよいプラグインを探していましたら、<a href="http://blog.taragana.com/index.php/archive/angsumans-authenticated-wordpress-plugin-password-protection-for-your-wordpress-blog/">Angsuman’s Authenticated WordPress Plugin</a>というプラグインがありましたので、早速適用。</p>
				<p>設置はいつものプラグインと一緒なので簡単でしたが、ログイン画面に正しいアカウントを入力してもページが動かない。ログインページのままでした。</p>
				<p>えっ？なぜ？って思いパスワードミスったかなともう一度入力してもやっぱり駄目。<br />
				仕方なくまたググると<a href="http://bison.jp/wordpress/271.html">脳みその中身</a>さんのページで紹介されていたので、その通りに実行</p>
				<pre class="brush:php; highlight: [14,15,16];">&#60;?php
/*
Plugin Name: Angsuman's Authenticated WordPress Plugin
Plugin URI: http://blog.taragana.com/index.php/archive/angsumans-authenticated-wordpress-plugin-password-protection-for-your-wordpress-blog/
Description: This plugin allows you to make your WordPress site accessible to logged in users only. In other words to view your site they have to create / have an account in your site and be logged in. No configuration necessary. Simply activating the plugin is all that is required from you.
Author: Angsuman Chakraborty, Taragana
Version: 1.0
Author URI: http://blog.taragana.com/
License: Free to use non-commercially.
Warranties: None.
*/
function ac_auth_redirect() {
 // Checks if a user is logged in, if not redirects them to the login page
 if ( (!empty($_COOKIE&#91;USER_COOKIE&#93;) &amp;&amp;
 !wp_login($_COOKIE&#91;USER_COOKIE&#93;, $_COOKIE&#91;PASS_COOKIE&#93;, true)) ||
 (empty($_COOKIE&#91;USER_COOKIE&#93;)) ) {
 nocache_headers();
 header("HTTP/1.1 302 Moved Temporarily");
 header('Location: ' . get_settings('siteurl') . '/wp-login.php?redirect_to=' . urlencode($_SERVER&#91;'REQUEST_URI'&#93;));
 header("Status: 302 Moved Temporarily");
 exit();
 }
}

if('wp-login.php' != $pagenow &amp;&amp; 'wp-register.php' != $pagenow) add_action('template_redirect', 'ac_auth_redirect');
?&#62;</pre>
				<p>変更後</p>
				<pre class="brush:php; highlight: [14];"　highlight_lines="1,2,3">&#60;?php
/*
Plugin Name: Angsuman's Authenticated WordPress Plugin
Plugin URI: http://blog.taragana.com/index.php/archive/angsumans-authenticated-wordpress-plugin-password-protection-for-your-wordpress-blog/
Description: This plugin allows you to make your WordPress site accessible to logged in users only. In other words to view your site they have to create / have an account in your site and be logged in. No configuration necessary. Simply activating the plugin is all that is required from you.
Author: Angsuman Chakraborty, Taragana
Version: 1.0
Author URI: http://blog.taragana.com/
License: Free to use non-commercially.
Warranties: None.
*/
function ac_auth_redirect() {
	// Checks if a user is logged in, if not redirects them to the login page
if ( !is_user_logged_in() ){
		nocache_headers();
		header("HTTP/1.1 302 Moved Temporarily");
		header('Location: ' . get_settings('siteurl') . '/wp-login.php?redirect_to=' . urlencode($_SERVER&#91;'REQUEST_URI'&#93;));
            header("Status: 302 Moved Temporarily");
		exit();
	}
}

if('wp-login.php' != $pagenow &amp;&amp; 'wp-register.php' != $pagenow) add_action('template_redirect', 'ac_auth_redirect');
?&#62;</pre>
				<p>めでたしめでたし。脳みその中身さんありがとうございました。</p>
]]></content:encoded>
			<wfw:commentRss>http://tan2net.com/?feed=rss2&amp;p=26</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPressで前後のページへのリンクが無い場合の処理</title>
		<link>http://tan2net.com/?p=22</link>
		<comments>http://tan2net.com/?p=22#comments</comments>
		<pubDate>Thu, 12 Nov 2009 10:24:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[タグ]]></category>

		<guid isPermaLink="false">http://www.tan2net.com/?p=22</guid>
		<description><![CDATA[				WordPressをカスタマイズしていて、前後の記事へのページが無い場合、それらのリンクを
				&#60;div&#62;とかで括っているとｈｔｍｌで要素内に何もないよって怒られちゃうんですよね。
				そんな [...]]]></description>
			<content:encoded><![CDATA[				<p>WordPressをカスタマイズしていて、前後の記事へのページが無い場合、それらのリンクを<br />
				&lt;div&gt;とかで括っているとｈｔｍｌで要素内に何もないよって怒られちゃうんですよね。<br />
				そんなときに、どうしたらよいのか調べましたら、だずりんぐわーるどつぅさんの「<a href="http://www.dazzlingworld2.com/post_2642.html">Another HTML-lintで100点を目指せ</a>」のページで紹介されていましたので、使わせていただきました。</p>
				<p>single.phpではこちら</p>
				<pre class="brush:php;">&#60;?php $next_post = get_next_post(); ?&#62;
&#60;?php $previous_post = get_previous_post(); ?&#62;
&#60;?php if(!(empty($next_post) &amp;amp;&amp;amp; empty($previous_post))): ?&#62;
&#60;div class="navi"&#62;
&#60;ul&#62;
&#60;?php if(!empty($previous_post)): ?&#62;
&#60;li&#62;&#60;?php previous_post_link( '%link', '&amp;lt;span&amp;gt;&amp;amp;laquo;&amp;lt;/span&amp;gt; %title' ) ?&#62;&#60;/li&#62;
&#60;?php endif ; ?&#62;
&#60;?php if(!empty($next_post)): ?&#62;
&#60;li&#62;&#60;?php next_post_link( '%link', '%title &amp;lt;span&amp;gt;&amp;amp;raquo;&amp;lt;/span&amp;gt;' ) ?&#62;&#60;/li&#62;
&#60;?php endif ; ?&#62;
&#60;/ul&#62;
&#60;/div&#62;</pre>
				<p>index.phpならこちら。基本的に同じような気がするがphpをあまり理解できてない私としては・・・</p>
				<pre class="brush:php;">
&#60;?php $next_posts_link = get_next_posts_link('&amp;laquo; 前のページ',0); ?&#62;
&#60;?php $previous_posts_link = get_previous_posts_link('次のページ &amp;raquo;',0); ?&#62;
&#60;?php if((isset($next_posts_link)) || (isset($previous_posts_link))): ?&#62;
&#60;div&#62;
&#60;ul&#62;
&#60;?php if(isset($next_posts_link)): ?&#62;
&#60;li&#62;&#60;?php echo $next_posts_link; ?&#62;&#60;/li&#62;
&#60;?php endif ; ?&#62;
&#60;?php if(isset($previous_posts_link)): ?&#62;
&#60;li&#62;&#60;?php echo $previous_posts_link; ?&#62;&#60;/li&#62;
&#60;?php endif ; ?&#62;
&#60;/ul&#62;
&#60;/div&#62;
&#60;?php endif ; ?&#62;
</pre>
				<p>別にここまでしなくても、表示には問題ないのですが、htmlをちゃんと書きたいと初心者ながら思っているのです。<br />
				だずりんぐわーるどつぅさんありがとう。</p>
]]></content:encoded>
			<wfw:commentRss>http://tan2net.com/?feed=rss2&amp;p=22</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

