











<?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>ダウンアンダー：Wordpress・XOOPS・CMSはおまかせ。東京都練馬区のデザイン事務所 &#187; WordPress</title>
	<atom:link href="http://d7r.com/tag/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://d7r.com</link>
	<description>印刷・ホームページなど、販売促進のためのデザインを提案します。</description>
	<lastBuildDate>Fri, 27 Jan 2012 05:21:59 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://d7r.com/tag/wordpress/feed/" />
		<item>
		<title>mixi pluginの「イイネ！」ボタンが表示されない。</title>
		<link>http://d7r.com/2012/01/mixi-plugin%e3%81%ae%e3%80%8c%e3%82%a4%e3%82%a4%e3%83%8d%ef%bc%81%e3%80%8d%e3%83%9c%e3%82%bf%e3%83%b3%e3%81%8c%e8%a1%a8%e7%a4%ba%e3%81%95%e3%82%8c%e3%81%aa%e3%81%84%e3%80%82/</link>
		<comments>http://d7r.com/2012/01/mixi-plugin%e3%81%ae%e3%80%8c%e3%82%a4%e3%82%a4%e3%83%8d%ef%bc%81%e3%80%8d%e3%83%9c%e3%82%bf%e3%83%b3%e3%81%8c%e8%a1%a8%e7%a4%ba%e3%81%95%e3%82%8c%e3%81%aa%e3%81%84%e3%80%82/#comments</comments>
		<pubDate>Fri, 20 Jan 2012 00:23:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[技術ノート]]></category>
		<category><![CDATA[mixi]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://d7r.com/?p=2124</guid>
		<description><![CDATA[mixi pluginの「イイネ！」ボタンを設置しても表示されるページとされないページがあることがあります。 設置方法はコチラ。 私の場合、許可ドメインリストに追加し忘れたことがありました。 また、oizm.d7r.co [...]]]></description>
			<content:encoded><![CDATA[
<p>mixi pluginの「イイネ！」ボタンを設置しても表示されるページとされないページがあることがあります。</p>
<p><a href="http://developer.mixi.co.jp/connect/mixi_plugin/mixi_check/spec_mixi_check/" target="_blank">設置方法はコチラ。</a></p>
<p>私の場合、許可ドメインリストに追加し忘れたことがありました。</p>
<p>また、oizm.d7r.comを設定する時に「d7r.com」を許可ドメインとしたところうまく動作しませんでした。上記の場合、すべてのページに「イイネ！」ボタンが表示されませんが、ページによって表示が異なることがあります。</p>
<p>よく見てみると「日本語URL」のページには表示されない、ということがわかりました。<br />WordPressでは投稿名をURLに設定することが多いと思いますので、</p>
<ul>
	<li>トップページ（URLが「/」）にはボタンが表示されている。</li>
	<li>記事ページ（URLが「/お知らせ/」等）にはボタンが表示されない。</li>
</ul>
<p>のようになってしまいます。</p>
<p>デフォルトの埋め込みコードは以下の通りです。</p>
<ul>
	<li>&lt;div data-plugins-type=&#8221;mixi-favorite&#8221; data-service-key=&#8221;&lt;!&#8211; サービスキー &#8211;&gt;&#8221; data-size=&#8221;medium&#8221; data-href=&#8221;" data-show-faces=&#8221;false&#8221; data-show-count=&#8221;true&#8221; data-show-comment=&#8221;true&#8221; data-width=&#8221;"&gt;</li>
	<li>&lt;/div&gt;</li>
	<li>&lt;script type=&#8221;text/javascript&#8221;&gt;</li>
	<li>(function(d) {var s = d.createElement(&#8216;script&#8217;); s.type = &#8216;text/javascript&#8217;; s.async = true;s.src = &#8216;//static.mixi.jp/js/plugins.js#lang=ja&#8217;;d.getElementsByTagName(&#8216;head&#8217;)[0].appendChild(s);})(document);</li>
	<li>&lt;/script&gt;</li>
</ul>
<p>マニュアルページを見ると</p>
<ul>
	<li>data-url mixiチェック対象ページの URL を指定します (*2)(*3)(*4) (*5)</li>
	<li>(*2) 認証や IP 帯域によるアクセス制限のないものを指定してください。</li>
	<li>(*3) スマートフォン向けページにボタンを設置する場合でも、PC 向けページの URL を指定してください。</li>
	<li>(*4) 日本語などのマルチバイト文字を含む場合は UTF-8 で URL エンコードしたものを指定してください。</li>
	<li>(*5) 省略可能です。その場合、そのページの URL が使われます。</li>
</ul>
<p> とありますので、</p>
<ul>
	<li>data-href=&#8221;http://mixi.jp/share.pl&#8221;</li>
</ul>
<p>と修正し、</p>
<ul>
	<li>data-url=&#8221;&lt;?php print(&#8216;http://&#8217; . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']); ?&gt;&#8221;</li>
</ul>
<p>を追加します。</p>
<p>これで全ページに「イイネ！」ボタンが表示されました。</p>
<p>もしうまくいかない場合は、サービスキーを再発行してみると良いでしょう。</p>
]]></content:encoded>
			<wfw:commentRss>http://d7r.com/2012/01/mixi-plugin%e3%81%ae%e3%80%8c%e3%82%a4%e3%82%a4%e3%83%8d%ef%bc%81%e3%80%8d%e3%83%9c%e3%82%bf%e3%83%b3%e3%81%8c%e8%a1%a8%e7%a4%ba%e3%81%95%e3%82%8c%e3%81%aa%e3%81%84%e3%80%82/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://d7r.com/2012/01/mixi-plugin%e3%81%ae%e3%80%8c%e3%82%a4%e3%82%a4%e3%83%8d%ef%bc%81%e3%80%8d%e3%83%9c%e3%82%bf%e3%83%b3%e3%81%8c%e8%a1%a8%e7%a4%ba%e3%81%95%e3%82%8c%e3%81%aa%e3%81%84%e3%80%82/" />
	</item>
		<item>
		<title>IE8の記事入力でBSを2回押すと記事が消える。</title>
		<link>http://d7r.com/2011/10/ie8%e3%81%ae%e8%a8%98%e4%ba%8b%e5%85%a5%e5%8a%9b%e3%81%a7bs%e3%82%922%e5%9b%9e%e6%8a%bc%e3%81%99%e3%81%a8%e8%a8%98%e4%ba%8b%e3%81%8c%e6%b6%88%e3%81%88%e3%82%8b%e3%80%82/</link>
		<comments>http://d7r.com/2011/10/ie8%e3%81%ae%e8%a8%98%e4%ba%8b%e5%85%a5%e5%8a%9b%e3%81%a7bs%e3%82%922%e5%9b%9e%e6%8a%bc%e3%81%99%e3%81%a8%e8%a8%98%e4%ba%8b%e3%81%8c%e6%b6%88%e3%81%88%e3%82%8b%e3%80%82/#comments</comments>
		<pubDate>Fri, 21 Oct 2011 00:24:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[技術ノート]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://d7r.com/?p=1518</guid>
		<description><![CDATA[バグのようです。 http://ja.forums.wordpress.com/topic/385]]></description>
			<content:encoded><![CDATA[
<p>バグのようです。</p>
<p>http://ja.forums.wordpress.com/topic/385</p>
]]></content:encoded>
			<wfw:commentRss>http://d7r.com/2011/10/ie8%e3%81%ae%e8%a8%98%e4%ba%8b%e5%85%a5%e5%8a%9b%e3%81%a7bs%e3%82%922%e5%9b%9e%e6%8a%bc%e3%81%99%e3%81%a8%e8%a8%98%e4%ba%8b%e3%81%8c%e6%b6%88%e3%81%88%e3%82%8b%e3%80%82/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://d7r.com/2011/10/ie8%e3%81%ae%e8%a8%98%e4%ba%8b%e5%85%a5%e5%8a%9b%e3%81%a7bs%e3%82%922%e5%9b%9e%e6%8a%bc%e3%81%99%e3%81%a8%e8%a8%98%e4%ba%8b%e3%81%8c%e6%b6%88%e3%81%88%e3%82%8b%e3%80%82/" />
	</item>
		<item>
		<title>WordPressが突然表示されない。</title>
		<link>http://d7r.com/2011/08/wordpress%e3%81%8c%e7%aa%81%e7%84%b6%e8%a1%a8%e7%a4%ba%e3%81%95%e3%82%8c%e3%81%aa%e3%81%84%e3%80%82/</link>
		<comments>http://d7r.com/2011/08/wordpress%e3%81%8c%e7%aa%81%e7%84%b6%e8%a1%a8%e7%a4%ba%e3%81%95%e3%82%8c%e3%81%aa%e3%81%84%e3%80%82/#comments</comments>
		<pubDate>Wed, 17 Aug 2011 10:02:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[技術ノート]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://d7r.com/?p=1491</guid>
		<description><![CDATA[WordPressで作ったサイトが突然表示されず、管理画面・ログイン画面も表示されない場合。 サイトに対してpingは通る。 その他ネットワークの問題は無い。 サイトのデータベースをphpMyAdminで最適化してみまし [...]]]></description>
			<content:encoded><![CDATA[
<p>WordPressで作ったサイトが突然表示されず、管理画面・ログイン画面も表示されない場合。</p>
<ul>
	<li>サイトに対してpingは通る。</li>
	<li>その他ネットワークの問題は無い。</li>
</ul>
<p>サイトのデータベースをphpMyAdminで最適化してみましょう。</p>
]]></content:encoded>
			<wfw:commentRss>http://d7r.com/2011/08/wordpress%e3%81%8c%e7%aa%81%e7%84%b6%e8%a1%a8%e7%a4%ba%e3%81%95%e3%82%8c%e3%81%aa%e3%81%84%e3%80%82/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://d7r.com/2011/08/wordpress%e3%81%8c%e7%aa%81%e7%84%b6%e8%a1%a8%e7%a4%ba%e3%81%95%e3%82%8c%e3%81%aa%e3%81%84%e3%80%82/" />
	</item>
		<item>
		<title>記事に挿入された画像のURLを取得。</title>
		<link>http://d7r.com/2011/07/%e8%a8%98%e4%ba%8b%e3%81%ab%e6%8c%bf%e5%85%a5%e3%81%95%e3%82%8c%e3%81%9f%e7%94%bb%e5%83%8f%e3%81%aeurl%e3%82%92%e5%8f%96%e5%be%97%e3%80%82/</link>
		<comments>http://d7r.com/2011/07/%e8%a8%98%e4%ba%8b%e3%81%ab%e6%8c%bf%e5%85%a5%e3%81%95%e3%82%8c%e3%81%9f%e7%94%bb%e5%83%8f%e3%81%aeurl%e3%82%92%e5%8f%96%e5%be%97%e3%80%82/#comments</comments>
		<pubDate>Mon, 25 Jul 2011 12:59:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[技術ノート]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://d7r.com/?p=1486</guid>
		<description><![CDATA[WebTecNoteさんの「Wordpress2.7 記事に添付された画像を取得して表示」という記事を読み利用させていただきました。 http://tenderfeel.xsrv.jp/wordpress/513/ プロ [...]]]></description>
			<content:encoded><![CDATA[
<p>WebTecNoteさんの「Wordpress2.7 記事に添付された画像を取得して表示」という記事を読み利用させていただきました。</p>
<p><a href="http://tenderfeel.xsrv.jp/wordpress/513/" target="_blank">http://tenderfeel.xsrv.jp/wordpress/513/</a></p>
<p>プログラム詳細はWebTecNoteさんをご覧ください。</p>
<p>ここでは最終行のwp_get_attachment_imageをwp_get_attachment_image_srcとして、画像情報を配列で取得しています。</p>
<ul>
	<li>&lt;?php</li>
	<li>function get_the_post_image_src($postid,$size,$order=0,$max=null) {</li>
	<li>$attachments = get_children(array(&#8216;post_parent&#8217; =&gt; $postid, &#8216;post_type&#8217; =&gt; &#8216;attachment&#8217;, &#8216;post_mime_type&#8217; =&gt; &#8216;image&#8217;));</li>
	<li>if ( is_array($attachments) ){</li>
	<li>foreach ($attachments as $key =&gt; $row) {</li>
	<li>$mo[$key]  = $row-&gt;menu_order;</li>
	<li>$aid[$key] = $row-&gt;ID;</li>
	<li>}</li>
	<li>array_multisort($mo, SORT_ASC,$aid,SORT_DESC,$attachments);</li>
	<li>$max = empty($max)? $order+1 :$max;</li>
	<li>for($i=$order;$i&lt;$max;$i++){</li>
	<li>return wp_get_attachment_image_src( $attachments[$i]-&gt;ID, $size );</li>
	<li>}</li>
	<li>}</li>
	<li>}</li>
	<li>?&gt;</li>
</ul>
<p>上記をfunctions.php最終行（適当なところでOK）に追加してください。</p>
<p>使い方は</p>
<ul>
	<li>&lt;?php</li>
	<li>$data=get_the_post_image_src(get_the_ID(),&#8221;full&#8221;);</li>
	<li>echo $data[0];</li>
	<li>?&gt;</li>
</ul>
<p>配列[0]には画像のURLが入ります。</p>
]]></content:encoded>
			<wfw:commentRss>http://d7r.com/2011/07/%e8%a8%98%e4%ba%8b%e3%81%ab%e6%8c%bf%e5%85%a5%e3%81%95%e3%82%8c%e3%81%9f%e7%94%bb%e5%83%8f%e3%81%aeurl%e3%82%92%e5%8f%96%e5%be%97%e3%80%82/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://d7r.com/2011/07/%e8%a8%98%e4%ba%8b%e3%81%ab%e6%8c%bf%e5%85%a5%e3%81%95%e3%82%8c%e3%81%9f%e7%94%bb%e5%83%8f%e3%81%aeurl%e3%82%92%e5%8f%96%e5%be%97%e3%80%82/" />
	</item>
		<item>
		<title>予定に基づいたメンテナンスを行っているためしばらくの間ご利用できません。少し間をおいて再度確認してください。</title>
		<link>http://d7r.com/2011/05/%e4%ba%88%e5%ae%9a%e3%81%ab%e5%9f%ba%e3%81%a5%e3%81%84%e3%81%9f%e3%83%a1%e3%83%b3%e3%83%86%e3%83%8a%e3%83%b3%e3%82%b9%e3%82%92%e8%a1%8c%e3%81%a3%e3%81%a6%e3%81%84%e3%82%8b%e3%81%9f%e3%82%81%e3%81%97/</link>
		<comments>http://d7r.com/2011/05/%e4%ba%88%e5%ae%9a%e3%81%ab%e5%9f%ba%e3%81%a5%e3%81%84%e3%81%9f%e3%83%a1%e3%83%b3%e3%83%86%e3%83%8a%e3%83%b3%e3%82%b9%e3%82%92%e8%a1%8c%e3%81%a3%e3%81%a6%e3%81%84%e3%82%8b%e3%81%9f%e3%82%81%e3%81%97/#comments</comments>
		<pubDate>Tue, 31 May 2011 00:26:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[技術ノート]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://d7r.com/?p=1465</guid>
		<description><![CDATA[「予定に基づいたメンテナンスを行っているためしばらくの間ご利用できません。少し間をおいて再度確認してください。」 プラグイン等のアップデートに失敗した際に上記のように表示され、管理画面・サイトとも表示できなくなります。  [...]]]></description>
			<content:encoded><![CDATA[
<p>「予定に基づいたメンテナンスを行っているためしばらくの間ご利用できません。少し間をおいて再度確認してください。」</p>
<p>プラグイン等のアップデートに失敗した際に上記のように表示され、管理画面・サイトとも表示できなくなります。</p>
<p>最初は「エラーの多いサーバだな？」と思っていたのですが、違いました。犯人はWordPressです。</p>
<p>/wordpress/ディレクトリに.maintenanceという隠しファイルが作成されていますので、それを削除すればすぐに表示できるようになります。</p>
]]></content:encoded>
			<wfw:commentRss>http://d7r.com/2011/05/%e4%ba%88%e5%ae%9a%e3%81%ab%e5%9f%ba%e3%81%a5%e3%81%84%e3%81%9f%e3%83%a1%e3%83%b3%e3%83%86%e3%83%8a%e3%83%b3%e3%82%b9%e3%82%92%e8%a1%8c%e3%81%a3%e3%81%a6%e3%81%84%e3%82%8b%e3%81%9f%e3%82%81%e3%81%97/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://d7r.com/2011/05/%e4%ba%88%e5%ae%9a%e3%81%ab%e5%9f%ba%e3%81%a5%e3%81%84%e3%81%9f%e3%83%a1%e3%83%b3%e3%83%86%e3%83%8a%e3%83%b3%e3%82%b9%e3%82%92%e8%a1%8c%e3%81%a3%e3%81%a6%e3%81%84%e3%82%8b%e3%81%9f%e3%82%81%e3%81%97/" />
	</item>
		<item>
		<title>【プラグイン】wp-lyteboxのIE8での動作不良</title>
		<link>http://d7r.com/2011/05/%e3%80%90%e3%83%97%e3%83%a9%e3%82%b0%e3%82%a4%e3%83%b3%e3%80%91wp-lytebox%e3%81%aeie8%e3%81%a7%e3%81%ae%e5%8b%95%e4%bd%9c%e4%b8%8d%e8%89%af/</link>
		<comments>http://d7r.com/2011/05/%e3%80%90%e3%83%97%e3%83%a9%e3%82%b0%e3%82%a4%e3%83%b3%e3%80%91wp-lytebox%e3%81%aeie8%e3%81%a7%e3%81%ae%e5%8b%95%e4%bd%9c%e4%b8%8d%e8%89%af/#comments</comments>
		<pubDate>Thu, 12 May 2011 16:16:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[技術ノート]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://d7r.com/?p=1453</guid>
		<description><![CDATA[wp-lyteboxは、IE8では 背景が暗転しない。 クローズボックスが表示されない。 という不具合があります。 /wordpress/wp-content/plugins/wp-lytebox/lytebox.js. [...]]]></description>
			<content:encoded><![CDATA[
<p>wp-lyteboxは、IE8では</p>
<ul>
	<li>背景が暗転しない。</li>
	<li>クローズボックスが表示されない。</li>
</ul>
<p>という不具合があります。</p>
<p>/wordpress/wp-content/plugins/wp-lytebox/lytebox.js.phpを開き</p>
<ul>
	<li>document.all &amp;&amp; !window.opera</li>
</ul>
<p>を検索します。</p>
<ul>
	<li>/*@cc_on</li>
	<li>/*@if (@_jscript)</li>
	<li>this.ie = (document.all &amp;&amp; !window.opera) ? true : false;</li>
	<li>/*@else @*/</li>
	<li>this.ie = false;</li>
	<li>/*@end</li>
	<li>@*/</li>
</ul>
<p>これを以下のように変更します。</p>
<ul>
	<li>/*@cc_on</li>
	<li>/*@if (@_jscript)</li>
	<li>this.ie = (document.all &amp;&amp; !window.opera &amp;&amp; document.documentMode != 8 ) ? true : false;	//IE8 Error Fix fixed by d7r</li>
	<li>/*@else @*/</li>
	<li>this.ie = false;</li>
	<li>/*@end</li>
	<li>@*/</li>
</ul>
<p>「//IE8 Error Fix fixed by d7r」はメモなので不要です。</p>
]]></content:encoded>
			<wfw:commentRss>http://d7r.com/2011/05/%e3%80%90%e3%83%97%e3%83%a9%e3%82%b0%e3%82%a4%e3%83%b3%e3%80%91wp-lytebox%e3%81%aeie8%e3%81%a7%e3%81%ae%e5%8b%95%e4%bd%9c%e4%b8%8d%e8%89%af/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://d7r.com/2011/05/%e3%80%90%e3%83%97%e3%83%a9%e3%82%b0%e3%82%a4%e3%83%b3%e3%80%91wp-lytebox%e3%81%aeie8%e3%81%a7%e3%81%ae%e5%8b%95%e4%bd%9c%e4%b8%8d%e8%89%af/" />
	</item>
		<item>
		<title>XOOPS、WordPressのサーバ移転承ります。</title>
		<link>http://d7r.com/2011/04/xoops%e3%80%81wordpress%e3%81%ae%e3%82%b5%e3%83%bc%e3%83%90%e7%a7%bb%e8%bb%a2%e6%89%bf%e3%82%8a%e3%81%be%e3%81%99%e3%80%82/</link>
		<comments>http://d7r.com/2011/04/xoops%e3%80%81wordpress%e3%81%ae%e3%82%b5%e3%83%bc%e3%83%90%e7%a7%bb%e8%bb%a2%e6%89%bf%e3%82%8a%e3%81%be%e3%81%99%e3%80%82/#comments</comments>
		<pubDate>Mon, 18 Apr 2011 16:18:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[技術ノート]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[XOOPS]]></category>

		<guid isPermaLink="false">http://d7r.com/?p=1410</guid>
		<description><![CDATA[XOOPS、WordPressのサーバ移転をお考えの方へ。 新規サーバの設定、データベースのバックアップ、設定ファイルのドメインやディレクトリ指定等、解決すべき問題がたいへん多く、お困りのことと思います。 弊社は多数のサ [...]]]></description>
			<content:encoded><![CDATA[
<p>XOOPS、WordPressのサーバ移転をお考えの方へ。</p>
<p>新規サーバの設定、データベースのバックアップ、設定ファイルのドメインやディレクトリ指定等、解決すべき問題がたいへん多く、お困りのことと思います。</p>
<p>弊社は多数のサーバ間にてサイト移転を行った実績があります。</p>
<p>サーバ・コンテンツ容量・バージョンによって見積が必要ですので、お気軽にお問い合せください。</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://d7r.com/2011/04/xoops%e3%80%81wordpress%e3%81%ae%e3%82%b5%e3%83%bc%e3%83%90%e7%a7%bb%e8%bb%a2%e6%89%bf%e3%82%8a%e3%81%be%e3%81%99%e3%80%82/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://d7r.com/2011/04/xoops%e3%80%81wordpress%e3%81%ae%e3%82%b5%e3%83%bc%e3%83%90%e7%a7%bb%e8%bb%a2%e6%89%bf%e3%82%8a%e3%81%be%e3%81%99%e3%80%82/" />
	</item>
		<item>
		<title>sandboxテーマでギャラリーのリンク変更</title>
		<link>http://d7r.com/2011/02/sandbox%e3%83%86%e3%83%bc%e3%83%9e%e3%81%a7%e3%82%ae%e3%83%a3%e3%83%a9%e3%83%aa%e3%83%bc%e3%81%ae%e3%83%aa%e3%83%b3%e3%82%af%e5%a4%89%e6%9b%b4/</link>
		<comments>http://d7r.com/2011/02/sandbox%e3%83%86%e3%83%bc%e3%83%9e%e3%81%a7%e3%82%ae%e3%83%a3%e3%83%a9%e3%83%aa%e3%83%bc%e3%81%ae%e3%83%aa%e3%83%b3%e3%82%af%e5%a4%89%e6%9b%b4/#comments</comments>
		<pubDate>Wed, 02 Feb 2011 18:48:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[技術ノート]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://d7r.com/?p=1124</guid>
		<description><![CDATA[テーマにsandboxを使用した場合、ギャラリー機能を使用するとサムネイルからのリンクがパラメータに関わりなく「添付ファイルのページ」へのリンクになってしまいます。 これはfunctions.php内の // Funct [...]]]></description>
			<content:encoded><![CDATA[<p>テーマにsandboxを使用した場合、ギャラリー機能を使用するとサムネイルからのリンクがパラメータに関わりなく「添付ファイルのページ」へのリンクになってしまいます。</p>
<p>これはfunctions.php内の</p>
<p>// Function to filter the default gallery shortcode</p>
<p>という箇所でgallery shortcodeをフックしているからです。</p>
<ul>
<li>extract(shortcode_atts( array(<br />&#8216;orderby&#8217;    =&gt; &#8216;menu_order ASC, ID ASC&#8217;,<br />&#8216;id&#8217;         =&gt; $post-&gt;ID,<br />&#8216;itemtag&#8217;    =&gt; &#8216;dl&#8217;,<br />&#8216;icontag&#8217;    =&gt; &#8216;dt&#8217;,<br />&#8216;captiontag&#8217; =&gt; &#8216;dd&#8217;,<br />&#8216;columns&#8217;    =&gt; 3,<br />&#8216;size&#8217;       =&gt; &#8216;<span style="color: #ff0000;">thumbnail</span>&#8216;,<br />), $attr ));</li>
<li>…</li>
<li>foreach ( $attachments as $id =&gt; $attachment ) {<br />$img_lnk = get_attachment_link($id);<br /><span style="color: #ff0000;">$img_src = d7rwp_get_attachment_image_src( $id, $size );<br />$img_src = $img_src[0];</span><br />$img_alt = $attachment-&gt;post_excerpt;<br />if ( $img_alt == null )<br />$img_alt = $attachment-&gt;post_title;<br />$img_rel = apply_filters( &#8216;gallery_img_rel&#8217;, &#8216;attachment&#8217; ); // Available filter: gallery_img_rel<br />$img_class = apply_filters( &#8216;gallery_img_class&#8217;, &#8216;gallery-image&#8217; ); // Available filter: gallery_img_class<br />$output  .=  &#8220;\n\t&#8221; . &#8216;&lt;&#8217; . $itemtag . &#8216; class=&#8221;gallery-item gallery-columns-&#8217; . $columns .&#8217;&#8221;&gt;&#8217;;<br />$output  .=  &#8220;\n\t\t&#8221; . &#8216;&lt;&#8217; . $icontag . &#8216; class=&#8221;gallery-icon&#8221;&gt;&lt;a href=&#8221;&#8216; . <span style="color: #ff0000;">$img_src</span> . &#8216;&#8221; title=&#8221;&#8216; . $img_alt . &#8216;&#8221; rel=&#8221;wp-lytebox&#8217; . $img_rel . &#8216;&#8221;&gt;&lt;img src=&#8221;&#8216; . $img_src . &#8216;&#8221; alt=&#8221;&#8216; . $img_alt . &#8216;&#8221; class=&#8221;&#8216; . $img_class . &#8216; attachment-&#8217; . $size . &#8216;&#8221; /&gt;&lt;/a&gt;&lt;/&#8217; . $icontag . &#8216;&gt;&#8217;;</li>
</ul>
<p>赤字の箇所が「決め打ち」になっています。</p>
<p>本来は引数から条件分岐したいところですが、面倒臭いので「ファイルへのリンク」に決め打ちしてしまいます。<br />ついでに並び順も「降順」に変更します。</p>
<ul>
<li>extract(shortcode_atts( array(<br />&#8216;orderby&#8217;    =&gt; &#8216;menu_order <span style="color: #ff0000;">DESC</span>, ID <span style="color: #ff0000;">DESC</span>&#8216;,<br />&#8216;id&#8217;         =&gt; $post-&gt;ID,<br />&#8216;itemtag&#8217;    =&gt; &#8216;dl&#8217;,<br />&#8216;icontag&#8217;    =&gt; &#8216;dt&#8217;,<br />&#8216;captiontag&#8217; =&gt; &#8216;dd&#8217;,<br />&#8216;columns&#8217;    =&gt; 3,<br />&#8216;size&#8217;       =&gt; &#8216;thumbnail&#8217;,<br />), $attr ));</li>
<li>…</li>
<li>foreach ( $attachments as $id =&gt; $attachment ) {<br />$img_lnk = get_attachment_link($id);<br />$img_src = d7rwp_get_attachment_image_src( $id, $size );<br />$img_src = $img_src[0];<br /><span style="color: #ff0000;">$img_src_org = d7rwp_get_attachment_image_src( $id, &#8220;full&#8221; );<br />$img_src_org = $img_src_org[0];<br /></span>$img_alt = $attachment-&gt;post_excerpt;<br />if ( $img_alt == null )<br />$img_alt = $attachment-&gt;post_title;<br />$img_rel = apply_filters( &#8216;gallery_img_rel&#8217;, &#8216;attachment&#8217; ); // Available filter: gallery_img_rel<br />$img_class = apply_filters( &#8216;gallery_img_class&#8217;, &#8216;gallery-image&#8217; ); // Available filter: gallery_img_class<br />$output  .=  &#8220;\n\t&#8221; . &#8216;&lt;&#8217; . $itemtag . &#8216; class=&#8221;gallery-item gallery-columns-&#8217; . $columns .&#8217;&#8221;&gt;&#8217;;<br />$output  .=  &#8220;\n\t\t&#8221; . &#8216;&lt;&#8217; . $icontag . &#8216; class=&#8221;gallery-icon&#8221;&gt;&lt;a href=&#8221;&#8216; . <span style="color: #ff0000;">$img_src_org</span> . &#8216;&#8221; title=&#8221;&#8216; . $img_alt . &#8216;&#8221; rel=&#8221;wp-lytebox&#8217; . $img_rel . &#8216;&#8221;&gt;&lt;img src=&#8221;&#8216; . $img_src . &#8216;&#8221; alt=&#8221;&#8216; . $img_alt . &#8216;&#8221; class=&#8221;&#8216; . $img_class . &#8216; attachment-&#8217; . $size . &#8216;&#8221; /&gt;&lt;/a&gt;&lt;/&#8217; . $icontag . &#8216;&gt;&#8217;;</li>
</ul>
<p>これでlight-boxやwp-lyteboxが動作します。</p>
<p>サンプルは、<a href="/gallery機能テスト2/">gallery機能テスト2</a>、<a href="/gallery機能テスト/">gallery機能テスト</a>をご覧ください。</p>
]]></content:encoded>
			<wfw:commentRss>http://d7r.com/2011/02/sandbox%e3%83%86%e3%83%bc%e3%83%9e%e3%81%a7%e3%82%ae%e3%83%a3%e3%83%a9%e3%83%aa%e3%83%bc%e3%81%ae%e3%83%aa%e3%83%b3%e3%82%af%e5%a4%89%e6%9b%b4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://d7r.com/2011/02/sandbox%e3%83%86%e3%83%bc%e3%83%9e%e3%81%a7%e3%82%ae%e3%83%a3%e3%83%a9%e3%83%aa%e3%83%bc%e3%81%ae%e3%83%aa%e3%83%b3%e3%82%af%e5%a4%89%e6%9b%b4/" />
	</item>
		<item>
		<title>lightbox2とjquery.jsのコンフリクト</title>
		<link>http://d7r.com/2011/01/lightbox2%e3%81%a8jquery-js%e3%81%ae%e3%82%b3%e3%83%b3%e3%83%95%e3%83%aa%e3%82%af%e3%83%88/</link>
		<comments>http://d7r.com/2011/01/lightbox2%e3%81%a8jquery-js%e3%81%ae%e3%82%b3%e3%83%b3%e3%83%95%e3%83%aa%e3%82%af%e3%83%88/#comments</comments>
		<pubDate>Fri, 28 Jan 2011 00:41:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[技術ノート]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://d7r.com/?p=1059</guid>
		<description><![CDATA[スライドショーを実現すべく、jquery.jsを導入しました。 スライドショーは別途解説。 SafariやIE6では問題なかったのですが、IE8ではコンフリクトが発生。エラーメッセージで「prototype.jsのオブジ [...]]]></description>
			<content:encoded><![CDATA[<p>スライドショーを実現すべく、jquery.jsを導入しました。</p>
<ul>
<li>スライドショーは別途解説。</li>
</ul>
<p>SafariやIE6では問題なかったのですが、IE8ではコンフリクトが発生。<br />エラーメッセージで「prototype.jsのオブジェクトがありません云々」が毎回表示されます。<br />またスライドショーが動作しません。</p>
<p>原因を探ると、lightbox2の利用するprototype.jsとjqueryがコンフリクトしているようです。<br />たぶん同じ変数名をグローバルで使っているのでは？＜究明していません。</p>
<p>そこで2つの案を考えました。</p>
<ul>
<li>prototype.jsを使用せずにlightboxを実現するプラグインを使う。</li>
<li>コンフリクトを避けるためにjqury.jsを編集。</li>
</ul>
<p>jquery（またはprototype.js）の編集は、バージョンアップした際の対応がいちいち面倒そうです。<br />よって、違うプラグインを探したところ、けっこう見つかりました。<br />いずれも、画像に対して「rel=&#8221;lightbox&#8221;」等の追記タグは必要ない物です。</p>
<ul>
<li><a href="http://grupenet.com/2007/08/03/wp-lytebox/" target="_blank">WP-Lytebox</a> シンプル。</li>
<li><a href="http://grupenet.com/2007/06/11/wp-greybox/" target="_blank">WP-GreyBox</a> シンプル。ウィンドウクローズ・画像送りボタンが離れて表示されるのが、直感的ではない。</li>
<li><a href="http://sivel.net/wordpress/shadowbox-js/" target="_blank">Shadowbox JS WordPress</a> 多機能。ムービーのlightbox表示もできる。</li>
</ul>
<p>多機能で見た目も良いShadowbox JS WordPressは、残念ながらFlash Video Playerとコンフリクトしてしまいました。<br />GreyBoxは、見た目が少々・・。</p>
<p>たいへんシンプルですが、 WP-Lyteboxは動作も安定して直感的なので使用することにしました。<br />ただし、IE8ではCloseボタンが表示されないことがあるので、原因を調べています。</p>
]]></content:encoded>
			<wfw:commentRss>http://d7r.com/2011/01/lightbox2%e3%81%a8jquery-js%e3%81%ae%e3%82%b3%e3%83%b3%e3%83%95%e3%83%aa%e3%82%af%e3%83%88/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://d7r.com/2011/01/lightbox2%e3%81%a8jquery-js%e3%81%ae%e3%82%b3%e3%83%b3%e3%83%95%e3%83%aa%e3%82%af%e3%83%88/" />
	</item>
		<item>
		<title>Lightboxのエラー</title>
		<link>http://d7r.com/2011/01/lightbox%e3%81%ae%e3%82%a8%e3%83%a9%e3%83%bc/</link>
		<comments>http://d7r.com/2011/01/lightbox%e3%81%ae%e3%82%a8%e3%83%a9%e3%83%bc/#comments</comments>
		<pubDate>Thu, 27 Jan 2011 03:58:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[技術ノート]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://d7r.com/?p=1054</guid>
		<description><![CDATA[WordPressのLightbox-2プラグインを使用した際、ページによってLightboxが動作しないというエラーが発生しました。 これは、ページ中に「空のリンク」が含まれている場合に発生します。 具体的には &#038;lt [...]]]></description>
			<content:encoded><![CDATA[<p>WordPressのLightbox-2プラグインを使用した際、ページによってLightboxが動作しないというエラーが発生しました。</p>
<p>これは、ページ中に「空のリンク」が含まれている場合に発生します。</p>
<p>具体的には</p>
<ul>
<li>&lt;a href=&#8221;http://d7r.com/xxxx/wp-content/uploads/MG_00271.jpg&#8221;&gt;&lt;img src=&#8221;http://d7r.com/xxxx/wp-content/uploads/MG_00271-300&#215;200.jpg&#8221; title=&#8221;_MG_0027&#8243; width=&#8221;300&#8243; height=&#8221;200&#8243; /&gt;&lt;/a&gt;</li>
</ul>
<p>となるべきところ</p>
<ul>
<li>&lt;a href=&#8221;http://d7r.com/xxxx/wp-content/uploads/MG_00271.jpg&#8221;&gt;&lt;/a&gt;</li>
</ul>
<p>のようにリンクを張るべき対象が亡くなっているような場合です。</p>
<p>これはリンクを張った画像を削除した際に、&lt;a&gt;タグのみが取り残されて発生するようです。</p>
]]></content:encoded>
			<wfw:commentRss>http://d7r.com/2011/01/lightbox%e3%81%ae%e3%82%a8%e3%83%a9%e3%83%bc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://d7r.com/2011/01/lightbox%e3%81%ae%e3%82%a8%e3%83%a9%e3%83%bc/" />
	</item>
	</channel>
</rss>

