<?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/"
	>

<channel>
	<title>WEB MEMO:RE</title>
	<atom:link href="http://memo.6-bird.net/feed" rel="self" type="application/rss+xml" />
	<link>http://memo.6-bird.net</link>
	<description>WEB制作について忘れないためのメモ</description>
	<lastBuildDate>Thu, 17 Jun 2010 06:54:31 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Firefoxでページの一番下に隙間ができる</title>
		<link>http://memo.6-bird.net/archives/153</link>
		<comments>http://memo.6-bird.net/archives/153#comments</comments>
		<pubDate>Thu, 17 Jun 2010 06:54:31 +0000</pubDate>
		<dc:creator>sixbird</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://memo.6-bird.net/?p=153</guid>
		<description><![CDATA[特にマージンもなにも設定していないのに、Firefoxでページの一番下に隙間ができる原因としての一つは、 Clearfix を使用しているためである。 clearfixで使用しているcontentプロパティのせいで高さが [...]]]></description>
			<content:encoded><![CDATA[<p>特にマージンもなにも設定していないのに、Firefoxでページの一番下に隙間ができる原因としての一つは、<br />
<strong>Clearfix</strong><br />
を使用しているためである。</p>
<p>clearfixで使用しているcontentプロパティのせいで高さが確保されてしまう。<br />
なので、clearfixを使用しないか、ネガティブマージンを突っ込むか、フォントサイズをメチャクチャ小さくするか…などするしかないです。</p>
]]></content:encoded>
			<wfw:commentRss>http://memo.6-bird.net/archives/153/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CakePHP1.2をCPIにインストール</title>
		<link>http://memo.6-bird.net/archives/136</link>
		<comments>http://memo.6-bird.net/archives/136#comments</comments>
		<pubDate>Thu, 25 Mar 2010 01:26:29 +0000</pubDate>
		<dc:creator>sixbird</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[CPI]]></category>
		<category><![CDATA[インストール]]></category>

		<guid isPermaLink="false">http://memo.6-bird.net/?p=136</guid>
		<description><![CDATA[インストールといっても、ダウンロードしたCakePHPをサーバに丸ごとバコッとアップするだけなのですが、CPIは文字コードがEUCなので、UTF-8で利用するにはちょこっと修正する必要があり。 なので、そのポイントだけを [...]]]></description>
			<content:encoded><![CDATA[<p>インストールといっても、ダウンロードしたCakePHPをサーバに丸ごとバコッとアップするだけなのですが、CPIは文字コードがEUCなので、UTF-8で利用するにはちょこっと修正する必要があり。<br />
なので、そのポイントだけをサラッと説明。</p>
<h2>各ファイルの修正</h2>
<h3>/app/config/database.php を修正。</h3>
<p>encodingを指定するのがポイント。</p>
<pre class="brush: php; title: ; notranslate">
class DATABASE_CONFIG {
	var $default = array(
		'driver' =&gt; 'mysql',
		'persistent' =&gt; false,
		'host' =&gt; '127.0.0.1',
		'port' =&gt; '3307',
		'login' =&gt; '&lt;Login ID&gt;',
		'password' =&gt; '&lt;Password&gt;',
		'database' =&gt; '&lt;Databese Name&gt;',
		'encoding' =&gt; 'utf8',
		'prefix' =&gt; '',
	);
</pre>
<h3>php.iniを作成</h3>
<p>php.iniを作成し、CPIのコントロールパネルから最新のphpのphp.iniをコピペ。<br />
文字化け対策のため以下のように修正。<br />
そして、CakePHPをアップしたディレクトリにアップロード。</p>
<pre class="brush: plain; title: ; notranslate">
mbstring.internal_encoding = UTF-8
mbstring.encoding_translation = Off
</pre>
<h3>/.htaccess を修正。</h3>
<p>一番上の階層の .htaccess なので、phpのバージョンと、php.ini へのパスを指定。<br />
&#8220;Options +FollowSymLinks&#8221; を指定することで mod_rewrite が有効になる。<br />
さらに、php.iniが外部からアクセスできないように拒否させる。</p>
<pre class="brush: plain; title: ; notranslate">
AddHandler x-httpd-php524 .php
suPHP_ConfigPath /usr/home/gt______/html/&lt;php.iniへのPATH&gt;/

&lt;Files ~ &quot;\.ini&quot;&gt;
deny from all
&lt;/Files&gt;

&lt;IfModule mod_rewrite.c&gt;
	Options +FollowSymLinks
	RewriteEngine on
	RewriteRule    ^$ app/webroot/    [L]
	RewriteRule    (.*) app/webroot/$1 [L]
&lt;/IfModule&gt;
</pre>
<h3>/app/.htaccess を修正</h3>
<pre class="brush: plain; title: ; notranslate">
&lt;IfModule mod_rewrite.c&gt;
	Options +FollowSymLinks
	RewriteEngine on
	RewriteRule    ^$    webroot/    [L]
	RewriteRule    (.*) webroot/$1    [L]
&lt;/IfModule&gt;
</pre>
<h3>/app/webroot/.htaccess を修正</h3>
<pre class="brush: plain; title: ; notranslate">
&lt;IfModule mod_rewrite.c&gt;
	Options +FollowSymLinks
	RewriteEngine On
	RewriteCond %{REQUEST_FILENAME} !-d
	RewriteCond %{REQUEST_FILENAME} !-f
	RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
&lt;/IfModule&gt;
</pre>
<p>多分、これでいけたと思います。<br />
うーん、他に何かしたかなぁ…<br />
とりあえず、あとはCakePHPの<a href="http://book.cakephp.org/ja/view/219/the-cakephp-blog-tutorial" target="_blank">ブログチュートリアル</a>でもやってみて下さい。</p>
<p>Special Thanks : <a href="http://astrodeo.com/blog/archives/210" target="_blank">utf-8とutf8｜ASTRODEO</a></p>
]]></content:encoded>
			<wfw:commentRss>http://memo.6-bird.net/archives/136/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>EC-CUBE2.4.3をCPIにインストール</title>
		<link>http://memo.6-bird.net/archives/113</link>
		<comments>http://memo.6-bird.net/archives/113#comments</comments>
		<pubDate>Wed, 24 Mar 2010 00:31:59 +0000</pubDate>
		<dc:creator>sixbird</dc:creator>
				<category><![CDATA[EC-CUBE2系]]></category>
		<category><![CDATA[CPI]]></category>
		<category><![CDATA[インストール]]></category>

		<guid isPermaLink="false">http://memo.6-bird.net/?p=113</guid>
		<description><![CDATA[EC-CUBE2.4.3をCPI(シェアードプランZ1)にインストールするための手順です。 EC-CUBEは以下の構成とします。 /html/eccube/ : 解凍後のhtmlディレクトリ /eccube_data/  [...]]]></description>
			<content:encoded><![CDATA[<p>EC-CUBE2.4.3をCPI(シェアードプランZ1)にインストールするための手順です。</p>
<p>EC-CUBEは以下の構成とします。</p>
<p>/html/eccube/ : 解凍後のhtmlディレクトリ<br />
/eccube_data/ : 解凍後のdataディレクトリ<br />
DB : postgreSQL</p>
<h2>define.php を修正</h2>
<p>define(&#8220;HTML2DATA_DIR&#8221;, &#8220;/../../eccube_data/&#8221;);<br />
define(&#8220;DATA_DIR2HTML&#8221;, &#8220;../html/eccube/&#8221;);</p>
<h2>.htaccessを修正(PC用)</h2>
<p>以下2行を追加<br />
AddHandler x-httpd-php524 .php<br />
suPHP_ConfigPath /usr/home/ユーザー名/html/eccube/</p>
<p>php_value や php_flag は全て削除。</p>
<p>/html/eccube/ と /eccube_data/ に .htaccess をアップロード。</p>
<h2>.htaccessを修正(モバイル用)</h2>
<p>以下2行を追加<br />
AddHandler x-httpd-php524 .php<br />
suPHP_ConfigPath /usr/home/ユーザー名/html/eccube/mobile/</p>
<p>php_value や php_flag は全て削除。</p>
<p>/html/eccube/mobile/ に .htaccess をアップロード。</p>
<h2>php.iniを編集(PC用)</h2>
<p>CPIコントロールパネルの、<br />
お客様情報 &gt; プログラムのパスとサーバの情報<br />
で、最新の「PHP iniの設定情報」にある最新のPHPのリンクをクリックし表示された内容をコピー。<br />
php.iniというファイルを作成し、先程コピーした内容をペースト。</p>
<p>php.iniの内容の一部を以下のように修正。<br />
mbstring.http_input = UTF-8<br />
mbstring.encoding_translation = Off<br />
output_handler = mb_output_handler<br />
output_buffering = 4096<br />
magic_quotes_gpc = Off<br />
upload_max_filesize = 5M</p>
<p>/html/eccube/ にphp.ini をアップロード。</p>
<h2>php.iniを編集(モバイル用)</h2>
<p>基本的にはPC用と同じ流れ。<br />
ただし、一部を以下のようにしないと色々と問題を起こすので注意。</p>
<p>output_handler = (nullなので何も指定しない)<br />
variables_order = &#8220;EGPS&#8221;</p>
<p>/html/eccube/mobile/ にphp.ini をアップロード。</p>
<h2>.htaccessを新規作成</h2>
<p>php.iniが外部から閲覧されないようにphp.iniへのアクセスを拒否。<br />
/html/に作成した .htaccess をアップロード。<br />
※つまり、公開ディレクトリ内に置いたphp.ini全てを拒否。</p>
<pre class="brush: plain; title: ; notranslate">
&lt;Files ~ &quot;\.ini&quot;&gt;
deny from all
&lt;/Files&gt;
</pre>
<h2>SC_DbConn.php を修正</h2>
<p>/eccube_data/class/SC_DbConn.php の<br />
$this-&gt;conn = $objDbConn;<br />
の直前に以下を追加。</p>
<pre class="brush: php; title: ; notranslate">
if (DB_TYPE == 'pgsql') {
pg_set_client_encoding(&quot;utf8&quot;);
}
</pre>
<h2>insert_data.sqlを修正</h2>
<p>html/install/sql/insert_data.sql<br />
内のファイルを以下のように変更。</p>
<p>INSERT INTO mtb_delivery_date VALUES (&#8217;2&#8242;, &#8217;1〜2日後&#8217;,1);<br />
INSERT INTO mtb_delivery_date VALUES (&#8217;3&#8242;, &#8217;3〜4日後&#8217;,2);<br />
↓<br />
INSERT INTO mtb_delivery_date VALUES (&#8217;2&#8242;, &#8217;1-2日後&#8217;,1);<br />
INSERT INTO mtb_delivery_date VALUES (&#8217;3&#8242;, &#8217;3-4日後&#8217;,2);</p>
<p>EUC-JPでは「〜」を扱えないため「-」に変えておく。</p>
<h2>パーミッション変更</h2>
<p>/html/eccube/install/temp のパーミッションを777に変更。</p>
<h2>インストール開始</h2>
<p>http://hogehoge.cpinet.jp/eccube/install/ にアクセス。</p>
<p>インストール画面の通りに進めて行けば、問題なく完了するはずです。</p>
<p>Special Thanks : <a href="http://www.r-de.net/blog/2009/08/ec-cubecpi1.html" target="_blank">EC-CUBEの女王<br />
</a> <a href="http://www.r-de.net/blog/2009/08/ec-cubecpi1.html" target="_blank"><br />
</a></p>
]]></content:encoded>
			<wfw:commentRss>http://memo.6-bird.net/archives/113/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>CORESERVERのSSH</title>
		<link>http://memo.6-bird.net/archives/107</link>
		<comments>http://memo.6-bird.net/archives/107#comments</comments>
		<pubDate>Thu, 10 Dec 2009 10:36:15 +0000</pubDate>
		<dc:creator>sixbird</dc:creator>
				<category><![CDATA[CORESERVER]]></category>
		<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://memo.6-bird.net/?p=107</guid>
		<description><![CDATA[CORESERVERのSSHを利用するとき、lsコマンドとかができなかった。 デフォルトではrbashになっているので、bashに変更する必要があります。 ~&#62; chsh Changing login shell  [...]]]></description>
			<content:encoded><![CDATA[<p>CORESERVERのSSHを利用するとき、lsコマンドとかができなかった。<br />
デフォルトではrbashになっているので、bashに変更する必要があります。</p>
<blockquote>
<pre>~&gt; chsh
Changing login shell for xxxx.
Password:
Enter the new value, or press return for the default.
        Login Shell [/bin/rbash]: /bin/bash
Shell changed.
~&gt; bash
</pre>
</blockquote>
<p>これでOK!</p>
<p>&gt; special thanks! <a href="http://aoshiman.net/weblog/tag/coreserver/">http://aoshiman.net/weblog/tag/coreserver/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://memo.6-bird.net/archives/107/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>EC-CUBE商品サブ情報をギャラリー化 &#8211; fvGallery</title>
		<link>http://memo.6-bird.net/archives/104</link>
		<comments>http://memo.6-bird.net/archives/104#comments</comments>
		<pubDate>Fri, 04 Dec 2009 09:41:37 +0000</pubDate>
		<dc:creator>sixbird</dc:creator>
				<category><![CDATA[EC-CUBE2系]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[EC-CUBE関連]]></category>

		<guid isPermaLink="false">http://memo.6-bird.net/?p=104</guid>
		<description><![CDATA[EC-CUBEの商品サブ情報をギャラリー化するfvGalleryをリリースしました。 EC-CUBEコミュニティ版のプラグイン機能に対応しているので、コミュ版使用の場合は非常に簡単に導入できます。 個人・法人、商用・非商 [...]]]></description>
			<content:encoded><![CDATA[<p>EC-CUBEの商品サブ情報をギャラリー化するfvGalleryをリリースしました。<br />
EC-CUBEコミュニティ版のプラグイン機能に対応しているので、コミュ版使用の場合は非常に簡単に導入できます。</p>
<p>個人・法人、商用・非商用を問わずどなたでも無料で自由にご利用できます。</p>
<p>詳しくは<a href="http://www.6-bird.net/information/fvGallery/fvGallery.html">fvGallely</a>ページをご覧ください。</p>
<p><a href="http://www.6-bird.net/information/fvGallery/fvGallery.html"><img class="alignnone size-full wp-image-105" title="bnr_fvGallery" src="http://memo.6-bird.net/wp-content/uploads/2009/12/bnr_fvGallery.jpg" alt="bnr_fvGallery" width="190" height="50" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://memo.6-bird.net/archives/104/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FireFoxでFlashが表示されない</title>
		<link>http://memo.6-bird.net/archives/97</link>
		<comments>http://memo.6-bird.net/archives/97#comments</comments>
		<pubDate>Thu, 03 Dec 2009 03:16:26 +0000</pubDate>
		<dc:creator>sixbird</dc:creator>
				<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://memo.6-bird.net/?p=97</guid>
		<description><![CDATA[FireFox（バージョン3.5系）で色んなサイトを見ていると、たまにフルFlashのサイトがなーんにも表示されないことがある。 実際、自分で制作したフルFlashも表示されなかった。 原因はswfobjectのような気 [...]]]></description>
			<content:encoded><![CDATA[<p>FireFox（バージョン3.5系）で色んなサイトを見ていると、たまにフルFlashのサイトがなーんにも表示されないことがある。</p>
<p>実際、自分で制作したフルFlashも表示されなかった。</p>
<p>原因はswfobjectのような気がする（詳しくは調べてないですが…）</p>
<p>で、対応策として、CSSを以下のようにする</p>
<pre class="brush: css; tab-size: 4; title: ; notranslate">body {
	width: 100%;
	height: 100%;
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://memo.6-bird.net/archives/97/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MODxで外部RSSを取得し表示する</title>
		<link>http://memo.6-bird.net/archives/93</link>
		<comments>http://memo.6-bird.net/archives/93#comments</comments>
		<pubDate>Thu, 03 Dec 2009 03:03:44 +0000</pubDate>
		<dc:creator>sixbird</dc:creator>
				<category><![CDATA[MODx]]></category>
		<category><![CDATA[RSS]]></category>

		<guid isPermaLink="false">http://memo.6-bird.net/?p=93</guid>
		<description><![CDATA[MODxで構築したサイトで外部サイトのRSSを表示できないかと思い、色々調べたところ、 pieX という有り難いスニペットを発見！ pieXをダウンロード SimplePieをダウンロード pieXを解凍してできたsim [...]]]></description>
			<content:encoded><![CDATA[<p>MODxで構築したサイトで外部サイトのRSSを表示できないかと思い、色々調べたところ、</p>
<p><a href="http://www.petit-power.com/plugin/tag/piex" target="_blank">pieX</a></p>
<p>という有り難いスニペットを発見！</p>
<ol>
<li>pieXをダウンロード</li>
<li><a href="http://simplepie.org/" target="_blank">SimplePie</a>をダウンロード</li>
<li>pieXを解凍してできたsimplepieフォルダをそのまま assets/snippets/ へ</li>
<li>ダウンロードしたSimplePieを解凍してできたsimplepie.incを assets/snippets/simplepie/ にアップロード</li>
<li>さらに piex.snippet.php を開いてソースを全てコピーし、MODx管理画面のスニペットにペースト。</li>
<li>プロパティにはソースの上部コメントにあるSinppets propertyをコピペし、各種プロパティを設定。</li>
<li>pieXを表示するためのチャンクを登録</li>
<li>最後に、テンプレートの好きなところチャンクを呼び出せばOK</li>
</ol>
<p>細かな設定は<a href="http://www.petit-power.com/plugin/tag/piex" target="_blank">pieX</a>ページを参考に。</p>
]]></content:encoded>
			<wfw:commentRss>http://memo.6-bird.net/archives/93/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>EC-CUBEの商品画像を移動・拡大 &#8211; FreelyView</title>
		<link>http://memo.6-bird.net/archives/87</link>
		<comments>http://memo.6-bird.net/archives/87#comments</comments>
		<pubDate>Mon, 09 Nov 2009 11:24:28 +0000</pubDate>
		<dc:creator>sixbird</dc:creator>
				<category><![CDATA[EC-CUBE2系]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[FreelyView]]></category>

		<guid isPermaLink="false">http://memo.6-bird.net/?p=87</guid>
		<description><![CDATA[EC-CUBEの商品画像を魅力的にみせる方法はないかと思い、Flashを使って商品画像を移動・拡大させるFreelyViewをリリースしました。 個人・法人、商用・非商用を問わずどなたでも無料で自由にご利用できます。 詳 [...]]]></description>
			<content:encoded><![CDATA[<p>EC-CUBEの商品画像を魅力的にみせる方法はないかと思い、Flashを使って商品画像を移動・拡大させるFreelyViewをリリースしました。</p>
<p>個人・法人、商用・非商用を問わずどなたでも無料で自由にご利用できます。</p>
<p>詳しくは<a href="http://www.6-bird.net/information/freelyview/freelyview.html">FreelyView</a>ページをご覧ください。</p>
<p><a href="http://www.6-bird.net/information/freelyview/freelyview.html"><img class="alignnone size-full wp-image-89" title="FreelyView" src="http://memo.6-bird.net/wp-content/uploads/2009/11/bnr_freelyview.jpg" alt="FreelyView" width="190" height="50" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://memo.6-bird.net/archives/87/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>safari4のCSSハック</title>
		<link>http://memo.6-bird.net/archives/79</link>
		<comments>http://memo.6-bird.net/archives/79#comments</comments>
		<pubDate>Tue, 23 Jun 2009 09:30:43 +0000</pubDate>
		<dc:creator>sixbird</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://memo.6-bird.net/?p=79</guid>
		<description><![CDATA[今まで使ってたsafari3のハックがsafari4では通用しなかった。 下記、safari4でも効くCSSハックです。 body:first-of-type example : 注意：Firefox3.5でも効いてしま [...]]]></description>
			<content:encoded><![CDATA[<p>今まで使ってたsafari3のハックがsafari4では通用しなかった。<br />
下記、safari4でも効くCSSハックです。</p>
<pre>body:first-of-type</pre>
<p>example :</p>
<pre class="brush: css; title: ; notranslate">
body:first-of-type body {
back-ground: #333333;
margin: 10px
}
</pre>
<p>注意：Firefox3.5でも効いてしまいます。<br />
つまりsafari4「だけ」ではなくsafari4「でも」効くハックです。</pre>
]]></content:encoded>
			<wfw:commentRss>http://memo.6-bird.net/archives/79/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>商品検索ブロックに入力補完機能を追加 [EC-CUBE2.3.3]</title>
		<link>http://memo.6-bird.net/archives/48</link>
		<comments>http://memo.6-bird.net/archives/48#comments</comments>
		<pubDate>Wed, 17 Dec 2008 14:43:05 +0000</pubDate>
		<dc:creator>sixbird</dc:creator>
				<category><![CDATA[EC-CUBE2系]]></category>
		<category><![CDATA[ブロック]]></category>

		<guid isPermaLink="false">http://memo.6-bird.net/?p=48</guid>
		<description><![CDATA[jquery.suggestを利用して、商品検索ブロックの入力フォームに入力補完機能を追加してみよう。 ファイルをダウンロードする まずはVulgarisOverIPサイトからファイルをダウンロード。 jsダウンロード( [...]]]></description>
			<content:encoded><![CDATA[<p>jquery.suggestを利用して、商品検索ブロックの入力フォームに入力補完機能を追加してみよう。</p>
<p><img class="size-full wp-image-64 alignnone" title="入力補完機能追加イメージ" src="http://memo.6-bird.net/wp-content/uploads/2008/12/jquery_suggest_sample11.jpg" alt="jquery.suggestのサンプル" width="450" height="141" /></p>
<h3>ファイルをダウンロードする</h3>
<p>まずは<a href="http://www.vulgarisoip.com/2007/08/06/jquerysuggest-11/" target="_blank">VulgarisOverIP</a>サイトからファイルをダウンロード。</p>
<ul>
<li><a href="http://www.vulgarisoip.com/files/jquery.suggest.js" target="_blank">jsダウンロード</a>(jquery.suggest.js)</li>
<li><a href="http://www.vulgarisoip.com/files/jquery.suggest.css" target="_blank">cssダウンロード</a>(jquery.suggest.css)</li>
</ul>
<h3>ファイルを格納</h3>
<p>jquery.suggest.js → /user_data/packages/default/js/<br />
jquery.suggest.css → /user_data/packages/default/css/<br />
へ放り込む。</p>
<h3>商品名検索用php作成</h3>
<p>EC-CUBEをインストールしたルートディレクトリにjquery_suggestというディレクトリを作成。<br />
そこに以下の内容でname_search.phpというファイルを作成。</p>
<pre class="brush: php; title: ; notranslate">&lt;?php
require_once(&quot;../require.php&quot;);

// 検索結果の取得
$objQuery = new SC_Query();
$col = &quot; name &quot;;
$from = &quot; dtb_products &quot;;
$where = &quot;status = 1 and del_flg = 0&quot;;
$arrval = array();

$q = strtolower($_REQUEST[&quot;q&quot;]);
if (!$q) return;
$arrProducts = $objQuery-&gt;select($col, $from, $where, $arrval);
foreach ($arrProducts as $value) {
	$items[] = $value['name'];
}

foreach ($items as $value) {
	if (strpos(strtolower($value), $q) !== false) {
		echo &quot;$value\n&quot;;
	}
}
?&gt;</pre>
<h3>商品検索ブロック修正</h3>
<p>/data/Smarty/templates/default/bloc/search_products.tpl 内の次の１行、</p>
<pre class="brush: php; title: ; notranslate">&lt;p&gt;&lt;input type=&quot;text&quot; name=&quot;name&quot; class=&quot;box142&quot; maxlength=&quot;50&quot; value=&quot;&lt;!--{$smarty.get.name|escape}--&gt;&quot; /&gt;&lt;/p&gt;</pre>
<p>を以下に修正(id=&#8221;suggest_name&#8221;を追加しただけ)</p>
<pre class="brush: php; title: ; notranslate">&lt;p&gt;&lt;input type=&quot;text&quot; name=&quot;name&quot; id=&quot;suggest_name&quot; class=&quot;box142&quot; maxlength=&quot;50&quot; value=&quot;&lt;!--{$smarty.get.name|escape}--&gt;&quot; /&gt;&lt;/p&gt;</pre>
<h3>テンプレートに追加</h3>
<p>/data/Smarty/templates/default/site_flame.tpl へ以下を追加。</p>
<pre class="brush: xml; title: ; notranslate">&lt;link rel=&quot;stylesheet&quot; href=&quot;&lt;!--{$TPL_DIR}--&gt;css/jquery.suggest.css&quot; type=&quot;text/css&quot; media=&quot;all&quot; /&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;&lt;!--{$TPL_DIR}--&gt;js/jquery.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;&lt;!--{$TPL_DIR}--&gt;js/jquery.suggest.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
jQuery(function() {
jQuery(&quot;#suggest_name&quot;).suggest(&quot;&lt;!--{$smarty.const.URL_DIR}--&gt;jquery_suggest/name_search.php&quot;,{});
});
&lt;/script&gt;</pre>
<p>さぁ、レッツトライ！</p>
<p>うまく動かない場合はご一報を。（全く同じ環境で試してないので…）</p>
]]></content:encoded>
			<wfw:commentRss>http://memo.6-bird.net/archives/48/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>

