<?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>邪罗刹的菠萝阁 &#187; google</title>
	<atom:link href="http://www.rainmoe.com/tag/google/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rainmoe.com</link>
	<description>One code, one world ...</description>
	<lastBuildDate>Thu, 29 Dec 2011 14:04:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>制作好一个输出PR图片的API</title>
		<link>http://www.rainmoe.com/2009/12/09/made-a-api-can-output-pr-image/</link>
		<comments>http://www.rainmoe.com/2009/12/09/made-a-api-can-output-pr-image/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 06:35:07 +0000</pubDate>
		<dc:creator>小邪</dc:creator>
				<category><![CDATA[作品 [Work]]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[curl]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[pr]]></category>

		<guid isPermaLink="false">http://www.evlos.org/?p=1490</guid>
		<description><![CDATA[> ╮(╯▽╰)╭ 昨天白夜三更写的，糊涂地忘记了已经有蛮多网站提供这个功能了，结果就杯具了。

> 不过也没什么，这篇文章刚刚好总结一下 Curl 函数和 File_get_contents 函数的用法。



<span class="readmore"><a href="http://www.rainmoe.com/2009/12/09/made-a-api-can-output-pr-image/" title="制作好一个输出PR图片的API">阅读全文——共2672字</a></span>]]></description>
			<content:encoded><![CDATA[<p>> ╮(╯▽╰)╭ 昨天白夜三更写的，糊涂地忘记了已经有蛮多网站提供这个功能了，结果就杯具了。<br />
> 不过也没什么，这篇文章刚刚好总结一下 Curl 函数和 File_get_contents 函数的用法。</p>
<p><img src="http://www.rainmoe.com/wp-content/uploads/old/Capture0704.jpg" /></p>
<p>> 好多服务器为了防采集都禁止 File_get_contents，所以介绍一下俩函数互相替代的方法。<br />
> 话说，昨天给 619 的模板导航栏上加上了分类目录的显示，但我觉得那个模板的函数有点奇怪。</p>
<p>P.s. 呵呵，使用方法如图，作为图片显示即可，有兴趣的童鞋可以调用过去玩玩 O(∩_∩)O。</p>
<p><span id="more-1490"></span>1. <strong>File_get_contents 函数</strong>：</p>
<p><img src="http://www.rainmoe.com/wp-content/uploads/old/Capture0703.jpg" /></p>
<p>> 使用如下的代码可以将变量 $GontenPRURL 里的路径指向的文件读入字符串 $filecontent 中。<br />
> 只要在 Url 中传递参数即可到 Google 获取到 PR 的数值，然后转换为相对的图片文件名称。</p>
<pre class="brush: php; auto-links: false; html-script: false; title: ; notranslate">
$filecontent = file_get_contents($prurl);
</pre>
<p>> 我简单的使用下面的函数代码过滤了一下 Url 地址。<br />
> 因为没法过滤引号，所以后面再使用 Preg_match 的正则式过滤文件头。</p>
<pre class="brush: php; auto-links: false; html-script: false; title: ; notranslate">
$evlos_re = array(&quot;\&quot;&quot;,&quot;'&quot;,&quot;!&quot;,&quot;@&quot;,&quot;#&quot;,&quot;$&quot;,&quot;%&quot;,&quot;^&quot;,&quot;&amp;&quot;,&quot;*&quot;,&quot;(&quot;,&quot;)&quot;,&quot;+&quot;,&quot;=&quot;);
$website = str_replace($evlos_re,&quot;&quot;,$website);
</pre>
<p>> 最后再输出一个文件头，再把作为字符串的图片接着输出即可。</p>
<pre class="brush: php; auto-links: false; html-script: false; title: ; notranslate">
header(&quot;Content-Type: image/jpeg; charset=UTF-8&quot;);
echo $content;
</pre>
<p>2. <strong>Curl 函数</strong>：</p>
<p>> <strong>注意！！</strong>CURLOPT_URL 参数是不支持相对路径的，网上没看到有人提到，害我差点没折腾挂掉。</p>
<pre class="brush: php; auto-links: false; html-script: false; title: ; notranslate">
$ch1 = curl_init();
$timeout1 = 15;
curl_setopt ($ch1, CURLOPT_URL, $prurl);
curl_setopt ($ch1, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch1, CURLOPT_CONNECTTIMEOUT, $timeout1);
$filecontent = curl_exec($ch1);
curl_close($ch1);
</pre>
<p>> 这里就得用那么长的代码来代替上面 File_get_contents 函数的那一行代码了。</p>
<pre class="brush: php; auto-links: false; html-script: false; title: ; notranslate">
$fixurl = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'];
$fixurl = str_replace(basename($_SERVER['PHP_SELF']),&quot;&quot;,$fixurl);
$pic = $fixurl.$pic;
</pre>
<p>> $pic 是我的 PR 图片文件，这里通过上面代码把相对路径转换为 Url 路径。<br />
> 最后也差不多，输出一个文件头，再把作为字符串的图片接着输出即可。</p>
<pre class="brush: php; auto-links: false; html-script: false; title: ; notranslate">
$ch2 = curl_init();
$timeout2 = 15;
curl_setopt ($ch2, CURLOPT_URL, $pic);
curl_setopt ($ch2, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch2, CURLOPT_CONNECTTIMEOUT, $timeout2);
$content = curl_exec($ch2);
curl_close($ch2);
</pre>
<p>3. <strong>同行输出日志分类与博客页面列表</strong>：</p>
<p>> 话说原先 Sandbox 只输出博客页面列表的时候 Header.php 只调用了一个函数：</p>
<pre class="brush: php; auto-links: false; html-script: false; title: ; notranslate">
&lt;?php sandbox_globalnav() ?&gt;
</pre>
<p>> 然后在主题函数 Functions.php 里面加了一大段这个代码：</p>
<pre class="brush: php; auto-links: false; html-script: false; title: ; notranslate">
function sandbox_globalnav() {
	if ( $menu = str_replace( array( &quot;\r&quot;, &quot;\n&quot;, &quot;\t&quot; ), '',
wp_list_pages('title_li=&amp;sort_column=menu_order&amp;echo=0') ) )
		$menu = '&lt;ul&gt;' . $menu . '&lt;/ul&gt;';
	$menu = '&lt;div id=&quot;menu&quot;&gt;' . $menu . &quot;&lt;/div&gt;\n&quot;;
	echo apply_filters( 'globalnav_menu', $menu );
}
</pre>
<p>> 我觉得其实没啥必要的样子，因为下面使用 WP 自带的函数输出一个 Li 列表也是可以达到相同效果的。<br />
> 博客页面是 Wp_list_pages，文章分类是 Wp_list_categories。</p>
<pre class="brush: php; auto-links: false; html-script: false; title: ; notranslate">
&lt;div id=&quot;menu&quot;&gt;
&lt;?php wp_list_categories('title_li=0&amp;orderby=name&amp;show_count=0');
wp_list_pages('title_li=0&amp;sort_column=menu_order'); ?&gt;
&lt;/div&gt;
</pre>
<p>> 然后在 CSS 文件里面把 Li 变成行内元素即可，话说 Li 真是一个神奇的东西。</p>
<pre class="brush: css; auto-links: false; html-script: false; title: ; notranslate">
#access li {
display:inline;
padding-left:8px;
}
</pre>
<p>4. <strong>调用说明页面传送门</strong>：</p>
<p>> <a target="_blank" href="http://tool.evlos.org/primg/">http://tool.evlos.org/primg/</a></p>
<p>5. <strong>欢迎来 Follow 我的 Twitter <a target="_blank" rel="nofollow" href="http://twitter.com/angelsolo">@AngelSolo</a></strong> 。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rainmoe.com/2009/12/09/made-a-api-can-output-pr-image/feed/</wfw:commentRss>
		<slash:comments>71</slash:comments>
		</item>
		<item>
		<title>RSS阅读器图表与定期清理</title>
		<link>http://www.rainmoe.com/2009/12/01/rss-reader-is-crack-a-joke/</link>
		<comments>http://www.rainmoe.com/2009/12/01/rss-reader-is-crack-a-joke/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 16:00:22 +0000</pubDate>
		<dc:creator>小邪</dc:creator>
				<category><![CDATA[奇客 [Geek]]]></category>
		<category><![CDATA[clean]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[graphy]]></category>
		<category><![CDATA[reader]]></category>

		<guid isPermaLink="false">http://www.evlos.org/?p=1247</guid>
		<description><![CDATA[> 嘎嘎，话说小邪我刚开始使用RSS的时候用的是鲜果阅读器，因为很好奇就大量订阅了很多不同的RSS。

> 可是它太小气了，貌似未读文章超过1000，1000以外最早的文章就会被清除掉，好可惜。



<span class="readmore"><a href="http://www.rainmoe.com/2009/12/01/rss-reader-is-crack-a-joke/" title="RSS阅读器图表与定期清理">阅读全文——共781字</a></span>]]></description>
			<content:encoded><![CDATA[<p>> 嘎嘎，话说小邪我刚开始使用RSS的时候用的是鲜果阅读器，因为很好奇就大量订阅了很多不同的RSS。<br />
> 可是它太小气了，貌似未读文章超过1000，1000以外最早的文章就会被清除掉，好可惜。</p>
<p><img src="http://www.rainmoe.com/wp-content/uploads/old/Capture0517.jpg" /></p>
<p>> 所以我觉得鲜果最大的亮点就是支持OPML导入导出，这样我很方便的就转移到GoogleReader上鸟。<br />
> 其实RSS阅读器需要定期清理，不然就会像我这样每天收到2000+的未读文章。</p>
<p>> P.s. 同时不知道啥时候发傻订阅了丫的育儿博客，平时阅读都无视，结果清理的时候震精了（- -||）。</p>
<p><span id="more-1247"></span><strong>我是如何分类的</strong>：</p>
<p>> 1. Book - 订阅了很多手打全本小说，嘿嘿。<br />
> 2. Daily - 每天大量的订阅源，比如Cnbeta、EngadgetCn之类的。<br />
> 3. Economic - 关注一下经济，呵呵。<br />
> 4. Emule - 电驴各个分类的RSS，只订阅首页会错过很多。<br />
> 5. En_Fa	- 英文的各类网站。<br />
> 6. Fav - 喜欢的很多博客。<br />
> 7. Friends - 每天要踩踩的博客。<br />
> 8. Music - 每天虾米的音乐更新。<br />
> 9. News - 一些新闻，非IT的，量大就放在这个分类了。</p>
<p><strong>看看我的订阅统计图表</strong>：</p>
<p>> 1. 每日动态 - 每天下午2点到4点是发博文的高峰，嘿嘿，上班时间。同时半夜也很多。</p>
<p><img src="http://www.rainmoe.com/wp-content/uploads/old/Capture0518.jpg" /></p>
<p>> 2. 每周动态 - 呵呵，星期一和星期四很多，然后是星期天。说明这俩天很多人在上网喔。</p>
<p><img src="http://www.rainmoe.com/wp-content/uploads/old/Capture0519.jpg" /></p>
<p>> 3. 每月动态 - 每月中旬倒是发文章量最多的，分别在前半个和后半个月的中间处也有起伏。</p>
<p><img src="http://www.rainmoe.com/wp-content/uploads/old/Capture0520.jpg" /></p>
<p>> 嘿嘿，统计图表里面能看出很多东西，了解一个人，了解很多人，学会一些东西。<br />
> 只可意会不可言传，嘎嘎，我太坏了 O(∩_∩)O。</p>
<p>> 话说昨天九站问我：<strong>发送邮件的PHP代码是在什么时候执行的呢</strong>？<br />
> 因为这个是要看插件作者的思路的，所以我特地为这个问题请教了 Thread Comment 的作者偶爱偶家。<br />
> 他说：这个插件是先写数据库后发邮件的，未通过审核的评论是不会发邮件的，通过之后再发。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rainmoe.com/2009/12/01/rss-reader-is-crack-a-joke/feed/</wfw:commentRss>
		<slash:comments>41</slash:comments>
		</item>
		<item>
		<title>大爆发快来拿32个Wave邀请</title>
		<link>http://www.rainmoe.com/2009/11/26/share-32-wave-invitations/</link>
		<comments>http://www.rainmoe.com/2009/11/26/share-32-wave-invitations/#comments</comments>
		<pubDate>Thu, 26 Nov 2009 05:44:28 +0000</pubDate>
		<dc:creator>小邪</dc:creator>
				<category><![CDATA[奇客 [Geek]]]></category>
		<category><![CDATA[get]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[invitation]]></category>
		<category><![CDATA[wave]]></category>

		<guid isPermaLink="false">http://www.evlos.org/?p=1180</guid>
		<description><![CDATA[> 今天我震精了，貌似全民Wave的时代到来鸟( ⊙o⊙ )，我现在突然得到32个Wave邀请。

> 话说我有2个Google账号来着，加上Xue.Xin的1个Google账号，全有了邀请资格。



<span class="readmore"><a href="http://www.rainmoe.com/2009/11/26/share-32-wave-invitations/" title="大爆发快来拿32个Wave邀请">阅读全文——共372字</a></span>]]></description>
			<content:encoded><![CDATA[<p>> 今天我震精了，貌似全民Wave的时代到来鸟( ⊙o⊙ )，我现在突然得到32个Wave邀请。<br />
> 话说我有2个Google账号来着，加上Xue.Xin的1个Google账号，全有了邀请资格。</p>
<p><img src="http://www.rainmoe.com/wp-content/uploads/old/Capture04591.png" /></p>
<p>> 要的快来，晕，慢慢来就好，现在一大堆，请各位注意一下<strong>规则</strong>防止受到采集与垃圾邮件。<br />
> 请将邮箱填在留言处的“电子邮箱 (我们会为您保密) (必填)”处，填在留言内容内则<strong>留言无效</strong>。</p>
<p>> P.s. ╮(╯▽╰)╭，好想看下雪，貌似我这里天气却开始晴朗起来鸟，难道是传说中的RP问题。</p>
<p><span id="more-1180"></span></p>
<p>> 上面是我的站点邮箱 lost578#gmail.com，今天突然冒出来 8 个邀请。<br />
> 下面是我的个人信箱 4tyle8#gmail.com，也冒出来 8 个邀请。</p>
<p><img src="http://www.rainmoe.com/wp-content/uploads/old/Capture04561.png" /></p>
<p>> 下面的是 Xue.Xin 的，貌似我人品不好，Xue.Xin 有 16 个的说，我才 8 个。<br />
> 我发现了 Wave 的新功能鸟！测人品非常方便 O(∩_∩)O 。</p>
<p><img src="http://www.rainmoe.com/wp-content/uploads/old/Capture04581.png" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rainmoe.com/2009/11/26/share-32-wave-invitations/feed/</wfw:commentRss>
		<slash:comments>77</slash:comments>
		</item>
		<item>
		<title>刚刚获得了GoogleWave邀请</title>
		<link>http://www.rainmoe.com/2009/11/03/got-a-invitation-for-google-wave/</link>
		<comments>http://www.rainmoe.com/2009/11/03/got-a-invitation-for-google-wave/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 01:03:35 +0000</pubDate>
		<dc:creator>小邪</dc:creator>
				<category><![CDATA[奇客 [Geek]]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[invitarion]]></category>
		<category><![CDATA[wave]]></category>

		<guid isPermaLink="false">http://www.evlos.org/?p=803</guid>
		<description><![CDATA[非常感谢 Weiming Yin 童鞋 今天一大早就收到这封邮件

最后终于还是获得了Wave的邀请 真是艰难 -_-&#124;&#124;

 

<span class="readmore"><a href="http://www.rainmoe.com/2009/11/03/got-a-invitation-for-google-wave/" title="刚刚获得了GoogleWave邀请">阅读全文——共109字</a></span>]]></description>
			<content:encoded><![CDATA[<p>非常感谢 Weiming Yin 童鞋 今天一大早就收到这封邮件<br />
最后终于还是获得了Wave的邀请 真是艰难 -_-||</p>
<p> <img src="http://www.rainmoe.com/wp-content/uploads/old/Capture0055.jpg" /></p>
<p>> 刚进去的时候空空的呢 我得找找人一起玩Wave<br />
> 不过貌似我现在还是穷二代 不能邀请别人啊<br />
> 真是可惜呀 ╮(╯▽╰)╭</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rainmoe.com/2009/11/03/got-a-invitation-for-google-wave/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>用Chrome进行优化分析</title>
		<link>http://www.rainmoe.com/2009/10/10/optimize-website-by-chrome/</link>
		<comments>http://www.rainmoe.com/2009/10/10/optimize-website-by-chrome/#comments</comments>
		<pubDate>Sat, 10 Oct 2009 04:59:10 +0000</pubDate>
		<dc:creator>小邪</dc:creator>
				<category><![CDATA[探索 [Explore]]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[optimize]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.evlos.org/2009/10/10/%e7%94%a8chrome%e8%bf%9b%e8%a1%8c%e4%bc%98%e5%8c%96%e5%88%86%e6%9e%90/</guid>
		<description><![CDATA[我们来图

图中第三列有空档 这里在读取Widget的数据 花费了0.6s左右

图中6.05s和7.70s之间有一个大的空当 这里在读取文章的数据 花费了1.5s多

<span class="readmore"><a href="http://www.rainmoe.com/2009/10/10/optimize-website-by-chrome/" title="用Chrome进行优化分析">阅读全文——共510字</a></span>]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.rainmoe.com/wp-content/uploads/old/chrome-1.jpg" /></p>
<p>我们来图<br />
图中第三列有空档 这里在读取Widget的数据 花费了0.6s左右<br />
图中6.05s和7.70s之间有一个大的空当 这里在读取文章的数据 花费了1.5s多<br />
在数据读取上花费的时间过多<br />
所以SuperCache和WidgetCache是必备的 </p>
<p><span id="more-545"></span>4条长的紫色条是表示在读取Flickr图片上花费的时间<br />
这也是没办法的 </p>
<p>前面长的橙色条是表示花费在jQuery库的读取时间<br />
所以我改成了从Google提供的MinijQuery库读取 </p>
<p>第四行的绿条是用Autoptimize优化之后的CSS 读取很快<br />
这个插件我没有优化HTML和Javascript<br />
因为优化HTML会造成我的Mail to Commenter插件无法使用<br />
而优化Javascript会造成我的回复按键无法使用 </p>
<p>剩下紫色小点是CSS模板元素的读取<br />
这个不用管它<br />
 当然如果这里花费过多 请检查你的模板 </p>
<p>原来我在最底下有一个4s的空档<br />
居然是统计代码的问题<br />
我干脆就不统计了 </p>
<p>那么看我优化之后的图 </p>
<p><img src="http://www.rainmoe.com/wp-content/uploads/old/chrome-2.jpg" /></p>
<p>图上的点呈一条竖直的直线<br />
 颜色分布很均匀<br />
当然这张图来自于未包含Flickr图片的页面<br />
所以都是小点 </p>
<p>前面的空档是我换成OpenDNS的原因<br />
域名解析服务器离我这里有点远哈 </p>
<p>所以说Chrome的优化分析是非常有用的 节省了很多时间 </p>
]]></content:encoded>
			<wfw:commentRss>http://www.rainmoe.com/2009/10/10/optimize-website-by-chrome/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>将Google搜索引擎嵌入Inove</title>
		<link>http://www.rainmoe.com/2009/10/09/conflate-google-and-inove/</link>
		<comments>http://www.rainmoe.com/2009/10/09/conflate-google-and-inove/#comments</comments>
		<pubDate>Fri, 09 Oct 2009 03:51:00 +0000</pubDate>
		<dc:creator>小邪</dc:creator>
				<category><![CDATA[代码 [Code]]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[inove]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.evlos.org/?p=516</guid>
		<description><![CDATA[此方法针对Inove模板

非此模板的童鞋请注意修正

请原谅我在代码段某些不重要的地方空行

<span class="readmore"><a href="http://www.rainmoe.com/2009/10/09/conflate-google-and-inove/" title="将Google搜索引擎嵌入Inove">阅读全文——共1697字</a></span>]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.rainmoe.com/wp-content/uploads/old/Capture279.JPG" /></p>
<p>此方法针对Inove模板<br />
非此模板的童鞋请注意修正<br />
请原谅我在代码段某些不重要的地方空行<br />
为了让IE的阅读性更好 虽然我很讨厌IE<br />
推荐用Chrome ..</p>
<p>步骤：<br />
> 首先当然是申请一个Google自定义搜索引擎<br />
> 得到搜索框代码</p>
<pre class="brush: php; auto-links: false; html-script: false; title: ; notranslate">
&lt;form action=&quot; http://www.evlos.org/gsearch &quot; id=&quot;cse-search-box&quot;&gt;
  &lt;div&gt;
    &lt;input type=&quot;hidden&quot; name=&quot;cx&quot; value=&quot;你的Google自定义搜索引擎Key&quot; /&gt;
    &lt;input type=&quot;hidden&quot; name=&quot;cof&quot; value=&quot;FORID:9&quot; /&gt;
    &lt;input type=&quot;hidden&quot; name=&quot;ie&quot; value=&quot;UTF-8&quot; /&gt;
    &lt;input type=&quot;text&quot; name=&quot;q&quot; size=&quot;31&quot; /&gt;
    &lt;input type=&quot;submit&quot; name=&quot;sa&quot; value=&quot;搜索&quot; /&gt;
  &lt;/div&gt;
&lt;/form&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://www.google.com/cse/brand?form=cse-search-box&amp;lang=zh-Hans&quot;&gt;
&lt;/script&gt;
</pre>
<p><span id="more-516"></span>> 以及结果代码</p>
<pre class="brush: php; auto-links: false; html-script: false; title: ; notranslate">
&lt;div id=&quot;cse-search-results&quot;&gt;&lt;/div&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  var googleSearchIframeName = &quot;cse-search-results&quot;;
  var googleSearchFormName = &quot;cse-search-box&quot;;
  var googleSearchFrameWidth = 600;
  var googleSearchDomain = &quot;www.google.com&quot;;
  var googleSearchPath = &quot;/cse&quot;;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://www.google.com/afsonline/show_afs_search.js&quot;&gt;&lt;/script&gt;
</pre>
<p>> 然后需要创建一个给页面用的搜索结果模板<br />
> 当然要在页面顶部用以下代载入Wordpress的头部</p>
<pre class="brush: php; auto-links: false; html-script: false; title: ; notranslate">
&lt;?php get_header(); ?&gt;
</pre>
<p>> 然后在页面底部用以下代码载入Wordpress的底部</p>
<pre class="brush: php; auto-links: false; html-script: false; title: ; notranslate">
&lt;?php get_footer(); ?&gt;
</pre>
<p>>也别忘了加上下面代码在顶部表示模板名称</p>
<pre class="brush: php; auto-links: false; html-script: false; title: ; notranslate">
&lt;?php
/*
Template Name: gsearch
*/
?&gt;
</pre>
<p>> 所以代码就变成这样 我们保存成gsearch.php 并上传到Inove模板目录<br />
> 代码里的googleSearchPath表示搜索结果的页面地址，googleSearchFrameWidth表示宽度<br />
> Inove用606刚刚好 花了我半天测试出来的 完美主义就是连像素也要精确到个位</p>
<pre class="brush: php; auto-links: false; html-script: false; title: ; notranslate">
&lt;?php
/*
Template Name: gsearch
*/
?&gt;
&lt;?php get_header(); ?&gt;
&lt;div id=&quot;cse-search-results&quot;&gt;&lt;/div&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  var googleSearchIframeName = &quot;cse-search-results&quot;;
  var googleSearchFormName = &quot;cse-search-box&quot;;
  var googleSearchFrameWidth =606;
  var googleSearchDomain = &quot;www.google.com&quot;;
  var googleSearchPath = &quot;/gsearch&quot;;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://www.google.com/afsonline/show_afs_search.js&quot;&gt;&lt;/script&gt;
&lt;?php get_footer(); ?&gt;
</pre>
<p>> 现在使用这个搜索结果创建一个页面 模板用gsearch<br />
> 创建的时候记下此页ID 即地址栏中post参数<br />
> 将模板目录inove/templates/header.php</p>
<pre class="brush: php; auto-links: false; html-script: false; title: ; notranslate">wp_list_pages('title_li=0&amp;sort_column=menu_order');</pre>
<p>> 修改一下 像下面一样 用exclude参数隐藏搜索结果页面在Inove模板导航栏的显示</p>
<pre class="brush: php; auto-links: false; html-script: false; title: ; notranslate">wp_list_pages('title_li=0&amp;sort_column=menu_order&amp;exclude=511');</pre>
<p>> 刚测了下InoveGoogle搜索框的字符空间长度是22个字符 我用微软雅黑 可能有些出入 就统一用20<br />
> 在模板目录inove/templates/header.php中的搜索框代码是</p>
<pre class="brush: php; auto-links: false; html-script: false; title: ; notranslate">
&lt;form action=&quot;http://www.google.com/cse&quot; method=&quot;get&quot;&gt;
    &lt;div class=&quot;content&quot;&gt;
        &lt;input type=&quot;text&quot; class=&quot;textfield&quot; name=&quot;q&quot; size=&quot;24&quot; /&gt;
        &lt;input type=&quot;submit&quot; class=&quot;button&quot; name=&quot;sa&quot; value=&quot;&quot; /&gt;
        &lt;input type=&quot;hidden&quot; name=&quot;cx&quot;
value=&quot;&lt;?php echo $options['google_cse_cx']; ?&gt;&quot; /&gt;
        &lt;input type=&quot;hidden&quot; name=&quot;ie&quot; value=&quot;UTF-8&quot; /&gt;
    &lt;/div&gt;
&lt;/form&gt;
</pre>
<p>> 我们需要做一些修改 把action里面我的页面地址换成你的页面地址 size用刚才测的20就好</p>
<pre class="brush: php; auto-links: false; html-script: false; title: ; notranslate">
&lt;form action=&quot;http://www.evlos.org/gsearch&quot; id=&quot;cse-search-box&quot;&gt;
  &lt;div class=&quot;content&quot;&gt;
    &lt;input type=&quot;text&quot; class=&quot;textfield&quot; id=&quot;searchtxt&quot; name=&quot;q&quot; size=&quot;20&quot; /&gt;
    &lt;input type=&quot;submit&quot; class=&quot;button&quot;  id=&quot;searchbtn&quot; name=&quot;sa&quot; value=&quot;&quot; /&gt;
    &lt;input type=&quot;hidden&quot; name=&quot;cx&quot;
value=&quot;&lt;?php echo $options['google_cse_cx']; ?&gt;&quot; /&gt;
    &lt;input type=&quot;hidden&quot; name=&quot;cof&quot; value=&quot;FORID:9&quot; /&gt;
    &lt;input type=&quot;hidden&quot; name=&quot;ie&quot; value=&quot;UTF-8&quot; /&gt;
  &lt;/div&gt;
&lt;/form&gt;
</pre>
<p>> 在iNove的主题选项中，把使用Google自定义引擎勾起来，填上你的google自定义搜索引擎key<br />
> 呼 累死了 写了这么长 看我这么累的份上 要是对你有用就留言支持下吧</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rainmoe.com/2009/10/09/conflate-google-and-inove/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using memcached (Feed is rejected)
Page Caching using memcached
Database Caching 1/21 queries in 0.014 seconds using memcached
Object Caching 460/509 objects using memcached

Served from: www.rainmoe.com @ 2012-02-09 17:03:08 -->
