<?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:xhtml="http://www.w3.org/1999/xhtml"
>

<channel>
	<title>Development memo</title>
	<atom:link href="http://officesoya.net/weblog/feed/" rel="self" type="application/rss+xml" />
	<link>http://officesoya.net/weblog</link>
	<description>Rough Consensus　And Running code</description>
	<pubDate>Sun, 30 Nov 2008 16:16:10 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
	<language>ja</language>
			<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://officesoya.net/weblog/feed/" />
		<item>
		<title>OpenCartのモジュール　DisplayIcons</title>
		<link>http://officesoya.net/weblog/2008/12/01/opencart_display_icon_module/</link>
		<comments>http://officesoya.net/weblog/2008/12/01/opencart_display_icon_module/#comments</comments>
		<pubDate>Sun, 30 Nov 2008 16:14:52 +0000</pubDate>
		<dc:creator>soya</dc:creator>
		
		<category><![CDATA[OpenCart]]></category>

		<category><![CDATA[module]]></category>

		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://officesoya.net/weblog/?p=127</guid>
		<description><![CDATA[英語の説明文が完成したのでContributionをアップしました。名前はDisplayIcons。
その名前の通り、新作リリースの場合は「New」、在庫が少ない場合は「在庫少」、在庫がない場合は「在庫無」のアイコンが出 [...]]]></description>
			<content:encoded><![CDATA[<p>英語の説明文が完成したのでContributionをアップしました。名前はDisplayIcons。<br />
その名前の通り、新作リリースの場合は「New」、在庫が少ない場合は「在庫少」、在庫がない場合は「在庫無」のアイコンが出る、というものです。新作の場合は何日まで表示するか、在庫が少ない場合のアイコンは在庫がいくつになったら表示するか設定できます。<br />
日本のショッピング事情には必須だと思うのですが、（特に在庫無しっていうの）無かったので自作しました。<br />
OpenCartを使いましょう！</p>
<p>こちらでダウンロードできます<br />
<a href="http://www.opencart.com/contribution/info/category_id/1/contribution_id/81">http://www.opencart.com/contribution/info/category_id/1/contribution_id/81</a></p>
]]></content:encoded>
			<wfw:commentRss>http://officesoya.net/weblog/2008/12/01/opencart_display_icon_module/feed/</wfw:commentRss>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://officesoya.net/weblog/2008/12/01/opencart_display_icon_module/" />
	</item>
		<item>
		<title>OpenCartのrss.phpで文字化け</title>
		<link>http://officesoya.net/weblog/2008/11/22/opencart_rss/</link>
		<comments>http://officesoya.net/weblog/2008/11/22/opencart_rss/#comments</comments>
		<pubDate>Fri, 21 Nov 2008 15:10:28 +0000</pubDate>
		<dc:creator>soya</dc:creator>
		
		<category><![CDATA[OpenCart]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[rss]]></category>

		<guid isPermaLink="false">http://officesoya.net/weblog/?p=123</guid>
		<description><![CDATA[OpenCartのrss.phpで日本語が文字化けする。&#38;atilde;←こんな文字がたくさん出る。
upload/rss.phpのソースコードを見てみると、48行目


foreach ($results as $result) {
$products[]=array(

&#039;name&#039; =&#62; htmlentities(strip_tags($result[&#039;name&#039;])),
&#039;url&#039; =&#62; htmlentities($url-&#62;href(&#039;product&#039;, FALSE, array(&#039;product_id&#039; =&#62; $result[&#039;product_id&#039;]))),
&#039;add_date&#039; =&#62; date(&#34;D, d M Y H:i:s T&#34;, strtotime($result[&#039;date_product_added&#039;])),
&#039;desc&#039; =&#62; htmlentities(strip_tags($result[&#039;description&#039;],&#039;ENT_QUOTES&#039;)) .
htmlentities(&#039;&#60;br&#62;&#60;img width=&#34;100&#34; height=&#34;100&#34; src=&#34;&#039; .
$image-&#62;resize($result[&#039;filename&#039;], 100, 100) . &#039;&#34;&#62;&#039;)
);
}

となっているが、ここのforeach文で文字化けしている様子。
htmlentities のデフォルト文字列は iso-8859-1なのでUTF-8に変更。


foreach ($results as $result) {
$products[]=array(

&#039;name&#039; =&#62; htmlentities(strip_tags($result[&#039;name&#039;]),ENT_COMPAT,&#34;utf-8&#34;),
&#039;url&#039; =&#62; htmlentities($url-&#62;href(&#039;product&#039;, FALSE, array(&#039;product_id&#039; =&#62; $result[&#039;product_id&#039;])),ENT_COMPAT,&#34;utf-8&#34;),
&#039;add_date&#039; =&#62; date(&#34;D, d M Y H:i:s T&#34;, strtotime($result[&#039;date_product_added&#039;])),
&#039;desc&#039; =&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>OpenCartのrss.phpで日本語が文字化けする。&amp;atilde;←こんな文字がたくさん出る。</p>
<p>upload/rss.phpのソースコードを見てみると、48行目</p>
<pre name="code" class="php">

foreach ($results as $result) {
$products[]=array(

&#039;name&#039; =&gt; htmlentities(strip_tags($result[&#039;name&#039;])),
&#039;url&#039; =&gt; htmlentities($url-&gt;href(&#039;product&#039;, FALSE, array(&#039;product_id&#039; =&gt; $result[&#039;product_id&#039;]))),
&#039;add_date&#039; =&gt; date(&quot;D, d M Y H:i:s T&quot;, strtotime($result[&#039;date_product_added&#039;])),
&#039;desc&#039; =&gt; htmlentities(strip_tags($result[&#039;description&#039;],&#039;ENT_QUOTES&#039;)) .
htmlentities(&#039;&lt;br&gt;&lt;img width=&quot;100&quot; height=&quot;100&quot; src=&quot;&#039; .
$image-&gt;resize($result[&#039;filename&#039;], 100, 100) . &#039;&quot;&gt;&#039;)
);
}
</pre>
<p>となっているが、ここのforeach文で文字化けしている様子。<br />
htmlentities のデフォルト文字列は iso-8859-1なのでUTF-8に変更。</p>
<pre name="code" class="php">

foreach ($results as $result) {
$products[]=array(

&#039;name&#039; =&gt; htmlentities(strip_tags($result[&#039;name&#039;]),ENT_COMPAT,&quot;utf-8&quot;),
&#039;url&#039; =&gt; htmlentities($url-&gt;href(&#039;product&#039;, FALSE, array(&#039;product_id&#039; =&gt; $result[&#039;product_id&#039;])),ENT_COMPAT,&quot;utf-8&quot;),
&#039;add_date&#039; =&gt; date(&quot;D, d M Y H:i:s T&quot;, strtotime($result[&#039;date_product_added&#039;])),
&#039;desc&#039; =&gt; htmlentities(strip_tags($result[&#039;description&#039;],&#039;ENT_QUOTES&#039;),ENT_COMPAT,&quot;utf-8&quot;) .
htmlentities(&#039;&lt;br&gt;&lt;img width=&quot;100&quot; height=&quot;100&quot; src=&quot;&#039; .
$image-&gt;resize($result[&#039;filename&#039;], 100, 100) . &#039;&quot;&gt;&#039;),ENT_COMPAT,&quot;utf-8&quot;
);
}
</pre>
<p>これで文字化けが解消された</p>
]]></content:encoded>
			<wfw:commentRss>http://officesoya.net/weblog/2008/11/22/opencart_rss/feed/</wfw:commentRss>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://officesoya.net/weblog/2008/11/22/opencart_rss/" />
	</item>
		<item>
		<title>OpenCartの日本語化</title>
		<link>http://officesoya.net/weblog/2008/11/21/opencart_japanse/</link>
		<comments>http://officesoya.net/weblog/2008/11/21/opencart_japanse/#comments</comments>
		<pubDate>Fri, 21 Nov 2008 14:59:45 +0000</pubDate>
		<dc:creator>soya</dc:creator>
		
		<category><![CDATA[OpenCart]]></category>

		<category><![CDATA[日本語化]]></category>

		<guid isPermaLink="false">http://officesoya.net/weblog/?p=120</guid>
		<description><![CDATA[日本語化ファイルを制作しました。ファイルは本家http://www.opencart.com/のcontribution内にアップロードしました。ここです。
英語は基本的に苦手なので、日本人がもっとOpencartを使っ [...]]]></description>
			<content:encoded><![CDATA[<p>日本語化ファイルを制作しました。ファイルは本家http://www.opencart.com/のcontribution内にアップロードしました。<a title="コントリビューション" href="http://www.opencart.com/contribution/category/category_id/7">ここ</a>です。</p>
<p>英語は基本的に苦手なので、日本人がもっとOpencartを使ってくれるよう、日本語を見るとなんとなく安心できる人のためにアップしました。開発時間の短縮になれば、と思います。日本語化したらかえってわかりずらくなった、という方は自分で日本語を直してください。ご利用はご自身の責任でお願いします。</p>
<p>ただいま、アイコンを表示するモジュールを製作中です。完成すれば、New アイコンと在庫少ないアイコンと在庫切れアイコンが表示できるようになります。、というか、もうできているのですが、本家にアップロードするのに、インストール方法の翻訳（日本語→英語）に苦闘しています<span style="color: #c0c0c0;">（というか、できない）</span>。今週中に通訳の知り合いにお願いして翻訳してもらう予定です。</p>
]]></content:encoded>
			<wfw:commentRss>http://officesoya.net/weblog/2008/11/21/opencart_japanse/feed/</wfw:commentRss>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://officesoya.net/weblog/2008/11/21/opencart_japanse/" />
	</item>
		<item>
		<title>OpenCartの日本語化（バグフィックス）</title>
		<link>http://officesoya.net/weblog/2008/11/12/opencart_japanese/</link>
		<comments>http://officesoya.net/weblog/2008/11/12/opencart_japanese/#comments</comments>
		<pubDate>Tue, 11 Nov 2008 20:08:59 +0000</pubDate>
		<dc:creator>soya</dc:creator>
		
		<category><![CDATA[OpenCart]]></category>

		<category><![CDATA[日本語化]]></category>

		<guid isPermaLink="false">http://officesoya.net/weblog/?p=108</guid>
		<description><![CDATA[引き続きオープンカートOpenCartの日本語化に集中。
といっても日本語になる前にバグを発見したのでメモっておきます。
①/upload/library/environment/url.php
80行目//return [...]]]></description>
			<content:encoded><![CDATA[<p>引き続きオープンカートOpenCartの日本語化に集中。<br />
といっても日本語になる前にバグを発見したのでメモっておきます。<br />
①<span style="color: #339966;">/upload/library/environment/url.php</span><br />
80行目//return htmlspecialchars($server . $link);<br />
return $server . $link;</p>
<p>に書き換える<br />
extension.phpのURLがおかしかったので。<br />
参考URL→http://forum.opencart.com/index.php?action=profile;u=2022;sa=showPosts</p>
<p>②<span style="color: #339966;">/upload/admin/template/default/content/product.tpl</span><br />
10行目  &lt;div class=&#8221;enabled&#8221; onmouseover=&#8221;className=&#8217;hover&#8217;&#8221; onmouseout=&#8221;className=&#8217;enabled&#8217;&#8221; onclick=&#8221;location=&#8217;&lt;?php echo $delete; ?&gt;&#8217;&gt;<br />
を<br />
&lt;div class=&#8221;enabled&#8221; onmouseover=&#8221;className=&#8217;hover&#8217;&#8221; onmouseout=&#8221;className=&#8217;enabled&#8217;&#8221; onclick=&#8221;location=&#8217;&lt;?php echo $delete; ?&gt;&#8217;&#8221;&gt;<br />
に書き換える。※最後の方の「&#8221;」を書き加える<br />
製品更新の画面で削除アイコンが表示されなかったため（動作には問題ないが）。</p>
<p>デモ用オープンカート <a href="http://officesoya.net/~demo3/" target="_blank">http://officesoya.net/~demo3 </a>にて公開予定です。</p>
]]></content:encoded>
			<wfw:commentRss>http://officesoya.net/weblog/2008/11/12/opencart_japanese/feed/</wfw:commentRss>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://officesoya.net/weblog/2008/11/12/opencart_japanese/" />
	</item>
		<item>
		<title>.htaccessを有効にするためにAllowOverride AllにするとForbiddenになる・・・</title>
		<link>http://officesoya.net/weblog/2008/11/08/opencart/</link>
		<comments>http://officesoya.net/weblog/2008/11/08/opencart/#comments</comments>
		<pubDate>Sat, 08 Nov 2008 08:07:01 +0000</pubDate>
		<dc:creator>soya</dc:creator>
		
		<category><![CDATA[OpenCart]]></category>

		<category><![CDATA[htaccess]]></category>

		<guid isPermaLink="false">http://officesoya.net/weblog/?p=102</guid>
		<description><![CDATA[OpenCartのインターフェイスがかわいくて大変気に入っているのですが、日本ではほとんど使われていないOpenCartを必死に日本語化しているさなか、ローカル(WindowsXP)ではリンクをクリックしてもページが変わ [...]]]></description>
			<content:encoded><![CDATA[<p><a title="OpenCart" href="http://http://www.opencart.com/" target="_blank">OpenCart</a>のインターフェイスがかわいくて大変気に入っているのですが、日本ではほとんど使われていないOpenCartを必死に日本語化しているさなか、ローカル(WindowsXP)ではリンクをクリックしてもページが変わらない、テストサーバー(Fedora Core6)ではRewriteが動いていない様子でNotFoundになってしまい、心が折れました・・・。日本語の情報が少なすぎなのは覚悟の上でしたが。英語のFAQを読み漁っていると、解決しました。私はチルダ付きのUserdirにインストールしたわけだが、以下の太字の部分を加える必要があったのです。</p>
<p>&lt;IfModule mod_rewrite.c&gt;<br />
RewriteEngine On<br />
<strong><br />
# Put your installation directory here:<br />
# If your URL is www.example.com/shop/, use /shop/<br />
# If your URL is www.example.com/, use /<br />
<span style="text-decoration: line-through;">RewriteBase /</span><br />
RewriteBase /~mydir/</strong></p>
<p>#OPENCART REWRITES START<br />
RewriteCond %{REQUEST_FILENAME} !-f<br />
RewriteCond %{REQUEST_FILENAME} !-d<br />
RewriteRule ^(.*) index.php<br />
#OPENCART REWRITES END</p>
<p>&lt;/IfModule&gt;</p>
<p>テストサーバー(Fedora Core6)では上記の問題に加え、.htaccessの設定をhttpd.confで使用しているディレクトリにだけ<br />
AllowOverride All<br />
としてみるとForbiddenに<br />
AllowOcerride None<br />
としてみるとトップページは表示されるがその他のページはFileNotFoundになってしまうという現象に悩まされた。<br />
が、.htaccessのパーミッションが間違っていた・・・644で表示できました。</p>
<p>日本語情報がかなり少ないOpenCartですが、ソースコードが整理されていてカスタマイズしやすそうなので選びました。ZenCartやPrestaShopもインストールしてみたけど、どうも管理画面とかが気に入らない・・・<br />
皆さんこんなにかわいい<a title="OpenCart" href="http://http://www.opencart.com/" target="_blank">OpenCart</a>をもっと使ってください！</p>
]]></content:encoded>
			<wfw:commentRss>http://officesoya.net/weblog/2008/11/08/opencart/feed/</wfw:commentRss>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://officesoya.net/weblog/2008/11/08/opencart/" />
	</item>
		<item>
		<title>IE7で表示されないページ</title>
		<link>http://officesoya.net/weblog/2008/11/06/ie7/</link>
		<comments>http://officesoya.net/weblog/2008/11/06/ie7/#comments</comments>
		<pubDate>Thu, 06 Nov 2008 04:42:02 +0000</pubDate>
		<dc:creator>soya</dc:creator>
		
		<category><![CDATA[HTML]]></category>

		<category><![CDATA[IE7]]></category>

		<guid isPermaLink="false">http://officesoya.net/weblog/?p=99</guid>
		<description><![CDATA[IE７でクライアントの画面が表示されず、焦った。FirefoxやSafariでは問題ないのに・・・、でもソースコードは表示される。
原因は
&#60;meta http-equiv=&#8221;Content-Scrip [...]]]></description>
			<content:encoded><![CDATA[<p>IE７でクライアントの画面が表示されず、焦った。FirefoxやSafariでは問題ないのに・・・、でもソースコードは表示される。<br />
原因は<br />
&lt;meta http-equiv=&#8221;Content-Script-Type&#8221; content=&#8221;text/javascript&#8221;&gt;<br />
がヘッダーにないのにJavascriptをhtmlに書いていたから。</p>
<p>IE７で表示がされていないページがあったらこの三行が入っているか確認しよう。<br />
&lt;meta http-equiv=&#8221;Content-Type&#8221; content=&#8221;text/html; charset=文字コード&#8221;&gt;<br />
&lt;meta http-equiv=&#8221;Content-Script-Type&#8221; content=&#8221;text/javascript&#8221;&gt;<br />
&lt;meta http-equiv=&#8221;Content-Style-Type&#8221; content=&#8221;text/css&#8221; /&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://officesoya.net/weblog/2008/11/06/ie7/feed/</wfw:commentRss>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://officesoya.net/weblog/2008/11/06/ie7/" />
	</item>
		<item>
		<title>include_pathの追加</title>
		<link>http://officesoya.net/weblog/2008/10/21/include_path/</link>
		<comments>http://officesoya.net/weblog/2008/10/21/include_path/#comments</comments>
		<pubDate>Tue, 21 Oct 2008 07:51:36 +0000</pubDate>
		<dc:creator>soya</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[include_path]]></category>

		<guid isPermaLink="false">http://officesoya.net/weblog/?p=93</guid>
		<description><![CDATA[インクルードパスを追加


ini_set(&#34;include_path&#34;,&#34;../Zend&#34;);

または、


set_include_path(&#34;../Zend&#038;qu [...]]]></description>
			<content:encoded><![CDATA[<p>インクルードパスを追加</p>
<pre name="code" class="php">

ini_set(&quot;include_path&quot;,&quot;../Zend&quot;);
</pre>
<p>または、</p>
<pre name="code" class="php">

set_include_path(&quot;../Zend&quot;);
</pre>
<p>どちらでも良い。デフォルトのphp.iniに書いてあるパスは無視されるので、要注意です。<br />
または、.htaccessで（下記はPHP5の場合）<br />
&lt;IfModule mod_php5.c&gt;<br />
 php_value include_path &#8220;C:\php\includes;C:\Program Files\php\Zend\library;&#8221;<br />
&lt;/IfModule&gt;<br />
としてやってもよい。<br />
デフォルトのphp.iniに書いてある設定も有効にしたい場合は、</p>
<pre name="code" class="php">

ini_set(&quot;include_path&quot;, 追加するパス . PATH_SEPARATOR . ini_get(&quot;include_path&quot;) );
</pre>
<p>とする。（PATH_SEPARATORはPHPの定数です）<br />
include_pathがわからない時はphpinfo()で調べる。</p>
]]></content:encoded>
			<wfw:commentRss>http://officesoya.net/weblog/2008/10/21/include_path/feed/</wfw:commentRss>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://officesoya.net/weblog/2008/10/21/include_path/" />
	</item>
		<item>
		<title>fedora webmater 受信できない</title>
		<link>http://officesoya.net/weblog/2008/10/19/webmater/</link>
		<comments>http://officesoya.net/weblog/2008/10/19/webmater/#comments</comments>
		<pubDate>Sun, 19 Oct 2008 14:09:03 +0000</pubDate>
		<dc:creator>soya</dc:creator>
		
		<category><![CDATA[Fedora Core6]]></category>

		<category><![CDATA[webmaster]]></category>

		<guid isPermaLink="false">http://officesoya.net/weblog/?p=89</guid>
		<description><![CDATA[fedora webmaterというアカウントのメールが受信できない
useradd webmasterとしてユーザーを追加しようとしたが、すでに追加されている模様。
どうやらエイリアスというやつでrootで受信されるよ [...]]]></description>
			<content:encoded><![CDATA[<p>fedora webmaterというアカウントのメールが受信できない</p>
<p>useradd webmasterとしてユーザーを追加しようとしたが、すでに追加されている模様。<br />
どうやらエイリアスというやつでrootで受信されるようになっていたらしい。<br />
webminのpostfixのモジュール、エイリアス設定ですぐ受信できるようになった。</p>
<p>１時間くらい悩んだけど・・・。</p>
]]></content:encoded>
			<wfw:commentRss>http://officesoya.net/weblog/2008/10/19/webmater/feed/</wfw:commentRss>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://officesoya.net/weblog/2008/10/19/webmater/" />
	</item>
		<item>
		<title>サーバーが不安定</title>
		<link>http://officesoya.net/weblog/2008/10/19/dice/</link>
		<comments>http://officesoya.net/weblog/2008/10/19/dice/#comments</comments>
		<pubDate>Sun, 19 Oct 2008 14:04:20 +0000</pubDate>
		<dc:creator>soya</dc:creator>
		
		<category><![CDATA[Fedora Core6]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[DiCE]]></category>

		<category><![CDATA[Mydns]]></category>

		<guid isPermaLink="false">http://officesoya.net/weblog/?p=86</guid>
		<description><![CDATA[
というサービスに登録しているのだが、週に一度ほどサーバーが繋がらなくなる。しかも決まってメールもつながらなくなる。
DNSはMydnsサービスでIPアドレス更新にはＨＴＴＰのＢＡＳＩＣ認証DiCEを利用しているわけだが [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.cman.jp/network/" target="_blank"><img src="http://www.cman.jp/network/logo/CmanSvNetS.gif" border="0" alt="株式会社シーマン　サーバー監視サービス" width="88" height="31" /></a></p>
<p>というサービスに登録しているのだが、週に一度ほどサーバーが繋がらなくなる。しかも決まってメールもつながらなくなる。<br />
DNSはMydnsサービスでIPアドレス更新には<span class="content" style="color: #333333;">ＨＴＴＰのＢＡＳＩＣ認証</span>DiCEを利用しているわけだが、仮想サーバーで同じアパッチにもうひとつドメインをもっているのにそちらは一度も繋がらなくなったことはない。なのでDiCEが怪しいと思って、eventをみてみた。そしたら、仮想サーバーの方は7日毎になっているのに、本サーバーのほうは28日毎に。Myｄns<span class="content" style="color: #333333;">の注意書きにも</span></p>
<p><span class="content" style="color: #333333;"><br />
</span><span class="content" style="color: #333333;"> ＤＮＳ情報そのものの生成期間は、<span style="color: #ff0000;">一週間</span>です。１週間まったくアクセスがないと、サーバーが動いているかどうかも判りませんのでＤＮＳ情報を作りません。 さらに<span style="color: #ff0000;">１ヶ月間</span>全くＩＰアドレスの更新がない、またはログインも無いという場合は、登録データそのものを破棄しますのでご注意ください。 </span></p>
<p>とあった。</p>
<p>DiCEの設定を7日毎のIPアドレス更新時という設定に変更して、様子をみる。</p>
]]></content:encoded>
			<wfw:commentRss>http://officesoya.net/weblog/2008/10/19/dice/feed/</wfw:commentRss>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://officesoya.net/weblog/2008/10/19/dice/" />
	</item>
		<item>
		<title>ポップアップブロックでハマったのでメモ</title>
		<link>http://officesoya.net/weblog/2008/10/15/popup/</link>
		<comments>http://officesoya.net/weblog/2008/10/15/popup/#comments</comments>
		<pubDate>Wed, 15 Oct 2008 11:19:46 +0000</pubDate>
		<dc:creator>soya</dc:creator>
		
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://officesoya.net/weblog/?p=76</guid>
		<description><![CDATA[ＩＥ７とＦｉｒｅｆｏｘでローカルで動作確認したのち、本番サーバーへファイルをアップロードし、動作確認をしたわけですが、なぜか
window.open(url);
が動作せず。
ポップアップブロッカーのことは知っていたけど [...]]]></description>
			<content:encoded><![CDATA[<p>ＩＥ７とＦｉｒｅｆｏｘでローカルで動作確認したのち、本番サーバーへファイルをアップロードし、動作確認をしたわけですが、なぜか</p>
<p>window.open(url);</p>
<p>が動作せず。<br />
ポップアップブロッカーのことは知っていたけど、最初にポップアップする際に「どうしますか？」みたいに聞かれると思っていた。原因不明なので</p>
<p>ini_setエラーレポーティングをE_ALLに。そしてApacheのerror.logを調べて見ることに。<br />
しかし、これといってエラーは出されてなかった。</p>
<p>次に</p>
<pre name="code" class="jscript">

win = windou.open(url);
alert(win);
</pre>
<p>をやってみたらnullが帰ってきた。お帰り。<br />
じゃなくて返ってきた。</p>
<p>調べてみるとポップアップブロックなどでウィンドウを開くことができなかった場合はnullを返すらしいです。<br />
ということで</p>
<pre name="code" class="jscript">

win = windou.open(url);
if (win==null) alert(&#039;ブロックされています&#039;);
</pre>
<p>としました。</p>
]]></content:encoded>
			<wfw:commentRss>http://officesoya.net/weblog/2008/10/15/popup/feed/</wfw:commentRss>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://officesoya.net/weblog/2008/10/15/popup/" />
	</item>
	</channel>
</rss>
