<?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>石間謙 勝手ブログ Ver.2.5 &#187; IT</title>
	<atom:link href="http://jbar.jp/ishima/category/it/feed" rel="self" type="application/rss+xml" />
	<link>http://jbar.jp/ishima</link>
	<description>IT、iPhone、NOKIA、バー、日本酒、柏、冷麺、釣り、星、フードニングネタを書き綴るサイト</description>
	<lastBuildDate>Fri, 09 Dec 2011 05:25:05 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://jbar.jp/ishima/category/it/feed" />
		<item>
		<title>[WordPress]指定期間だけ記事の一部を公開するプラグインLimitDisplay</title>
		<link>http://jbar.jp/ishima/it/wordpress_pluginlimitdisplay.html</link>
		<comments>http://jbar.jp/ishima/it/wordpress_pluginlimitdisplay.html#comments</comments>
		<pubDate>Fri, 09 Dec 2011 04:33:57 +0000</pubDate>
		<dc:creator>石間</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://jbar.jp/ishima/?p=9416</guid>
		<description><![CDATA[WordPressには指定日時に記事を公開する機能が標準でありますが、指定日時に記事をクローズ（非公開）にする機能は標準ではついていません。 プラグインでは　PostExpirator などがあり、これで上記の事項は実現 [...]]]></description>
			<content:encoded><![CDATA[<p>WordPressには指定日時に記事を公開する機能が標準でありますが、指定日時に記事をクローズ（非公開）にする機能は標準ではついていません。</p>
<p>プラグインでは　<a href="http://wordpress.org/extend/plugins/post-expirator/" target="_blank">PostExpirator</a> などがあり、これで上記の事項は実現できます。</p>
<p>ただ、<strong>記事の一部分のみを指定日時に公開・非公開にする機能</strong>がないため、これを可能にしたプラグイン「LimitDisplay」を作りました。</p>
<p>このプラグインを使うと記事の本文内でショートコード［limitdisp］で括った部分のみ、<strong>日時指定で公開・非公開</strong>になります。<br />
※ショートコードを括る［］はこの本文内で書いてしまうとショートコードが実行されてしまうので全角で記述していますが、使うときは半角で使ってください。</p>
<p><strong>使い方：</strong></p>
<p>ダウンロードしたファイルを解凍してlimitdisp.phpをプラグインフォルダにアップロードして管理画面から有効化してください。</p>
<p><strong>書式：</strong></p>
<p><strong>［limitdisp open=&#8221;2011/12/01 10:00:00&#8243; close=&#8221;2011/12/05 08:00:00&#8243; desc=&#8221;このコンテンツは閉じました&#8221;］<span style="color: #ff0000;">日時指定で表示したいコンテンツ</span>［/limitdisp］</strong></p>
<p>上記のように記述すると、<span style="color: #ff0000;"><strong>日時指定で表示したいコンテンツ</strong></span>が　2011/12/01 10:00:00~2011/12/05 08:00:00まで表示されます。</p>
<p>コンテンツが非表示状態になると、descの文章が表示されます。</p>
<p>ダウンロードはこちらから　<a href="/download/LimitDisplay_1.00.lzh">LimitDisplay ver.1.00</a></p>
<img src="http://jbar.jp/ishima/?ak_action=api_record_view&id=9416&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://jbar.jp/ishima/it/wordpress_pluginlimitdisplay.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://jbar.jp/ishima/it/wordpress_pluginlimitdisplay.html" />
	</item>
		<item>
		<title>ソフトバンクのホームアンテナFT設置完了~その後</title>
		<link>http://jbar.jp/ishima/it/softbank_hone_anntena_ft.html</link>
		<comments>http://jbar.jp/ishima/it/softbank_hone_anntena_ft.html#comments</comments>
		<pubDate>Thu, 08 Dec 2011 06:20:06 +0000</pubDate>
		<dc:creator>石間</dc:creator>
				<category><![CDATA[IT]]></category>

		<guid isPermaLink="false">http://jbar.jp/ishima/?p=9101</guid>
		<description><![CDATA[■ホームアンテナFTの設置完了（2011年5月） ソフトバンクのホームアンテナFT（フェムトセル）が設置された。申し込んでから数カ月とわりと早いほうだった。当日は作業員が来て20分程度の作業で終了。ホームアンテナFT自体 [...]]]></description>
			<content:encoded><![CDATA[<h2>■ホームアンテナFTの設置完了（2011年5月）</h2>
<p>ソフトバンクのホームアンテナFT（フェムトセル）が設置された。申し込んでから数カ月とわりと早いほうだった。当日は作業員が来て20分程度の作業で終了。ホームアンテナFT自体は先に送られてきていた。大きさはB6サイズ程度。</p>
<p>ホームアンテナFTはワイヤーで壁に固定されている。レンタル品扱いで、一応携帯の基地局なので、自分で勝手に外したりはできない。</p>
<div id="attachment_9102" class="wp-caption aligncenter" style="width: 234px"><a href="http://jbar.jp/ishima/wp-content/uploads/2011/05/IMG_0423.jpg"><img src="http://jbar.jp/ishima/wp-content/uploads/2011/05/IMG_0423-224x300.jpg" alt="ソフトバンクのホームアンテナFT" title="ソフトバンクのホームアンテナFT" width="224" height="300" class="size-medium wp-image-9102" /></a><p class="wp-caption-text">ソフトバンクのホームアンテナFT</p></div>
<p>これで自宅では完全に圏外になることがなくなった。フェムトセルを経由しているかどうかを確認するにはソフトバンクの携帯から「*2610」にかけると、経由しているかどうかの確認が取れる。本当はdocomoがもっと電波状態が悪いので、docomoのフェムトセルも付けたいのだが、回線がBフレッツとかでないと無理っぽいのであきらめている。</p>
<p>本体ランプにはUSBランプ１，２なども付いているが現時点では特に機能していないらしい。管理画面とかのぞいてみたいが、情報がないので覗けない。</p>
<p>&nbsp;</p>
<h2>■設置後、半年が経過。状態は？（2011年12月）</h2>
<p>さて、半年が過ぎました。</p>
<p>ぶっちゃけて言ってしまうと、<strong>「微妙」</strong>。何が微妙かというと、結構「圏外」状態になってしまう。しかもホームアンテナFTの電源を抜き差しすると解決するというのが、よくない。そもそも電波状況の改善のために設置しているのに、ホームアンテナFTの電源が入っていると「圏外」になることがあるというのが「微妙」だ。</p>
<p>その他のホームアンテナFTについてのFAQはここに掲載されている。</p>
<p><a href="http://mb.softbank.jp/mb/service/home_antenna_ft/troubles/">http://mb.softbank.jp/mb/service/home_antenna_ft/troubles/</a></p>
<p>上記のFAQを見るとなんかUSBポートも使えるような書き方していますが、全く使いかたもわからないし、変な説明文です。</p>
<p>まぁ、タダなので文句は言いませんが。</p>
<p>&nbsp;</p>
<img src="http://jbar.jp/ishima/?ak_action=api_record_view&id=9101&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://jbar.jp/ishima/it/softbank_hone_anntena_ft.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://jbar.jp/ishima/it/softbank_hone_anntena_ft.html" />
	</item>
		<item>
		<title>MyLinkOrderでリンク順を自由に並び変えよう[WordPress]</title>
		<link>http://jbar.jp/ishima/it/wordpress-mylinkorder.html</link>
		<comments>http://jbar.jp/ishima/it/wordpress-mylinkorder.html#comments</comments>
		<pubDate>Mon, 21 Nov 2011 08:38:52 +0000</pubDate>
		<dc:creator>石間</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://jbar.jp/ishima/?p=9377</guid>
		<description><![CDATA[このところ、立て続けにWordPressの作業をしているので、備忘録も兼ねてメモ。 通常はリンクの並び順は五十音順だが、これを使うとリンクの並び順を自由に変更できるWordPress必須プラグインの一つ。 MyLinkO [...]]]></description>
			<content:encoded><![CDATA[<p>このところ、立て続けにWordPressの作業をしているので、備忘録も兼ねてメモ。</p>
<p>通常はリンクの並び順は五十音順だが、これを使うとリンクの並び順を自由に変更できるWordPress必須プラグインの一つ。</p>
<p>MyLinkOrder<br />
<a href="http://wordpress.org/extend/plugins/my-link-order/installation/" target="_blank">http://wordpress.org/extend/plugins/my-link-order/installation/</a></p>
<p>プラグインのインストールは通常通りダウンロードしたプラグインを解凍して「フォルダごと」</p>
<p><strong>[WordPressのインストールフォルダ]/wp-content/plugins/</strong></p>
<p>にアップロードする。アップロードした後は管理画面のプラグインからMyLinkOrderを有効にする。</p>
<p>プラグインのインストール後に通常のリンクを表示している部分</p>
<p><strong>wp_list_bookmarks()</strong></p>
<p>を使用しているテーマファイルから見つけ出し、下記に置き換える。</p>
<p><strong>mylinkorder_list_bookmarks(&#8216;orderby=order&amp;category_orderby=order&#8217;);</strong></p>
<img src="http://jbar.jp/ishima/?ak_action=api_record_view&id=9377&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://jbar.jp/ishima/it/wordpress-mylinkorder.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://jbar.jp/ishima/it/wordpress-mylinkorder.html" />
	</item>
		<item>
		<title>ホーチミンの無線LAN（WiFi）事情</title>
		<link>http://jbar.jp/ishima/it/%e3%83%9b%e3%83%bc%e3%83%81%e3%83%9f%e3%83%b3%e3%81%ae%e7%84%a1%e7%b7%9alan%ef%bc%88wifi%ef%bc%89%e4%ba%8b%e6%83%85.html</link>
		<comments>http://jbar.jp/ishima/it/%e3%83%9b%e3%83%bc%e3%83%81%e3%83%9f%e3%83%b3%e3%81%ae%e7%84%a1%e7%b7%9alan%ef%bc%88wifi%ef%bc%89%e4%ba%8b%e6%83%85.html#comments</comments>
		<pubDate>Wed, 28 Sep 2011 20:00:37 +0000</pubDate>
		<dc:creator>石間</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[旅]]></category>
		<category><![CDATA[WiFi]]></category>
		<category><![CDATA[ドンコイ]]></category>
		<category><![CDATA[ベトナム]]></category>
		<category><![CDATA[ホーチミン]]></category>
		<category><![CDATA[無線LAN]]></category>

		<guid isPermaLink="false">http://jbar.jp/ishima/?p=9313</guid>
		<description><![CDATA[2011/09にホーチミンへ初めての旅行。 現地でiPhone4などからインターネットを使いたかったので結構、色々調べてみた。 結果的には現地SIMでパケット定額というのが確実だしオススメだが、事前情報ではホーチミン市内 [...]]]></description>
			<content:encoded><![CDATA[<p>2011/09にホーチミンへ初めての旅行。</p>
<p>現地でiPhone4などからインターネットを使いたかったので結構、色々調べてみた。</p>
<p>結果的には現地SIMでパケット定額というのが確実だしオススメだが、事前情報ではホーチミン市内でのWiFi情報も結構書かれていたので、向こうのWiFi情報について感想をちょっと。</p>
<p>ネットの情報では野良WiFiといわれるパスワードのかかっていない無線LANがあふれているような事を書いているサイトも多かったが、少なくとも私がホーチミンの中を4日間歩いている限りそのような事はなかった。</p>
<p>たしかにアクセスポイントは絶えず見つかるが、ほとんど暗号化されている。そういう意味では野良WiFiは少ないので、WiFiだけに頼って現地で常にネットを使うのは難しいと思う。</p>
<p>ただ、現地のカフェなどでは結構フリースポットを提供しているので、そういったところを活用すればWiFiも意外に活用できるかもしれない。</p>
<p>私が今回お世話になったドンコイ中心部のボンセンホテルもホテル内はWiFiがあって、特に暗号化もされておらず勝手に接続してネットが使えたのでホテルに戻ってからは便利だった。</p>
<p>また現地ではよく見かけるHIGHLANDS COFFEE（日本でいえばスタバのようなカフェ）も私が行ったところは無線LANがあり、勝手に接続できた。</p>
<img src="http://jbar.jp/ishima/?ak_action=api_record_view&id=9313&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://jbar.jp/ishima/it/%e3%83%9b%e3%83%bc%e3%83%81%e3%83%9f%e3%83%b3%e3%81%ae%e7%84%a1%e7%b7%9alan%ef%bc%88wifi%ef%bc%89%e4%ba%8b%e6%83%85.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://jbar.jp/ishima/it/%e3%83%9b%e3%83%bc%e3%83%81%e3%83%9f%e3%83%b3%e3%81%ae%e7%84%a1%e7%b7%9alan%ef%bc%88wifi%ef%bc%89%e4%ba%8b%e6%83%85.html" />
	</item>
		<item>
		<title>ベトナム（ホーチミン）でパケット定額【STEP3】</title>
		<link>http://jbar.jp/ishima/it/%e3%83%99%e3%83%88%e3%83%8a%e3%83%a0%ef%bc%88%e3%83%9b%e3%83%bc%e3%83%81%e3%83%9f%e3%83%b3%ef%bc%89%e3%81%a7%e3%83%91%e3%82%b1%e3%83%83%e3%83%88%e5%ae%9a%e9%a1%8d%e3%80%90step3%e3%80%91.html</link>
		<comments>http://jbar.jp/ishima/it/%e3%83%99%e3%83%88%e3%83%8a%e3%83%a0%ef%bc%88%e3%83%9b%e3%83%bc%e3%83%81%e3%83%9f%e3%83%b3%ef%bc%89%e3%81%a7%e3%83%91%e3%82%b1%e3%83%83%e3%83%88%e5%ae%9a%e9%a1%8d%e3%80%90step3%e3%80%91.html#comments</comments>
		<pubDate>Wed, 28 Sep 2011 14:39:48 +0000</pubDate>
		<dc:creator>石間</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[旅]]></category>
		<category><![CDATA[GP01]]></category>
		<category><![CDATA[iphone4]]></category>
		<category><![CDATA[mobifone]]></category>
		<category><![CDATA[イーモバイル]]></category>
		<category><![CDATA[パケット定額]]></category>
		<category><![CDATA[ベトナム]]></category>
		<category><![CDATA[ホーチミン]]></category>

		<guid isPermaLink="false">http://jbar.jp/ishima/?p=9296</guid>
		<description><![CDATA[STEP1,STEP2ができていれば、このSTEP3は非常にやさしい。 ホーチミンで購入したSIM（今回はmobifone）はプリペイドだが、このままでは使えない。まずデータ（パケット）通信が使えるようにして、契約プラン [...]]]></description>
			<content:encoded><![CDATA[<p>STEP1,STEP2ができていれば、このSTEP3は非常にやさしい。</p>
<p>ホーチミンで購入したSIM（今回はmobifone）はプリペイドだが、このままでは使えない。まずデータ（パケット）通信が使えるようにして、契約プランを決める必要がある。これはiPhone4からSMSを使って行える。</p>
<p><a href="http://www.asitex.net/archives/82" target="_blank">http://www.asitex.net/archives/82</a> を参考にして私も成功した。</p>
<p>まずはSMSで「999」宛に「DATA ON」と送る。次にSMSで「999」に「DK DATA Surf7」と送る。このあと、メールが返ってくるので、「Y」を返信すればOK。下記のようなメールのやりとり。</p>
<div id="attachment_9297" class="wp-caption aligncenter" style="width: 210px"><a rel="attachment wp-att-9297" href="http://jbar.jp/ishima/it/%e3%83%99%e3%83%88%e3%83%8a%e3%83%a0%ef%bc%88%e3%83%9b%e3%83%bc%e3%83%81%e3%83%9f%e3%83%b3%ef%bc%89%e3%81%a7%e3%83%91%e3%82%b1%e3%83%83%e3%83%88%e5%ae%9a%e9%a1%8d%e3%80%90step3%e3%80%91.html/attachment/img_0655"><img src="http://jbar.jp/ishima/wp-content/uploads/2011/09/IMG_0655-200x300.png" alt="mobifone SMS" title="mobifone SMS" width="200" height="300" class="size-medium wp-image-9297" /></a><p class="wp-caption-text">mobifone SMS</p></div>
<p><a rel="attachment wp-att-9298" href="http://jbar.jp/ishima/it/%e3%83%99%e3%83%88%e3%83%8a%e3%83%a0%ef%bc%88%e3%83%9b%e3%83%bc%e3%83%81%e3%83%9f%e3%83%b3%ef%bc%89%e3%81%a7%e3%83%91%e3%82%b1%e3%83%83%e3%83%88%e5%ae%9a%e9%a1%8d%e3%80%90step3%e3%80%91.html/attachment/img_0653"><img src="http://jbar.jp/ishima/wp-content/uploads/2011/09/IMG_0653-200x300.png" title="IMG_0653" width="200" height="300" class="aligncenter size-medium wp-image-9298" /></a><a rel="attachment wp-att-9299" href="http://jbar.jp/ishima/it/%e3%83%99%e3%83%88%e3%83%8a%e3%83%a0%ef%bc%88%e3%83%9b%e3%83%bc%e3%83%81%e3%83%9f%e3%83%b3%ef%bc%89%e3%81%a7%e3%83%91%e3%82%b1%e3%83%83%e3%83%88%e5%ae%9a%e9%a1%8d%e3%80%90step3%e3%80%91.html/attachment/img_0654"><img src="http://jbar.jp/ishima/wp-content/uploads/2011/09/IMG_0654-200x300.png" title="IMG_0654" width="200" height="300" class="aligncenter size-medium wp-image-9299" /></a></p>
<p>最後のSurf7はmobifoneのプラン名。自分が使いたいプランに合わせて選べばよい。プラン名や詳細は<a href="http://mobifone3g.com.vn/index.aspx?s=internet&amp;Lang=1" target="_blank">ここ</a>に記載されている。Surf7だと「速度7.2M／7日間1024MBの転送量まで定額、あとは従量制」となる。私は4日間いたが、このSurf7で全く問題なかった。最上位のSurf30で申し込めば「速度7.2M／30日間3.5GBの転送量まで定額、あとは従量制」になるが、その場合はプリペイドで購入するSIMカードも100,000ドンではおそらく足りないだろう。</p>
<p>mobifone以外のキャリアの場合はSMSの送り先や文の内容も変わるので、調べるとよい。以下の色つきの文は調べた情報で確かかどうかは不明。</p>
<p><span style="color: #ff6600;">vinaphoneはSMSで888宛に「GPRS ON」でパケット通信開始。その後「U30 ON」で使い放題30日プラン（U30）になるようだ。（この前に900に電話して１を押してアクティベートという情報もある）</span></p>
<p><span style="color: #ff6600;">viettelではSMSで「191」宛にプラン名を送ればよいようだ。</span></p>
<p><span style="color: #ff6600;">プラン名を変えれば他のプランもいけるだろうが試せてないので不明。それぞれ公式サイトでプラン名を調べた方がよいだろう。</span></p>
<p><a href="http://dunzhi.at.webry.info/201101/article_1.html" target="_blank"><span style="color: #ff6600;">http://dunzhi.at.webry.info/201101/article_1.html</span></a></p>
<p><a href="http://mixed.txt-nifty.com/tsubutsubu/2011/01/vinaphonegu30-6.html" target="_blank"><span style="color: #ff6600;">http://mixed.txt-nifty.com/tsubutsubu/2011/01/vinaphonegu30-6.html</span></a></p>
<p>あとはiPhone4にアクセスポイントの設定をすればOK。</p>
<p>これは「設定」－「一般」－「ネットワーク」－「モバイルデータ通信ネットワーク」で行う。</p>
<p>ただし、ここから先は私は行っていないので、<a href="http://www.yamakawa.us/iphone/1237.html" target="_blank">http://www.yamakawa.us/iphone/1237.html</a> などを参考にしてほしい。このステップまで来てる人はGEVEYアダプタを使っているはずなので、JB（脱獄）だけ行えば問題ないはず。これを行っていないと通常のソフトバンクのiPhone4には「モバイルデータ通信ネットワーク」という項目が表示されない。</p>
<p>上記の項目が表示されたら下記の項目を設定すればiPhone4で現地キャリア（今回はmobifone）のSIMでパケット定額が実現できる。</p>
<p><strong>APN：m-wap　／User Name：mms ／Password:　mms　　（この設定値はmobifoneの場合）</strong></p>
<p>その他のキャリアのAPN（アクセスポイント）情報は下記の通り。（キャリア／APN名／ユーザ名／パスワード）</p>
<p><strong>Viettel: v-internet/null（空って意味）/null（空って意味）</strong><br />
<strong> Vietnamobile : internet/null（空って意味）/null（空って意味）</strong><br />
<strong>VinaPhone:m3-world/mms/mms</strong></p>
<p>iPhone4だけで通話や定額パケット通信を行う人はこれで作業は終了。現地でパケット定額通信が楽しめます。</p>
<p>しかし私の場合はiPhone4ではなくイーモバイルGP01でパケット定額にしたかったので、上記の最後のアクセスポイントの設定だけGP01に行う必要がある。なぜわざわざGP01で行いたいのかというと、iPhone4のSIMを現地SIMに取り換えると、自分の本来の電話番号に誰かがかけてきても電話番号が変わってしまって着信できないからだ。そのため、iPhone4のSIMはソフトバンクのままにしておいて着信はできるようにしつつも、パケット通信は現地SIMで定額で行いたいというためにはイーモバイルのGP01が必要だった。</p>
<p>イーモバイルのGP01は最新ファームウェアにしてあればSIMロックはないため現地SIMがいきなり使えるが、上記の手順を読んでいる人はわかるとおり、GP01単体ではSMSが送れないのでSIMロックフリーな携帯電話が必要になってしまうのだ。</p>
<p>上記でSMSを送ってプラン契約までできていれば、あとはGP01の管理画面でアクセスポイントの設定をする。私の場合はiPhone4を持っているので、iPhone4からブラウザでGp01の管理画面を開いてアクセスポイントの設定を下記のように行って、最後に「かんたん設定」で使用するプロファイルを指定（設定したアクセスポイントのもの）すればそれでGp01は現地キャリアにつながる。ここではmobiというプロファイル名にした。はじめちょっと悩んだが、プロファイルを追加する際に、下記の「プロファイル名」の部分をクリックして文字を消さないと新しいプロファイルが入力できないことに気がつくのに時間がかかった。</p>
<p style="text-align: center;"><a rel="attachment wp-att-9306" href="http://jbar.jp/ishima/it/%e3%83%99%e3%83%88%e3%83%8a%e3%83%a0%ef%bc%88%e3%83%9b%e3%83%bc%e3%83%81%e3%83%9f%e3%83%b3%ef%bc%89%e3%81%a7%e3%83%91%e3%82%b1%e3%83%83%e3%83%88%e5%ae%9a%e9%a1%8d%e3%80%90step3%e3%80%91.html/attachment/screenhunter_01-sep-28-12-10"><img src="http://jbar.jp/ishima/wp-content/uploads/2011/09/ScreenHunter_01-Sep.-28-12.10.jpg" title="ScreenHunter_01 Sep. 28 12.10" width="546" height="437" class="aligncenter size-full wp-image-9306" /></a><a rel="attachment wp-att-9307" href="http://jbar.jp/ishima/it/%e3%83%99%e3%83%88%e3%83%8a%e3%83%a0%ef%bc%88%e3%83%9b%e3%83%bc%e3%83%81%e3%83%9f%e3%83%b3%ef%bc%89%e3%81%a7%e3%83%91%e3%82%b1%e3%83%83%e3%83%88%e5%ae%9a%e9%a1%8d%e3%80%90step3%e3%80%91.html/attachment/screenhunter_02-sep-28-12-10"><img src="http://jbar.jp/ishima/wp-content/uploads/2011/09/ScreenHunter_02-Sep.-28-12.10.jpg" title="ScreenHunter_02 Sep. 28 12.10" width="546" height="437" class="aligncenter size-full wp-image-9307" /></a></p>
<p style="text-align: left;">&nbsp;</p>
<p style="text-align: left;">これでうまくいけばGP01に下記のような画面が表示されて現地キャリアに変わったことが分かる。</p>
<p style="text-align: left;"><a rel="attachment wp-att-9308" href="http://jbar.jp/ishima/it/%e3%83%99%e3%83%88%e3%83%8a%e3%83%a0%ef%bc%88%e3%83%9b%e3%83%bc%e3%83%81%e3%83%9f%e3%83%b3%ef%bc%89%e3%81%a7%e3%83%91%e3%82%b1%e3%83%83%e3%83%88%e5%ae%9a%e9%a1%8d%e3%80%90step3%e3%80%91.html/attachment/dscn0023"><img src="http://jbar.jp/ishima/wp-content/uploads/2011/09/DSCN0023-350x262.jpg" title="DSCN0023" width="350" height="262" class="aligncenter size-medium wp-image-9308" /></a></p>
<p style="text-align: left;">これで作業は完了。iPhone4から無線LANでGP01を経由して快適なパケット定額通信ができます。（ホーチミンでGP01を使用しているときにたまに圏外になったりして復旧しないときはGP01の電源を一度入れなおすと正常になったりしました。）</p>
<p style="text-align: left;">今回はmobifoneのSIMで書いているが原則、ベトナムの他のキャリアでも方法は同じようだ。送るSMSの宛先や文章、アクセスポイント（APN）の情報が違うだけのようです。</p>
<p style="text-align: left;">&nbsp;</p>
<img src="http://jbar.jp/ishima/?ak_action=api_record_view&id=9296&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://jbar.jp/ishima/it/%e3%83%99%e3%83%88%e3%83%8a%e3%83%a0%ef%bc%88%e3%83%9b%e3%83%bc%e3%83%81%e3%83%9f%e3%83%b3%ef%bc%89%e3%81%a7%e3%83%91%e3%82%b1%e3%83%83%e3%83%88%e5%ae%9a%e9%a1%8d%e3%80%90step3%e3%80%91.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://jbar.jp/ishima/it/%e3%83%99%e3%83%88%e3%83%8a%e3%83%a0%ef%bc%88%e3%83%9b%e3%83%bc%e3%83%81%e3%83%9f%e3%83%b3%ef%bc%89%e3%81%a7%e3%83%91%e3%82%b1%e3%83%83%e3%83%88%e5%ae%9a%e9%a1%8d%e3%80%90step3%e3%80%91.html" />
	</item>
		<item>
		<title>ホーチミン（ベトナム）でのパケット定額について調べてみた</title>
		<link>http://jbar.jp/ishima/it/%e3%83%99%e3%83%88%e3%83%8a%e3%83%a0_%e3%83%9b%e3%83%bc%e3%83%81%e3%83%9f%e3%83%b3_%e3%83%91%e3%82%b1%e3%83%83%e3%83%88%e5%ae%9a%e9%a1%8d.html</link>
		<comments>http://jbar.jp/ishima/it/%e3%83%99%e3%83%88%e3%83%8a%e3%83%a0_%e3%83%9b%e3%83%bc%e3%83%81%e3%83%9f%e3%83%b3_%e3%83%91%e3%82%b1%e3%83%83%e3%83%88%e5%ae%9a%e9%a1%8d.html#comments</comments>
		<pubDate>Wed, 14 Sep 2011 12:00:01 +0000</pubDate>
		<dc:creator>石間</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[iphone4]]></category>
		<category><![CDATA[ベトナム]]></category>
		<category><![CDATA[ホーチミン]]></category>

		<guid isPermaLink="false">http://jbar.jp/ishima/?p=9267</guid>
		<description><![CDATA[久しぶりの海外旅行。タイ以来だ。 今回はベトナム　ホーチミンに行くので、そこでのネットライフが確実にできるようにネットでいろいろ調べている。（下記情報はまだ調べただけで実際のレポートではないのでご注意） ホーチミン市内は [...]]]></description>
			<content:encoded><![CDATA[<p>久しぶりの海外旅行。タイ以来だ。</p>
<p>今回はベトナム　ホーチミンに行くので、そこでのネットライフが確実にできるようにネットでいろいろ調べている。（下記情報はまだ調べただけで実際のレポートではないのでご注意）</p>
<p>ホーチミン市内は野良WiFiやそうでないWiFiも日本よりかなり充実しているらしく、それだけでもネット環境は問題ないように思えるが、現地のフリースポットの使い方はさすがによくわからないので、そうなると野良WiFiに限定されてしまう。</p>
<p>それでは心もとないので、現地でパケット定額でネット環境を実現する方法を検討した。そもそも、パケット定額にしたいのはiPhone4で地図などを見たいのと、今回デジカメにEye-Fiを入れたので、撮影後そのままネットに投稿できるという利点を生かしたいというのもある。</p>
<p>（日本からでも各社から海外パケット定額プランが出ているが、1日1,500円程度とぼったくりなので、その方法ははじめからつかわない前提）</p>
<p>■SIMカードの購入</p>
<p>まず現地でプリペイドのSIMを買うというのが前提となる。</p>
<p>タンソンニャット空港の国際線の出口を出た付近の店で売っているという情報や市内でもViettel、Mobifine、Vietnamobileという看板があるところなら買えるという情報もある。道端の露店や現地のコンビニ「サークルＫ」で売っているという情報もあった。</p>
<p>「3G」「DATA」「SIM」などの言葉を言えば現地の人間もそれに合ったSIMを出してくれるようだ。ただ、プリペイドなので、あらかじめ利用する期間にあわせた金額のものを購入する必要がある。</p>
<p>■プリペイドSIMの金額</p>
<p>現地の通信キャリアはViettel、Mobifine、Vietnamobileなどがあって、それぞれプランはあるようだが1週間程度で10万ドン程度（2011年9月現在で約400円）のプリペイドで定額プランが十分使えるようだ。</p>
<p>ただ、ここでひとつ問題なのが私の場合、日本国内で使っているiPhone4の電話番号はそのまま現地でも着信はできるようにしておきたいので、iPhone4のSIMカード自体を交換してしまうと国内で使っている番号で着信ができない。</p>
<p>それは個人的に困るのでさらにほかの方法を検討。</p>
<p>（まぁ、最悪の場合はここまでできればiPhone4でパケット定額ができるので、その番号を教えたい人に教えておけばよいという考えもある。脱獄（JB）前提ならMyWiなどでiPhone4自体をWiFiルータ化していればよいので）</p>
<p>■SIMロックフリーのWiFiルーターGP01</p>
<p>するとイーモバイルのGP01がSIMロックがなく海外でも使えるという情報があった。たまたま職場でGP01を使っているのでこれはいい。</p>
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top">
<div style="border: 1px none; margin: 0px; padding: 6px 0px; width: 120px; text-align: center; float: left;">
<p><a href="http://hb.afl.rakuten.co.jp/hgc/0e6d327e.94be6780.0e6d327f.cb9d2e10/?pc=http%3a%2f%2fitem.rakuten.co.jp%2fhachihachimobile%2f100009038%2f%3fscid%3daf_ich_link_tbl&amp;m=http%3a%2f%2fm.rakuten.co.jp%2fhachihachimobile%2fi%2f10000776%2f" target="_blank"><img src="http://hbb.afl.rakuten.co.jp/hgb/?pc=http%3a%2f%2fthumbnail.image.rakuten.co.jp%2f%400_mall%2fhachihachimobile%2fcabinet%2fimg57974914.jpg%3f_ex%3d80x80&amp;m=http%3a%2f%2fthumbnail.image.rakuten.co.jp%2f%400_mall%2fhachihachimobile%2fcabinet%2fimg57974914.jpg%3f_ex%3d64x64" border="0" alt="イーモバイル　GP01で節約　IS03　iphone ギャラクシーと一緒の使..." style="margin: 0px; padding: 0px;" /></a></p>
<p style="font-size: 12px; line-height: 1.4em; text-align: left; margin: 0px; padding: 2px 6px;"><a href="http://hb.afl.rakuten.co.jp/hgc/0e6d327e.94be6780.0e6d327f.cb9d2e10/?pc=http%3a%2f%2fitem.rakuten.co.jp%2fhachihachimobile%2f100009038%2f%3fscid%3daf_ich_link_tbl&amp;m=http%3a%2f%2fm.rakuten.co.jp%2fhachihachimobile%2fi%2f10000776%2f" target="_blank">イーモバイル　GP01で節約　IS03　iphone ギャラクシーと一緒の使&#8230;</a><br />
<span>価格：1円（税込、送料込）</span></p>
</div>
</td>
</tr>
</tbody>
</table>
<p>ただし、イーモバイルのサポートは受けられないので自己責任で行う。（GP01のファームウェアは必ず最新版にしておく）</p>
<p>しかし、ここに一つ問題がある。GP01にSIMカードは挿入できても、そのままでは使えない。</p>
<p>なぜならSIMカードを<span style="text-decoration: underline;">アクティベートする必要がある</span>からだ。このアクティベートはSIMカード自体を使えるようにすることとパケット通信のプランを決定する目的がある。</p>
<p>これを行うには携帯のSMSか電話でできるようだが、現地で電話をできる自信はない。すると方法は方法はSMSになるのだが、Gp01単体ではSMSが送れない。となると、一度SIMカードをiPhone4などの携帯に入れてアクティベート作業を行う必要がある。</p>
<p>（ここでiPhone4と書いているが日本国内でソフトバンクから販売されているiPhone4自体はSIMロックがかかっているので、私の場合は脱獄JB＆SIMロックフリー化前提。あとはSIMロックフリーの端末が必要になる）</p>
<p>このSIMカードのアクティベートはキャリア各社によって方法が違う。</p>
<p>また、iPhone4の場合、マイクロSIMカードなので現地で購入したSIMカードを<a href="http://www.amazon.co.jp/gp/product/B003VU3UY4/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&amp;tag=kenweb-22&amp;linkCode=as2&amp;camp=247&amp;creative=1211&amp;creativeASIN=B003VU3UY4"><strong>SIMカッター</strong></a>などでカットする必要がある。</p>
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top">
<div style="border: 1px none; margin: 0px; padding: 6px 0px; width: 120px; text-align: center; float: left;">
<p><a href="http://hb.afl.rakuten.co.jp/hgc/0e6d31df.ba1d64db.0e6d31e0.08ab391d/?pc=http%3a%2f%2fitem.rakuten.co.jp%2fcandybox%2fch0191%2f%3fscid%3daf_ich_link_tbl&amp;m=http%3a%2f%2fm.rakuten.co.jp%2fcandybox%2fi%2f10000520%2f" target="_blank"><img src="http://hbb.afl.rakuten.co.jp/hgb/?pc=http%3a%2f%2fthumbnail.image.rakuten.co.jp%2f%400_mall%2fcandybox%2fcabinet%2f02213010%2fch0191.jpg%3f_ex%3d80x80&amp;m=http%3a%2f%2fthumbnail.image.rakuten.co.jp%2f%400_mall%2fcandybox%2fcabinet%2f02213010%2fch0191.jpg%3f_ex%3d64x64" border="0" alt="【送料無料&amp;楽天最安値挑戦】iPad iPhone4対応！世界で一番売れ..." style="margin: 0px; padding: 0px;" /></a></p>
<p style="font-size: 12px; line-height: 1.4em; text-align: left; margin: 0px; padding: 2px 6px;"><a href="http://hb.afl.rakuten.co.jp/hgc/0e6d31df.ba1d64db.0e6d31e0.08ab391d/?pc=http%3a%2f%2fitem.rakuten.co.jp%2fcandybox%2fch0191%2f%3fscid%3daf_ich_link_tbl&amp;m=http%3a%2f%2fm.rakuten.co.jp%2fcandybox%2fi%2f10000520%2f" target="_blank">【送料無料&amp;楽天最安値挑戦】iPad iPhone4対応！世界で一番売れ&#8230;</a><br />
<span>価格：1,499円（税込、送料込）</span></p>
</div>
</td>
</tr>
</tbody>
</table>
<p>SIMカードのアクティベート後に今後はGP01にSIMカードを差して、iPhoneからGP01にWiFiで接続して、GP01の管理画面からAPNの設定を行う。これも現地で買うSIMカードのキャリアによって違う。</p>
<p>Viettel: v-internet/null（空って意味）/null（空って意味）<br />
Mobifine: m-wap/mms/mms<br />
Vietnamobile : internet/null（空って意味）/null（空って意味）</p>
<p>とまぁ、ここまでできれば理想のパケット定額が数百円で実現できるのだが、はたして現地でうまくできるかどうか。レポートは後日。</p>
<p>余談だが、iPhone4に「050Plus」をインストールしておけばベトナムから日本への電話でも国内にいるのと同様の一般電話の料金で通話できるので試してみたい。</p>
<p>■現地の電圧、コンセントなど</p>
<p>現地は何種類かコンセントの種類があるようだ。また電圧はほとんどが220V（たまに110V)らしい。</p>
<p>Gp01のACアダプタはみてみるとワールドワイドの電圧対応なのでコネクタさえ変換できれば問題ない。そこでサスコムを今回購入した。</p>
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top">
<div style="border: 1px none; margin: 0px; padding: 6px 0px; width: 120px; text-align: center; float: left;"><a href="http://hb.afl.rakuten.co.jp/hgc/0e6d3494.1fc10fff.0e6d3495.7e13f7b2/?pc=http%3a%2f%2fitem.rakuten.co.jp%2fgriptone%2f01681%2f%3fscid%3daf_ich_link_tbl&amp;m=http%3a%2f%2fm.rakuten.co.jp%2fgriptone%2fi%2f10004027%2f" target="_blank"><img src="http://hbb.afl.rakuten.co.jp/hgb/?pc=http%3a%2f%2fthumbnail.image.rakuten.co.jp%2f%400_mall%2fgriptone%2fcabinet%2fimg55842092.jpg%3f_ex%3d80x80&amp;m=http%3a%2f%2fthumbnail.image.rakuten.co.jp%2f%400_mall%2fgriptone%2fcabinet%2fimg55842092.jpg%3f_ex%3d64x64" border="0" alt="レビュー記入で粗品進呈♪　世界各国のプラグが超コンパクトにまとま..." style="margin: 0px; padding: 0px;" /></a></p>
<p style="font-size: 12px; line-height: 1.4em; text-align: left; margin: 0px; padding: 2px 6px;"><a href="http://hb.afl.rakuten.co.jp/hgc/0e6d3494.1fc10fff.0e6d3495.7e13f7b2/?pc=http%3a%2f%2fitem.rakuten.co.jp%2fgriptone%2f01681%2f%3fscid%3daf_ich_link_tbl&amp;m=http%3a%2f%2fm.rakuten.co.jp%2fgriptone%2fi%2f10004027%2f" target="_blank">レビュー記入で粗品進呈♪　世界各国のプラグが超コンパクトにまとま&#8230;</a><br />
<span>価格：1,990円（税込、送料別）</span></p>
</div>
</td>
</tr>
</tbody>
</table>
<img src="http://jbar.jp/ishima/?ak_action=api_record_view&id=9267&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://jbar.jp/ishima/it/%e3%83%99%e3%83%88%e3%83%8a%e3%83%a0_%e3%83%9b%e3%83%bc%e3%83%81%e3%83%9f%e3%83%b3_%e3%83%91%e3%82%b1%e3%83%83%e3%83%88%e5%ae%9a%e9%a1%8d.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://jbar.jp/ishima/it/%e3%83%99%e3%83%88%e3%83%8a%e3%83%a0_%e3%83%9b%e3%83%bc%e3%83%81%e3%83%9f%e3%83%b3_%e3%83%91%e3%82%b1%e3%83%83%e3%83%88%e5%ae%9a%e9%a1%8d.html" />
	</item>
		<item>
		<title>PHP Simple HTML DOM Parserでウェブのコンテンツを取り出す</title>
		<link>http://jbar.jp/ishima/it/php_simple_html_dom_parser.html</link>
		<comments>http://jbar.jp/ishima/it/php_simple_html_dom_parser.html#comments</comments>
		<pubDate>Fri, 26 Aug 2011 07:58:35 +0000</pubDate>
		<dc:creator>石間</dc:creator>
				<category><![CDATA[IT]]></category>

		<guid isPermaLink="false">http://jbar.jp/ishima/?p=9251</guid>
		<description><![CDATA[コンテンツを動的に生成していくときに、様々なウェブから情報を整理して取り出したい場合がある。 そんなときに「PHP Simple HTML DOM Parser」を使う。 このライブラリはPHP Simple HTML  [...]]]></description>
			<content:encoded><![CDATA[<p>コンテンツを動的に生成していくときに、様々なウェブから情報を整理して取り出したい場合がある。<br />
そんなときに「PHP Simple HTML DOM Parser」を使う。</p>
<p>このライブラリは<a href="http://simplehtmldom.sourceforge.net/">PHP Simple HTML DOM Parser</a> からダウンロードできる。</p>
<p><a href="http://smkn.xsrv.jp/blog/2010/02/php_simple_html_dom_parser/">http://smkn.xsrv.jp/blog/2010/02/php_simple_html_dom_parser/</a></p>
<p><a href="http://php.net/manual/ja/curl.examples-basic.php">http://php.net/manual/ja/curl.examples-basic.php</a></p>
<p>を参考にして、</p>
<pre class="brush: php; title: ; notranslate">
include_once($_SERVER['DOCUMENT_ROOT'].&quot;/ishima/htmldom/simple_html_dom.php&quot;);

$html = file_get_html('http://mixi.jp/home.pl');

foreach($html-&gt;find('#headerArea h1 a img') as $e)
    echo $e-&gt;outertext;
</pre>
<p>というコードを表示したい場所に貼り付けるとmixiのロゴを取得できる。</p>
<p>ところがレンタルサーバによってはこのfile_get_htmlでエラーになる。その場合は、</p>
<p><strong>Warning</strong>:  file_get_contents() [<a href="../it/function.file-get-contents">function.file-get-contents</a>]: URL file-access is disabled in the server configuration in http://xxxxxx.xxx.xxx</p>
<p>のようなメッセージが表示される。</p>
<p>この関数はfile_get_contents()を使っていて、サーバのセキュリティのためこの機能を無効にしているところがあるからだ。<br />
レンタルサーバ会社によっては上記のコードを実行する前に</p>
<pre class="brush: php; title: ; notranslate">
ini_set('allow_url_fopen',&quot;On&quot;);
</pre>
<p>と記述すれば利用できるところもあるが、上記のコード自体を利用できないようにしているところもあるので、設定してみて状況が変わらなければ別の手段をとる必要がある。</p>
<p>上記の手段で解決しない場合には今度はcURLで解決できる場合がある。これもサーバがcURLが使えることが前提となる。<br />
この場合は、下記のようなコードになる。</p>
<pre class="brush: php; title: ; notranslate">
ini_set('allow_url_fopen',&quot;On&quot;);
include_once($_SERVER['DOCUMENT_ROOT'].&quot;/ishima/htmldom/simple_html_dom.php&quot;);

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'http://mixi.jp/home.pl');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 10);
$str = curl_exec($curl);
curl_close($curl);

$html= str_get_html($str);
foreach($html-&gt;find('#headerArea h1 a img') as $e)
    echo $e-&gt;outertext;
</pre>
<p>これでmixiの画像が表示されれば問題ない。</p>
<img src="http://jbar.jp/ishima/?ak_action=api_record_view&id=9251&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://jbar.jp/ishima/it/php_simple_html_dom_parser.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://jbar.jp/ishima/it/php_simple_html_dom_parser.html" />
	</item>
		<item>
		<title>WordPress ユーザ名の制限解除</title>
		<link>http://jbar.jp/ishima/it/wordpress_remove_limit_of_user_name.html</link>
		<comments>http://jbar.jp/ishima/it/wordpress_remove_limit_of_user_name.html#comments</comments>
		<pubDate>Thu, 25 Aug 2011 22:32:07 +0000</pubDate>
		<dc:creator>石間</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://jbar.jp/ishima/?p=9240</guid>
		<description><![CDATA[WordPressではユーザ名が「英数字4文字以上、数字のみはダメ」という制限があります。 この制限の解除方法。 /wp-includes/ms-functions.php　を開く。 の部分を下記のように変更する。下記の [...]]]></description>
			<content:encoded><![CDATA[<p><div id="flickrImage_4" class="wp-caption alignleft" style="width: 250px"><a href="http://www.flickr.com/photos/loulou/" rel="nofollow"  target="_blank"><img src="http://farm1.static.flickr.com/89/249803574_8e2cdc192f_m.jpg" width="240" height="160" /></a><p class="wp-caption-text">Tikehau, archipel des Tuamotus © by Benoit Mahe</p></div>WordPressではユーザ名が「英数字4文字以上、数字のみはダメ」という制限があります。</p>
<p>この制限の解除方法。</p>
<p>/wp-includes/ms-functions.php　を開く。</p>
<pre class="brush: php; title: ; notranslate">
	if ( strlen( $user_name ) &lt; 4 )
		$errors-&gt;add('user_name',  __('Username must be at least 4 characters'));

	if ( strpos( ' ' . $user_name, '_' ) != false )
		$errors-&gt;add( 'user_name', __( 'Sorry, usernames may not contain the character &amp;#8220;_&amp;#8221;!' ) );

	// all numeric?
	$match = array();
	preg_match( '/[0-9]*/', $user_name, $match );
	if ( $match[0] == $user_name )
		$errors-&gt;add('user_name', __('Sorry, usernames must have letters too!'));
</pre>
<p>の部分を下記のように変更する。下記の場合は10文字以下では登録できない。</p>
<pre class="brush: php; title: ; notranslate">
	if ( strlen( $user_name ) &lt; 10 )
		$errors-&gt;add('user_name',  __('Username must be at least 10 characters'));

	if ( strpos( ' ' . $user_name, '_' ) != false )
		$errors-&gt;add( 'user_name', __( 'Sorry, usernames may not contain the character &amp;#8220;_&amp;#8221;!' ) );

	// all numeric?
	$match = array();
	preg_match( '/[0-9]*/', $user_name, $match );
//	if ( $match[0] == $user_name )
//		$errors-&gt;add('user_name', __('Sorry, usernames must have letters too!'));
</pre>
<img src="http://jbar.jp/ishima/?ak_action=api_record_view&id=9240&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://jbar.jp/ishima/it/wordpress_remove_limit_of_user_name.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://jbar.jp/ishima/it/wordpress_remove_limit_of_user_name.html" />
	</item>
		<item>
		<title>WordPress カスタムフィールドを[設定]-[一般]に追加する</title>
		<link>http://jbar.jp/ishima/it/wordpress_custom_filed_in_general_setting.html</link>
		<comments>http://jbar.jp/ishima/it/wordpress_custom_filed_in_general_setting.html#comments</comments>
		<pubDate>Thu, 25 Aug 2011 07:20:33 +0000</pubDate>
		<dc:creator>石間</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://jbar.jp/ishima/?p=9227</guid>
		<description><![CDATA[WordPressのマルチサイトを使っているとサイト別にカスタムフィールドを設定したい場合がある。 例えばA,Bのサイトを構築した場合にそれぞれの「サイト名」などが取得できるが、そこに「住所」などのフィールドを追加したい [...]]]></description>
			<content:encoded><![CDATA[<div id="flickrImage_3" class="wp-caption alignleft" style="width: 250px"><a href="http://www.flickr.com/photos/ndecam/" rel="nofollow"  target="_blank"><img src="http://farm3.static.flickr.com/2227/5804374210_bbed753da4_m.jpg" width="240" height="160" /></a><p class="wp-caption-text">Easter Island Ahu Tongariki © by Ndecam</p></div>WordPressのマルチサイトを使っているとサイト別にカスタムフィールドを設定したい場合がある。</p>
<p>例えばA,Bのサイトを構築した場合にそれぞれの「サイト名」などが取得できるが、そこに「住所」などのフィールドを追加したい場合などである。</p>
<p>下記はデフォルトの設定画面。</p>
<p><div id="attachment_9228" class="wp-caption aligncenter" style="width: 310px">-[一般]の画面&#8221;]<a href="http://jbar.jp/ishima/wp-content/uploads/2011/08/wp_custom_field_on_general_setting_1.gif"><img src="http://jbar.jp/ishima/wp-content/uploads/2011/08/wp_custom_field_on_general_setting_1-300x172.gif" alt="WordPress [設定]-[一般]の画面" title="WordPress [設定]-[一般]の画面" width="300" height="172" class="size-medium wp-image-9228" /></a><p class="wp-caption-text">WordPress [設定</p></div>■options-general.phpの修正</p>
<pre class="brush: php; title: ; notranslate">
&lt;!--?php if ( !is_multisite() ) { ?--&gt;
</pre>
<p>の行を探し出し、その上に下記のコードを追記する。<br />
下記では「siteimage」というコードを作りたかったので、各項目をその名前にしているので、自分で作りたい名前に置き換えること。</p>
<pre class="brush: php; title: ; notranslate">
&lt;label for=&quot;siteimage&quot;&gt;&lt;!--?php _e('SiteTop Image Path') ?--&gt; &lt;/label&gt;
&lt;input id=&quot;siteimage&quot; class=&quot;regular-text&quot; name=&quot;siteimage&quot; type=&quot;text&quot; value=&quot;&lt;?php form_option('siteimage'); ?&gt;&quot; /&gt;
&lt;span class=&quot;description&quot;&gt;&lt;!--?php _e('This is top position image of site') ?--&gt;&lt;/span&gt;
</pre>
<p><div id="attachment_9229" class="wp-caption aligncenter" style="width: 310px"><a href="http://jbar.jp/ishima/wp-content/uploads/2011/08/wp_custom_field_on_general_setting_3.gif"><img src="http://jbar.jp/ishima/wp-content/uploads/2011/08/wp_custom_field_on_general_setting_3-300x61.gif" title="wp_custom_field_on_general_setting_3" width="300" height="61" class="size-medium wp-image-9229" /></a><p class="wp-caption-text">管理画面で表示する部分を追記する（青字部分）</p></div>
<p>■/wp-includes/general-template.phpの編集</p>
<p>function get_bloginfo( $show = &#8221;, $filter = &#8216;raw&#8217; )<br />
の下のswitch文に</p>
<pre class="brush: php; title: ; notranslate">
case 'siteimage':
$output = get_option('siteimage');
break;
</pre>
<p>な感じで追記。フィールド名は自分で作るものに変える。ここではsiteimageというフィールド。</p>
<p>&nbsp;</p>
<p>■options.phpの編集<br />
<a href="http://jbar.jp/ishima/wp-content/uploads/2011/08/wp_custom_field_on_general_setting_5.gif"><img src="http://jbar.jp/ishima/wp-content/uploads/2011/08/wp_custom_field_on_general_setting_5-300x73.gif" title="wp_custom_field_on_general_setting_5" width="300" height="73" class="aligncenter size-medium wp-image-9235" /></a></p>
<p>■Mysql（phpMyAdmin）でwp_optionsテーブルにフィールド名（ここではsiteimage）を追加</p>
<p>blogs_id 0<br />
option_name siteimage</p>
<p><a href="http://jbar.jp/ishima/wp-content/uploads/2011/08/wp_custom_field_on_general_setting_4.gif"><img src="http://jbar.jp/ishima/wp-content/uploads/2011/08/wp_custom_field_on_general_setting_4-300x120.gif" title="wp_custom_field_on_general_setting_4" width="300" height="120" class="aligncenter size-medium wp-image-9233" /></a></p>
<p>[参考動画]<a href="http://www.youtube.com/watch?v=JQaDFbQbaCM&amp;feature=related">http://www.youtube.com/watch?v=JQaDFbQbaCM&amp;feature=related</a></p>
<img src="http://jbar.jp/ishima/?ak_action=api_record_view&id=9227&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://jbar.jp/ishima/it/wordpress_custom_filed_in_general_setting.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://jbar.jp/ishima/it/wordpress_custom_filed_in_general_setting.html" />
	</item>
		<item>
		<title>WordPressマルチサイトFAQ</title>
		<link>http://jbar.jp/ishima/it/wordpress_multisite_faq.html</link>
		<comments>http://jbar.jp/ishima/it/wordpress_multisite_faq.html#comments</comments>
		<pubDate>Wed, 24 Aug 2011 04:47:29 +0000</pubDate>
		<dc:creator>石間</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://jbar.jp/ishima/?p=9210</guid>
		<description><![CDATA[■マルチサイトでどのサイトからアップロードする時も画像などのアップロード先が /wp-conten/uploads/年月 になってしまう。 １．管理画面右上から「サイトネットワーク管理者」に行く ２．左サイドメニュー「サ [...]]]></description>
			<content:encoded><![CDATA[<p>■マルチサイトでどのサイトからアップロードする時も画像などのアップロード先が /wp-conten/uploads/年月 になってしまう。</p>
<p>１．管理画面右上から「サイトネットワーク管理者」に行く</p>
<p>２．左サイドメニュー「サイト」－「サイト」をクリックしてから設定を変更したいサイトを「編集」する</p>
<p>３．「設定」タブの中の「Uploads Use Yearmonth Folders」を「１」から「0」に変更して「変更を保存」をクリックする。</p>
<p>これでサイトごとに画像をなどを保存するフォルダを分けられる。</p>
<p>■マルチサイトをサブドメインで設定後にフォルダ形式に変更したい場合</p>
<p>wp-config.php　と　.htaccess　の設定を変更する。<br />
define(&#8216;SUBDOMAIN_INSTALL&#8217;, true );<br />
を</p>
<p>define(&#8216;SUBDOMAIN_INSTALL&#8217;, false );</p>
<p>に変更。</p>
<p>そのあとに　.htaccess　を下記のように書き換える。</p>
<pre class="brush: plain; title: ; notranslate">
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
# uploaded files
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
RewriteRule ^[_0-9a-zA-Z-]+/(.*.php)$ $1 [L]
RewriteRule . index.php [L]
</pre>
<p>■ブログ名からブログIDを取得する関数<br />
get_id_from_blogname(ブログ名);</p>
<p>■マルチサイトでブログを切り替える関数<br />
switch_to_blog(get_id_from_blogname(ブログID); //親サイトは&#8217;1&#8242;</p>
<img src="http://jbar.jp/ishima/?ak_action=api_record_view&id=9210&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://jbar.jp/ishima/it/wordpress_multisite_faq.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://jbar.jp/ishima/it/wordpress_multisite_faq.html" />
	</item>
	</channel>
</rss>

