<?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>FVF.me&#039;Ye &#187; google</title>
	<atom:link href="http://fvf.me/tag/google/feed" rel="self" type="application/rss+xml" />
	<link>http://fvf.me</link>
	<description>我是孤独的根号5</description>
	<lastBuildDate>Mon, 19 Sep 2011 12:10:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Google自定义搜索设置之搜索元素</title>
		<link>http://fvf.me/wordpress/theme/google-custom-search-to-set-the-search-element.html</link>
		<comments>http://fvf.me/wordpress/theme/google-custom-search-to-set-the-search-element.html#comments</comments>
		<pubDate>Thu, 02 Sep 2010 11:38:00 +0000</pubDate>
		<dc:creator>死兔子</dc:creator>
				<category><![CDATA[主题]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[搜索]]></category>
		<category><![CDATA[搜索元素]]></category>
		<category><![CDATA[设置]]></category>

		<guid isPermaLink="false">http://fvf.me/wordpress/theme/google%e8%87%aa%e5%ae%9a%e4%b9%89%e6%90%9c%e7%b4%a2%e8%ae%be%e7%bd%ae%e4%b9%8b%e6%90%9c%e7%b4%a2%e5%85%83%e7%b4%a0.html</guid>
		<description><![CDATA[今天帮网友找资料，发现网站的搜索页面有的差一点。感觉不爽，就想到了Google自定义搜索，呵呵！去设置新建了一个新的自定义搜索。得到搜索引擎的唯一 ID，其实就是一个自定义搜索个人标识一样。 巧合的是咱这个主题尽然自带支持Google的自定义搜索。本以为把那个个人ID填进去就好了，结果搜索一下发现不行，悲剧的事情啊！看来还是得自己动手丰衣足食啊。 搜索了发现原来有两种设置方法，对应着Google自定义搜索的2个实现方法。方法一，搜索元素：提供大多数布局和自定义选项。方法二，IFRAME：提供的自定义内容有限，且需要为您网站上的搜索结果提供单独网页。当然还有一种方法是，Google 托管的网页。搜索结果位于 Google 上。 方法一：搜索元素 这种方法其实是最好看的，所以我第一个想到就是它，高速Ajax加载，减少主机负担，自定义CSS，自定义展示结果，高亮搜索，而且Adsense集成，Analytics 集成。 开始去Google自定义搜索里面设置-外观-托管选项-搜索元素：提供大多数布局和自定义选项。保存得到代码，不过这个代码不能随便的用，需要修改一下，添加正则表达式的传参代码。复制page.php页面适当修改，制作成cse模板，代码如下 &#60;?php /* Template Name: cse */ ?&#62; &#60;?php get_header(); ?&#62; &#60;div class="post"&#62; &#60;div class="contents"&#62; &#60;div id="cse" style="width: 100%;"&#62;正在从Google 加载搜索结果……&#60;/div&#62; &#60;script src="http://www.google.com/jsapi" type="text/javascript"&#62;&#60;/script&#62; &#60;script type="text/javascript"&#62; google.load(‘search’, ’1′, {language : ‘zh-CN’}); google.setOnLoadCallback(function(){ var customSearchControl = new google.search.CustomSearchControl(‘//换成自己的ID号’); customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET); customSearchControl.draw(‘cse’); var match = location.search.match(/q=([^&#38;]*)(&#38;&#124;$)/); if(match &#38;&#38; match[1]){ [...]]]></description>
			<content:encoded><![CDATA[<p>今天帮网友找资料，发现网站的搜索页面有的差一点。感觉不爽，就想到了<a href="http://www.google.com/cse/?hl=zh-CN">Google自定义搜索</a>，呵呵！去设置新建了一个新的自定义搜索。得到搜索引擎的唯一 ID，其实就是一个自定义搜索个人标识一样。</p>
<p>巧合的是咱这个主题尽然自带支持Google的自定义搜索。本以为把那个个人ID填进去就好了，结果搜索一下发现不行，悲剧的事情啊！看来还是得自己动手丰衣足食啊。</p>
<p>搜索了发现原来有两种设置方法，对应着Google自定义搜索的2个实现方法。方法一，<strong>搜索元素：</strong>提供大多数布局和自定义选项。方法二，<strong>IFRAME：</strong>提供的自定义内容有限，且需要为您网站上的搜索结果提供单独网页。当然还有一种方法是，<strong>Google 托管的网页。</strong>搜索结果位于 Google 上。</p>
<p>方法一：<strong>搜索元素</strong></p>
<p>这种方法其实是最好看的，所以我第一个想到就是它，高速Ajax加载，减少主机负担，自定义CSS，自定义展示结果，高亮搜索，而且Adsense集成，Analytics 集成。</p>
<p>开始去Google自定义搜索里面设置-外观-托管选项-<strong>搜索元素：</strong>提供大多数布局和自定义选项。保存得到代码，不过这个代码不能随便的用，需要修改一下，添加正则表达式的传参代码。复制page.php页面适当修改，制作成cse模板，代码如下</p>
<div class="source" style="background-color: #000000; font-family: tahoma, 'Lucida Console', 'Courier New', verdana; color: #c0c0c0;"><span style="color: #ffffff;">&lt;?php</span><br />
<span style="color: #696969;">/* </span><br />
<span style="color: #696969;">Template Name: cse </span><br />
<span style="color: #696969;">*/</span><br />
<span style="color: #ffffff;">?&gt;</span><br />
<span style="color: #ffffff;">&lt;?php</span> <span style="color: #c0c0c0;">get_header</span>(); <span style="color: #ffffff;">?&gt;</span><br />
<span style="color: #ffff00; font-weight: bold;">&lt;div</span> <span style="color: #ffff00;">class=</span><span style="color: #bbbb00;">"post"</span><span style="color: #ffff00; font-weight: bold;">&gt;</span><br />
<span style="color: #ffff00; font-weight: bold;">&lt;div</span> <span style="color: #ffff00;">class=</span><span style="color: #bbbb00;">"contents"</span><span style="color: #ffff00; font-weight: bold;">&gt;</span><br />
<span style="color: #ffff00; font-weight: bold;">&lt;div</span> <span style="color: #ffff00;">id=</span><span style="color: #bbbb00;">"cse"</span> <span style="color: #ffff00;">style=</span><span style="color: #bbbb00;">"width: 100%;"</span><span style="color: #ffff00; font-weight: bold;">&gt;</span><span style="color: #c0c0c0;">正在从Google 加载搜索结果……</span><span style="color: #ffff00; font-weight: bold;">&lt;/div&gt;</span><br />
<span style="color: #ffff00; font-weight: bold;">&lt;script </span><span style="color: #ffff00;">src=</span><span style="color: #bbbb00;">"http://www.google.com/jsapi"</span> <span style="color: #ffff00;">type=</span><span style="color: #bbbb00;">"text/javascript"</span><span style="color: #ffff00; font-weight: bold;">&gt;&lt;/script&gt;</span><br />
<span style="color: #ffff00; font-weight: bold;">&lt;script </span><span style="color: #ffff00;">type=</span><span style="color: #bbbb00;">"text/javascript"</span><span style="color: #ffff00; font-weight: bold;">&gt;</span><br />
<span style="color: #c0c0c0;">google</span><span style="color: #c0c0c0;">.</span><span style="color: #c0c0c0;">load</span>(<span style="color: #c0c0c0;">‘</span><span style="color: #c0c0c0;">search</span><span style="color: #c0c0c0;">’</span><span style="color: #c0c0c0;">,</span> <span style="color: #c0c0c0;">’</span><span style="color: #c0c0c0;">1</span><span style="color: #c0c0c0;">′</span><span style="color: #c0c0c0;">,</span> <span style="color: #c0c0c0;">{</span><span style="color: #c0c0c0;">language</span> <span style="color: #c0c0c0;">:</span> <span style="color: #c0c0c0;">‘</span><span style="color: #c0c0c0;">zh</span><span style="color: #c0c0c0;">-</span><span style="color: #c0c0c0;">CN</span><span style="color: #c0c0c0;">’</span><span style="color: #c0c0c0;">});</span><br />
<span style="color: #c0c0c0;">google</span><span style="color: #c0c0c0;">.</span><span style="color: #c0c0c0;">setOnLoadCallback</span>(<span style="color: #ffff00; font-weight: bold;">function</span><span style="color: #c0c0c0;">(){</span><br />
<span style="color: #ffff00; font-weight: bold;">var</span> <span style="color: #c0c0c0;">customSearchControl</span> <span style="color: #c0c0c0;">=</span> <span style="color: #ffff00; font-weight: bold;">new</span> <span style="color: #c0c0c0;">google</span><span style="color: #c0c0c0;">.</span><span style="color: #c0c0c0;">search</span><span style="color: #c0c0c0;">.</span><span style="color: #c0c0c0;">CustomSearchControl</span>(<span style="color: #c0c0c0;">‘</span><span style="color: #696969;">//换成自己的ID号’); </span><br />
<span style="color: #c0c0c0;">customSearchControl</span><span style="color: #c0c0c0;">.</span><span style="color: #c0c0c0;">setResultSetSize</span>(<span style="color: #c0c0c0;">google</span><span style="color: #c0c0c0;">.</span><span style="color: #c0c0c0;">search</span><span style="color: #c0c0c0;">.</span><span style="color: #c0c0c0;">Search</span><span style="color: #c0c0c0;">.</span><span style="color: #c0c0c0;">FILTERED_CSE_RESULTSET</span>);<br />
<span style="color: #c0c0c0;">customSearchControl</span><span style="color: #c0c0c0;">.</span><span style="color: #c0c0c0;">draw</span>(<span style="color: #c0c0c0;">‘</span><span style="color: #c0c0c0;">cse</span><span style="color: #c0c0c0;">’</span>);<br />
<span style="color: #ffff00; font-weight: bold;">var</span> <span style="color: #c0c0c0;">match</span> <span style="color: #c0c0c0;">=</span> <span style="color: #c0c0c0;">location</span><span style="color: #c0c0c0;">.</span><span style="color: #c0c0c0;">search</span><span style="color: #c0c0c0;">.</span><span style="color: #c0c0c0;">match</span>(<span style="color: #bbbb00;">/q=([^&amp;]*)(&amp;|$)/</span>);<br />
<span style="color: #ffff00; font-weight: bold;">if</span>(<span style="color: #c0c0c0;">match</span> <span style="color: #c0c0c0;">&amp;&amp;</span> <span style="color: #c0c0c0;">match</span><span style="color: #c0c0c0;">[</span><span style="color: #c0c0c0;">1</span><span style="color: #c0c0c0;">]){</span><br />
<span style="color: #ffff00; font-weight: bold;">var</span> <span style="color: #c0c0c0;">search</span> <span style="color: #c0c0c0;">=</span> <span style="color: #c0c0c0;">decodeURIComponent</span>(<span style="color: #c0c0c0;">match</span><span style="color: #c0c0c0;">[</span><span style="color: #c0c0c0;">1</span><span style="color: #c0c0c0;">]);</span><br />
<span style="color: #c0c0c0;">customSearchControl</span><span style="color: #c0c0c0;">.</span><span style="color: #c0c0c0;">execute</span>(<span style="color: #c0c0c0;">search</span>);<br />
<span style="color: #c0c0c0;">}</span><br />
<span style="color: #c0c0c0;">});</span><br />
<span style="color: #ffff00; font-weight: bold;">&lt;/script&gt;</span><br />
<span style="color: #ffff00; font-weight: bold;">&lt;link</span> <span style="color: #ffff00;">rel=</span><span style="color: #bbbb00;">"stylesheet"</span> <span style="color: #ffff00;">href=</span><span style="color: #bbbb00;">"http://www.google.com/cse/style/look/greensky.css"</span> <span style="color: #ffff00;">type=</span><span style="color: #bbbb00;">"text/css"</span> <span style="color: #ffff00; font-weight: bold;">/&gt;</span><br />
<span style="color: #ffff00; font-weight: bold;">&lt;div</span> <span style="color: #ffff00;">class=</span><span style="color: #bbbb00;">"fixed"</span><span style="color: #ffff00; font-weight: bold;">&gt;&lt;/div&gt;</span><br />
<span style="color: #ffff00; font-weight: bold;">&lt;/div&gt;</span><br />
<span style="color: #ffff00; font-weight: bold;">&lt;/div&gt;</span><br />
<span style="color: #ffffff;">&lt;?php</span> <span style="color: #c0c0c0;">get_sidebar</span>(); <span style="color: #ffffff;">?&gt;</span><br />
<span style="color: #ffff00; font-weight: bold;">&lt;div</span> <span style="color: #ffff00;">class=</span><span style="color: #bbbb00;">"fixed"</span><span style="color: #ffff00; font-weight: bold;">&gt;&lt;/div&gt;</span><br />
<span style="color: #ffff00; font-weight: bold;">&lt;div</span> <span style="color: #ffff00;">id=</span><span style="color: #bbbb00;">"bottom"</span><span style="color: #ffff00; font-weight: bold;">&gt;</span><br />
<span style="color: #ffffff;">&lt;?php</span> <span style="color: #c0c0c0;">get_footer</span>(); <span style="color: #ffffff;">?&gt;</span></div>
<p>接下来在WP后台新建一个搜索页面，选择页面模板 <strong>cse</strong> 就是刚刚传上去的那个文件，设置永久链接：比如咱的是<a href="http://fvf.me/search">http://fvf.me/search</a>，得到页面的ＩＤ号，比如咱的是130号，点击发表页面。然后修改header.php</p>
<div class="source" style="background-color: #000000; font-family: 'Courier New', 'Lucida Console', verdana; color: #c0c0c0;"><span style="color: #c0c0c0;">wp_list_pages('title_li=0</span><span style="color: #ffffff;">&amp;sort_column=menu_order');</span></div>
<p>修改成刚才获取的页面ID，</p>
<div class="source" style="background-color: #000000; font-family: 'Courier New', 'Lucida Console', verdana; color: #c0c0c0;"><span style="color: #c0c0c0;">wp_list_pages('title_li=0</span><span style="color: #ffffff;">&amp;sort_column=menu_order&amp;exclude=130');</span></div>
<p>这样就能把刚才的搜索页面排除在导航栏之中了。</p>
<p>终于咱有了一个正常使用的search页面，下面开始对首页的搜索条进行修改，用了一个正则来处理传递参数。</p>
<div class="source" style="background-color: #000000; font-family: 'Courier New', 'Lucida Console', verdana; color: #c0c0c0;"><span style="color: #ffff00; font-weight: bold;">&lt;form</span> <span style="color: #ffff00;">method=</span><span style="color: #bbbb00;">"get"</span> <span style="color: #ffff00;">id=</span><span style="color: #bbbb00;">"searchform"</span> <span style="color: #ffff00;">action=</span><span style="color: #bbbb00;">"http://fvf.me/search"</span><span style="color: #ffff00; font-weight: bold;">&gt;</span><br />
<span style="color: #ffff00; font-weight: bold;">&lt;div&gt;</span><br />
<span style="color: #ffff00; font-weight: bold;">&lt;input</span> <span style="color: #ffff00;">type=</span><span style="color: #bbbb00;">"text"</span> <span style="color: #ffff00;">value=</span><span style="color: #bbbb00;">"Click Enter…"</span> <span style="color: #ffff00;">name=</span><span style="color: #bbbb00;">"q"</span> <span style="color: #ffff00;">id=</span><span style="color: #bbbb00;">"search_input"</span> <span style="color: #ffff00;">onFocus=</span><span style="color: #bbbb00;">"this.value = this.value == this.defaultValue ? ” : this.value"</span> <span style="color: #ffff00;">onBlur=</span><span style="color: #bbbb00;">"this.value = this.value == ” ? this.defaultValue : this.value"</span> <span style="color: #ffff00; font-weight: bold;">/&gt;</span><br />
<span style="color: #ffff00; font-weight: bold;">&lt;/div&gt;</span><br />
<span style="color: #ffff00; font-weight: bold;">&lt;/form&gt;</span></div>
<p>现在基本的功能都已经实现了，最后要做的就是优化 CSS，使之看起来跟博客协调！在Google自定义搜索的控制面板选择 外观-搜索元素-自定样式。最下面都有阅览供大家调试。</p>
]]></content:encoded>
			<wfw:commentRss>http://fvf.me/wordpress/theme/google-custom-search-to-set-the-search-element.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google自定义搜索设置之IFRAME</title>
		<link>http://fvf.me/diary/google-custom-search-to-set-the-iframe.html</link>
		<comments>http://fvf.me/diary/google-custom-search-to-set-the-iframe.html#comments</comments>
		<pubDate>Thu, 02 Sep 2010 04:09:00 +0000</pubDate>
		<dc:creator>死兔子</dc:creator>
				<category><![CDATA[小记]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[IFRAME]]></category>
		<category><![CDATA[搜索]]></category>
		<category><![CDATA[设置]]></category>

		<guid isPermaLink="false">http://fvf.me/diary/google%e8%87%aa%e5%ae%9a%e4%b9%89%e6%90%9c%e7%b4%a2%e8%ae%be%e7%bd%ae%e4%b9%8biframe.html</guid>
		<description><![CDATA[刚刚设置了Google的自定义搜索,发现搜索结果很长时间在加载中,起码等待了5，6秒。很悲剧啊，也不知道是我的服务的关系还是什么，看来咱只能换另一种模式设置那就是方法二，IFRAME：提供的自定义内容有限，且需要为您网站上的搜索结果提供单独网页。虽然Google讲了这么多的坏处，当我还是发现它的好处就是速度快，不知道是什么原因。但是就为这速度我决定选它了。 第一步修改模板，复制page.php另存为cse.php，根据自己的主题把Google自定义搜索代码添加修改，把一些调用留言框的代码等都可以注释或删除掉，大体如下 &#60;?php /* Template Name: cse */ ?&#62; &#60;?php get_header(); ?&#62; &#60;?php if (have_posts()) : the_post(); ?&#62; &#60;div class=&#34;post&#34;&#62; &#160;&#160; &#60;div class=&#34;contents&#34;&#62; &#160;&#160;&#160;&#160; //Google自定义搜索代码开始 &#160;&#160;&#160;&#160; &#60;div id=&#34;cse-search-results&#34;&#62;&#60;/div&#62; &#160;&#160;&#160;&#160; &#60;script type=&#34;text/javascript&#34;&#62; &#160;&#160;&#160;&#160;&#160;&#160; var googleSearchIframeName = &#34;cse-search-results&#34;; &#160;&#160;&#160;&#160;&#160;&#160; var googleSearchFormName = &#34;search_box&#34;; &#160;&#160;&#160;&#160;&#160;&#160; var googleSearchFrameWidth =660;//搜索内容的宽带 &#160;&#160;&#160;&#160;&#160;&#160; var googleSearchDomain = &#34;www.google.com&#34;; &#160;&#160;&#160;&#160;&#160;&#160; var googleSearchPath = &#34;/cse&#34;; [...]]]></description>
			<content:encoded><![CDATA[<p>刚刚设置了Google的自定义搜索,发现搜索结果很长时间在加载中,起码等待了5，6秒。很悲剧啊，也不知道是我的服务的关系还是什么，看来咱只能换另一种模式设置那就是方法二，<strong>IFRAME：</strong>提供的自定义内容有限，且需要为您网站上的搜索结果提供单独网页。虽然Google讲了这么多的坏处，当我还是发现它的好处就是速度快，不知道是什么原因。但是就为这速度我决定选它了。</p>
<p>第一步修改模板，复制page.php另存为cse.php，根据自己的主题把Google自定义搜索代码添加修改，把一些调用留言框的代码等都可以注释或删除掉，大体如下</p>
<div style="background-color: rgb(0,0,0); font-family: tahoma, &#39;Lucida Console&#39;, &#39;Courier New&#39;, verdana; color: rgb(192,192,192)" class="source"><span style="color: rgb(255,255,255)">&lt;?php</span>     <br /><span style="color: rgb(105,105,105)">/* </span>    <br /><span style="color: rgb(105,105,105)">Template Name: cse </span>    <br /><span style="color: rgb(105,105,105)">*/</span>     <br /><span style="color: rgb(255,255,255)">?&gt;</span>     <br /><span style="color: rgb(255,255,255)">&lt;?php</span> <span style="color: rgb(192,192,192)">get_header</span>(); <span style="color: rgb(255,255,255)">?&gt;</span>     <br /><span style="color: rgb(255,255,255)">&lt;?php</span> <span style="color: rgb(255,255,0); font-weight: bold">if</span> (<span style="color: rgb(192,192,192)">have_posts</span>()) <span style="color: rgb(192,192,192)">:</span> <span style="color: rgb(192,192,192)">the_post</span>(); <span style="color: rgb(255,255,255)">?&gt;</span>     <br /><span style="color: rgb(255,255,0); font-weight: bold">&lt;div</span> <span style="color: rgb(255,255,0)">class=</span><span style="color: rgb(187,187,0)">&quot;post&quot;</span><span style="color: rgb(255,255,0); font-weight: bold">&gt;</span>     <br />&#160;&#160; <span style="color: rgb(255,255,0); font-weight: bold">&lt;div</span> <span style="color: rgb(255,255,0)">class=</span><span style="color: rgb(187,187,0)">&quot;contents&quot;</span><span style="color: rgb(255,255,0); font-weight: bold">&gt;</span>     <br /><span style="color: rgb(192,192,192)">&#160;&#160;&#160;&#160; //Google自定义搜索代码开始 </span>    <br />&#160;&#160;&#160;&#160; <span style="color: rgb(255,255,0); font-weight: bold">&lt;div</span> <span style="color: rgb(255,255,0)">id=</span><span style="color: rgb(187,187,0)">&quot;cse-search-results&quot;</span><span style="color: rgb(255,255,0); font-weight: bold">&gt;&lt;/div&gt;</span>     <br />&#160;&#160;&#160;&#160; <span style="color: rgb(255,255,0); font-weight: bold">&lt;script </span><span style="color: rgb(255,255,0)">type=</span><span style="color: rgb(187,187,0)">&quot;text/javascript&quot;</span><span style="color: rgb(255,255,0); font-weight: bold">&gt;</span>     <br />&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: rgb(255,255,0); font-weight: bold">var</span> <span style="color: rgb(192,192,192)">googleSearchIframeName</span> <span style="color: rgb(192,192,192)">=</span> <span style="color: rgb(187,187,0)">&quot;cse-search-results&quot;</span>;     <br />&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: rgb(255,255,0); font-weight: bold">var</span> <span style="color: rgb(192,192,192)">googleSearchFormName</span> <span style="color: rgb(192,192,192)">=</span> <span style="color: rgb(187,187,0)">&quot;search_box&quot;</span>;     <br />&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: rgb(255,255,0); font-weight: bold">var</span> <span style="color: rgb(192,192,192)">googleSearchFrameWidth</span> <span style="color: rgb(192,192,192)">=</span><span style="color: rgb(192,192,192)">660</span>;<span style="color: rgb(105,105,105)">//搜索内容的宽带 </span>    <br />&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: rgb(255,255,0); font-weight: bold">var</span> <span style="color: rgb(192,192,192)">googleSearchDomain</span> <span style="color: rgb(192,192,192)">=</span> <span style="color: rgb(187,187,0)">&quot;www.google.com&quot;</span>;     <br />&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: rgb(255,255,0); font-weight: bold">var</span> <span style="color: rgb(192,192,192)">googleSearchPath</span> <span style="color: rgb(192,192,192)">=</span> <span style="color: rgb(187,187,0)">&quot;/cse&quot;</span>;     <br />&#160;&#160;&#160; <span style="color: rgb(255,255,0); font-weight: bold">&lt;/script&gt;</span>     <br />&#160;&#160;&#160;&#160; <span style="color: rgb(255,255,0); font-weight: bold">&lt;script </span><span style="color: rgb(255,255,0)">type=</span><span style="color: rgb(187,187,0)">&quot;text/javascript&quot;</span> <span style="color: rgb(255,255,0)">src=</span><span style="color: rgb(187,187,0)">&quot;http://www.google.com/afsonline/show_afs_search.js&quot;</span><span style="color: rgb(255,255,0); font-weight: bold">&gt;&lt;/script&gt;</span>     <br /><span style="color: rgb(192,192,192)">&#160;&#160; //Google自定义搜索代码结束 </span>    <br />&#160;&#160;&#160;&#160; <span style="color: rgb(255,255,0); font-weight: bold">&lt;div</span> <span style="color: rgb(255,255,0)">class=</span><span style="color: rgb(187,187,0)">&quot;fixed&quot;</span><span style="color: rgb(255,255,0); font-weight: bold">&gt;&lt;/div&gt;</span>     <br />&#160;&#160; <span style="color: rgb(255,255,0); font-weight: bold">&lt;/div&gt;</span>     <br /><span style="color: rgb(255,255,0); font-weight: bold">&lt;/div&gt;</span>     <br /><span style="color: rgb(255,255,255)">&lt;?php</span> <span style="color: rgb(255,255,0); font-weight: bold">else</span> <span style="color: rgb(192,192,192)">:</span> <span style="color: rgb(255,255,255)">?&gt;</span>     <br /><span style="color: rgb(255,255,255)">&lt;?php</span> <span style="color: rgb(255,255,0); font-weight: bold">endif</span>; <span style="color: rgb(255,255,255)">?&gt;</span>     <br /><span style="color: rgb(255,255,0); font-weight: bold">&lt;/div&gt;</span>     <br /><span style="color: rgb(255,255,255)">&lt;?php</span> <span style="color: rgb(192,192,192)">get_sidebar</span>(); <span style="color: rgb(255,255,255)">?&gt;</span>     <br /><span style="color: rgb(255,255,0); font-weight: bold">&lt;div</span> <span style="color: rgb(255,255,0)">class=</span><span style="color: rgb(187,187,0)">&quot;fixed&quot;</span><span style="color: rgb(255,255,0); font-weight: bold">&gt;&lt;/div&gt;</span>     <br /><span style="color: rgb(255,255,0); font-weight: bold">&lt;div</span> <span style="color: rgb(255,255,0)">id=</span><span style="color: rgb(187,187,0)">&quot;bottom&quot;</span><span style="color: rgb(255,255,0); font-weight: bold">&gt;</span>     <br /><span style="color: rgb(255,255,255)">&lt;?php</span> <span style="color: rgb(192,192,192)">get_footer</span>(); <span style="color: rgb(255,255,255)">?&gt;</span>    </div>
<p>然后都一样，就是新建一个搜索页面，使用cse模板，当然前面已经新建了，不过要把那个永久链接修改成http://fvf.me/cse。然后就是把搜索这个页面在导航栏中隐藏掉，方法在上一个页面中。</p>
<p>接下来修改主页上的搜索框代码，由于咱的主题自带了调用Google自定义搜索的参数，写入刚才获取的搜索引擎的唯一 ID并启用它，继续修改header.php，找到如下代码：</p>
<div style="background-color: rgb(0,0,0); font-family: tahoma, &#39;Lucida Console&#39;, &#39;Courier New&#39;, verdana; color: rgb(192,192,192)" class="source"><span style="color: rgb(255,255,0); font-weight: bold">&lt;form</span> <span style="color: rgb(255,255,0)">action=</span><span style="color: rgb(187,187,0)">&quot;http://www.google.com/cse&quot;</span> <span style="color: rgb(255,255,0)">id=</span><span style="color: rgb(187,187,0)">&quot;search_box&quot;</span> <span style="color: rgb(255,255,0)">method=</span><span style="color: rgb(187,187,0)">&quot;get&quot;</span><span style="color: rgb(255,255,0); font-weight: bold">&gt;</span>     <br />&#160; <span style="color: rgb(255,255,0); font-weight: bold">&lt;div</span> <span style="color: rgb(255,255,0)">id=</span><span style="color: rgb(187,187,0)">&quot;searchbox&quot;</span><span style="color: rgb(255,255,0); font-weight: bold">&gt;</span>     <br />&#160;&#160; <span style="color: rgb(255,255,0); font-weight: bold">&lt;input</span> <span style="color: rgb(255,255,0)">type=</span><span style="color: rgb(187,187,0)">&quot;text&quot;</span> <span style="color: rgb(255,255,0)">id=</span><span style="color: rgb(187,187,0)">&quot;searchtxt&quot;</span> <span style="color: rgb(255,255,0)">class=</span><span style="color: rgb(187,187,0)">&quot;textfield&quot;</span> <span style="color: rgb(255,255,0)">name=</span><span style="color: rgb(187,187,0)">&quot;q&quot;</span> <span style="color: rgb(255,255,0)">size=</span><span style="color: rgb(187,187,0)">&quot;24&quot;</span> <span style="color: rgb(255,255,0); font-weight: bold">/&gt;</span>     <br />&#160;&#160;&#160; <span style="color: rgb(255,255,0); font-weight: bold">&lt;input</span> <span style="color: rgb(255,255,0)">type=</span><span style="color: rgb(187,187,0)">&quot;hidden&quot;</span> <span style="color: rgb(255,255,0)">name=</span><span style="color: rgb(187,187,0)">&quot;cx&quot;</span> <span style="color: rgb(255,255,0)">value=</span><span style="color: rgb(187,187,0)">&quot;</span><span style="color: rgb(255,255,255)">&lt;?php</span> <span style="color: rgb(255,255,0); font-weight: bold">echo</span> <span style="color: rgb(204,204,0)">$options</span><span style="color: rgb(192,192,192)">[</span><span style="color: rgb(187,187,0)">'google_cse_cx'</span><span style="color: rgb(192,192,192)">];</span> <span style="color: rgb(255,255,255)">?&gt;</span><span style="color: rgb(187,187,0)">&quot;</span> <span style="color: rgb(255,255,0); font-weight: bold">/&gt;</span>     <br />&#160;&#160;&#160; <span style="color: rgb(255,255,0); font-weight: bold">&lt;input</span> <span style="color: rgb(255,255,0)">type=</span><span style="color: rgb(187,187,0)">&quot;hidden&quot;</span> <span style="color: rgb(255,255,0)">name=</span><span style="color: rgb(187,187,0)">&quot;ie&quot;</span> <span style="color: rgb(255,255,0)">value=</span><span style="color: rgb(187,187,0)">&quot;UTF-8&quot;</span> <span style="color: rgb(255,255,0); font-weight: bold">/&gt;</span>     <br />&#160; <span style="color: rgb(255,255,0); font-weight: bold">&lt;/div&gt;</span>     <br /><span style="color: rgb(255,255,0); font-weight: bold">&lt;/form&gt;</span></div>
<p>非此主题者，查找form标签修改一下就好了 </p>
<div style="background-color: rgb(0,0,0); font-family: tahoma, &#39;Lucida Console&#39;, &#39;Courier New&#39;, verdana; color: rgb(192,192,192)" class="source"><span style="color: rgb(255,255,0); font-weight: bold">&lt;form</span> <span style="color: rgb(255,255,0)">action=</span><span style="color: rgb(187,187,0)">&quot;http://sitz.me/cse&quot;</span> <span style="color: rgb(255,255,0)">id=</span><span style="color: rgb(187,187,0)">&quot;search_box&quot;</span> <span style="color: rgb(255,255,0)">method=</span><span style="color: rgb(187,187,0)">&quot;get&quot;</span><span style="color: rgb(255,255,0); font-weight: bold">&gt;</span>     <br />&#160;&#160; <span style="color: rgb(255,255,0); font-weight: bold">&lt;div</span> <span style="color: rgb(255,255,0)">id=</span><span style="color: rgb(187,187,0)">&quot;searchbox&quot;</span><span style="color: rgb(255,255,0); font-weight: bold">&gt;</span>     <br />&#160;&#160;&#160;&#160; <span style="color: rgb(255,255,0); font-weight: bold">&lt;input</span> <span style="color: rgb(255,255,0)">type=</span><span style="color: rgb(187,187,0)">&quot;hidden&quot;</span> <span style="color: rgb(255,255,0)">name=</span><span style="color: rgb(187,187,0)">&quot;cx&quot;</span> <span style="color: rgb(255,255,0)">value=</span><span style="color: rgb(187,187,0)">&quot;</span><span style="color: rgb(255,255,255)">&lt;?php</span> <span style="color: rgb(255,255,0); font-weight: bold">echo</span> <span style="color: rgb(204,204,0)">$options</span><span style="color: rgb(192,192,192)">[</span><span style="color: rgb(187,187,0)">'google_cse_cx'</span><span style="color: rgb(192,192,192)">];</span> <span style="color: rgb(255,255,255)">?&gt;</span><span style="color: rgb(187,187,0)">&quot;</span> <span style="color: rgb(255,255,0); font-weight: bold">/&gt;</span><span style="color: rgb(192,192,192)">//非此主题者可以直接在此写入搜索引擎的唯一 ID </span>    <br />&#160;&#160;&#160;&#160; <span style="color: rgb(255,255,0); font-weight: bold">&lt;input</span> <span style="color: rgb(255,255,0)">type=</span><span style="color: rgb(187,187,0)">&quot;hidden&quot;</span> <span style="color: rgb(255,255,0)">name=</span><span style="color: rgb(187,187,0)">&quot;cof&quot;</span> <span style="color: rgb(255,255,0)">value=</span><span style="color: rgb(187,187,0)">&quot;FORID:11&quot;</span> <span style="color: rgb(255,255,0); font-weight: bold">/&gt;</span>     <br />&#160;&#160;&#160;&#160; <span style="color: rgb(255,255,0); font-weight: bold">&lt;input</span> <span style="color: rgb(255,255,0)">type=</span><span style="color: rgb(187,187,0)">&quot;hidden&quot;</span> <span style="color: rgb(255,255,0)">name=</span><span style="color: rgb(187,187,0)">&quot;ie&quot;</span> <span style="color: rgb(255,255,0)">value=</span><span style="color: rgb(187,187,0)">&quot;UTF-8&quot;</span> <span style="color: rgb(255,255,0); font-weight: bold">/&gt;</span>     <br />&#160;&#160;&#160;&#160; <span style="color: rgb(255,255,0); font-weight: bold">&lt;input</span> <span style="color: rgb(255,255,0)">type=</span><span style="color: rgb(187,187,0)">&quot;text&quot;</span> <span style="color: rgb(255,255,0)">class=</span><span style="color: rgb(187,187,0)">&quot;textfield&quot;</span> <span style="color: rgb(255,255,0)">id=</span><span style="color: rgb(187,187,0)">&quot;searchtxt&quot;</span> <span style="color: rgb(255,255,0)">name=</span><span style="color: rgb(187,187,0)">&quot;q&quot;</span> <span style="color: rgb(255,255,0)">size=</span><span style="color: rgb(187,187,0)">&quot;24&quot;</span> <span style="color: rgb(255,255,0); font-weight: bold">/&gt;</span>     <br />&#160;&#160; <span style="color: rgb(255,255,0); font-weight: bold">&lt;/div&gt;</span>     <br /><span style="color: rgb(255,255,0); font-weight: bold">&lt;/form&gt;</span>     </div>
<p>这样子就好了。搜索一下发现搜索速度明显快多了。</p>
]]></content:encoded>
			<wfw:commentRss>http://fvf.me/diary/google-custom-search-to-set-the-iframe.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Chrome上用Sidewiki</title>
		<link>http://fvf.me/tools/online/chrome-on-the-use-sidewiki.html</link>
		<comments>http://fvf.me/tools/online/chrome-on-the-use-sidewiki.html#comments</comments>
		<pubDate>Sun, 01 Nov 2009 01:55:01 +0000</pubDate>
		<dc:creator>死兔子</dc:creator>
				<category><![CDATA[在线]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[sidewiki]]></category>

		<guid isPermaLink="false">http://fvf.me/tools/online/chrome%e4%b8%8a%e7%94%a8sidewiki.html</guid>
		<description><![CDATA[今天上网是看见了Sidewiki软件，一看是Google的我就去关注一下，看看有什么好玩的，一看瞧明白了，原来就是使用了这软件之后，你可以在任何网站、任何页面都可以发表你言论的工具，当然了现在的情况是你可以在个Google自家的浏览器上使用了，可以把你自己的评论发表到twitter和facebook上去，呵呵！ 去试试把，使用方式是Internet Explorer和 Firefox的点击下载. chrome和Safari等支持JS书签的浏览器，保存一下为书签就可以了， 点击选择语言]]></description>
			<content:encoded><![CDATA[<p>今天上网是看见了Sidewiki软件，一看是Google的我就去关注一下，看看有什么好玩的，一看瞧明白了，原来就是使用了这软件之后，你可以在任何网站、任何页面都可以发表你言论的工具，当然了现在的情况是你可以在个Google自家的浏览器上使用了，可以把你自己的评论发表到twitter和facebook上去，呵呵！</p>
<p>去试试把，使用方式是Internet Explorer和 Firefox的<a href="http://www.google.com/sidewiki/intl/zh-TW/index.html#tbbrand=">点击下载</a>.</p>
<p>chrome和Safari等支持JS书签的浏览器，保存一下为书签就可以了，<br />
<a title="点击选择语言" href="http://www.google.com/support/toolbar/bin/answer.py?hl=en&amp;answer=164493" target="_blank">点击选择语言</a></p>
]]></content:encoded>
			<wfw:commentRss>http://fvf.me/tools/online/chrome-on-the-use-sidewiki.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>收到Google wave的邀请码</title>
		<link>http://fvf.me/tools/online/google-wave-received-an-invitation-code.html</link>
		<comments>http://fvf.me/tools/online/google-wave-received-an-invitation-code.html#comments</comments>
		<pubDate>Sat, 31 Oct 2009 00:49:03 +0000</pubDate>
		<dc:creator>死兔子</dc:creator>
				<category><![CDATA[在线]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[wave]]></category>
		<category><![CDATA[邀请码]]></category>

		<guid isPermaLink="false">http://fvf.me/tools/online/google-wave-received-an-invitation-code.html</guid>
		<description><![CDATA[今天收到了Google wave的邀请码，真的好高兴啊！ 为此我在网上泡了2个星期，还在题名之后等了3天啊，这么多天的等待终于可以自己尝试一下wave了，以前还只能看到别人用的图片，现在在我自己的电脑上就能使用了，好兴奋啊！不过为了了解使用wave我还是花了很大的力气！只是不好的是现在还只是英文界面！]]></description>
			<content:encoded><![CDATA[<p>今天收到了Google wave的邀请码，真的好高兴啊！</p>
<p>为此我在网上泡了2个星期，还在题名之后等了3天啊，这么多天的等待终于可以自己尝试一下wave了，以前还只能看到别人用的图片，现在在我自己的电脑上就能使用了，好兴奋啊！不过为了了解使用wave我还是花了很大的力气！只是不好的是现在还只是英文界面！</p>
]]></content:encoded>
			<wfw:commentRss>http://fvf.me/tools/online/google-wave-received-an-invitation-code.html/feed</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>改写404页面之Inove 主题</title>
		<link>http://fvf.me/wordpress/theme/404-pages-inove-rewrite-of-the-theme.html</link>
		<comments>http://fvf.me/wordpress/theme/404-pages-inove-rewrite-of-the-theme.html#comments</comments>
		<pubDate>Wed, 05 Aug 2009 07:46:33 +0000</pubDate>
		<dc:creator>死兔子</dc:creator>
				<category><![CDATA[主题]]></category>
		<category><![CDATA[404]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[inove]]></category>

		<guid isPermaLink="false">http://fvf.me/wordpress/%e6%94%b9%e5%86%99404%e9%a1%b5%e9%9d%a2%e4%b9%8binove-%e4%b8%bb%e9%a2%98.html</guid>
		<description><![CDATA[改写404页面 这主题 有一个小秘密，就是404页面了，里面还有MG12那个咸湿佬的图片和网站链接。建议大家改一下404页面，很不客气的把他的图片和链接给该了，当然了footer的MG12的链接，还是留着的，做人还是要厚道的。这也是国际惯例了吧！表示对作者的谢意！我把Google的404页面代码也加上去了，代码如下： &#60;script type=&#34;text/javascript&#34;&#62; var GOOG_FIXURL_LANG = &#39;zh-CN&#39;; var GOOG_FIXURL_SITE = &#39;http://fvf.me/&#39;;&#60;/script&#62; &#60;script type=&#34;text/javascript&#34; src=&#34;http://linkhelp.clients.google.com/tbproxy/lh/wm/fixurl.js&#34;&#62;&#60;/script&#62; 把其中的http://fvf.me 改一下就可以了。这样当用户访问到404页面的时候会出现Google的搜索条，进行网站的内部搜索！方便用户进行查找!&#160;&#160;]]></description>
			<content:encoded><![CDATA[<p><strong>改写404页面</strong></p>
<p>这主题 有一个小秘密，就是404页面了，里面还有MG12那个咸湿佬的图片和网站链接。建议大家改一下404页面，很不客气的把他的图片和链接给该了，当然了footer的MG12的链接，还是留着的，做人还是要厚道的。这也是国际惯例了吧！表示对作者的谢意！我把Google的404页面代码也加上去了，代码如下：</p>
<div class="source" style="font-family: 'Courier New', 'Lucida Console', Verdana; color: rgb(192, 192, 192); background-color: rgb(0, 0, 0); "> <span style="color: rgb(192, 192, 192); ">&lt;</span><span style="color: rgb(192, 192, 192); ">script</span> <span style="color: rgb(192, 192, 192); ">type</span><span style="color: rgb(192, 192, 192); ">=</span><span style="color: rgb(187, 187, 0); ">&quot;text/javascript&quot;</span><span style="color: rgb(192, 192, 192); ">&gt;</span><br /> <span style="color: rgb(255, 255, 0); font-weight: bold; ">var</span> <span style="color: rgb(192, 192, 192); ">GOOG_FIXURL_LANG</span> <span style="color: rgb(192, 192, 192); ">=</span> <span style="color: rgb(187, 187, 0); ">&#39;zh-CN&#39;</span>;<br /> <span style="color: rgb(255, 255, 0); font-weight: bold; ">var</span> <span style="color: rgb(192, 192, 192); ">GOOG_FIXURL_SITE</span> <span style="color: rgb(192, 192, 192); ">=</span> <span style="color: rgb(187, 187, 0); ">&#39;http://fvf.me/&#39;</span>;<span style="color: rgb(192, 192, 192); ">&lt;</span><span style="color: rgb(192, 192, 192); ">/script&gt;</span><br /> <span style="color: rgb(192, 192, 192); ">&lt;</span><span style="color: rgb(192, 192, 192); ">script</span> <span style="color: rgb(192, 192, 192); ">type</span><span style="color: rgb(192, 192, 192); ">=</span><span style="color: rgb(187, 187, 0); ">&quot;text/javascript&quot;</span> <span style="color: rgb(192, 192, 192); ">src</span><span style="color: rgb(192, 192, 192); ">=</span><span style="color: rgb(187, 187, 0); ">&quot;http://linkhelp.clients.google.com/tbproxy/lh/wm/fixurl.js&quot;</span><span style="color: rgb(192, 192, 192); ">&gt;&lt;</span><span style="color: rgb(192, 192, 192); ">/script&gt;</span></div>
<p>把其中的http://fvf.me 改一下就可以了。这样当用户访问到404页面的时候会出现Google的搜索条，进行网站的内部搜索！方便用户进行查找!&#160;&#160; </p>
]]></content:encoded>
			<wfw:commentRss>http://fvf.me/wordpress/theme/404-pages-inove-rewrite-of-the-theme.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

