<?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; WordPress交流</title>
	<atom:link href="http://www.muzifish.com/archives/category/wordpress-exchanges/feed" rel="self" type="application/rss+xml" />
	<link>http://www.muzifish.com</link>
	<description>评论经济互联网,记载生活点滴,共享资源的草根博客</description>
	<lastBuildDate>Fri, 06 Aug 2010 10:21:02 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>WordPress建博方案解析</title>
		<link>http://www.muzifish.com/archives/1581.html</link>
		<comments>http://www.muzifish.com/archives/1581.html#comments</comments>
		<pubDate>Sun, 25 Apr 2010 03:57:36 +0000</pubDate>
		<dc:creator>木子小鱼</dc:creator>
				<category><![CDATA[WordPress交流]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[博客]]></category>
		<category><![CDATA[方案]]></category>

		<guid isPermaLink="false">http://www.muzifish.com/archives/1581.html</guid>
		<description><![CDATA[&#160;&#160;&#160; 使用wordpress建立木子小鱼的博客已经有半年多了，期间虽有些许波折，但总体上还算顺利。结合这半年来的使用经验，也谈一谈关于使用WordPress建立独立博客的一些建议，供大家参考。
&#160;&#160;&#160; 使用WordPress建博大概需要以[......]<p class='read-more'><a href='http://www.muzifish.com/archives/1581.html'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<p>&#160;&#160;&#160; 使用wordpress建立木子小鱼的博客已经有半年多了，期间虽有些许波折，但总体上还算顺利。结合这半年来的使用经验，也谈一谈关于使用<a href="http://wordpress.org" target="_blank">WordPress</a>建立独立博客的一些建议，供大家参考。</p>
<p>&#160;&#160;&#160; 使用WordPress建博大概需要以下这些步骤：选择域名和主机提供商，选择主题，选择需要的插件。那么，本文将就以上四个方面来展开，来与大家分享一下我个人的经验。</p>
<p><a href="http://www.muzifish.com/uploads/WordPress_A818/wordpress_logo.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="wordpress_logo" border="0" alt="wordpress_logo" src="http://www.muzifish.com/uploads/WordPress_A818/wordpress_logo_thumb.png" width="470" height="320" /></a> </p>
<p>&#160;&#160;&#160; 1.域名的选择与注册。就我个人而言，我是比较支持.CN域名的，对它有着特别的感情，也始终认为它有较大的投资价值。但是自2009年12月国家有关互联网监管政策调整后，.CN域名的注册价格和使用成本较往时要高，域名自主权也相对降低，在此背景下，木子小鱼就不推荐大家在使用CN域名以及在国内注册域名，而是推荐大家使用COM、NET、ORG、INFO等国际通用域名了，域名注册商也建议大家选择国外较为著名的注册商，例如Godaddy、<a href="http://www.name.com" target="_blank">Name</a>等，特别是Godaddy自去年起已经支持支付宝支付了，但个人建议在name注册，虽然价格相对<a href="http://www.godaddy.com" target="_blank">Godaddy</a>要高一些，但其域名价格里包含了域名whois信息保护，而对于whois信息保护在绝大多数的域名注册商那里是另外收费的。其实，在国注册域名的特点相对于国内而就是注册价格相对要低许多，域名自主权较高，域名的转入转出较为简单和容易，也基本上不会出现域名被注册商停止解析的情况，基于以上情况，我比较建议在国外注册域名。</p>
<p>&#160;&#160;&#160; 2.主机的选择。在一些论坛上，常常有人讨论博客建站是选择国内主机还是选择国外主机，往往得出的结论都是比较倾向于国外主机，原因很简单，不用备案和价格便宜且空间大，各方面功能都比较多，但是我一直以来是比较推荐使用国内主机的。为什么呢？一般而言，非图片类博客100M的空间已经能满足需要了，如果单纯是为了建个博客而已的话，能够满足WordPress所需要的功能就可以了，基于此，国外的空间大且功能丰富就没有多大的优势了，剩下的也只有价格和访问速度的比较了。对于空间需求大的用户来讲国外空间的价格相对便宜，但对于普通的WordPress博客来讲，我觉得国外空间的成本要高一些，在国内，许多主机提供商例如中电数据中心等都专有提供BLOG主机，价格一般也都在几十块到一百多块钱一年，另外还有酋长等博客名主提供的口碑和服务都比较好的WordPress主机，这些主机的价格都相当便宜，对于普通的博客建站需求来讲，这些主机较国外主机便宜。选择主机的另外一个重要的考虑因素就是速度问题，一般而言国内主机肯定要比国外主机要快两到三倍的访问速度，对于那些成天在网上逛吼国内外主机速度不存在多大区别的言论，我想说，见鬼去吧，别以为老子没用过国外主机！对于博客的备案问题，一般情况下，不违反国内有关法律法规和政策的网站在备案上基本都不存在什么大问题，木子小鱼的博客（域名：muzifish.com）在去年12月中国互联网风风火火的时候提交备案，顺利通过，然后于今年二月份修改接入商信息备案修改也顺利通过。所以，在备案的问题上，只要你的博客是正规的基本上都不会存在问题。综上所述，对于普通的正规的博客来讲，我比较建议选择国内主机，主机的访问速度和相对价格优势是我推荐使用国内主机的主要考虑因素。</p>
<p>&#160;&#160;&#160; 3.博客插件的选择。对于插件WordPress的议论，我认为在在缓存优化、安全加强等某些功能上，有插件总比没有插件要好，但是插件的使用也不能盲目跟风，例如网上到处泛滥着诸如WordPress必需的N大插件等文章，我看了不少，认为其中的一些插件在普通的博客中不是十分必须的。插件的作用本来就在于加强安全、博客优化、丰富功能等，但如果过多的使用插件造成博客效率降低等负面功效的话就得不尝失了。所以对于插件的选择，我的建议是以效率为先，注重安全，然后才是丰富功能，美化功能等，在此特别提醒，在涉及数据库操作的插件上我提醒大家务必要慎重，因为木子小鱼的博客就曾因为使用某插件导致数据库某表损坏，后果是极其痛苦的。在插件等WordPress应用方面，我比较推荐大家多去看看<a href="http://fairyfish.net/" target="_blank">我爱水煮鱼</a>的博客，它在博客方面写的文章都比较好。</p>
<p>&#160;&#160;&#160; 4.博客主题。其实博客主题的选择我不想过多的介绍，因为各人的审美观不一样，看法自然也不一致，只要自己喜欢就好。但是，我在这里提出我自己的一些建议，主题应尽量简洁，色彩搭配要合理，让人看着舒服，此外切忌频繁变换主题。我想，这也是国内外一些著名博客比较通行的做法了。博客的主要在于博客的文章，而不在于主题。</p>
<h3  class="related_post_title">相关文章</h3><ol class="related_post"><li><a href="http://www.muzifish.com/archives/1530.html" title="WordPress博客搬迁及域名相关方案">WordPress博客搬迁及域名相关方案</a></li><li><a href="http://www.muzifish.com/archives/1497.html" title="独立博客的搜索引擎收录登录地址">独立博客的搜索引擎收录登录地址</a></li><li><a href="http://www.muzifish.com/archives/1528.html" title="每日一博的梦想">每日一博的梦想</a></li><li><a href="http://www.muzifish.com/archives/1523.html" title="在wordpress中获取文章图片及获得图片路径的方法">在wordpress中获取文章图片及获得图片路径的方法</a></li><li><a href="http://www.muzifish.com/archives/1472.html" title="关于名人博客的猜想">关于名人博客的猜想</a></li><li><a href="http://www.muzifish.com/archives/1463.html" title="整合Google自定义搜索到Wordpress">整合Google自定义搜索到Wordpress</a></li><li><a href="http://www.muzifish.com/archives/1342.html" title="Wordpress Blogger新手必备插件推荐">Wordpress Blogger新手必备插件推荐</a></li><li><a href="http://www.muzifish.com/archives/1339.html" title="关于Wordpress Google XML Sitemaps Plugin">关于Wordpress Google XML Sitemaps Plugin</a></li></ol><p><small>Copyright © 2009-2010 <a href="http://www.muzifish.com">MuziFish.COM</a> . |
原文地址：<a href="http://www.muzifish.com/archives/1581.html">http://www.muzifish.com/archives/1581.html</a>
<br/>
标签: <a href="http://www.muzifish.com/archives/tag/wordpress" rel="tag">wordpress</a>, <a href="http://www.muzifish.com/archives/tag/%e5%8d%9a%e5%ae%a2" rel="tag">博客</a>, <a href="http://www.muzifish.com/archives/tag/%e6%96%b9%e6%a1%88" rel="tag">方案</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.muzifish.com/archives/1581.html/feed</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>WordPress博客搬迁及域名相关方案</title>
		<link>http://www.muzifish.com/archives/1530.html</link>
		<comments>http://www.muzifish.com/archives/1530.html#comments</comments>
		<pubDate>Tue, 16 Mar 2010 15:00:35 +0000</pubDate>
		<dc:creator>木子小鱼</dc:creator>
				<category><![CDATA[WordPress交流]]></category>
		<category><![CDATA[学习笔记]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[多域名]]></category>
		<category><![CDATA[搬迁]]></category>
		<category><![CDATA[方案]]></category>

		<guid isPermaLink="false">http://www.muzifish.com/archives/1530.html</guid>
		<description><![CDATA[&#160;&#160;&#160; 最近在密谋博客的搬迁及添加域名事件,在Yahoo Small Business廉价($1.99,用PayPal支付的话约14.08RMB)注册了Muzifish.COM,联系好了空间(空间是网上的名博主友情赞助的)，一切都悄无声息的进行中…下面就逐步将相关问题实[......]<p class='read-more'><a href='http://www.muzifish.com/archives/1530.html'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<p>&#160;&#160;&#160; 最近在密谋博客的搬迁及添加域名事件,在<a href="http://smallbusiness.yahoo.com" target="_blank">Yahoo Small Business</a>廉价($1.99,用PayPal支付的话约14.08RMB)注册了<a href="http://www.muzifish.com" target="_blank">Muzifish.COM</a>,联系好了空间(空间是网上的名博主友情赞助的)，一切都悄无声息的进行中…下面就逐步将相关问题实现的方法晒出来,留个笔记,也希望能够帮助有需要的童鞋。至于为什么考虑博客搬迁及添加新域名，择日再议。</p>
<p>&#160;&#160;&#160; 1.WordPress绑定多个域名问题。因为WordPress是采用绝对路径访问的,所以在默认情况下WordPress会通过定义WP_HOME和WP_SITEURL这两个变量来固定博客的访问域名,固定访问域名有些人说是一种SEO行为,但个人对SEO没什么追求,喜欢博客能够通过多个域名来访问而不必都转发至固定的一个域名。那么怎么样才能实现WordPress绑定多域名呢?既然WordPress是通过定义变量来实现域名固定的,那么从这两个变量的定义入手就可以了,具体就是在WordPress的配置文件wp_config.php中给WP_HOME和WP_SITEURL这两个变量赋值就可以了,这里的WP_HOME是指博客的访问地址,而WP_SITEURL则是指博客的安装地址。具体代码如下:</p>
<div>
<pre>      $homeurl = 'http://'.$_SERVER['HTTP_HOST'];
      $siteurl = 'http://'.$_SERVER['HTTP_HOST'];
      define('WP_HOME',$homeurl);
      define('WP_SITEURL',$siteurl);</pre>
</div>
<p>&#160;&#160;&#160; 将上面的代码添加至wp-config.php这个文件中就可以实现多域名访问了。实质上如果纯粹上为了能够实现多域名访问而已的话只需要定义WP_HOME这个变量就可以了,因为WP_SITEURL指的是博客的安装地址,为了安全起见,木子小鱼不推荐用以上代码定义WP_SITEURL,而是通过在后台控制面板设置跟访问不一样的URL来增强博客后台的安全性。对于采用不同域名加上配置.htaccess文件以增强WordPress博客安全性的方法,小鱼正在Sun VirtualBox中反复测试,如果成功再发布,在此不议。</p>
<p>&#160;&#160;&#160; 2.WordPress独立博客变更域名的实施方案。前段时间，我的一名比较好的博友<a href="http://hcc.name" target="_blank">箫韶九成</a> 最终还是放弃.CN域名,投入了.NAME的怀抱,但其在变更域名之后并没有将原来的域名重定向(传说中的301永久重定向)到新域名,这样的结果有可能会损失一部分的访客,对SEO也是不好友的，前期的SEO工作会前功尽弃，一切都得从新开始，包括搜索引擎的收录。但是如果对原域名做了重定向的话是可以继承原域名的。如何实现更改域名后与原域名的无缝切换的呢?这主要是通过替换数据库中的相关域名值以及修改Linux主机中的.htaccess文件来实现的,对于替换数据库中的域名信息，最快捷的方法是备份数据库，用文字编辑软件打开数据库备份SQL文件，用新的域名替换旧域名，然后清空网络数据库，再导入修改后的数据库文件即可。在数据库中替换了域名后再打开空间根目录下的.htaccess文件,删除其中的全部内容,添加如下代码:</p>
<div>
<pre><span style="color: #0000ff">      &lt;</span><span style="color: #800000">IfModule</span> <span style="color: #ff0000">mod_rewrite</span>.<span style="color: #ff0000">c</span><span style="color: #0000ff">&gt;</span>
        Options +FollowSymLinks
        RewriteEngine on
        rewritecond %{http_host} ^www.muzifish.com [nc]   //旧域名
         rewriterule ^(.*)$ http://www.muzifish.com/$1 [L,R=301]  //新域名
<span style="color: #0000ff">      &lt;/</span><span style="color: #800000">IfModule</span><span style="color: #0000ff">&gt;</span></pre>
</div>
<p>&#160;&#160;&#160; 到此，博客域名变更的无缝切换就完成了，但上述方法的实现需要满足以下几个条件:</p>
<p>&#160;&#160;&#160; a.应当是Linux或者Unix类系统主机,因为Windows系统不支持修改.htaccess文件</p>
<p>&#160;&#160;&#160; b.网站的结构和固定链接保持不变.</p>
<p>&#160;&#160;&#160; c.更改域名后,两个域名需要继续运行一段时间,大概两三个月吧.</p>
<p>&#160;&#160;&#160; 3.WordPress迁移实施方案。此种情形多见于变更主机空间。之前两步，现在实现博客的空间转移就变得简单多了。对于不变更域名的迁移，只需要将当前网站的所有文件转移到新空间，将现网站数据库信息导入新的数据库，然后修改wp-config.php文件即可.如果既换空间又改域名的话就参照第2点去做就可以,现在想来,确实也有些简单。</p>
<p>&#160;&#160;&#160; 本来还是写如何建立WordPress站点或者备份站点的,但写到这里不想写了,有兴趣的童鞋可以加我QQ或发邮件和我交流。我的博客愿景是将它变成一个交流的博客,创新因交流而迸发!</p>
<h3  class="related_post_title">相关文章</h3><ol class="related_post"><li><a href="http://www.muzifish.com/archives/1581.html" title="WordPress建博方案解析">WordPress建博方案解析</a></li><li><a href="http://www.muzifish.com/archives/1523.html" title="在wordpress中获取文章图片及获得图片路径的方法">在wordpress中获取文章图片及获得图片路径的方法</a></li><li><a href="http://www.muzifish.com/archives/1497.html" title="独立博客的搜索引擎收录登录地址">独立博客的搜索引擎收录登录地址</a></li><li><a href="http://www.muzifish.com/archives/1463.html" title="整合Google自定义搜索到Wordpress">整合Google自定义搜索到Wordpress</a></li><li><a href="http://www.muzifish.com/archives/1342.html" title="Wordpress Blogger新手必备插件推荐">Wordpress Blogger新手必备插件推荐</a></li><li><a href="http://www.muzifish.com/archives/1339.html" title="关于Wordpress Google XML Sitemaps Plugin">关于Wordpress Google XML Sitemaps Plugin</a></li></ol><p><small>Copyright © 2009-2010 <a href="http://www.muzifish.com">MuziFish.COM</a> . |
原文地址：<a href="http://www.muzifish.com/archives/1530.html">http://www.muzifish.com/archives/1530.html</a>
<br/>
标签: <a href="http://www.muzifish.com/archives/tag/wordpress" rel="tag">wordpress</a>, <a href="http://www.muzifish.com/archives/tag/%e5%a4%9a%e5%9f%9f%e5%90%8d" rel="tag">多域名</a>, <a href="http://www.muzifish.com/archives/tag/%e6%90%ac%e8%bf%81" rel="tag">搬迁</a>, <a href="http://www.muzifish.com/archives/tag/%e6%96%b9%e6%a1%88" rel="tag">方案</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.muzifish.com/archives/1530.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>在wordpress中获取文章图片及获得图片路径的方法</title>
		<link>http://www.muzifish.com/archives/1523.html</link>
		<comments>http://www.muzifish.com/archives/1523.html#comments</comments>
		<pubDate>Sat, 13 Mar 2010 15:51:50 +0000</pubDate>
		<dc:creator>木子小鱼</dc:creator>
				<category><![CDATA[WordPress交流]]></category>
		<category><![CDATA[学习笔记]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[图片]]></category>
		<category><![CDATA[正则]]></category>
		<category><![CDATA[笔记]]></category>
		<category><![CDATA[路径]]></category>

		<guid isPermaLink="false">http://www.muzifish.com/archives/1523.html</guid>
		<description><![CDATA[&#160;&#160;&#160; 在wordpress中获取文章中图片的方法有很多,也可以通过安装插件的方式获取,在此这里我总结了网上的通行实现方法,列表一下在Wordpress主题模板中获取文章图片以及获得文章图片路径的方法,这对于制作wordpress主题时调用文章图片有一定的帮助。话不多说[......]<p class='read-more'><a href='http://www.muzifish.com/archives/1523.html'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<p>&#160;&#160;&#160; 在wordpress中获取文章中图片的方法有很多,也可以通过安装插件的方式获取,在此这里我总结了网上的通行实现方法,列表一下在Wordpress主题模板中获取文章图片以及获得文章图片路径的方法,这对于制作wordpress主题时调用文章图片有一定的帮助。话不多说，直晒代码：</p>
<div class="cnblogs_code">
<pre><img id="Code_Closed_Image_537411" onclick="this.style.display=&#39;none&#39;; document.getElementById(&#39;Code_Closed_Text_537411&#39;).style.display=&#39;none&#39;; document.getElementById(&#39;Code_Open_Image_537411&#39;).style.display=&#39;inline&#39;; document.getElementById(&#39;Code_Open_Text_537411&#39;).style.display=&#39;inline&#39;;" height="16" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif" width="11" align="top" /><img id="Code_Open_Image_537411" style="display: none" onclick="this.style.display=&#39;none&#39;; document.getElementById(&#39;Code_Open_Text_537411&#39;).style.display=&#39;none&#39;; getElementById(&#39;Code_Closed_Image_537411&#39;).style.display=&#39;inline&#39;; getElementById(&#39;Code_Closed_Text_537411&#39;).style.display=&#39;inline&#39;;" height="16" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif" width="11" align="top" /><span class="cnblogs_code_Collapse" id="Code_Closed_Text_537411">展开查看相关代码</span><span id="Code_Open_Text_537411" style="display: none"><span style="color: #0000ff">&lt;?</span>php
<span style="color: #008000">//从文章中搜索图片并获取图片</span>
$SoImages  = '<span style="color: #8b0000">~&lt;img [^\&gt;]*\ /&gt;~</span>';
<a style="color: #ffa500" href="http://www.php.net/preg_match_all">preg_match_all</a>($SoImages,$post-&gt;post_content,$Images);
$PictureAmount=<a style="color: #ffa500" href="http://www.php.net/count">count</a>($Images[0]);　<span style="color: #008000">//获取图片数量</span>

<span style="color: #008000">//处理所有的图片</span>
<a style="color: #0000ff" href="http://www.php.net/for">for</a>($i=0;$i&lt;$PictureAmount;$i++){
	<a style="color: #0000ff" href="http://www.php.net/echo">echo</a> $Images[0][$i]  <span style="color: #008000">//处理图片,语句可以自定义,第一张图片为$Images[0][0];</span>
	}

<span style="color: #008000">//通过使用switch控制语句处理第一张图片,也可以使用if...else...elseif语句来实现,具体逻辑请自定义</span>
<a style="color: #0000ff" href="http://www.php.net/switch">switch</a>($PictureAmount&gt;0){
	<a style="color: #0000ff" href="http://www.php.net/case">case</a> 1:
	  <a style="color: #0000ff" href="http://www.php.net/echo">echo</a> $Images[0][0];　<span style="color: #008000">//输出第一张图片</span>
	  <a style="color: #0000ff" href="http://www.php.net/break">break</a>;
	<a style="color: #0000ff" href="http://www.php.net/default">default</a>:
	  $ImagesUrl=bloginfo('<span style="color: #8b0000">stylesheet_directory</span>').&quot;<span style="color: #8b0000">/images/1.jpg</span>&quot;;　<span style="color: #008000">//当文章无图片时默认输出的图片</span>
	}

<span style="color: #008000">/*获得文章中的图片链接路径的代码
*首先使用上面第一段的语句从文章搜索并获取图片
*然后通过运行正则表达式来分析图片代码,然后得到匹配的字符
*以下只列出其中的一种正则表达式代码,有兴趣的童鞋可以自己编写
*/</span>

<span style="color: #008000">//获取一张图片,例如获取第一张图片$Images[0][0],其代码样例为:&lt;img alt=&quot;Google&quot; title=&quot;Google&quot; id=&quot;logo&quot; src=&quot;/intl/zh-CN/images/logo_cn.gif&quot; width=&quot;276&quot; height=&quot;110&quot; border=&quot;0&quot;  /&gt;</span>
$ImgUrl = $Images[0][0];
$SoImgAddress=&quot;<span style="color: #8b0000">/\&lt;img.*?src\=\&quot;(.*?)\&quot;[^&gt;]*&gt;/i</span>&quot;;  <span style="color: #008000">//正则表达式语句</span>
<a style="color: #ffa500" href="http://www.php.net/preg_match">preg_match</a>($SoImgAddress,$ImgUrl,$imagesurl);　　<span style="color: #008000">//分析</span>
<a style="color: #0000ff" href="http://www.php.net/echo">echo</a> $imagesurl[1];　<span style="color: #008000">//得到并处理路径:/intl/zh-CN/images/logo_cn.gif</span>
<span style="color: #0000ff">?&gt;</span></span></pre>
</div>
<h3  class="related_post_title">相关文章</h3><ol class="related_post"><li><a href="http://www.muzifish.com/archives/1463.html" title="整合Google自定义搜索到Wordpress">整合Google自定义搜索到Wordpress</a></li><li><a href="http://www.muzifish.com/archives/1342.html" title="Wordpress Blogger新手必备插件推荐">Wordpress Blogger新手必备插件推荐</a></li><li><a href="http://www.muzifish.com/archives/1339.html" title="关于Wordpress Google XML Sitemaps Plugin">关于Wordpress Google XML Sitemaps Plugin</a></li><li><a href="http://www.muzifish.com/archives/1581.html" title="WordPress建博方案解析">WordPress建博方案解析</a></li><li><a href="http://www.muzifish.com/archives/1561.html" title="Windows下让Nginx+PHP以系统服务方式启动">Windows下让Nginx+PHP以系统服务方式启动</a></li><li><a href="http://www.muzifish.com/archives/1530.html" title="WordPress博客搬迁及域名相关方案">WordPress博客搬迁及域名相关方案</a></li><li><a href="http://www.muzifish.com/archives/1506.html" title="windows平台下nginx+php的安装配置">windows平台下nginx+php的安装配置</a></li><li><a href="http://www.muzifish.com/archives/1497.html" title="独立博客的搜索引擎收录登录地址">独立博客的搜索引擎收录登录地址</a></li><li><a href="http://www.muzifish.com/archives/1340.html" title="在Windows 7中修改系统hosts文件的方法">在Windows 7中修改系统hosts文件的方法</a></li></ol><p><small>Copyright © 2009-2010 <a href="http://www.muzifish.com">MuziFish.COM</a> . |
原文地址：<a href="http://www.muzifish.com/archives/1523.html">http://www.muzifish.com/archives/1523.html</a>
<br/>
标签: <a href="http://www.muzifish.com/archives/tag/wordpress" rel="tag">wordpress</a>, <a href="http://www.muzifish.com/archives/tag/%e5%9b%be%e7%89%87" rel="tag">图片</a>, <a href="http://www.muzifish.com/archives/tag/%e6%ad%a3%e5%88%99" rel="tag">正则</a>, <a href="http://www.muzifish.com/archives/tag/%e7%ac%94%e8%ae%b0" rel="tag">笔记</a>, <a href="http://www.muzifish.com/archives/tag/%e8%b7%af%e5%be%84" rel="tag">路径</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.muzifish.com/archives/1523.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>整合Google自定义搜索到Wordpress</title>
		<link>http://www.muzifish.com/archives/1463.html</link>
		<comments>http://www.muzifish.com/archives/1463.html#comments</comments>
		<pubDate>Thu, 11 Feb 2010 22:28:34 +0000</pubDate>
		<dc:creator>木子小鱼</dc:creator>
				<category><![CDATA[WordPress交流]]></category>
		<category><![CDATA[学习笔记]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[笔记]]></category>

		<guid isPermaLink="false">http://www.muzifish.com/archives/1463.html</guid>
		<description><![CDATA[其实，网络上关于如何整合Google Custom Search到Wordpress的教程满天飞，之所以还是要发布，是权当作一个笔记，方便自己日后换主题的时候不用再在GOOGLE上搜索一遍而已，请大家不要鄙视我的这种行为哈，谢谢谅解。
以谷歌的自定义搜索取代Wordpress自带的站内搜索功能的主要[......]<p class='read-more'><a href='http://www.muzifish.com/archives/1463.html'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<p>其实，网络上关于如何整合Google Custom Search到Wordpress的教程满天飞，之所以还是要发布，是权当作一个笔记，方便自己日后换主题的时候不用再在GOOGLE上搜索一遍而已，请大家不要鄙视我的这种行为哈，谢谢谅解。</p>
<p>以谷歌的自定义搜索取代Wordpress自带的站内搜索功能的主要好处概括如下：</p>
<p>1.减少数据库的查询，减轻服务负载。</p>
<p>2.加速搜索结果显示的速度。（google的搜索服务器提供的搜索结果能不快吗？）</p>
<p>3.能够提供全面的搜索，wordpress自带的搜索一般只搜索文章，而Google会搜索wordpress的目录和标签等。</p>
<p>具体的步骤如下：</p>
<p>1.添加一个页面，并且在导航中将这个页面设置为不显示。如何将其设置为不显示呢?只要在wp_list_pages()函数中用exclude将这个页面的post id剔除就可以了。</p>
<p>2. 登录到<a href="http://www.google.com/coop/cse/"> Google 自定义搜索</a>，创建你的自定义搜索。</p>
<p>3. 在输入你的基本信息和网站之后，点击“控制面板”来到代码 tab 页面。</p>
<p>4. 搜索结果托管选项选项：选择“在您的网站上托管搜索结果”，然后选择 iframe</p>
<p>5. 指定搜索结果详情：输入你第一步创建页面的页面的地址。如我的：<a title="http://www.muzifish.com/search" href="http://www.muzifish.com/search">http://www.muzifish.com/search</a></p>
<p>6. 然后用搜索框代码替换你原来的 WordPress 搜索框代码。你需要根据你自己的 WordPress 搜索框的样式对这段代码做下修改，以适合你的主题。</p>
<p>7. 编辑你第一步创建的页面，把搜索结果代码复制到该页面。你也需要对该段代码做些调整。主要是修改下 googleSearchFrameWidth = 600，把 600 修改成适合你主体的宽度。</p>
<p>8. 然后到达外观 tab 页面，在该页定义搜索框样式和搜索结果配色方案。</p>
<p>9. 如果你要整合 Google Adsense 到这个结果中来，还可以使用到赚钱这个 tab 页面，绑定你 Google Adsense 账号。</p>
<p>此方法源自我爱水煮鱼：<a title="http://fairyfish.net/2008/04/29/integrate-google-custom-search-into-wordpress/" href="http://fairyfish.net/2008/04/29/integrate-google-custom-search-into-wordpress/">http://fairyfish.net/2008/04/29/integrate-google-custom-search-into-wordpress/</a></p>
<h3  class="related_post_title">相关文章</h3><ol class="related_post"><li><a href="http://www.muzifish.com/archives/1339.html" title="关于Wordpress Google XML Sitemaps Plugin">关于Wordpress Google XML Sitemaps Plugin</a></li><li><a href="http://www.muzifish.com/archives/1523.html" title="在wordpress中获取文章图片及获得图片路径的方法">在wordpress中获取文章图片及获得图片路径的方法</a></li><li><a href="http://www.muzifish.com/archives/1497.html" title="独立博客的搜索引擎收录登录地址">独立博客的搜索引擎收录登录地址</a></li><li><a href="http://www.muzifish.com/archives/1342.html" title="Wordpress Blogger新手必备插件推荐">Wordpress Blogger新手必备插件推荐</a></li><li><a href="http://www.muzifish.com/archives/1581.html" title="WordPress建博方案解析">WordPress建博方案解析</a></li><li><a href="http://www.muzifish.com/archives/1561.html" title="Windows下让Nginx+PHP以系统服务方式启动">Windows下让Nginx+PHP以系统服务方式启动</a></li><li><a href="http://www.muzifish.com/archives/1530.html" title="WordPress博客搬迁及域名相关方案">WordPress博客搬迁及域名相关方案</a></li><li><a href="http://www.muzifish.com/archives/1506.html" title="windows平台下nginx+php的安装配置">windows平台下nginx+php的安装配置</a></li><li><a href="http://www.muzifish.com/archives/1498.html" title="搜索引擎网站收录提交地址">搜索引擎网站收录提交地址</a></li><li><a href="http://www.muzifish.com/archives/1474.html" title="AOL中国站疑似被挂马">AOL中国站疑似被挂马</a></li></ol><p><small>Copyright © 2009-2010 <a href="http://www.muzifish.com">MuziFish.COM</a> . |
原文地址：<a href="http://www.muzifish.com/archives/1463.html">http://www.muzifish.com/archives/1463.html</a>
<br/>
标签: <a href="http://www.muzifish.com/archives/tag/google" rel="tag">google</a>, <a href="http://www.muzifish.com/archives/tag/wordpress" rel="tag">wordpress</a>, <a href="http://www.muzifish.com/archives/tag/%e7%ac%94%e8%ae%b0" rel="tag">笔记</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.muzifish.com/archives/1463.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wordpress Blogger新手必备插件推荐</title>
		<link>http://www.muzifish.com/archives/1342.html</link>
		<comments>http://www.muzifish.com/archives/1342.html#comments</comments>
		<pubDate>Thu, 04 Feb 2010 18:46:45 +0000</pubDate>
		<dc:creator>木子小鱼</dc:creator>
				<category><![CDATA[WordPress交流]]></category>
		<category><![CDATA[学习笔记]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[插件]]></category>
		<category><![CDATA[笔记]]></category>

		<guid isPermaLink="false">http://www.muzifish.com/1342.html</guid>
		<description><![CDATA[&#160;&#160;&#160; 作为一个100%的Wordpress Blogger新手，在博客插件的选择上，面对互联网上林林总总，成千上万的wordpress插件以及各个知名博客的必备插件推荐，仍然显得无所适从，于是结合这一个多月以来的使用必得，效仿望月的博客，向像我一样的Wordpress[......]<p class='read-more'><a href='http://www.muzifish.com/archives/1342.html'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<p>&#160;&#160;&#160; 作为一个100%的Wordpress Blogger新手，在博客插件的选择上，面对互联网上林林总总，成千上万的wordpress插件以及各个知名博客的必备插件推荐，仍然显得无所适从，于是结合这一个多月以来的使用必得，效仿望月的博客，向像我一样的Wordpress Blogger新手列示一些在博客中应当安装的插件，供大家参与选择。</p>
<p>&#160;&#160;&#160; 1.<a href="http://akismet.com/">Akismet</a>.功能相当强大的拦截垃圾留言、评论的插件，博客默认安装了此插件，但其启用需要在Wordpress.COM上注册一个API Key。在垃圾留言、评论盛行的现代互联网，类似于<a href="http://akismet.com/">Akismet</a>这样的垃圾拦截工具实在是必不可少。</p>
<p>&#160;&#160;&#160; 2.<a href="http://semperfiwebdesign.com/">All In One SEO Pack</a>.虽然有不少人抱怨这个插件的配置过于复杂，但优良的配置方能显现出其卓越的性能，其方便的标题、关键词、Tags、摘要设置，卓越的性能使其不失为优秀的SEO插件。如果您想对您的博客进行较为友好的SEO配置，那All in One SEO Pack将是您的不二选择。值得注意的是，据望月的博客的提醒，使用此插件时，摘要最好控制在50个字左右，将你最想表达的关键词写上，但也不能堆砌关键词，不能和文章内容差别太大。</p>
<p>&#160;&#160;&#160; 3.<a href="http://www.arnebrachhold.de/redir/sitemap-home/">Google XML Sitemaps</a>.相当优秀的网站地图生成插件，其生成的网站地图XML文件以及向搜索引擎的网站地图XML文件提交功能能够帮助像谷歌这样的搜索引擎更快更友好地收录您的博客。对于新博客而言，向搜索引擎提交标准化的网站地图XML文件尤其重要。</p>
<p>&#160;&#160;&#160; 4.<a href="http://wordpress.org/extend/plugins/no-self-ping/">NO Self Pings</a>.消除Wordpress内部相互PingPack提示的插件，提高文章发布速度。</p>
<p>&#160;&#160;&#160; 5.<a href="http://www.elektroelch.de/hacks/wp/pagebar">Pagebar2</a>.Wordpress默认分页只有上一页和下一页，为了使您的博客拥有更加友好美观的文章分页功能，您就需要安装类似于Pagebar这样的分页功能插件。这个插件能够使您在后台自行订制自己的分页样式，使其更加友好美观。</p>
<p>&#160;&#160;&#160; 6.<a href="http://www.ilfilosofo.com/blog/wp-db-backup">WordPress Database Backup</a>.网站备份在当今互联网中仍是永恒不变的话题，Wordpress Database Backup能够定期自动备份您的博客数据库，以备不时之需。</p>
<p>&#160;&#160;&#160; 7.<a href="http://myfairland.net/wp-utf8-excerpt/">wp-utf8-excerpt</a>.此插件为使用多字节语言（如中文）的Wordpress用户提供更好的摘要算法，以解决Wordpress默认摘要算法只考虑西方语言的不足。此外，此插件产生的摘要可保留原文中的格式。中文博客的摘要显示插件，我觉得这个是做得最好的。因为它是国人根据国内的互联网环境和中国网民的上网习惯开发的，正所谓最优秀的未必就是最好的，只是最合适才是最好的。</p>
<p>&#160;&#160;&#160; 都是我觉得在博客中应当安装的一些插件，此外在博客初始化时还应当安装<a href="http://wordpress.org/extend/plugins/admin-renamer-extended/">Admin renamer extended</a>这类插件来修改博客默认的Admin登录名以提高博客的安全性，如果您想使您的博客能够在手机上浏览的话您还可以类似于<a href="http://mobilepress.co.za/">MobilePress</a>这样的手机模块插件，总而言之，wordpress的插件成千上万，功能各异，按需所取即可。</p>
<h3  class="related_post_title">相关文章</h3><ol class="related_post"><li><a href="http://www.muzifish.com/archives/1339.html" title="关于Wordpress Google XML Sitemaps Plugin">关于Wordpress Google XML Sitemaps Plugin</a></li><li><a href="http://www.muzifish.com/archives/1523.html" title="在wordpress中获取文章图片及获得图片路径的方法">在wordpress中获取文章图片及获得图片路径的方法</a></li><li><a href="http://www.muzifish.com/archives/1463.html" title="整合Google自定义搜索到Wordpress">整合Google自定义搜索到Wordpress</a></li><li><a href="http://www.muzifish.com/archives/1581.html" title="WordPress建博方案解析">WordPress建博方案解析</a></li><li><a href="http://www.muzifish.com/archives/1561.html" title="Windows下让Nginx+PHP以系统服务方式启动">Windows下让Nginx+PHP以系统服务方式启动</a></li><li><a href="http://www.muzifish.com/archives/1530.html" title="WordPress博客搬迁及域名相关方案">WordPress博客搬迁及域名相关方案</a></li><li><a href="http://www.muzifish.com/archives/1506.html" title="windows平台下nginx+php的安装配置">windows平台下nginx+php的安装配置</a></li><li><a href="http://www.muzifish.com/archives/1497.html" title="独立博客的搜索引擎收录登录地址">独立博客的搜索引擎收录登录地址</a></li><li><a href="http://www.muzifish.com/archives/1340.html" title="在Windows 7中修改系统hosts文件的方法">在Windows 7中修改系统hosts文件的方法</a></li></ol><p><small>Copyright © 2009-2010 <a href="http://www.muzifish.com">MuziFish.COM</a> . |
原文地址：<a href="http://www.muzifish.com/archives/1342.html">http://www.muzifish.com/archives/1342.html</a>
<br/>
标签: <a href="http://www.muzifish.com/archives/tag/wordpress" rel="tag">wordpress</a>, <a href="http://www.muzifish.com/archives/tag/%e6%8f%92%e4%bb%b6" rel="tag">插件</a>, <a href="http://www.muzifish.com/archives/tag/%e7%ac%94%e8%ae%b0" rel="tag">笔记</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.muzifish.com/archives/1342.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>关于Wordpress Google XML Sitemaps Plugin</title>
		<link>http://www.muzifish.com/archives/1339.html</link>
		<comments>http://www.muzifish.com/archives/1339.html#comments</comments>
		<pubDate>Thu, 04 Feb 2010 17:27:19 +0000</pubDate>
		<dc:creator>木子小鱼</dc:creator>
				<category><![CDATA[WordPress交流]]></category>
		<category><![CDATA[学习笔记]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[插件]]></category>
		<category><![CDATA[笔记]]></category>

		<guid isPermaLink="false">http://www.muzifish.com/1339.html</guid>
		<description><![CDATA[&#160;&#160;&#160; 由Arne Brachhold开发的Wordpress Google XML Sitemaps Plugin一直是Wordpress Blogger的最爱，其在wordpress.org官方网站的下载量达到3126353次之多，被誉为Wordpress Blog[......]<p class='read-more'><a href='http://www.muzifish.com/archives/1339.html'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<p>&#160;&#160;&#160; 由<a href="http://www.arnebrachhold.de/">Arne Brachhold</a>开发的<a href="http://www.arnebrachhold.de/redir/sitemap-home/">Wordpress Google XML Sitemaps Plugin</a>一直是<a href="http://wordpress.org">Wordpress</a> Blogger的最爱，其在wordpress.org官方网站的下载量达到3126353次之多，被誉为Wordpress Blogger必备的完美插件之一，本站使用的网站地图XML文件就是由该插件生成的。</p>
<p>&#160;&#160;&#160; 但被誉为完美插件的本身其实并非那么完美，至少我在使用的过程中在某些细节处理上发现了其存在着一点点瑕疵，那就是该插件在互联网不同语言环境的识别适应问题。具体而言就是这个插件在生成网站地图XML文件后向微软的搜索引擎Bing提交网站地图XML文件时在wordpress控制面板上报错，无法正常提交的问题。其实，就程序本身而言并没有什么bug，只是在程序的逻辑设计上还欠缺一些。如果插件在设计上于控制后台列示可提交网站地图文件的搜索引擎选项以及Ping的地址，能够让用户自己选择向哪些搜索引擎提交网站地图XML文件以及修改ping的地址，那么这个Bug就可以在一定程度上得到避免，毕竟各大搜索引擎在全球各个地区的网站地图文件提交的PING地址并不都是一致的。</p>
<p>&#160;&#160;&#160; 有鉴于此，为了使插件在生成地图文件后能够正常向Bing提交ping，我对插件做了微小的改动，就是修正向BING提交ping的地址，具体就是将插件的sitemap-core.php文件中的第2220行（行数不固定）的“http://www.bing.com/webmaster/ping.aspx?siteMap=”修改为&quot;http://cn.bing.com/webmaster/ping.aspx?siteMap=&quot;即可。</p>
<h3  class="related_post_title">相关文章</h3><ol class="related_post"><li><a href="http://www.muzifish.com/archives/1463.html" title="整合Google自定义搜索到Wordpress">整合Google自定义搜索到Wordpress</a></li><li><a href="http://www.muzifish.com/archives/1342.html" title="Wordpress Blogger新手必备插件推荐">Wordpress Blogger新手必备插件推荐</a></li><li><a href="http://www.muzifish.com/archives/1523.html" title="在wordpress中获取文章图片及获得图片路径的方法">在wordpress中获取文章图片及获得图片路径的方法</a></li><li><a href="http://www.muzifish.com/archives/1497.html" title="独立博客的搜索引擎收录登录地址">独立博客的搜索引擎收录登录地址</a></li><li><a href="http://www.muzifish.com/archives/1581.html" title="WordPress建博方案解析">WordPress建博方案解析</a></li><li><a href="http://www.muzifish.com/archives/1561.html" title="Windows下让Nginx+PHP以系统服务方式启动">Windows下让Nginx+PHP以系统服务方式启动</a></li><li><a href="http://www.muzifish.com/archives/1530.html" title="WordPress博客搬迁及域名相关方案">WordPress博客搬迁及域名相关方案</a></li><li><a href="http://www.muzifish.com/archives/1506.html" title="windows平台下nginx+php的安装配置">windows平台下nginx+php的安装配置</a></li><li><a href="http://www.muzifish.com/archives/1498.html" title="搜索引擎网站收录提交地址">搜索引擎网站收录提交地址</a></li><li><a href="http://www.muzifish.com/archives/1474.html" title="AOL中国站疑似被挂马">AOL中国站疑似被挂马</a></li></ol><p><small>Copyright © 2009-2010 <a href="http://www.muzifish.com">MuziFish.COM</a> . |
原文地址：<a href="http://www.muzifish.com/archives/1339.html">http://www.muzifish.com/archives/1339.html</a>
<br/>
标签: <a href="http://www.muzifish.com/archives/tag/google" rel="tag">google</a>, <a href="http://www.muzifish.com/archives/tag/wordpress" rel="tag">wordpress</a>, <a href="http://www.muzifish.com/archives/tag/%e6%8f%92%e4%bb%b6" rel="tag">插件</a>, <a href="http://www.muzifish.com/archives/tag/%e7%ac%94%e8%ae%b0" rel="tag">笔记</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.muzifish.com/archives/1339.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
