<?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; inove</title>
	<atom:link href="http://www.rainmoe.com/tag/inove/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>iNove的简单缓存头像法</title>
		<link>http://www.rainmoe.com/2009/10/26/inove-gravatar-simple/</link>
		<comments>http://www.rainmoe.com/2009/10/26/inove-gravatar-simple/#comments</comments>
		<pubDate>Mon, 26 Oct 2009 14:35:55 +0000</pubDate>
		<dc:creator>小邪</dc:creator>
				<category><![CDATA[代码 [Code]]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[comment]]></category>
		<category><![CDATA[inove]]></category>
		<category><![CDATA[theme]]></category>

		<guid isPermaLink="false">http://www.evlos.org/?p=637</guid>
		<description><![CDATA[我发现我的方法和whisperer童鞋的方法是不同的

但是还是有蛮多人按照他的方法

虽然他的方法使用的代码非常容易理解和阅读

<span class="readmore"><a href="http://www.rainmoe.com/2009/10/26/inove-gravatar-simple/" title="iNove的简单缓存头像法">阅读全文——共245字</a></span>]]></description>
			<content:encoded><![CDATA[<p>我发现我的方法和whisperer童鞋的方法是不同的<br />
但是还是有蛮多人按照他的方法<br />
虽然他的方法使用的代码非常容易理解和阅读<br />
但是貌似有些过长鸟 </p>
<p>打开模板目录里的主题支持函数 (functions.php)文件 </p>
<pre class="brush: php; auto-links: false; html-script: false; title: ; notranslate">
&lt;div class=&quot;pic&quot;&gt;
&lt;?php if (function_exists('get_avatar') &amp;&amp; get_option('show_avatars'))
{ echo get_avatar($comment, 32); } ?&gt;
&lt;/div&gt;
</pre>
<p>然后按照如下改动即可 <span id="more-637"></span></p>
<pre class="brush: php; auto-links: false; html-script: false; title: ; notranslate">
&lt;div class=&quot;pic&quot;&gt;
&lt;img src=&quot;你的缓存头像目录/cache/avatar/
&lt;?php echo md5(strtolower($comment-&gt;comment_author_email)); ?&gt;&quot; alt=&quot;&quot; /&gt;
&lt;/div&gt;
</pre>
<p>嘿嘿 搞定鸟 </p>
]]></content:encoded>
			<wfw:commentRss>http://www.rainmoe.com/2009/10/26/inove-gravatar-simple/feed/</wfw:commentRss>
		<slash:comments>2</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/9 queries in 0.005 seconds using memcached
Object Caching 257/269 objects using memcached

Served from: www.rainmoe.com @ 2012-02-09 16:54:33 -->
