<?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; テンプレート</title>
	<atom:link href="http://www.redistribution.cc/blog/category/wordpress/template/feed" rel="self" type="application/rss+xml" />
	<link>http://www.redistribution.cc/blog</link>
	<description>日々の出来事など・・・。</description>
	<lastBuildDate>Sat, 24 Jul 2010 17:43:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://www.redistribution.cc/blog/category/wordpress/template/feed" />
		<item>
		<title>トップページをポータルサイト風にカスタマイズ</title>
		<link>http://www.redistribution.cc/blog/20100606_2005.html</link>
		<comments>http://www.redistribution.cc/blog/20100606_2005.html#comments</comments>
		<pubDate>Sun, 06 Jun 2010 13:04:26 +0000</pubDate>
		<dc:creator>ken</dc:creator>
				<category><![CDATA[テンプレート]]></category>

		<guid isPermaLink="false">http://www.redistribution.cc/blog/?p=2005</guid>
		<description><![CDATA[ニコニコプレス Ver2.3 (夏)のトップページをポータルサイト風にカスタマイズする方法。
トップページをポータルサイト風にカスタマイズで基本的な流れは大丈夫だけど
一部変更が必要です。
変更箇所だけ記述します。
サム [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://hirokawaz.chicappa.jp/archives/20100604224327.html" target="_blank">ニコニコプレス Ver2.3 (夏)</a>のトップページをポータルサイト風にカスタマイズする方法。<br />
<a href="http://hirokawaz.chicappa.jp/archives/20090323152150.html" target="_blank">トップページをポータルサイト風にカスタマイズ</a>で基本的な流れは大丈夫だけど<br />
一部変更が必要です。<br />
変更箇所だけ記述します。</p>
<h3>サムネイル付カテゴリーリストを配置</h3>
<pre class="brush: php;">&lt;h3&gt;見出し&lt;/h3&gt;
&lt;ul class=&quot;entry_list clearfix&quot;&gt;
&lt;?php $posts = get_posts('numberposts=表示件数&amp;category=カテゴリID');
foreach($posts as $post) :
setup_postdata($post); ?&gt;
&lt;?php $thumbnail = getThumbnail() ?&gt;
&lt;?php $title = the_title('','',0);
$titlenum = mb_strlen( $title , 'UTF8' ) ;
if($titlenum &gt; 32){
$title = mb_substr( $title, 0, 32 , 'UTF8'). &quot;…&quot;;
}
?&gt;
&lt;li class=&quot;image&quot;&gt;&lt;a href=&quot;&lt;?php the_permalink(); ?&gt;&quot;&gt;&lt;img src=&quot;&lt;?php echo $thumbnail; ?&gt;&quot; alt=&quot;&lt;?php the_title(); ?&gt;&quot; width=&quot;72&quot; height=&quot;54&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;date&quot;&gt;&lt;?php the_time(__('Y年m月d日')); ?&gt; at &lt;?php the_time('G時i分'); ?&gt;&lt;/li&gt;
&lt;li class=&quot;title clearfix&quot;&gt;&lt;a href=&quot;&lt;?php the_permalink(); ?&gt;&quot;&gt;&lt;?php echo $title ; ?&gt;&lt;/a&gt;&lt;/li&gt;
&lt;?php endforeach; ?&gt;
&lt;/ul&gt;</pre>
<p>上記に入れ替え</p>
<h3>floatで左右にボックスを配置</h3>
<p><strong>左にfloat</strong></p>
<pre class="brush: php;">&lt;div class=&quot;box_left cleafix&quot;&gt;
左に回り込ませたい要素
&lt;/div&gt;
</pre>
<p><code>class="box_left"</code>から<code>class="box_left cleafix"</code>に変更</p>
<p><strong>右にfloat</strong></p>
<pre class="brush: php;">&lt;div class=&quot;box_right cleafix&quot;&gt;
左に回り込ませたい要素
&lt;/div&gt;
</pre>
<p><code>class="box_right"</code>から<code>class="box_right"</code>に変更</p>
<p>これで<a href="http://hirokawaz.chicappa.jp/archives/20100604224327.html" target="_blank">ニコニコプレス Ver2.3 (夏)</a>での表示も問題なくなるはず？(。・ω・。)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.redistribution.cc/blog/20100606_2005.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://www.redistribution.cc/blog/20100606_2005.html" />
	</item>
		<item>
		<title>サムネイル付き関連記事を表示</title>
		<link>http://www.redistribution.cc/blog/20100606_2013.html</link>
		<comments>http://www.redistribution.cc/blog/20100606_2013.html#comments</comments>
		<pubDate>Sun, 06 Jun 2010 10:27:25 +0000</pubDate>
		<dc:creator>ken</dc:creator>
				<category><![CDATA[テンプレート]]></category>

		<guid isPermaLink="false">http://www.redistribution.cc/blog/?p=2013</guid>
		<description><![CDATA[ニコニコプレス Ver2.3 (夏)のサムネイル付き関連記事を表示する方法。
サムネイル付き関連記事を表示で基本的な流れは大丈夫だけど一部変更が必要です。
変更箇所だけ記述します。
関連記事の出力方法をニコニコプレスに置 [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://hirokawaz.chicappa.jp/archives/20100604224327.html" target="_blank">ニコニコプレス Ver2.3 (夏)</a>のサムネイル付き関連記事を表示する方法。<br />
<a href="http://hirokawaz.chicappa.jp/archives/20091027234837.html" target="_blank">サムネイル付き関連記事を表示</a>で基本的な流れは大丈夫だけど一部変更が必要です。<br />
変更箇所だけ記述します。</p>
<h3>関連記事の出力方法をニコニコプレスに置き換えよう</h3>
<p>・Output templateの内容</p>
<pre class="brush: php;">&lt;li class=&quot;image&quot;&gt;&lt;a href=&quot;{url}&quot;&gt;&lt;img src=&quot;{php: $thumbnail=get_post_meta($result-&gt;ID, 'thumbnail',true); if ($thumbnail)echo $thumbnail; if ($thumbnail=='') echo get_bloginfo('template_directory') .'/images/spacer.jpg';}&quot; width=&quot;72&quot; height=&quot;54&quot; alt=&quot;{title}&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;title&quot;&gt;{link}&lt;/li&gt;
&lt;li class=&quot;excerpt clearfix&quot;&gt;{excerpt}&lt;/li&gt;</pre>
<p>・Text and codes before the listの内容</p>
<pre class="brush: php;">&lt;ul class=&quot;entry_list kanren clearfix&quot;&gt;</pre>
<p>・Text and codes after the listの内容</p>
<pre class="brush: php;">&lt;/ul&gt;</pre>
<p>上記に入れ替え</p>
<h3>CSSを追加しよう</h3>
<p>下記に差し替え</p>
<pre class="brush: css;">/* 関連記事 */
.kanren li.image {
	background: url(../images/spacer_kanren.jpg) no-repeat center!important;
}
.kanren li.title {
	border: none;
	margin: 0px!important;
	padding: 0px!important;
}
.kanren li.excerpt {
	margin-bottom: 5px;
	border-bottom: 2px dashed #ccc;
}
.kanren a {
	color: #0f8fcf!important;
}</pre>
<p>これで<a href="http://hirokawaz.chicappa.jp/archives/20100604224327.html" target="_blank">ニコニコプレス Ver2.3 (夏)</a>での表示も問題なくなるはず？(。・ω・。)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.redistribution.cc/blog/20100606_2013.html/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://www.redistribution.cc/blog/20100606_2013.html" />
	</item>
		<item>
		<title>ニコニコプレス Ver2.3 (夏)に入れ替えてみた(。・ω・。)</title>
		<link>http://www.redistribution.cc/blog/20100606_1996.html</link>
		<comments>http://www.redistribution.cc/blog/20100606_1996.html#comments</comments>
		<pubDate>Sun, 06 Jun 2010 09:56:42 +0000</pubDate>
		<dc:creator>ken</dc:creator>
				<category><![CDATA[テンプレート]]></category>

		<guid isPermaLink="false">http://www.redistribution.cc/blog/?p=1996</guid>
		<description><![CDATA[ニコニコプレス Ver2.3 (夏)が出たので入れ替えてみました。
結構変わってたのでテンプレのカスタマイズがそのままじゃ使えないのが殆どに(;゜ロ゜)
カスタマイズをした場所だけメモしたけど長くなりそうなので個別に書き [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://hirokawaz.chicappa.jp/archives/20100604224327.html" target="_blank">ニコニコプレス Ver2.3 (夏)</a>が出たので入れ替えてみました。<br />
結構変わってたのでテンプレのカスタマイズがそのままじゃ使えないのが殆どに(;゜ロ゜)</p>
<p>カスタマイズをした場所だけメモしたけど長くなりそうなので個別に書きます(^_^;</p>
<p>変な箇所があればコメントで教えてくれると嬉しいです<(_ _)></p>
]]></content:encoded>
			<wfw:commentRss>http://www.redistribution.cc/blog/20100606_1996.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://www.redistribution.cc/blog/20100606_1996.html" />
	</item>
		<item>
		<title>公開時間を現在日時に簡単に修正できるようにしてみた。</title>
		<link>http://www.redistribution.cc/blog/20100115_964.html</link>
		<comments>http://www.redistribution.cc/blog/20100115_964.html#comments</comments>
		<pubDate>Fri, 15 Jan 2010 06:01:39 +0000</pubDate>
		<dc:creator>ken</dc:creator>
				<category><![CDATA[テンプレート]]></category>

		<guid isPermaLink="false">http://www.redistribution.cc/blog/?p=964</guid>
		<description><![CDATA[WordPress日本語版 フォーラムを見ていると面白いものがあったので適用してみました。
公開時間を現在日時に簡単に修正できるようになります。
リディストリビュ～ションは日に何度か記事編集をして編集完了時に公開日時を
 [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://ja.forums.wordpress.org/topic/1127" target="_blank">WordPress日本語版 フォーラム</a>を見ていると面白いものがあったので適用してみました。<br />
公開時間を現在日時に簡単に修正できるようになります。<br />
リディストリビュ～ションは日に何度か記事編集をして編集完了時に公開日時を<br />
編集日時に修正して公開しています。<br />
手打ちで日時を指定するのが面倒でプラグインを作っていたのですが・・・<br />
スキル不足でコアファイルの修正をしないといけなくてバージョンアップ時に<br />
面倒だったので入れ替えました(゜-゜)</p>
<p>適用後、こんな感じになります。<br />
<img src="http://www.redistribution.cc/blog/wp-content/uploads/2010/01/10011500.jpg" alt="" title="現在の日時ボタンを追加" width="287" height="237" class="alignleft size-full wp-image-967" /><br />
新規投稿・投稿編集・新規ページ・ページ編集で現在の日時ボタンが表示されます。<br />
押すと公開時間が押した日時になります。<br />
<br class="clear" /><br />
<span id="more-964"></span></p>
<h3>jsファイルの作成</h3>
<pre class="brush: jscript;">jQuery(document).ready( function($) {
  if ( $('#submitdiv').length ) {
    stamp = $('#timestamp').html();
    $('#timestampdiv')
      .before('&lt;p&gt;&lt;a class=&quot;update-timestamp hide-if-no-js button&quot; href=&quot;#update_timestamp&quot;&gt;現在の日時&lt;/a&gt;&lt;/p&gt;')
      .prev().click(function(){
        date = new Date();
        var aa = date.getFullYear(), mm = date.getMonth() + 1, jj = date.getDate(), hh = date.getHours(), mn = date.getMinutes();
        mm = '' + mm;
        if(mm.length == 1) mm = '0' + mm;
        $('#aa').val(aa);
        $('#mm').val(mm);
        $('#jj').val(jj);
        $('#hh').val(hh);
        $('#mn').val(mn);
        $('#timestamp').html(
          postL10n.publishOnPast + ' &lt;b&gt;' +
          aa + '年' +
          mm + '月' +
          jj + '日 @ ' +
          hh + ':' +
          mn + '&lt;/b&gt; '
        );
	return false;
      });
  }
});</pre>
<p>上記をファイル名：timestamp-set.jsで保存</p>
<h3>functions.phpの編集</h3>
<p>※テーマによってはfunctions.phpがない場合があるので新規作成してください。</p>
<p>・functions.phpがある場合</p>
<pre class="brush: php;">/* 投稿のタイムスタンプに「現在の日時」ボタンを表示 */
function my_scripts(){
  wp_enqueue_script('my-admin-script', get_bloginfo('template_url') . '/js/timestamp-set.js', array('jquery'), false, true);
}
add_action('admin_print_scripts', 'my_scripts');</pre>
<p>上記をfunctions.phpに追加</p>
<p>・functions.phpがない場合</p>
<pre class="brush: php;">&lt;?php

/* 投稿のタイムスタンプに「現在の日時」ボタンを表示 */
function my_scripts(){
  wp_enqueue_script('my-admin-script', get_bloginfo('template_url') . '/js/timestamp-set.js', array('jquery'), false, true);
}
add_action('admin_print_scripts', 'my_scripts');

?&gt;</pre>
<p>上記をファイル名：functions.phpで保存(UTF-8 BOM無し)</p>
<h3>サーバーへファイルをアップロード</h3>
<p>timestamp-set.jsを使用中テーマフォルダ内にjsフォルダを作成しアップロード<br />
functions.phpを使用中テーマフォルダ内アップロード</p>
<p>ニコニコプレス(夏)場合は下記になります。<br />
niconico_press_20\js\timestamp-set.js<br />
niconico_press_20\functions.php</p>
<p>これでWordPressのバージョンアップ時にコアファイル編集がなくなりました。<br />
まぁテーマ変更時に再度実施しないと駄目になりましたけどね≧(´▽｀)≦アハハハ</p>
]]></content:encoded>
			<wfw:commentRss>http://www.redistribution.cc/blog/20100115_964.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://www.redistribution.cc/blog/20100115_964.html" />
	</item>
		<item>
		<title>ニコニコプレス(夏)のいぢくり その2</title>
		<link>http://www.redistribution.cc/blog/20100113_949.html</link>
		<comments>http://www.redistribution.cc/blog/20100113_949.html#comments</comments>
		<pubDate>Tue, 12 Jan 2010 18:38:41 +0000</pubDate>
		<dc:creator>ken</dc:creator>
				<category><![CDATA[T-01A]]></category>
		<category><![CDATA[テンプレート]]></category>

		<guid isPermaLink="false">http://www.redistribution.cc/blog/?p=949</guid>
		<description><![CDATA[こちらで書いたIE6ブロックの修正ですが、たぶん大丈夫になったので最新版を記事に・・・。
これでええや版はWindowsMobile携帯のT-01AとX02Tをスルーさせるようにしました。
※他はUserAgentが不明 [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.redistribution.cc/blog/20100112_904.html">こちら</a>で書いたIE6ブロックの修正ですが、たぶん大丈夫になったので最新版を記事に・・・。</p>
<p>これでええや版はWindowsMobile携帯のT-01AとX02Tをスルーさせるようにしました。<br />
※他はUserAgentが不明だったので未対応</p>
<h3>T-01AとX02T搭載IEのUserAgent</h3>
<p>・T-01A WindowsMobile 6.1 IE UserAgent</p>
<pre class="brush: plain;">&quot;Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; T-01A)&quot;</pre>
<p>・T-01A WindowsMobile 6.5 IE UserAgent</p>
<pre class="brush: plain;">&quot;Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; T-01A_6.5; Windows Phone 6.5)&quot;</pre>
<p>・X02T WindowsMobile 6.5 IE UserAgent</p>
<pre class="brush: plain;">&quot;Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Toshiba/X02T; Windows Phone 6.5)&quot;</pre>
<p>共通点ないっすねぇ・・・(苦笑)</p>
<h3>jsファイルの修正</h3>
<p>niconico_press_20\js\ie6_blocker\jquery.ie6blocker.jsになります。<br />
jquery.ie6blocker.jsの上から3行を下記と入れ替え。</p>
<p>変更前(オリジナル)</p>
<pre class="brush: jscript;">var IE6 = (navigator.userAgent.indexOf(&quot;MSIE 6&quot;) &gt;= 0) ? true : false;

if(IE6){</pre>
<p>変更後</p>
<pre class="brush: jscript;">var IE6 = ((navigator.userAgent.indexOf(&quot;MSIE 6&quot;) &gt;= 0)&amp;&amp;(navigator.userAgent.indexOf(&quot;Windows Phone&quot;) == -1)&amp;&amp;(navigator.userAgent.indexOf(&quot;T-01A&quot;)) == -1) ? true : false;

if(IE6 == true){</pre>
<p>UserAgentに&#8221;MSIE 6&#8243;があり、かつUserAgentに&#8221;Windows Phone&#8221;か&#8221;T-01A&#8221;がない場合に<br />
IE6ブロックが動作するようになります。</p>
<h3>その他</h3>
<p>FirefoxでT-01A WM6.1/T-01A WM6.5/X02TのUserAgentを設定し<br />
アクセスして問題ないことを確認しています。<br />
#テスト中にちゃんとブロックとかもされてたので大丈夫と信じたい(^-^;</p>
<p>手元のT-01A WindowsMobile 6.5 IEで確認しましたが問題なさそうです。</p>
<p>T-01AとX02T利用の方で実機でアクセスして見れない場合は<br />
コメントを頂けると嬉しいです(^^♪</p>
]]></content:encoded>
			<wfw:commentRss>http://www.redistribution.cc/blog/20100113_949.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://www.redistribution.cc/blog/20100113_949.html" />
	</item>
		<item>
		<title>ニコニコプレス(夏)のいぢくり</title>
		<link>http://www.redistribution.cc/blog/20100112_904.html</link>
		<comments>http://www.redistribution.cc/blog/20100112_904.html#comments</comments>
		<pubDate>Tue, 12 Jan 2010 04:30:53 +0000</pubDate>
		<dc:creator>ken</dc:creator>
				<category><![CDATA[T-01A]]></category>
		<category><![CDATA[テンプレート]]></category>

		<guid isPermaLink="false">http://www.redistribution.cc/blog/?p=904</guid>
		<description><![CDATA[変更したニコニコプレス(夏)ですが、少し変更を加えたので&#8221;φ(・ェ・o)~メモメモ
あまり改造はしてないです。
日時表記や部分的な表記を変える程度ですねぇ（ありがたいです。
あとはヒロカワズさんところのカスタ [...]]]></description>
			<content:encoded><![CDATA[<p>変更した<a href="http://hirokawaz.podcaster.jp/archives/20091024094651.html" target="_blank">ニコニコプレス(夏)</a>ですが、少し変更を加えたので&#8221;φ(・ェ・o)~メモメモ<br />
あまり改造はしてないです。<br />
日時表記や部分的な表記を変える程度ですねぇ（ありがたいです。<br />
あとはヒロカワズさんところのカスタマイズを何個かした程度ですね。<br />
変更箇所っても2箇所くらいしかありませんが・・・。</p>
<p><span id="more-904"></span></p>
<h3>コメント欄のバックにミク画像を表示</h3>
<p>春のときにコメント欄のバックにミク画像が表示されてたのですが、<br />
夏になったら無くなってました(´・ω・`)<br />
CSSで指定してたので追記してみたのですがうまくいかなかったので<br />
他力本願でヒロカワズさんに方法を教えていただきました<(_ _)></p>
<p>完成イメージ：<br />
<img src="http://www.redistribution.cc/blog/wp-content/uploads/2010/01/10011204-300x147.jpg" alt="" title="コメント欄のバックにミク画像を表示" width="300" height="147" class="alignleft size-medium wp-image-909" /><br />
<br class="clear" /><br />
niconico_press_20\style.cssの#comments textareaの箇所を下記に変更</p>
<pre class="brush: css;">#comments textarea {
background: #f9f9f9 url(images/comments_bg.png) no-repeat right top;
margin: 0px;
margin-top: 3px;
height: 200px;
width: 600px;
border: 2px dashed #ccc;
}</pre>
<p>niconico_press_20\imagesにcomments_bg.pngをアップロード<br />
これだけで変更が可能です(゜-゜)</p>
<h3>IE6ブロックの定義変更</h3>
<p>標準でIE6をブロックするJavaScriptが導入されていますが、判定方法が良くなかったので<br />
修正しました。（個人的な使用条件での話です。）</p>
<p>実はT-01A(WindowsMobile)に搭載されているIEのUserAgentが下記になってます。</p>
<p>・T-01A WindowsMobile 6.1 IE UserAgent</p>
<pre class="brush: plain;">&quot;Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; T-01A)&quot;</pre>
<p>・T-01A WindowsMobile 6.5 IE UserAgent</p>
<pre class="brush: plain;">&quot;Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; T-01A_6.5; Windows Phone 6.5)&quot;</pre>
<p>・PC版 IE UserAgent(一例です。)</p>
<pre class="brush: plain;">&quot;Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)&quot;</pre>
<p>IE6ブロックのJavaScriptの判定箇所は下記です。</p>
<pre class="brush: jscript;">var IE6 = (navigator.userAgent.indexOf(&quot;MSIE 6&quot;) &gt;= 0) ? true : false;

if(IE6){</pre>
<p>UserAgentに&#8221;MSIE 6&#8243;が含まれる場合、処理を実行するってなってます。<br />
上のIE UserAgentを見てもらえばわかるように全てに&#8221;MSIE 6&#8243;が含まれてます(￣Д￣;;</p>
<p>WindowsMobile携帯のIEでアクセスしようがPCのIE6でアクセスしようが<br />
全てIE6ブロックが動作してしまいます。<br />
WindowsMobile携帯のIEの場合はIE6ブロックを動作させないように変更しました。<br />
これはT-01AのIEだけ有効です。<br />
WindowsMobileのIE UserAgentってキャリア毎に違うんですよね・・・。<br />
WindowsMobileのIE UserAgentにあってPC版IE UserAgentにないってのが<br />
絞りきれませんでした(^-^;<br />
※T-01Aしかつかってないので良しとします（ぁ</p>
<p>変更ファイルは・・・<br />
niconico_press_20\js\ie6_blocker\jquery.ie6blocker.jsになります。<br />
jquery.ie6blocker.jsの上から3行を下記と入れ替え。</p>
<pre class="brush: jscript;">var IE6 = ((navigator.userAgent.indexOf(&quot;MSIE 6&quot;) &gt;= 0)&amp;&amp;(navigator.userAgent.indexOf(&quot;T-01A&quot;)) == -1) ? true : false;

if(IE6 == true){</pre>
<p>UserAgentに&#8221;MSIE 6&#8243;があり、かつUserAgentに&#8221;T-01A&#8221;がない場合に<br />
IE6ブロックが動作するようになります。</p>
<p>変更前のキャプチャー<br />
<img src="http://www.redistribution.cc/blog/wp-content/uploads/2010/01/10011201-180x300.jpg" alt="" title="IE6ブロックが動作 T-0１A" width="180" height="300" class="alignleft size-medium wp-image-918" />IE6ブロックが動作 T-0１A<br />
<br class="clear" /><br />
<img src="http://www.redistribution.cc/blog/wp-content/uploads/2010/01/10011203-300x202.jpg" alt="" title="IE6ブロックが動作 PC版IE6" width="300" height="202" class="alignleft size-medium wp-image-920" />IE6ブロックが動作 PC版IE6<br />
<br class="clear" /></p>
<p>変更後のキャプチャー<br />
<img src="http://www.redistribution.cc/blog/wp-content/uploads/2010/01/10011202-180x300.jpg" alt="" title="IE6ブロックが非動作 T-0１A" width="180" height="300" class="alignleft size-medium wp-image-922" />IE6ブロックが非動作 T-0１A<br />
でもPC版IE6は動作<img src="http://www.redistribution.cc/blog/wp-content/uploads/2010/01/10011203-300x202.jpg" alt="" title="IE6ブロックが動作 PC版IE6" width="300" height="202" class="alignleft size-medium wp-image-920" /><br />
<br class="clear" /><br />
う～ん。本当はPC版IE6だけブロックしてWindowsMobile版IEはスルーさせたいのですが、<br />
ええ方法が思い浮かびません・・・。<br />
下記だとPC版IE6の一部がスルーされる可能性が・・・</p>
<pre class="brush: jscript;">var IE6 = ((navigator.userAgent.indexOf(&quot;MSIE 6&quot;) &gt;= 0)&amp;&amp;(navigator.userAgent.indexOf(&quot;.NET&quot;)) &gt;= 0) ? true : false;

if(IE6 == true){</pre>
<p>UserAgentに&#8221;MSIE 6&#8243;と&#8221;.NET&#8221;がある場合にIE6ブロックが動作するようになります。<br />
ただし、IEのUserAgentで&#8221;.NET&#8221;が無いのがあるっぽいので抜けが出ます。</p>
<p>情報お待ちしておりますm(_ _)m</p>
]]></content:encoded>
			<wfw:commentRss>http://www.redistribution.cc/blog/20100112_904.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://www.redistribution.cc/blog/20100112_904.html" />
	</item>
		<item>
		<title>新しく導入したプラグイン</title>
		<link>http://www.redistribution.cc/blog/20100112_897.html</link>
		<comments>http://www.redistribution.cc/blog/20100112_897.html#comments</comments>
		<pubDate>Mon, 11 Jan 2010 18:32:44 +0000</pubDate>
		<dc:creator>ken</dc:creator>
				<category><![CDATA[テンプレート]]></category>

		<guid isPermaLink="false">http://www.redistribution.cc/blog/?p=897</guid>
		<description><![CDATA[ニコニコプレス(夏)にテンプレを変更した時に新しいプラグインを導入したので・・・
&#8220;φ(・ェ・o)~メモメモ
■Commented entry list Ver.1.2
コメントとトラックバックをわけて表示す [...]]]></description>
			<content:encoded><![CDATA[<p>ニコニコプレス(夏)にテンプレを変更した時に新しいプラグインを導入したので・・・<br />
&#8220;φ(・ェ・o)~メモメモ</p>
<p>■<a href="http://hirobee.jp/archives/2005/05/commented-entry-list-11/" target="_blank">Commented entry list Ver.1.2</a><br />
コメントとトラックバックをわけて表示するためのプラグイン<br />
サイドバーにコメントとトラックバックを表示させてみました。<br />
コメント・トラバが皆無なので寂しい状態に・・・やっぱ外そうかな(苦笑)</p>
<p>■<a href="http://wordpress.org/extend/plugins/comment-form-quicktags/" target="_blank">Comment Form Quicktags Ver.1.2.1</a><br />
コメント欄にクイックタグを追加できるプラグイン<br />
オプション画面からクイックタグを追加・変更できるみたいですが、<br />
WordPress 2.9.1だと編集画面がでませんでした(￣Д￣;;<br />
<img src="http://www.redistribution.cc/blog/wp-content/uploads/2010/01/10011200-300x181.jpg" alt="" title="Comment Form Quicktags オプション" width="300" height="181" class="alignleft size-medium wp-image-898" /><br />
<br class="clear" /><br />
うちだけの問題なのかな・・・？<br />
まぁ追加する予定無かったのでそのまま使用中です(笑)</p>
<p>■<a href="http://wordpress.org/extend/plugins/comment-form-quicktags/" target="_blank">Post-Plugin Library Ver.2.6.2.1</a>/<a href="http://rmarsh.com/plugins/similar-posts/" target="_blank">Similar Posts Ver.2.6.2.0</a><br />
関連記事の表示をするプラグイン<br />
Post-Plugin Libraryを有効後に、Similar Postsを有効にする<br />
結構アホな感じがするプラグイン(笑)<br />
学習とかあるのかは不明ですが、ある程度の精度で関連記事表示できないようであれば外す予定。<br />
設定は<a href="http://hirokawaz.podcaster.jp/archives/20091027234837.html" target="_blank">ヒロカワズ</a>さんとこに丸投げ(゜-゜)</p>
<p>ニコニコプレス(春)では導入しなかったので、戻すときは外すか設定しないと駄目だな・・・。<br />
他にも面白そうなのがあれば追加したいと思います～(^^♪</p>
]]></content:encoded>
			<wfw:commentRss>http://www.redistribution.cc/blog/20100112_897.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://www.redistribution.cc/blog/20100112_897.html" />
	</item>
		<item>
		<title>ニコニコプレス(夏)に変更してみた。</title>
		<link>http://www.redistribution.cc/blog/20100111_883.html</link>
		<comments>http://www.redistribution.cc/blog/20100111_883.html#comments</comments>
		<pubDate>Mon, 11 Jan 2010 12:52:43 +0000</pubDate>
		<dc:creator>ken</dc:creator>
				<category><![CDATA[テンプレート]]></category>

		<guid isPermaLink="false">http://www.redistribution.cc/blog/?p=883</guid>
		<description><![CDATA[Blogテンプレートをニコニコプレス(夏)に
変更してみました。
個人的にはニコニコプレス(春)のほうがいいかなと思ったり(゜-゜)
コメント欄でどっちがいいか受け付けます(笑)

頑張って？最近のコメントやトラックバッ [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.redistribution.cc/blog/wp-content/uploads/2010/01/10011106.jpg" alt="" title="ニコニコプレス(夏)" width="300" height="225" class="alignleft size-full wp-image-884" />Blogテンプレートを<a href="http://hirokawaz.podcaster.jp/archives/20091024094651.html" target="_blank">ニコニコプレス(夏)</a>に<br />
変更してみました。</p>
<p>個人的には<a href="http://hirokawaz.podcaster.jp/archives/20090315200029.html" target="_blank">ニコニコプレス(春)</a>のほうがいいかなと思ったり(゜-゜)</p>
<p>コメント欄でどっちがいいか受け付けます(笑)<br />
<br class="clear" /><br />
頑張って？最近のコメントやトラックバックの表示・関連記事の表示をさせてみました。<br />
<a class="highslide" onclick="return hs.expand(this)" onkeypress="return hs.expand(this)" href="http://www.redistribution.cc/blog/wp-content/uploads/2010/01/10011107.jpg"><img id="d41d8cd98f00b204e9800998ecf8427e" src="http://www.redistribution.cc/blog/wp-content/uploads/2010/01/10011107-300x107.jpg" alt="" title="最近のコメントやトラックバックの表示・関連記事の表示" width="300" height="107" class="alignleft size-medium wp-image-888" /></a><br />
<br class="clear" /><br />
<a href="http://hirokawaz.podcaster.jp/archives/20091024094651.html" target="_blank">ニコニコプレス(夏)</a>にしたら、プラグインの<a href="http://www.scriptygoddess.com/archives/2004/05/20/show-hide-more-with-wordpress/" target="_blank">Content with show/hide javascript for &#8220;more&#8221;</a>が動かなくなりました(￣Д￣;;<br />
<a href="http://hirokawaz.podcaster.jp/archives/20090315200029.html" target="_blank">ニコニコプレス(春)</a>だと動いてたのですけどねぇ・・・。<br />
ヘッダを見比べてみたけど違いがわからず断念(´・ω・`)<br />
情報お待ちしておりますm(__)m （他力本願だなぁ(笑)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.redistribution.cc/blog/20100111_883.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://www.redistribution.cc/blog/20100111_883.html" />
	</item>
		<item>
		<title>外部サイトのAtomフィードを取得して表示させてみる。</title>
		<link>http://www.redistribution.cc/blog/20100107_835.html</link>
		<comments>http://www.redistribution.cc/blog/20100107_835.html#comments</comments>
		<pubDate>Thu, 07 Jan 2010 08:00:32 +0000</pubDate>
		<dc:creator>ken</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[テンプレート]]></category>

		<guid isPermaLink="false">http://www.redistribution.cc/blog/?p=835</guid>
		<description><![CDATA[外部サイトのリディストリビュ～ションの更新情報をTopに表示(RSSより取得)させてましたが、WP2.9.xにアップデート後、投稿日時が何故か投稿を押した時間(公開時間で取れない)で取得されるようになったので、Atomフ [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.redistribution.cc/blog/wp-content/uploads/2010/01/10010700-300x263.jpg" alt="" title="外部サイトのAtom表示" width="300" height="263" class="alignleft size-medium wp-image-837" />外部サイトのリディストリビュ～ションの更新情報をTopに表示(RSSより取得)させてましたが、WP2.9.xにアップデート後、投稿日時が何故か投稿を押した時間(公開時間で取れない)で取得されるようになったので、Atomフィードから取るように変更してみました。<br />
<br class="clear" /><br />
RSSフィードの取得はこちら：<a href="http://www.redistribution.cc/blog/20090403_120.html ">外部サイトのRSSフィードを取得して表示させてみる。</a></p>
<p><span id="more-835"></span></p>
<p>殆どコードはいぢらないでいけるので楽です(゜-゜)</p>
<pre class="brush: php;">	&lt;div class=&quot;box_left&quot;&gt;
		&lt;h3&gt;リディストリビュ～ション更新履歴&lt;/h3&gt;
			&lt;?php
				include_once(ABSPATH . WPINC . '/rss.php');
				date_default_timezone_set('Asia/Tokyo');

			//フィードのURI
			$rss_arr = array(
			    'http://www.redistribution.cc/feed/atom'
				);

			//表示件数
			$num = 5;

				foreach($rss_arr as $uri)
			{
			$rss = fetch_rss($uri);

			$title = $rss-&gt;channel['title'];
			$link  = $rss-&gt;channel['link'];

			foreach($rss-&gt;items as $item)
			{
			$item_title = $item['title'];
			$item_link  = $item['link'];
			$item_date  = $item['published'];
			$out_item_date  = date('Y年m月d日 H時i分', strtotime($item_date));
			$thumbnail = get_bloginfo('template_directory').&quot;/images/18r.gif&quot;;
			$out_item = '
        	&lt;ul class=&quot;entry_list&quot;&gt;
			&lt;li class=&quot;image&quot;&gt;&lt;a href=&quot;' . $item_link . '&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;' . $thumbnail . '&quot; title=&quot;' . $item_title . 'の記事を読む？&quot; hspace=&quot;0&quot; align=&quot;left&quot; width=&quot;50&quot; height=&quot;38&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;date&quot;&gt;&lt;strong&gt;' . $out_item_date . '&lt;/strong&gt; 投稿&lt;/li&gt;
			&lt;li class=&quot;title&quot;&gt;&lt;a href=&quot;' . $item_link . '&quot; target=&quot;_blank&quot;&gt;' . $item_title . '&lt;/a&gt;&lt;/li&gt;
			&lt;dd style=&quot;font-size:77%;&quot;&gt;
			サイト：&lt;a href=&quot;' . $link . '&quot; title=&quot;' . $title . 'へいってみます？&quot; target=&quot;_blank&quot;&gt;' . $title . '&lt;/a&gt;
			&lt;/dd&gt;

			&lt;/ul&gt;
			';

			$unix_time = date('U', strtotime($item_date));
			$item_arr[$unix_time] = $out_item;
		}
	}

			//ソート
			krsort($item_arr);

			//出力
			for(reset($item_arr); $key = key($item_arr); next($item_arr))
			{
				echo $item_arr[$key];

				++$count;

				if($count === $num)
			{
				break;
		}
	}
			?&gt;
	&lt;/div&gt;</pre>
<p>RSSからの変更点は・・・<br />
フィードのURIをAtomに変更<br />
<code>$item_date  = $item['pubdate'];</code>のpubdateをpublishedに変更<br />
だけで可能です。<br />
ちなみにpublishedをupdatedにすると記事を更新した時間を取得できます。<br />
published：記事を公開した日時<br />
updated：記事を更新した日時（更新を押した時間になります。）</p>
<p>リディストリビュ～ションは1日に何度か更新するのですが、記事を公開した日時での表示にしてみました。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.redistribution.cc/blog/20100107_835.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://www.redistribution.cc/blog/20100107_835.html" />
	</item>
		<item>
		<title>IE8でのアクセスをIE7 Standardsモードで表示させる</title>
		<link>http://www.redistribution.cc/blog/20090414_203.html</link>
		<comments>http://www.redistribution.cc/blog/20090414_203.html#comments</comments>
		<pubDate>Tue, 14 Apr 2009 09:09:11 +0000</pubDate>
		<dc:creator>ken</dc:creator>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[テンプレート]]></category>

		<guid isPermaLink="false">http://www.redistribution.cc/blog/?p=203</guid>
		<description><![CDATA[なぜこうなるかはWebを見ればいくらでも情報があるので放置(笑)
うちでした方法のみ書きます。
あ。ニコニコプレスはIE8での表示も問題ないです。
あれこれポップアップがIE8 Standardsモードで表示だとおかしい [...]]]></description>
			<content:encoded><![CDATA[<p>なぜこうなるかはWebを見ればいくらでも情報があるので放置(笑)<br />
うちでした方法のみ書きます。</p>
<p>あ。<a href="http://hirokawaz.podcaster.jp/" target="_blank">ニコニコプレス</a>はIE8での表示も問題ないです。<br />
<a href="http://www.remus.dti.ne.jp/~a-satomi/bunsyorou/ArekorePopup.html" target="_blank">あれこれポップアップ</a>がIE8 Standardsモードで表示だとおかしいので簡易対策(笑)<br />
本当はあれこれポップアップのCSSを見直せって事なんだろうけどねぇ・・・。</p>
<p><span id="more-203"></span></p>
<p>レンダリングモードの指定は、METAタグ > HTTPレスポンスヘッダ > DOCTYPE宣言<br />
の順に優先度が高いのでMETAタグで対策をしました。</p>
<p>header.phpの&lt;title&gt;&lt;/title&gt;の下に記載。<br />
または、headセクションの最初のエントリーとして記載（&lt;head&gt;の下に記載）</p>
<pre class="brush: xml;">
&lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=7&quot; /&gt;
</pre>
<p>この1行だけでIE8はIE7 Standardsモードで表示させるようになります。</p>
<p>他にもIE=7の箇所を変更すればモードは変わります。<br />
IE=5 ・・・ Quirksモードで表示(互換性モード)<br />
IE=7 ・・・ IE7 Standardsモードで表示<br />
IE=8 ・・・ IE8 Standardsモードで表示<br />
IE=EmulateIE7 ・・・ DOCTYPE宣言に応じてIE7 StandardsモードまたはQuirksモードで表示<br />
IE=EmulateIE8 ・・・ DOCTYPE宣言に応じてIE8 StandardsモードまたはQuirksモードで表示<br />
IE=edge ・・・ 最新のレンダリングモードで表示</p>
<p>まぁIE=7かIE=5がお勧めですかね？</p>
<p>後はWebで下記を見つけました。</p>
<pre class="brush: php;">
&lt;?php
if(ereg(&quot;MSIE 8&quot;,$_SERVER['HTTP_USER_AGENT'])){
?&gt;&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;&gt;
&lt;?php
}else{
?&gt;
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;?php
}
?&gt;
</pre>
<p>IE8の場合だけ、DOCTYPE宣言を変えてQuirksモードを指定してるPHPです。<br />
ただこれだとIE9とかになると変更しないと駄目なので微妙かも？</p>
<p><img src="http://www.redistribution.cc/blog/wp-content/plugins/wp-tegaki/wp-tegaki-img.php?tegaki_id=203-0" alt="IEなんて消えればいいんだ・・・。" width="298" height="27" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.redistribution.cc/blog/20090414_203.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://www.redistribution.cc/blog/20090414_203.html" />
	</item>
	</channel>
</rss>
