<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>Chibiの覚え書き</title>
	
	<link>http://ilovechibi.net</link>
	<description>web制作とかcssとかデザインとか色々～な覚え書き</description>
	<lastBuildDate>Tue, 05 Jan 2010 01:44:23 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/ilovechibi/kBDl" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="ilovechibi/kbdl" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>wordpress:function.phpに入れとこう(文字数制限出力)</title>
		<link>http://ilovechibi.net/200912/297.html</link>
		<comments>http://ilovechibi.net/200912/297.html#comments</comments>
		<pubDate>Thu, 10 Dec 2009 05:55:52 +0000</pubDate>
		<dc:creator>chibi</dc:creator>
				<category><![CDATA[Wordpress応用]]></category>
		<category><![CDATA[function.php]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpressテーマ]]></category>

		<guid isPermaLink="false">http://ilovechibi.net/?p=297</guid>
		<description><![CDATA[mb_strimwidthで同じ事が出来るとroo様よりコメントを頂きました。
http://php.net/manual/ja/function.mb-strimwidth.php
勉強不足で申し訳ありません。
新着記 [...]]]></description>
			<content:encoded><![CDATA[<p>mb_strimwidthで同じ事が出来るとroo様よりコメントを頂きました。<br />
<a href="http://php.net/manual/ja/function.mb-strimwidth.php" class="liexternal">http://php.net/manual/ja/function.mb-strimwidth.php</a><br/><br />
勉強不足で申し訳ありません。<br/><br />
<del>新着記事のタイトルリストや、記事のexcerpt表示時に役に立つので入れとくfunction。<br />
テーマ作成時に自分のfunctionに入れておくと便利。<br />
<span id="more-297"></span></p>
<h4>ソース</h4>
<pre class="brush: php;">
function chibi_limit($cont, $ilimit = false)
{
    $limit = ($ilimit) ? $ilimit : 50;
    $pad=&quot;...&quot;;
    $cont = strip_tags($content);
    if(strlen($cont) &gt; $limit)
    {
        $content = mb_substr($cont,0,$limit);
    }
    echo $cont.$pad;
}
</pre>
<p>使い方は、上記をそのままテーマファイル内のfunction.phpにコピペ。<br/></p>
<h4>使い方</h4>
<p>例えば、『タイトルを30文字制限で出力したい』というときには、</p>
<pre class="brush: php;">
&lt;?php echo chibi_limit(get_the_title(),30); ?&gt;
</pre>
<p>で出力出来ます。<br/><br />
意外と使うことが多かったりするかもです。</del></p>
]]></content:encoded>
			<wfw:commentRss>http://ilovechibi.net/200912/297.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>wordpress:Similar Posts（Post-Plugin Library）の色々</title>
		<link>http://ilovechibi.net/200912/294.html</link>
		<comments>http://ilovechibi.net/200912/294.html#comments</comments>
		<pubDate>Thu, 10 Dec 2009 05:33:26 +0000</pubDate>
		<dc:creator>chibi</dc:creator>
				<category><![CDATA[Wordpress応用]]></category>
		<category><![CDATA[プラグイン]]></category>
		<category><![CDATA[自分用覚え書き記事]]></category>
		<category><![CDATA[Post-Plugin Library]]></category>
		<category><![CDATA[Similar Posts]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpressタグ]]></category>

		<guid isPermaLink="false">http://ilovechibi.net/?p=294</guid>
		<description><![CDATA[覚え書き。
Similar Posts内でのphpの使用とif文の書き方。

自分用記事です。
phpの書き方
そのまんま{php}

{php:$i = 0;}

とか。{php:~~~;}になって、{}内では{}と: [...]]]></description>
			<content:encoded><![CDATA[<p>覚え書き。<br />
Similar Posts内でのphpの使用とif文の書き方。<br />
<span id="more-294"></span><br />
自分用記事です。</p>
<h4>phpの書き方</h4>
<p>そのまんま{php}</p>
<pre class="brush: php;">
{php:$i = 0;}
</pre>
<p>とか。{php:~~~;}になって、{}内では{}と:が使えない。</p>
<h4>IF文の書き方</h4>
<p>クセ有り。あんまり使えない。</p>
<pre class="brush: php;">
{if:$i = 0:yes:no}
</pre>
<p>形式的には{if:条件:true:false}というか{}内でのphpが使えない！？のか分からないので、上記のphp使った方がマシ。</p>
<h4>まとめ</h4>
<p>phpでifを使う場合。<br />
2行に分けると挙動がおかしいので、基本1行で。IF文も1行で行う。ただし、:(コロン)や{}が使えないのでtrue,false用を別々に書く必要有り。<br/><br />
ソースサンプル。カスタムキー(thum)に挿入した画像URLを取得し、thum内が空の場合はデフォルト画像URLを出力。</p>
<pre class="brush: php;">
&lt;img src=&quot;{php:$normal = ''. get_bloginfo('stylesheet_directory') .'/img/normal.jpg';$thumb=get_post_meta($result-&gt;ID, 'thum', true);if ($thumb)echo $thumb.' ';if ($thumb == '')echo $normal.' ';}&quot; alt=&quot;{title}&quot;&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://ilovechibi.net/200912/294.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>wordpress：wp e-commerceプラグインでタイトルtitleをいじくる</title>
		<link>http://ilovechibi.net/200910/288.html</link>
		<comments>http://ilovechibi.net/200910/288.html#comments</comments>
		<pubDate>Thu, 22 Oct 2009 02:32:36 +0000</pubDate>
		<dc:creator>chibi</dc:creator>
				<category><![CDATA[wordpressでECサイト]]></category>
		<category><![CDATA[プラグイン]]></category>
		<category><![CDATA[e-commerce]]></category>
		<category><![CDATA[title]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[タイトル]]></category>

		<guid isPermaLink="false">http://ilovechibi.net/?p=288</guid>
		<description><![CDATA[Wordpressでショッピングサイトを作る人が、意外にも結構居るみたいで、e-commerceのカスタマイズで意外と皆さんが、やっていない事を書こうかと思います。
一つずつクリア出来たら結構使えるプラグインかもしれない [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Wordpress</strong>でショッピングサイトを作る人が、意外にも結構居るみたいで、<strong>e-commerce</strong>のカスタマイズで意外と皆さんが、やっていない事を書こうかと思います。<br/><br />
一つずつクリア出来たら結構使えるプラグインかもしれないです。<br />
ただ、よほどの理由があって使用する以外は、ショッピングサイトを普通に構築した方が良いと思います。私の様に、どうしてもWordpressがスキ！という人には、<a href="http://www.wposc.com/" class="liexternal">WordpressとosCommerceを連携させるプラグイン</a>もありますので、そっちが良いと思います。<br/><br />
もっとも、e-commerceプラグインに関しては、SSLに対応されていないので、買い物する側からしても敬遠されると思います。<br />
（きっとSSL対応も何とかなると思いますが・・。）<br />
お客様思考であれば、この部分が一番の理由としてあげられるべきかなー。<br/><br />
それはさておき、e-commerceプラグインでタイトルtitleをいじくっちゃいます。<br />
<span id="more-288"></span><br />
参考にさせていただいたサイトもありました。<br />
<a href="http://www.mywebtronics.com/atlanta-seo/wp-e-commerce-seo-tutorial/#products" class="liexternal">WP e-Commerce SEO Tutorial | Profit Exploding SEO</a>こちら等。<br />
皆さん、とても苦戦されているし、こんな難しい事しなくてもいいのに・・と思いました。<br/><br />
しかし、ぐぐっても、上記のサイトと同じ方法しか出てこなかったので、みんなここで挫折したり諦めてるんだなとも思いますが。<br/><br />
上記のサイトでは、以下の様な感じで処理してます。</p>
<ol style="background:#F0F7EF;">
<li>タイトルが『Products Page』の時、URLをトレースしてドメイン以下のURLを解析</li>
<li>ドメイン以下のURLの/での区切りが1個の時はカテゴリページ・ドメイン以下のURLの/での区切りが2個の時は商品ページと判別</li>
<li>最後の/以下のURLからデータベースを検索（商品ページならwpsc_productmeta・カテゴリページならproduct_categoriesというテーブル）</li>
<li>検索結果から商品タイトル及び、カテゴリタイトルを出力</li>
</ol>
<p>ここで重要なのが、2番目の区切り以下が～～の時の部分です。<br />
よく考えると、コレでは、サブカテゴリに属した場合、URLも長くなり、区切りも増えます。<br/><br />
この方法では、サブカテゴリに属することが出来ません。<br/><br />
ということで、考えました。<br/><br />
このwp e-commerceプラグインでは、パンくずを出力してくれる機能がありますので、それを使います。<br/><br />
しかもパンくずで出力されるのは、タイトルで設定した部分ですし、出力される最後の部分をタイトルtitleとして出力してしまえば良いだけかと。</p>
<pre class="brush: php;">
&lt;title&gt;
&lt;?php
function oGetChibi(){
	global $wpsc_query, $wpdb;
	while (wpsc_have_breadcrumbs()) : wpsc_the_breadcrumb();
	if(wpsc_breadcrumb_url() == &quot;&quot;){
	$titlename = wpsc_breadcrumb_name();
	}
	endwhile;
	return $titlename;
}

if( get_the_title() == 'Products Page' ){
echo oGetChibi();
} else { ?&gt;
&lt;?php wp_title('&amp;laquo;', true, 'right'); ?&gt; &lt;?php bloginfo('name'); ?&gt;
&lt;?php } ?&gt;
&lt;/title&gt;
</pre>
<p>こんだけです。<br/><br />
解説すると、パンくずナビを呼び出して、最後の部分をそのままタイトルにしてしまうというだけです。<br />
以上！<br/><br />
何か分からないことがあればコメント等でご連絡下さい。</p>
]]></content:encoded>
			<wfw:commentRss>http://ilovechibi.net/200910/288.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wordpress:『Faster Image Insert』日本語化しました</title>
		<link>http://ilovechibi.net/200910/270.html</link>
		<comments>http://ilovechibi.net/200910/270.html#comments</comments>
		<pubDate>Mon, 05 Oct 2009 04:37:54 +0000</pubDate>
		<dc:creator>chibi</dc:creator>
				<category><![CDATA[Wordpress応用]]></category>
		<category><![CDATA[プラグイン]]></category>
		<category><![CDATA[ADD-on]]></category>
		<category><![CDATA[Faster Image Insert]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[日本語化]]></category>

		<guid isPermaLink="false">http://ilovechibi.net/?p=270</guid>
		<description><![CDATA[更新してないけど生きてます   
最近、画像を沢山使用するサイトを作成したんだけど、画像ファイル一括指定でアップロードは簡単にできるのに、画像挿入は一括で出来ないという意味不明な仕様に気づきました。
あと、画像挿入時に毎 [...]]]></description>
			<content:encoded><![CDATA[<p>更新してないけど生きてます <img src='http://ilovechibi.net/wp-includes/images/smilies/icon_lol.gif' alt=':lol:' class='wp-smiley' />  <br/><br />
最近、画像を沢山使用するサイトを作成したんだけど、画像ファイル一括指定でアップロードは簡単にできるのに、<u>画像挿入は一括で出来ないという意味不明な仕様</u>に気づきました。<br/><br />
あと、画像挿入時に毎回アップローダ開くのがめんどくさいし、うざったいです。<br/><br />
まさに、『今更！？』ですが <img src='http://ilovechibi.net/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' />  <br/><br />
ということで、今回は<strong>Faster Image Insert</strong>を導入しましたよ。前から使ってたけど、記事にするのは『今更！？』ですが・・。<br/><br />
このプラグイン知らない方、、wordpressでサイト運営するなら絶対入れた方がいいです。ｲﾔｲﾔ悪いことは言わないから入れときなさい <img src='http://ilovechibi.net/wp-includes/images/smilies/icon_sad.gif' alt=':sad:' class='wp-smiley' /><br />
ということで、日本語化も行いましたので、下から続きをどうぞ。<br/><br />
<strong>※現在、日本語化Fileは本家プラグインに同梱していただいております。こちらにて別途ダウンロードして頂く必要は有りません。</strong><br />
<span id="more-270"></span></p>
<h3>Faster Image Insertの使い方とか</h3>
<p>このプラグインは、<strong>画像の一括挿入を可能にし、画像挿入時にいちいちアップローダを開く事を無くすプラグイン</strong>です。<br/><br />
画像の一括挿入は、ギャラリー画面にて、アップロードした画像の横にチェックボックスが付き、チェックを入れた画像を一括で挿入することが出来る様になります。<br />
<a href="http://ilovechibi.net/wp-content/uploads/2009/10/Faster-Image-Insert1.jpg" ><img src="http://ilovechibi.net/wp-content/uploads/2009/10/Faster-Image-Insert1-450x165.jpg" alt="Faster-Image-Insert" title="Faster-Image-Insert" width="450" height="165" class="aligncenter size-large wp-image-273" /></a><br/><br />
また、記事の編集画面に画像の挿入画面を常に表示しておけます。<br />
これで、画像をアップロードする度にいちいちアップローダをロードしなくて済みます。<br />
<a href="http://ilovechibi.net/wp-content/uploads/2009/10/Faster-Image-Insert2.jpg" ><img src="http://ilovechibi.net/wp-content/uploads/2009/10/Faster-Image-Insert2-450x395.jpg" alt="Faster-Image-Insert" title="Faster-Image-Insert" width="450" height="395" class="aligncenter size-large wp-image-276" /></a><br/><br />
その他、一括でキャプション、タイトル、配置、サイズを設定する機能が付いていたりとても便利です。<br/></p>
<h4>『Faster Image Insert』日本語化ファイルダウンロード</h4>
<p>操作に関しては、分かりやすい日本語にしたつもりですので、フィーリングでどうぞ。<br/><br />
<span style="color:red;">尚、日本語化に関しては、私が勝手に行った事ですので、日本語化に関しての本家への質問等はおやめ下さい。<br />
個人的に行った事なので、責任は負いません、再配布も絶対やめて下さい。</span><br/><br />
大人ならマナーをしっかり守りましょう <img src='http://ilovechibi.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  <br/><br />
ダウンロード時にはコメント頂けるとやる気が出ます。<br />
<a href="http://ilovechibi.net/wp-content/uploads/2009/10/faster-image-insert.zip" class="lizip">faster-image-insert日本語化ファイル</a><br/><br />
中身は言語ファイルのみです。バージョンは、1.3.7で作成しました。<br />
本体のダウンロードは<a href="http://wordpress.org/extend/plugins/faster-image-insert/" class="liwp">こちらから</a>どうぞ。<br />
<strong>※現在、日本語化Fileは本家プラグインに同梱していただいております。こちらにて別途ダウンロードして頂く必要は有りません。</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://ilovechibi.net/200910/270.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>wordpress:ドメインの変更時のDBの書き換え</title>
		<link>http://ilovechibi.net/200909/267.html</link>
		<comments>http://ilovechibi.net/200909/267.html#comments</comments>
		<pubDate>Fri, 25 Sep 2009 01:48:03 +0000</pubDate>
		<dc:creator>chibi</dc:creator>
				<category><![CDATA[Wordpress応用]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://ilovechibi.net/?p=267</guid>
		<description><![CDATA[生きてます。長らく更新していませんでしたが、ご質問をいただいたりして、こんな覚え書きでも見る人が居るのかと思わされました。
仕事もちゃんとしてます。
今回は運営しているサイトのドメインを変更した時にデーターベースの書き換 [...]]]></description>
			<content:encoded><![CDATA[<p>生きてます。長らく更新していませんでしたが、ご質問をいただいたりして、こんな覚え書きでも見る人が居るのかと思わされました。<br />
仕事もちゃんとしてます。<br/><br />
今回は運営しているサイトのドメインを変更した時にデーターベースの書き換えをちょこっとやったので、覚え書き。<br />
<span id="more-267"></span><br />
用意するもの</p>
<ol>
<li>古いドメイン(古いURL)</li>
<li>新しいドメイン(新しいURL)</li>
<li>SQL</li>
</ol>
<p>サイトによって様々だと思いますが、書き換えるところをきちんと把握出来てたら満点です。今回の僕のやったお引っ越しでは、以下を書き換え対象にしました。</p>
<ul>
<li><strong>wp-posts内のpost_content</strong> -記事の中の画像URLや自サイト内のリンク等の書き換え（記事内）</li>
<li><strong>wp-posts内のguid</strong> -画像などのメディアアップロード時のメディアURL</li>
<li><strong>wp_options内のoption_value</strong> -サイトURLやHOMEURLやプラグインで指定したURL情報など</li>
</ul>
<p>もちろん以上はウチの場合なので、これ以外にも必要になるサイトもあると思います。<br />
実行するのは以下</p>
<pre class="brush: sql;">
update wp_posts set post_content=replace(post_content,'古いURL','新しいURL')
update wp_posts set guid=replace(guid,'古いURL','新しいURL')
update wp_options set option_value=replace(option_value,'古いURL','新しいURL')
</pre>
<p>ここで注意<br />
<div class="note"><div class="dropshadow"><div class="noteclassic"><br />
wp_postsやwp_optionsは、データベースに応じて書き換えて下さい。wordpressインストール時に設定した接頭語に応じて違ってきます。<br />
</div></div></div></p>
]]></content:encoded>
			<wfw:commentRss>http://ilovechibi.net/200909/267.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>httpsとhttpでの条件分岐</title>
		<link>http://ilovechibi.net/200908/257.html</link>
		<comments>http://ilovechibi.net/200908/257.html#comments</comments>
		<pubDate>Fri, 21 Aug 2009 02:55:22 +0000</pubDate>
		<dc:creator>chibi</dc:creator>
				<category><![CDATA[スクリプト]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[SSL]]></category>
		<category><![CDATA[分岐]]></category>

		<guid isPermaLink="false">http://ilovechibi.net/?p=257</guid>
		<description><![CDATA[ググったらなんか難しそうな方法が出るけど簡単に条件分岐させれますyo！
httpsとhttpとで、外部の異なるjavaスクリプトを読み込むときや異なるcssファイルを使い分けたい時、分岐させたいときに使えます。
というか [...]]]></description>
			<content:encoded><![CDATA[<p>ググったらなんか難しそうな方法が出るけど簡単に条件分岐させれますyo！<br/></p>
<p>httpsとhttpとで、外部の異なるjavaスクリプトを読み込むときや異なるcssファイルを使い分けたい時、分岐させたいときに使えます。<br />
というか、今作成中のサイトでSSLのシール貼るのにそんな感じでjavaのファイルの読み込み先が違ったので。<br/></p>
<p>つーことで以下どうぞ<br />
<span id="more-257"></span></p>
<style>.hogehoge b {color:red;}</style>
<div class="hogehoge">
ただ単にjavaで条件分岐するだけのTIPSですｗ<br />
分からない方だけどうぞ</p>
<h4>javascriptの時</h4>
<p>たとえば、<br />
1. <b>http</b>://○○.com/　のときは<b>http</b>://▲▲.net/hoge.js　を使用する<br />
2. <b>https</b>://○○.com/　のときは<b>https</b>://▲▲.net/hoge.js　を使用する<br/><br />
そのときは以下のような感じです</p>
<pre class="brush: java;">
&lt;script type=&quot;text/javascript&quot;&gt;
var javaHost = ((&quot;https:&quot; == document.location.protocol) ? &quot;https://&quot; : &quot;http://&quot;);
document.write(unescape(&quot;%3Cscript src='&quot; + javaHost + &quot;▲▲.net/hoge.js' type='text/javascript'%3E%3C/script%3E&quot;));
&lt;/script&gt;
</pre>
<p>▲▲.net/hoge.jsの部分は例ですので書き換えて下さい。<br/></p>
<h4>cssの時</h4>
<p>たとえば、<br />
1. <b>http</b>://○○.com/　のときは<b>http</b>://▲▲.net/hoge.css　を使用する<br />
2. <b>https</b>://○○.com/　のときは<b>https</b>://▲▲.net/hoge.css　を使用する<br/><br />
そのときは以下のような感じです</p>
<pre class="brush: java;">
&lt;script type=&quot;text/javascript&quot;&gt;
var cssHost = ((&quot;https:&quot; == document.location.protocol) ? &quot;https://&quot; : &quot;http://&quot;);
document.write(unescape(&quot;%3Clink rel='stylesheet' href='&quot; + cssHost + &quot;▲▲.net/hoge.css' type='text/css' /%3E&quot;));
&lt;/script&gt;
</pre>
<p>▲▲.net/hoge.cssの部分は例ですので書き換えて下さい。<br/><br />
意外と色んなとこで使用出来ると思ったのでメモでした。
</div>
]]></content:encoded>
			<wfw:commentRss>http://ilovechibi.net/200908/257.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>EC-cube：SAKURAだけじゃなかった。新規に作成したページの500エラー</title>
		<link>http://ilovechibi.net/200908/254.html</link>
		<comments>http://ilovechibi.net/200908/254.html#comments</comments>
		<pubDate>Tue, 18 Aug 2009 06:40:37 +0000</pubDate>
		<dc:creator>chibi</dc:creator>
				<category><![CDATA[EC-cube]]></category>
		<category><![CDATA[500エラー]]></category>
		<category><![CDATA[仕様でございます]]></category>

		<guid isPermaLink="false">http://ilovechibi.net/?p=254</guid>
		<description><![CDATA[同じ現象が、今作ってるサイトでも発生したので対応メモ。
デザイン管理→ページ詳細から新規にページを作成するとhtml/user_dataのなかに新しいページ名.phpのファイルが出来て、そこにアクセスで表示されるようにな [...]]]></description>
			<content:encoded><![CDATA[<p>同じ現象が、今作ってるサイトでも発生したので対応メモ。<br />
デザイン管理→ページ詳細から新規にページを作成するとhtml/user_dataのなかに新しいページ名.phpのファイルが出来て、そこにアクセスで表示されるようになるのですが、うちのサーバーでは、何回作成しても500エラーの表示で、作成したページにアクセスできませぬ。<br />
調べてみると、さくらのレンタルサーバーでも起きるらしい。<br />
ということで以下対策メモ<br />
<span id="more-254"></span><br />
ほぼ<a href="http://xoops.ec-cube.net/modules/newbb/viewtopic.php?topic_id=4385&#038;forum=11&#038;post_id=19980" class="liexternal">フォーラム</a>のコピーなので、フォーラムをお読み下さい。こちらはあくまでも個人用です。<br/><br />
ただ単に、新規作成のページのパーミッションが666になってるので、それを644に変更すればいいのですが、Adminページ上で編集する度にEC-cube側の仕様で、パーミッションが666に戻ってしまい、また変更という感じでいたちごっこみたくなっちゃいます。<br />
ということで、そんな仕様を変更。<br/><br />
/data/class/pages/admin/design/LC_Page_Admin_Design_MainEdit.php</p>
<pre class="brush: php;">
// phpファイルの作成
$fp = fopen($path,&quot;w&quot;);
fwrite($fp, $php_data);
chmod($path, 0644); //この行追加
fclose($fp);
</pre>
<p>以上</p>
]]></content:encoded>
			<wfw:commentRss>http://ilovechibi.net/200908/254.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>EC-cube：カゴの中ブロックに商品名や商品写真を表示させる</title>
		<link>http://ilovechibi.net/200908/249.html</link>
		<comments>http://ilovechibi.net/200908/249.html#comments</comments>
		<pubDate>Mon, 10 Aug 2009 14:59:27 +0000</pubDate>
		<dc:creator>chibi</dc:creator>
				<category><![CDATA[EC-cube]]></category>
		<category><![CDATA[カート]]></category>
		<category><![CDATA[ブロック]]></category>

		<guid isPermaLink="false">http://ilovechibi.net/?p=249</guid>
		<description><![CDATA[調べて出てきた情報が古かったので、Forumのramrun様をリスペクトしてここに覚え書きしときます。
元記事を読んで分からないときにだけお読み下さい。
あくまでもコピペ+改良版です。1系をお使いの方はフォーラムをご覧下 [...]]]></description>
			<content:encoded><![CDATA[<p>調べて出てきた情報が古かったので、Forumのramrun様をリスペクトしてここに覚え書きしときます。<br />
<a href="http://xoops.ec-cube.net/modules/newbb/viewtopic.php?topic_id=384&#038;post_id=1657&#038;order=0&#038;viewmode=flat&#038;pid=0&#038;forum=5" class="liexternal">元記事</a>を読んで分からないときにだけお読み下さい。<br />
<strong>あくまでもコピペ+改良版です。1系をお使いの方はフォーラムをご覧下さい。</strong><br />
<span id="more-249"></span><br />
ソース見にくいですがソース右上のクリップボードにコピーとか色々試して見て下さい。</p>
<h4>/bloc/cart.tplブロックファイル</h4>
<p>これもフォーラムのじゃちょっと動きがおかしかったので少し編集してます。</p>
<pre class="brush: php;">
&lt;!--{*
* Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved.
*
* http://www.lockon.co.jp/
*}--&gt;
&lt;!--▼現在のカゴの中ここから--&gt;
&lt;div class=&quot;sb-base&quot;&gt;

&lt;!--★タイトル★--&gt;
&lt;h4&gt;&lt;img src=&quot;&lt;!--{$smarty.const.URL_DIR}--&gt;img/side/title_cartin.jpg&quot; alt=&quot;現在のカゴの中&quot; /&gt;&lt;/h4&gt;

&lt;div class=&quot;sb-main&quot;&gt;
&lt;div class=&quot;sb-content&quot;&gt;

&lt;!--★商品点数★--&gt;
  &lt;div&gt;&lt;span class=&quot;fs10&quot;&gt;商品数：&lt;!--{$arrCartList.0.TotalQuantity|number_format|default:0}--&gt;点&lt;/span&gt;&lt;/div&gt;

 &lt;!--{if $arrCartList.0.TotalQuantity &gt; 0}--&gt;
&lt;form name=&quot;form2&quot; id=&quot;form2&quot; method=&quot;post&quot; action=&quot;&lt;!--{$smarty.const.URL_DIR}--&gt;frontparts/bloc/cart_delitem.php&quot;&gt;
&lt;input type=&quot;hidden&quot; name=&quot;mode&quot; value=&quot;delete&quot; /&gt;
&lt;input type=&quot;hidden&quot; name=&quot;cart_no&quot; value=&quot;&quot; /&gt;
&lt;!--{section name=cnt loop=$arrCartList}--&gt;
&lt;div style=&quot;margin-bottom:5px&quot;&gt;
&lt;!--★商品画像★--&gt;
&lt;div style=&quot;width:50px;float:left&quot;&gt;&lt;a href=&quot;&lt;!--{$smarty.const.URL_DIR}--&gt;cart/index.php&quot;&gt;
 //↓rewrited by chibiの覚え書き
&lt;img src=&quot;&lt;!--{$smarty.const.SITE_URL}--&gt;resize_image.php?image=&lt;!--{$arrCartList[cnt].img}--&gt;&amp;width=48&amp;height=48&quot; alt=&quot;&lt;!--{$arrCartList[cnt].product_name|escape}--&gt;&quot; /&gt;
&lt;/a&gt;&lt;/div&gt;

&lt;div style=&quot;width:95px;float:right&quot;&gt;
&lt;!--★商品名★--&gt;
&lt;div style=&quot;color:#4a6fa6;font-size:14px&quot;&gt;
&lt;strong&gt;&lt;!--{$arrCartList[cnt].product_name|escape}--&gt;&lt;/strong&gt;
&lt;/div&gt;

&lt;!--★販売価格×数量★--&gt;
&lt;div style=&quot;text-align:right;font-size:12px&quot;&gt;
&lt;!--{$arrCartList[cnt].price|sfPreTax:$arrInfo.tax:$arrInfo.tax_rule|number_format|default:0}--&gt;円×&lt;!--{$arrCartList[cnt].quantity|escape}--&gt;
&lt;a href=&quot;&lt;!--{$smarty.const.URL_DIR}--&gt;frontparts/bloc/cart_delitem.php&quot; onclick=&quot;fnFormModeSubmit('form2', 'delete', 'cart_no', '&lt;!--{$arrCartList[cnt].cart_no}--&gt;'); return false;&quot;&gt;&lt;img src=&quot;&lt;!--{$smarty.const.URL_DIR}--&gt;img/contents/icon_delete.jpg&quot; alt=&quot;この商品の購入を取り消す&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;br style=&quot;clear:both&quot; /&gt;
&lt;/div&gt;
&lt;!--{/section}--&gt;
&lt;/form&gt;
&lt;!--{/if}--&gt;
&lt;!--★区切り線★--&gt;
&lt;hr /&gt;
&lt;!--★合計★--&gt;
&lt;div style=&quot;margin-bottom:5px;text-align:right&quot;&gt;
&lt;span class=&quot;redst&quot;&gt;&lt;span class=&quot;fs14&quot;&gt;合計：&lt;!--{$arrCartList.0.ProductsTotal|number_format|default:0}--&gt;円&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;!--★カゴの中に商品がある場合にのみ表示★--&gt;
&lt;!--{if $arrCartList.0.TotalQuantity &gt; 0 and $arrCartList.0.free_rule &gt; 0}--&gt;
&lt;div style=&quot;margin-bottom:10px&quot;&gt;
&lt;span class=&quot;fs10&quot;&gt;
&lt;!--{if $arrCartList.0.deliv_free &gt; 0}--&gt;
送料手数料無料まであと&lt;!--{$arrCartList.0.deliv_free|number_format|default:0}--&gt;円（税込）です。
&lt;!--{else}--&gt;
現在、送料は「&lt;span class=&quot;redst&quot;&gt;無料&lt;/span&gt;」です。
&lt;!--{/if}--&gt;
&lt;/span&gt;
&lt;/div&gt;
&lt;!--{/if}--&gt;
&lt;!--★ボタン★--&gt;
&lt;div style=&quot;margin-top:5px;text-align:center&quot;&gt;
&lt;a href=&quot;&lt;!--{$smarty.const.URL_DIR}--&gt;cart/index.php&quot; onmouseover=&quot;chgImg('&lt;!--{$smarty.const.URL_DIR}--&gt;img/side/button_cartin_on.gif','button_cartin');&quot; onmouseout=&quot;chgImg('&lt;!--{$smarty.const.URL_DIR}--&gt;img/side/button_cartin.gif','button_cartin');&quot;&gt;&lt;img src=&quot;&lt;!--{$smarty.const.URL_DIR}--&gt;img/side/button_cartin.gif&quot; alt=&quot;カゴの中を見る&quot; name=&quot;button_cartin&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sb-bottom&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;!--▲現在のカゴの中ここまで--&gt;
</pre>
<h4>data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Cart.php</h4>
<p>フォーラムではeccube/html/frontparts/bloc/cart.phpとなっているファイルですが、2系ではdata/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Cart.phpこのファイルを編集。<br />
編集する場所はここ！！のとこでｗ</p>
<pre class="brush: php;">
if (count($_SESSION[$objCart-&gt;key]) &gt; 0){
// カート情報を取得
$arrCartList = $objCart-&gt;getCartList();

// カート内の商品ＩＤ一覧を取得
$arrAllProductID = $objCart-&gt;getAllProductID();
// 商品が1つ以上入っている場合には商品名称を取得
if (count($arrAllProductID) &gt; 0){
	$objQuery = new SC_Query();
	$arrVal = array();
	$sql = &quot;&quot;;
   //↓ここ！！！
	$sql = &quot;SELECT product_id,name,main_list_image FROM dtb_products WHERE product_id IN ( ?&quot;;
	$arrVal = array($arrAllProductID[0]);
	for($i = 1 ; $i &lt; count($arrAllProductID) ; $i++){
	$sql.= &quot; ,? &quot;;
	array_push($arrVal, $arrAllProductID[$i]);
}
$sql.= &quot; )&quot;;
 //↓ここから！！！
$arrProduct_list = $objQuery-&gt;getAll($sql, $arrVal);

$item_list = array();
for($i = 0; $i &lt; count($arrProduct_list); $i++){
$item_list[$arrProduct_list[$i]['product_id']]['name'] = $arrProduct_list[$i]['name'];
$item_list[$arrProduct_list[$i]['product_id']]['main_list_image'] = $arrProduct_list[$i]['main_list_image'];
}
for($i = 0; $i &lt; count($arrCartList); $i++){
$arrCartList[$i]['product_name'] = $item_list[$arrCartList[$i]['id'][0]]['name'];
$arrCartList[$i]['img'] = $item_list[$arrCartList[$i]['id'][0]]['main_list_image'];
}
//↑ここまで！！！
}
// 店舗情報の取得
$arrInfo = $objSiteInfo-&gt;data;
// 購入金額合計
$ProductsTotal = $objCart-&gt;getAllProductsTotal($arrInfo);

// 合計個数
$TotalQuantity = $objCart-&gt;getTotalQuantity();[sourcecode=&quot;&quot;]

// 送料無料までの金額
$arrCartList[0]['ProductsTotal'] = $ProductsTotal;
$arrCartList[0]['TotalQuantity'] = $TotalQuantity;
$deliv_free = $arrInfo['free_rule'] - $ProductsTotal;
$arrCartList[0]['free_rule'] = $arrInfo['free_rule'];
$arrCartList[0]['deliv_free'] = $deliv_free;

$objSubPage-&gt;arrCartList = $arrCartList;
//↓ここ！！！
$objSubPage-&gt;arrInfo = $arrInfo;
}
</pre>
<h4>/html/frontparts/bloc/cart_delitem.php</h4>
<p>ファイルを新規に作成</p>
<pre class="brush: php;">
&lt;?php

require_once(&quot;../../require.php&quot;);

$objCartSess = new SC_CartSession(&quot;&quot;, false);

switch($_POST['mode']) {
case 'up':
    $objCartSess-&gt;upQuantity($_POST['cart_no']);
    header(&quot;Location: &quot; . URL_DIR);
    break;
case 'down':
    $objCartSess-&gt;downQuantity($_POST['cart_no']);
    header(&quot;Location: &quot; . URL_DIR);
    break;
case 'delete':
    $objCartSess-&gt;delProduct($_POST['cart_no']);
    header(&quot;Location: &quot; . URL_DIR);
    break;
default:
    header(&quot;Location: &quot; . URL_DIR);
    break;
}

?&gt;
</pre>
<p>以上で出来ると思います。<br />
ちなみに、フォーラムに書いてある、eccube/html/products/list.phpとeccube/html/products/detail.phpは編集しなくてもいいと思ったので見てません。<br />
というか、編集前にテストしたら全然問題ないので見てませんｗ<br/></p>
]]></content:encoded>
			<wfw:commentRss>http://ilovechibi.net/200908/249.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wordpress:e-commerceプラグインでショッピングサイト構築　その2</title>
		<link>http://ilovechibi.net/200908/244.html</link>
		<comments>http://ilovechibi.net/200908/244.html#comments</comments>
		<pubDate>Sat, 08 Aug 2009 15:51:01 +0000</pubDate>
		<dc:creator>chibi</dc:creator>
				<category><![CDATA[wordpressでECサイト]]></category>
		<category><![CDATA[e-commerce]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[プラグイン]]></category>
		<category><![CDATA[僕たちの失敗]]></category>

		<guid isPermaLink="false">http://ilovechibi.net/?p=244</guid>
		<description><![CDATA[といいたいところですが、大変な事に気付きました。
まず、全ての商品ページにつくページタイトルが統一されてしまう事。某SEOプラグイン等でも変更不可です。不可能ということではないですが、某SEOプラグインも併用するとなると [...]]]></description>
			<content:encoded><![CDATA[<p>といいたいところですが、大変な事に気付きました。<br/><br />
まず、全ての商品ページにつくページタイトルが統一されてしまう事。某SEOプラグイン等でも変更不可です。不可能ということではないですが、某SEOプラグインも併用するとなると色々めんどくさいです。<br />
ちなみにデフォルトでは『product page』というページタイトルになります。<br/><br />
あと、商品ページでカスタムフィールドが使えないです。カスタムフィールドの使用出来ないwordpressはア○ーバとかと一緒です。<br/><br />
あと、某サイトマッププラグインでも商品ページを自動で追加してくれたりしません。<br/><br />
とか、とりあえず今日解析しただけでこんな感じなので辞めときます、、。<br />
おとなしくEC-CubeかOScommerceにしときます。<br/></p>
]]></content:encoded>
			<wfw:commentRss>http://ilovechibi.net/200908/244.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wordpress:e-commerceプラグインでショッピングサイト構築　その1</title>
		<link>http://ilovechibi.net/200908/239.html</link>
		<comments>http://ilovechibi.net/200908/239.html#comments</comments>
		<pubDate>Sat, 08 Aug 2009 08:10:48 +0000</pubDate>
		<dc:creator>chibi</dc:creator>
				<category><![CDATA[wordpressでECサイト]]></category>
		<category><![CDATA[e-commerce]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://ilovechibi.net/?p=239</guid>
		<description><![CDATA[『wordpressでe-commerce』ってきっと不人気。さらには解析から始めるe-commerceプラグイン。
これ、かつては使用する方達がちょこちょこ日本語化されていたようですが、今ではデフォルトで日本語が選べる [...]]]></description>
			<content:encoded><![CDATA[<p>『wordpressでe-commerce』ってきっと不人気。さらには解析から始める<a href="http://www.instinct.co.nz/e-commerce/" class="liexternal">e-commerceプラグイン</a>。<br />
これ、かつては使用する方達がちょこちょこ日本語化されていたようですが、今ではデフォルトで日本語が選べる仕様になっています。とはいえ、作者がきっと自動翻訳したんだろうなー位の翻訳なので、その辺は直していくということで。<br/><br />
さて、今回は一発目なので解析中～と少し変更した部分をメモ。<br/></p>
<h4>金額の小数点消去</h4>
<p>processing.functions.php</p>
<pre class="brush: php;">
$price_out = number_format($price_in, 2, ‘.’, ”);
//↑の記述をコメントアウトして↓を追記
$price_out = number_format($price_in);
</pre>
<p>cart.class.php</p>
<pre class="brush: php;">
$price = number_format($price, 2, ‘.’, ”);
//↑の記述をコメントアウトして↓を追記
$price = number_format($price);
</pre>
<h4>商品カテゴリのh2要素がうざい</h4>
<p>ということで、以下をcategory_widget.27.phpとcategory_widget.28.phpからコメントアウト</p>
<pre class="brush: php;">
echo &quot;&lt;h2 class='categorytitle'&gt;{$categorisation_group['name']}&lt;/h2&gt;\n\r&quot;;
</pre>
<h4>カートに追加ボタンで表示される文字列の日本語化</h4>
<p>カートに追加ボタンを押すと表示されるTXT_WPSC_UPDATING_CARTという文字列を適当に日本語化。<br />
JP_jp.phpを編集</p>
<pre class="brush: php;">
//この一文を追記
define('TXT_WPSC_UDPATING_CART', /*'Updating'*/'カートを更新中です');
</pre>
]]></content:encoded>
			<wfw:commentRss>http://ilovechibi.net/200908/239.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
