<?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; 建站相关</title>
	<atom:link href="http://chenzhiwei.net/category/website/feed/" rel="self" type="application/rss+xml" />
	<link>http://chenzhiwei.net</link>
	<description>善始者实繁，克终者盖寡。</description>
	<lastBuildDate>Tue, 03 Jan 2012 09:14:12 +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>博客最近的更新</title>
		<link>http://chenzhiwei.net/2011/01/recently-blog-update/</link>
		<comments>http://chenzhiwei.net/2011/01/recently-blog-update/#comments</comments>
		<pubDate>Fri, 21 Jan 2011 09:25:10 +0000</pubDate>
		<dc:creator>zhiwei</dc:creator>
				<category><![CDATA[个人日志]]></category>
		<category><![CDATA[建站相关]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[博客]]></category>
		<category><![CDATA[邮件列表]]></category>

		<guid isPermaLink="false">http://chenzhiwei.net/?p=30418</guid>
		<description><![CDATA[快到年底了，公司里开始忙了，所以我最近这两个周没时间更新博客。以前在学校时一直想着早点工作，现在工作后才发现，其实工作和上学只是彼此彼此的关系。 前段时间工作比较轻松，我就用织梦系统建了个网站，在此期间我又学习了一些关于SEO的知识，索性也给自己博客加上了google sitemap。关于google sitemap功能，我用的是simple google sitemap for wordpress插件，因为自己的博客文件是放在域名子目录下的，所以我就修改了该插件的部分代码，使其适合我的博客使用。 有兴趣的同学可以围观一下我的google sitemap。 另外，我博客也加上了QQ邮件列表功能，将那个google feedburner订阅的地方修改了一下，现在直接输入电子邮箱就可以订阅我博客的更新了，更适合在大陆的同学使用。如果你对我博客内容感兴趣，不妨用邮件订阅一下，当然你也可以通过以下地址来进行邮件订阅：http://list.qq.com/cgi-bin/qf_invite?id=f00d2298c8fb35c385bd928b9afbe33092560d9e749460ab 还有就是我博客已经关闭了wordpress中该死的Post Revisions和Autosave功能，因为即便是关闭Post Revisions功能Autosave功能还会产生一篇Post Revision，索性就直接将Autosave也一并关闭。。。关于Post Revisions功能的的相关介绍具体信息可以看wordpress官方文档。 这次就写这么多，忙。。。 &#169; 2011, chenzhiwei.net. 版权所有. 本文永久链接：http://chenzhiwei.net/2011/01/recently-blog-update/相关日志wordpress主题常用的代码博客又一次搬家写博客获80童年大礼包随写提前祝博客访客及博友们新年快乐]]></description>
			<content:encoded><![CDATA[<p>快到年底了，公司里开始忙了，所以我最近这两个周没时间更新博客。以前在学校时一直想着早点工作，现在工作后才发现，其实工作和上学只是彼此彼此的关系。<span id="more-30418"></span></p>
<p>前段时间工作比较轻松，我就用<a href="http://www.dedecms.com" target="_blank">织梦系统</a>建了个网站，在此期间我又学习了一些关于SEO的知识，索性也给自己博客加上了<a href="http://chenzhiwei.net/sitemap.xml" target="_blank">google sitemap</a>。关于google sitemap功能，我用的是<a href="http://wordpress.org/extend/plugins/simple-google-sitemap/" target="_blank">simple google sitemap for wordpress</a>插件，因为自己的博客文件是放在域名子目录下的，所以我就修改了该插件的部分代码，使其适合我的博客使用。 有兴趣的同学可以围观一下我的<a href="http://chenzhiwei.net/sitemap.xml">google sitemap</a>。</p>
<p>另外，我博客也加上了<a href="http://list.qq.com" target="_blank">QQ邮件列表</a>功能，将那个google feedburner订阅的地方修改了一下，现在直接输入电子邮箱就可以订阅我博客的更新了，更适合在大陆的同学使用。如果你对我博客内容感兴趣，不妨用邮件订阅一下，当然你也可以通过以下地址来进行邮件订阅：<a href="http://list.qq.com/cgi-bin/qf_invite?id=f00d2298c8fb35c385bd928b9afbe33092560d9e749460ab" target="_blank">http://list.qq.com/cgi-bin/qf_invite?id=f00d2298c8fb35c385bd928b9afbe33092560d9e749460ab</a></p>
<p>还有就是我博客已经关闭了wordpress中该死的Post Revisions和Autosave功能，因为即便是关闭Post Revisions功能Autosave功能还会产生一篇Post Revision，索性就直接将Autosave也一并关闭。。。关于Post Revisions功能的的相关介绍具体信息可以看<a href="http://codex.wordpress.org/Revision_Management" target="_blank">wordpress官方文档</a>。</p>
<p>这次就写这么多，忙。。。</p>
<p style="font-weight: bold;">&copy; 2011, <a href="http://chenzhiwei.net">chenzhiwei.net</a>. 版权所有.  <br />本文永久链接：<a title="博客最近的更新" href="http://chenzhiwei.net/2011/01/recently-blog-update/">http://chenzhiwei.net/2011/01/recently-blog-update/</a></p><hr /><div  class="related_post_title">相关日志</div><ul class="related_post"><li><a href="http://chenzhiwei.net/2010/07/wordpress-useful-code/" title="wordpress主题常用的代码">wordpress主题常用的代码</a></li><li><a href="http://chenzhiwei.net/2009/11/move-blog-again/" title="博客又一次搬家">博客又一次搬家</a></li><li><a href="http://chenzhiwei.net/2011/12/blog-hongluotuo-act/" title="写博客获80童年大礼包">写博客获80童年大礼包</a></li><li><a href="http://chenzhiwei.net/2011/10/write-write/" title="随写">随写</a></li><li><a href="http://chenzhiwei.net/2011/01/happy-spring-festival-2011/" title="提前祝博客访客及博友们新年快乐">提前祝博客访客及博友们新年快乐</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://chenzhiwei.net/2011/01/recently-blog-update/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>不用插件实现wordpress分页导航的方法</title>
		<link>http://chenzhiwei.net/2010/12/display-pagination-without-plugin/</link>
		<comments>http://chenzhiwei.net/2010/12/display-pagination-without-plugin/#comments</comments>
		<pubDate>Fri, 10 Dec 2010 01:42:24 +0000</pubDate>
		<dc:creator>zhiwei</dc:creator>
				<category><![CDATA[建站相关]]></category>
		<category><![CDATA[pagination]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://chenzhiwei.net/?p=30402</guid>
		<description><![CDATA[一直想把自己博客主题里的代码拿出晒晒，今天就晒一下博客分页导航的代码。很多同学应该都听说过wp-pagenavi吧，这是一个很优秀的wordpress分页导航插件，我使用了很长时间。就在前段时间，我下载了一个国外wordpress主题（已经忘记是哪个了），看到里主题里面的分页导航代码，于是就拿来用了。 不多说了，直接上代码： 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 [...]]]></description>
			<content:encoded><![CDATA[<p>一直想把自己博客主题里的代码拿出晒晒，今天就晒一下博客分页导航的代码。很多同学应该都听说过wp-pagenavi吧，这是一个很优秀的wordpress分页导航插件，我使用了很长时间。就在前段时间，我下载了一个国外wordpress主题（已经忘记是哪个了），看到里主题里面的分页导航代码，于是就拿来用了。<span id="more-30402"></span></p>
<p>不多说了，直接上代码：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #009933; font-style: italic;">/**
 * PAGINATION
 * Retrieve or display pagination code.
 *
 * The defaults for overwriting are:
 * 'page' - Default is null (int). The current page. This function will
 *      automatically determine the value.
 * 'pages' - Default is null (int). The total number of pages. This function will
 *      automatically determine the value.
 * 'range' - Default is 3 (int). The number of page links to show before and after
 *      the current page.
 * 'gap' - Default is 3 (int). The minimum number of pages before a gap is 
 *      replaced with ellipses (...).
 * 'anchor' - Default is 1 (int). The number of links to always show at begining
 *      and end of pagination
 * 'before' - Default is '&lt;div class=&quot;emm-paginate&quot;&gt;' (string). The html or text 
 *      to add before the pagination links.
 * 'after' - Default is '&lt;/div&gt;' (string). The html or text to add after the
 *      pagination links.
 * 'title' - Default is '__('Pages:')' (string). The text to display before the
 *      pagination links.
 * 'next_page' - Default is '__('&amp;raquo;')' (string). The text to use for the 
 *      next page link.
 * 'previous_page' - Default is '__('&amp;laquo')' (string). The text to use for the 
 *      previous page link.
 * 'echo' - Default is 1 (int). To return the code instead of echo'ing, set this
 *      to 0 (zero).
 *
 * @author Eric Martin &lt;eric@ericmmartin.com&gt;
 * @copyright Copyright (c) 2009, Eric Martin
 * @version 1.0
 *
 * @param array|string $args Optional. Override default arguments.
 * @return string HTML content, if not displaying.
 */</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> emm_paginate<span style="color: #009900;">&#40;</span><span style="color: #000088;">$args</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$defaults</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
		<span style="color: #0000ff;">'page'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'pages'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #339933;">,</span> 
		<span style="color: #0000ff;">'range'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">3</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'gap'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">3</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'anchor'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'before'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;div class=&quot;emm-paginate&quot;&gt;'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'after'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;/div&gt;'</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'title'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'&lt;b&gt;页码&lt;/b&gt;:'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'nextpage'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">' &amp;raquo;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'previouspage'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'&amp;laquo; '</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'echo'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">1</span>
	<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$r</span> <span style="color: #339933;">=</span> wp_parse_args<span style="color: #009900;">&#40;</span><span style="color: #000088;">$args</span><span style="color: #339933;">,</span> <span style="color: #000088;">$defaults</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">extract</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$r</span><span style="color: #339933;">,</span> EXTR_SKIP<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$page</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #339933;">!</span><span style="color: #000088;">$pages</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$wp_query</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$page</span> <span style="color: #339933;">=</span> get_query_var<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'paged'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$page</span> <span style="color: #339933;">=</span> <span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$page</span><span style="color: #009900;">&#41;</span> ? <span style="color: #990000;">intval</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$page</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$posts_per_page</span> <span style="color: #339933;">=</span> <span style="color: #990000;">intval</span><span style="color: #009900;">&#40;</span>get_query_var<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'posts_per_page'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$pages</span> <span style="color: #339933;">=</span> <span style="color: #990000;">intval</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">ceil</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$wp_query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">found_posts</span> <span style="color: #339933;">/</span> <span style="color: #000088;">$posts_per_page</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000088;">$output</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$pages</span> <span style="color: #339933;">&gt;</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>	
		<span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$before</span>&lt;span class='emm-title'&gt;<span style="color: #006699; font-weight: bold;">$title</span>&lt;/span&gt;&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$ellipsis</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&lt;span class='emm-gap'&gt;...&lt;/span&gt;&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$page</span> <span style="color: #339933;">&gt;</span> <span style="color: #cc66cc;">1</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$previouspage</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;a href='&quot;</span> <span style="color: #339933;">.</span> get_pagenum_link<span style="color: #009900;">&#40;</span><span style="color: #000088;">$page</span> <span style="color: #339933;">-</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;' class='emm-prev'&gt;<span style="color: #006699; font-weight: bold;">$previouspage</span>&lt;/a&gt;&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #000088;">$min_links</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$range</span> <span style="color: #339933;">*</span> <span style="color: #cc66cc;">2</span> <span style="color: #339933;">+</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$block_min</span> <span style="color: #339933;">=</span> <span style="color: #990000;">min</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$page</span> <span style="color: #339933;">-</span> <span style="color: #000088;">$range</span><span style="color: #339933;">,</span> <span style="color: #000088;">$pages</span> <span style="color: #339933;">-</span> <span style="color: #000088;">$min_links</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$block_high</span> <span style="color: #339933;">=</span> <span style="color: #990000;">max</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$page</span> <span style="color: #339933;">+</span> <span style="color: #000088;">$range</span><span style="color: #339933;">,</span> <span style="color: #000088;">$min_links</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$left_gap</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$block_min</span> <span style="color: #339933;">-</span> <span style="color: #000088;">$anchor</span> <span style="color: #339933;">-</span> <span style="color: #000088;">$gap</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&gt;</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> ? <span style="color: #009900; font-weight: bold;">true</span> <span style="color: #339933;">:</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$right_gap</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$block_high</span> <span style="color: #339933;">+</span> <span style="color: #000088;">$anchor</span> <span style="color: #339933;">+</span> <span style="color: #000088;">$gap</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&lt;</span> <span style="color: #000088;">$pages</span><span style="color: #009900;">&#41;</span> ? <span style="color: #009900; font-weight: bold;">true</span> <span style="color: #339933;">:</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$left_gap</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #339933;">!</span><span style="color: #000088;">$right_gap</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> <span style="color: #990000;">sprintf</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'%s%s%s'</span><span style="color: #339933;">,</span> 
				emm_paginate_loop<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span> <span style="color: #000088;">$anchor</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> 
				<span style="color: #000088;">$ellipsis</span><span style="color: #339933;">,</span> 
				emm_paginate_loop<span style="color: #009900;">&#40;</span><span style="color: #000088;">$block_min</span><span style="color: #339933;">,</span> <span style="color: #000088;">$pages</span><span style="color: #339933;">,</span> <span style="color: #000088;">$page</span><span style="color: #009900;">&#41;</span>
			<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$left_gap</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$right_gap</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> <span style="color: #990000;">sprintf</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'%s%s%s%s%s'</span><span style="color: #339933;">,</span> 
				emm_paginate_loop<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span> <span style="color: #000088;">$anchor</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> 
				<span style="color: #000088;">$ellipsis</span><span style="color: #339933;">,</span> 
				emm_paginate_loop<span style="color: #009900;">&#40;</span><span style="color: #000088;">$block_min</span><span style="color: #339933;">,</span> <span style="color: #000088;">$block_high</span><span style="color: #339933;">,</span> <span style="color: #000088;">$page</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> 
				<span style="color: #000088;">$ellipsis</span><span style="color: #339933;">,</span> 
				emm_paginate_loop<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$pages</span> <span style="color: #339933;">-</span> <span style="color: #000088;">$anchor</span> <span style="color: #339933;">+</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$pages</span><span style="color: #009900;">&#41;</span>
			<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$right_gap</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #339933;">!</span><span style="color: #000088;">$left_gap</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> <span style="color: #990000;">sprintf</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'%s%s%s'</span><span style="color: #339933;">,</span> 
				emm_paginate_loop<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span> <span style="color: #000088;">$block_high</span><span style="color: #339933;">,</span> <span style="color: #000088;">$page</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
				<span style="color: #000088;">$ellipsis</span><span style="color: #339933;">,</span>
				emm_paginate_loop<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$pages</span> <span style="color: #339933;">-</span> <span style="color: #000088;">$anchor</span> <span style="color: #339933;">+</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$pages</span><span style="color: #009900;">&#41;</span>
			<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> emm_paginate_loop<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span> <span style="color: #000088;">$pages</span><span style="color: #339933;">,</span> <span style="color: #000088;">$page</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$page</span> <span style="color: #339933;">&lt;</span> <span style="color: #000088;">$pages</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$nextpage</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;a href='&quot;</span> <span style="color: #339933;">.</span> get_pagenum_link<span style="color: #009900;">&#40;</span><span style="color: #000088;">$page</span> <span style="color: #339933;">+</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;' class='emm-next'&gt;<span style="color: #006699; font-weight: bold;">$nextpage</span>&lt;/a&gt;&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> <span style="color: #000088;">$after</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$echo</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$output</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$output</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
 * Helper function for pagination which builds the page links.
 *
 * @access private
 *
 * @author Eric Martin &lt;eric@ericmmartin.com&gt;
 * @copyright Copyright (c) 2009, Eric Martin
 * @version 1.0
 *
 * @param int $start The first link page.
 * @param int $max The last link page.
 * @return int $page Optional, default is 0. The current page.
 */</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> emm_paginate_loop<span style="color: #009900;">&#40;</span><span style="color: #000088;">$start</span><span style="color: #339933;">,</span> <span style="color: #000088;">$max</span><span style="color: #339933;">,</span> <span style="color: #000088;">$page</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$output</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$start</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span> <span style="color: #339933;">&lt;=</span> <span style="color: #000088;">$max</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$page</span> <span style="color: #339933;">===</span> <span style="color: #990000;">intval</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> 
			? <span style="color: #0000ff;">&quot;&lt;span class='emm-page emm-current'&gt;<span style="color: #006699; font-weight: bold;">$i</span>&lt;/span&gt;&quot;</span> 
			<span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;&lt;a href='&quot;</span> <span style="color: #339933;">.</span> get_pagenum_link<span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;' class='emm-page'&gt;<span style="color: #006699; font-weight: bold;">$i</span>&lt;/a&gt;&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$output</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>用法是将上面的这些代码添加到主题的functions.php文件中合适位置，然后在主题index.php文件中的合适位置添加以下代码：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;emm_paginate&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> emm_paginate<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>如果还想美化一下显示效果的话，可以参考我博客主题的CSS代码：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.emm-paginate</span> <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">3px</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span><span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">clear</span><span style="color: #00AA00;">:</span><span style="color: #993333;">both</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.emm-paginate</span> a <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#ddd</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#666</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">5px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">3px</span> <span style="color: #933;">7px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span><span style="color: #993333;">center</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.emm-paginate</span> <span style="color: #6666ff;">.emm-title</span> <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#555</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">4px</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.emm-paginate</span> <span style="color: #6666ff;">.emm-gap</span> <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#A91B33</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">4px</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.emm-paginate</span> a<span style="color: #3333ff;">:hover</span><span style="color: #00AA00;">,</span> <span style="color: #6666ff;">.emm-paginate</span> a<span style="color: #3333ff;">:active</span><span style="color: #00AA00;">,</span> <span style="color: #6666ff;">.emm-paginate</span> <span style="color: #6666ff;">.emm-current</span> <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#A91B33</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#A91B33</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">5px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">3px</span> <span style="color: #933;">7px</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.emm-paginate</span> <span style="color: #6666ff;">.emm-page</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.emm-paginate</span> <span style="color: #6666ff;">.emm-prev</span><span style="color: #00AA00;">,</span> <span style="color: #6666ff;">.emm-paginate</span> <span style="color: #6666ff;">.emm-next</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p style="font-weight: bold;">&copy; 2010, <a href="http://chenzhiwei.net">chenzhiwei.net</a>. 版权所有.  <br />本文永久链接：<a title="不用插件实现wordpress分页导航的方法" href="http://chenzhiwei.net/2010/12/display-pagination-without-plugin/">http://chenzhiwei.net/2010/12/display-pagination-without-plugin/</a></p><hr /><div  class="related_post_title">相关日志</div><ul class="related_post"><li><a href="http://chenzhiwei.net/2010/02/change-blog-theme/" title="博客更换主题">博客更换主题</a></li><li><a href="http://chenzhiwei.net/2011/01/recently-blog-update/" title="博客最近的更新">博客最近的更新</a></li><li><a href="http://chenzhiwei.net/2010/07/wordpress-useful-code/" title="wordpress主题常用的代码">wordpress主题常用的代码</a></li><li><a href="http://chenzhiwei.net/2009/11/several-html-online-editor/" title="几款不错的在线HTML编辑器">几款不错的在线HTML编辑器</a></li><li><a href="http://chenzhiwei.net/2009/11/move-blog-again/" title="博客又一次搬家">博客又一次搬家</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://chenzhiwei.net/2010/12/display-pagination-without-plugin/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>博客搬家至新VPS</title>
		<link>http://chenzhiwei.net/2010/12/change-my-blog-host-space/</link>
		<comments>http://chenzhiwei.net/2010/12/change-my-blog-host-space/#comments</comments>
		<pubDate>Wed, 01 Dec 2010 05:08:51 +0000</pubDate>
		<dc:creator>zhiwei</dc:creator>
				<category><![CDATA[建站相关]]></category>
		<category><![CDATA[vps]]></category>
		<category><![CDATA[空间]]></category>

		<guid isPermaLink="false">http://chenzhiwei.net/?p=30394</guid>
		<description><![CDATA[之前的那个空间是12月3号到期，今天上午将博客搬家到了win7soft站长的VPS上。本来我是想买个VPS的，可是资金不够，后来又想买个虚拟主机，但还是资金不够，于是就搬到了win7soft站长的VPS上了，非常感谢win7soft站长。有句话是这样说的“什么都不缺，就是缺钱”，用在此时的我身上是最合适不过的了。 update20101202：由于VPS超载，我最终还是选择了购买虚拟主机，现在用的是Linost.com的虚拟主机独立IP的套餐。还等什么，点击这里注册linost.com的主机吧，速度还行，性价比也比较高。 &#169; 2010, chenzhiwei.net. 版权所有. 本文永久链接：http://chenzhiwei.net/2010/12/change-my-blog-host-space/随机日志Google 产品很好很强大让旧版本的PHP支持json说明我的wordpess主题又作了几处改动Chrome Web Store正式上线]]></description>
			<content:encoded><![CDATA[<p>之前的那个空间是12月3号到期，今天上午将博客搬家到了<a href="http://www.win7soft.com" target="_blank">win7soft</a>站长的VPS上。本来我是想买个VPS的，可是资金不够，后来又想买个虚拟主机，但还是资金不够，于是就搬到了<a href="http://www.win7soft.com" target="_blank">win7soft</a>站长的VPS上了，非常感谢<a href="http://www.win7soft.com" target="_blank">win7soft</a>站长。有句话是这样说的“什么都不缺，就是缺钱”，用在此时的我身上是最合适不过的了。</p>
<p>update20101202：由于VPS超载，我最终还是选择了购买虚拟主机，现在用的是Linost.com的虚拟主机独立IP的套餐。还等什么，点击这里<a href="https://my.linost.com/aff.php?aff=511" target="_blank">注册linost.com</a>的主机吧，速度还行，性价比也比较高。</p>
<p style="font-weight: bold;">&copy; 2010, <a href="http://chenzhiwei.net">chenzhiwei.net</a>. 版权所有.  <br />本文永久链接：<a title="博客搬家至新VPS" href="http://chenzhiwei.net/2010/12/change-my-blog-host-space/">http://chenzhiwei.net/2010/12/change-my-blog-host-space/</a></p><hr /><div  class="related_post_title">随机日志</div><ul class="related_post"><li><a href="http://chenzhiwei.net/2009/03/my-first-barrel-of-gold/" title="我的第一桶金，会是多少呢？">我的第一桶金，会是多少呢？</a></li><li><a href="http://chenzhiwei.net/2011/01/recently-blog-update/" title="博客最近的更新">博客最近的更新</a></li><li><a href="http://chenzhiwei.net/2009/08/feedsky-and-feedburner/" title="博客feed在feedsky和feedburner之间自由切换">博客feed在feedsky和feedburner之间自由切换</a></li><li><a href="http://chenzhiwei.net/2010/12/usage-of-assert-lib/" title="C/C++中assert的用法">C/C++中assert的用法</a></li><li><a href="http://chenzhiwei.net/2009/08/miibeian-sent-an-email-to-me/" title="我收到了一封工业和信息化部发过来的邮件">我收到了一封工业和信息化部发过来的邮件</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://chenzhiwei.net/2010/12/change-my-blog-host-space/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>我的博客已经屏蔽了360浏览器</title>
		<link>http://chenzhiwei.net/2010/10/lets-block-360se/</link>
		<comments>http://chenzhiwei.net/2010/10/lets-block-360se/#comments</comments>
		<pubDate>Wed, 27 Oct 2010 01:53:26 +0000</pubDate>
		<dc:creator>zhiwei</dc:creator>
				<category><![CDATA[建站相关]]></category>
		<category><![CDATA[360]]></category>
		<category><![CDATA[浏览器]]></category>
		<category><![CDATA[金山卫士]]></category>
		<category><![CDATA[阿里巴巴]]></category>

		<guid isPermaLink="false">http://chenzhiwei.net/?p=30381</guid>
		<description><![CDATA[靠做流氓软件起家的360董事长周鸿祎早就恶名在外，做人不能太周鸿祎！已经成为互联网一句口头禅！本人非常不喜欢360系列软件及周某某，一个周流氓领着一群XX开发了一系列流氓软件，并且还成功愚弄了某国的N多初级网民，稍微有点网龄的高级网民是不会使用360系列软件的。 周鸿祎可谓树敌无数，从3721 时期与CNNIC的宿怨、离开雅虎后与阿里巴巴的官司，到杀毒软件领域与金山、瑞星、江民、卡巴斯基等传统杀毒软件商撕破脸，今年以来与求伯君、可牛的傅盛爆发口水大战，与百度在桌面领域的新仇旧恨一并对决，得罪四大门户和凤凰网，最近又和小企鹅干上了，可谓彪悍之致！试想一下，我们不用360系列软件，还有很多可以代替的软件，比如：金山卫士、QQ电脑管家、可牛杀毒等，但是如果我们不用QQ的话，我实在想不出还有什么软件可以和QQ相比的。当初阿里巴巴马云选择收购phpwind而不收购discuz的一个原因就是周鸿祎投资了discuz，马云不想再与周鸿祎有任何关联，由此可见360老总周鸿祎的人品的确不怎么样。 抵制360系列软件，从自己做起。我自己已经不用360系列软件很长时间了，并且我也劝过很多身边的人，让他们也不使用360系列软件。最近，我在看博客流量统计时，发现我博客上还有一部分访客使用的是360浏览器，于是我就从网上搜索了一下，找到了一篇屏蔽360浏览器的文章，找到相关代码，加入了自己的博客中。现在360浏览器已经没法访问我博客了。 我希望我认识的人，和访问我博客的博友都能像我一样，主动屏蔽360浏览器。以下是屏蔽360浏览器的代码。 屏蔽360浏览器访问的php源码： 将这段代码加入到网页的最上部就行，即html标签上面。 1 2 3 4 5 6 &#60;?php $useragent = $_SERVER&#91;'HTTP_USER_AGENT'&#93;; if&#40;strstr&#40;$useragent,&#34;360SE&#34;&#41;&#41;&#123; die&#40;&#34;系统检测出来你使用了360流氓浏览器,请先卸载或改用ie（或firefox）等再行访问本站，谢谢合作！&#34;&#41;; &#125; ?&#62; 屏蔽360浏览器访问的Js脚本源码： 将这段代码加入到网页head标签之间。 1 2 3 4 5 6 7 &#60;script type=&#34;text/javascript&#34; language=&#34;javascript&#34;&#62; UA=navigator.userAgent; if &#40;UA.indexOf&#40;'360SE'&#41;&#62;0&#41;&#123; alert&#40;&#34;本站拒绝安装了流氓软件360的用户访问，想要舒心浏览本站请卸载360相关“安全软件”，谢谢合作！&#34;&#41;; document.execCommand&#40;&#34;stop&#34;&#41; &#125; &#60;/script&#62; linux+nginx服务器屏蔽360浏览器访问的代码: 这段代码加到配置文件中，我本人没用过nginx，所以无法给出具体配置文件。 1 2 3 if ($http_user_agent ~ (360SE) ) { return 404; } 注：本文参考网站屏蔽360浏览器访问的代码，有改动。 [...]]]></description>
			<content:encoded><![CDATA[<p>靠做流氓软件起家的360董事长周鸿祎早就恶名在外，做人不能太周鸿祎！已经成为互联网一句口头禅！本人非常不喜欢360系列软件及周某某，一个周流氓领着一群XX开发了一系列流氓软件，并且还成功愚弄了某国的N多初级网民，稍微有点网龄的高级网民是不会使用360系列软件的。</p>
<p>周鸿祎可谓树敌无数，从3721 时期与CNNIC的宿怨、离开雅虎后与阿里巴巴的官司，到杀毒软件领域与金山、瑞星、江民、卡巴斯基等传统杀毒软件商撕破脸，今年以来与求伯君、可牛的傅盛爆发口水大战，与百度在桌面领域的新仇旧恨一并对决，得罪四大门户和凤凰网，最近又和小企鹅干上了，可谓彪悍之致！试想一下，我们不用360系列软件，还有很多可以代替的软件，比如：金山卫士、QQ电脑管家、可牛杀毒等，但是如果我们不用QQ的话，我实在想不出还有什么软件可以和QQ相比的。当初阿里巴巴马云选择收购phpwind而不收购discuz的一个原因就是周鸿祎投资了discuz，马云不想再与周鸿祎有任何关联，由此可见360老总周鸿祎的人品的确不怎么样。<span id="more-30381"></span></p>
<p>抵制360系列软件，从自己做起。我自己已经不用360系列软件很长时间了，并且我也劝过很多身边的人，让他们也不使用360系列软件。最近，我在看博客流量统计时，发现我博客上还有一部分访客使用的是360浏览器，于是我就从网上搜索了一下，找到了一篇<a href="http://www.tybk.cn/post/pingbi_360.html" target="_blank">屏蔽360浏览器</a>的文章，找到相关代码，加入了自己的博客中。现在360浏览器已经没法访问我博客了。</p>
<p>我希望我认识的人，和访问我博客的博友都能像我一样，主动屏蔽360浏览器。以下是屏蔽360浏览器的代码。</p>
<p><strong>屏蔽360浏览器访问的php源码</strong>：<br />
将这段代码加入到网页的最上部就行，即html标签上面。</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
	<span style="color: #000088;">$useragent</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_USER_AGENT'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">strstr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$useragent</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;360SE&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		<span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;系统检测出来你使用了360流氓浏览器,请先卸载或改用ie（或firefox）等再行访问本站，谢谢合作！&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p><strong>屏蔽360浏览器访问的Js脚本源码</strong>：<br />
将这段代码加入到网页head标签之间。</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span> language<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;javascript&quot;</span><span style="color: #339933;">&gt;</span>
UA<span style="color: #339933;">=</span>navigator.<span style="color: #660066;">userAgent</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>UA.<span style="color: #660066;">indexOf</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'360SE'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">&gt;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;本站拒绝安装了流氓软件360的用户访问，想要舒心浏览本站请卸载360相关“安全软件”，谢谢合作！&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	document.<span style="color: #660066;">execCommand</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;stop&quot;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p><strong>linux+nginx服务器屏蔽360浏览器访问的代码</strong>:<br />
这段代码加到配置文件中，我本人没用过nginx，所以无法给出具体配置文件。</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="shell" style="font-family:monospace;">if ($http_user_agent ~ (360SE) ) {
	return 404;
}</pre></td></tr></table></div>

<p>注：本文参考<a href="http://www.tybk.cn/post/pingbi_360.html" target="_blank">网站屏蔽360浏览器访问的代码</a>，有改动。</p>
<p style="font-weight: bold;">&copy; 2010, <a href="http://chenzhiwei.net">chenzhiwei.net</a>. 版权所有.  <br />本文永久链接：<a title="我的博客已经屏蔽了360浏览器" href="http://chenzhiwei.net/2010/10/lets-block-360se/">http://chenzhiwei.net/2010/10/lets-block-360se/</a></p><hr /><div  class="related_post_title">相关日志</div><ul class="related_post"><li><a href="http://chenzhiwei.net/2010/12/chrome-web-store-is-now-launched/" title="Chrome Web Store正式上线">Chrome Web Store正式上线</a></li><li><a href="http://chenzhiwei.net/2010/04/recommend-to-use-firefox-web-browser/" title="推荐使用火狐浏览器">推荐使用火狐浏览器</a></li><li><a href="http://chenzhiwei.net/2009/03/sougou-browser/" title="搜狗浏览器，很好很强大">搜狗浏览器，很好很强大</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://chenzhiwei.net/2010/10/lets-block-360se/feed/</wfw:commentRss>
		<slash:comments>84</slash:comments>
		</item>
		<item>
		<title>wordpress主题常用的代码</title>
		<link>http://chenzhiwei.net/2010/07/wordpress-useful-code/</link>
		<comments>http://chenzhiwei.net/2010/07/wordpress-useful-code/#comments</comments>
		<pubDate>Tue, 20 Jul 2010 09:54:49 +0000</pubDate>
		<dc:creator>zhiwei</dc:creator>
				<category><![CDATA[建站相关]]></category>
		<category><![CDATA[默认分类]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[博客]]></category>

		<guid isPermaLink="false">http://chenzhiwei.net/?p=30304</guid>
		<description><![CDATA[很多同学的wordpress博客主题侧边栏都有最新文章、随机文章、最新评论等等内容，而单篇文章下方也会加上版权信息，我之前添加版权信息就是在写每篇文章时，在最后加上，但是这样太麻烦，自己在网上搜索一下，然后又仿照一些知名博客的相应设置自己也在博客文章页面加上了版权信息，由于最近比较忙，一直没空写出来，今天就把它写出来与大家分享一下。 1. 最新/随机文章 1 2 3 4 5 6 7 global $post; $myposts = get_posts('numberposts=9&#38;offset=1&#38;orderby=rand'); foreach($myposts as $post) : setup_postdata($post); ?&#62; &#60;li&#62;&#60;a href=&#34;&#60;?php the_permalink&#40;&#41;; ?&#62;&#34; title=&#34;&#60;?php the_title&#40;&#41;; ?&#62;&#34;&#62;&#60;?php the_title&#40;&#41;; ?&#62;&#60;/a&#62;&#60;/li&#62; &#60;?php endforeach; 最新/随机文章用的是wordpress现成的函数调用，上述代码中的numberposts=9是指显示9篇文章，orderby=rand意思是随机显示，如果是orderby=date就是最新文章了，当然还得order=desc，意思是按日期降序排列，懂sql语言的同学很容易就能看明白，这里有更详细的官方介绍，不过是英文的。这个地方是获得最新文章的另一种方法。 2. 最新评论 1 2 3 4 5 6 7 $comments = get_comments('number=9&#38;$status=approve&#38;offset=1'); foreach($comments as $comm) : $comm-&#62;comment_content=mb_substr($comm-&#62;comment_content,0,20); ?&#62; &#60;li&#62;&#60;a href=&#34;&#60;?php echo&#40;get_permalink&#40;$comm-&#62;comment_post_ID&#41;&#41;; ?&#62;#comment-&#60;?php [...]]]></description>
			<content:encoded><![CDATA[<p>很多同学的wordpress博客主题侧边栏都有最新文章、随机文章、最新评论等等内容，而单篇文章下方也会加上版权信息，我之前添加版权信息就是在写每篇文章时，在最后加上，但是这样太麻烦，自己在网上搜索一下，然后又仿照一些知名博客的相应设置自己也在博客文章页面加上了版权信息，由于最近比较忙，一直没空写出来，今天就把它写出来与大家分享一下。<br />
<span id="more-30304"></span><br />
<strong>1. 最新/随机文章</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">global $post;
	 $myposts = get_posts('numberposts=9&amp;offset=1&amp;orderby=rand');
	 foreach($myposts as $post) :
	   setup_postdata($post);
	 ?&gt;
		&lt;li&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; title=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/a&gt;&lt;/li&gt;
	 <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endforeach</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>最新/随机文章用的是wordpress现成的函数调用，上述代码中的numberposts=9是指显示9篇文章，orderby=rand意思是随机显示，如果是orderby=date就是最新文章了，当然还得order=desc，意思是按日期降序排列，懂sql语言的同学很容易就能看明白，<a href="http://codex.wordpress.org/Function_Reference/get_posts" target="_blank">这里</a>有更详细的官方介绍，不过是英文的。这个<a href="http://codex.wordpress.org/Function_Reference/wp_get_recent_posts" target="_blank">地方</a>是获得最新文章的另一种方法。</p>
<p><strong>2. 最新评论</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">$comments = get_comments('number=9&amp;$status=approve&amp;offset=1');
		  foreach($comments as $comm) :
			$comm-&gt;comment_content=mb_substr($comm-&gt;comment_content,0,20);
		?&gt;
		  &lt;li&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span><span style="color: #009900;">&#40;</span>get_permalink<span style="color: #009900;">&#40;</span><span style="color: #000088;">$comm</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">comment_post_ID</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>#comment-<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$comm</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">comment_ID</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; title=&quot;view the entire comment by <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$comm</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">comment_author</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$comm</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">comment_content</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/a&gt;&lt;/li&gt;
		<span style="color: #000000; font-weight: bold;">&lt;?php</span>
		  <span style="color: #b1b100;">endforeach</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>最新评论这个代码用了我很长时间才写好，一般网上的方法都是直接去查询数据库，写一大堆代码，太麻烦了，我在<a href="http://codex.wordpress.org/Function_Reference/get_comments" target="_blank">wordpress官方文档</a>上找到了这个方法，很好用，不过总是最后一条评论显示不出来，目前也没有找到原因。代码说明我就不写了，很简单的。</p>
<p><strong>3. 版权信息</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> insertNote<span style="color: #009900;">&#40;</span><span style="color: #000088;">$content</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>is_single<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">||</span>is_feed<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$content</span><span style="color: #339933;">.=</span><span style="color: #0000ff;">'&lt;p style=&quot;font-weight: bold;&quot;&gt;&amp;copy; '</span><span style="color: #339933;">.</span> get_the_time<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Y'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">', &lt;a href=&quot;http://chenzhiwei.net&quot;&gt;chenzhiwei.net&lt;/a&gt;. 版权所有.  &lt;br /&gt;'</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$content</span><span style="color: #339933;">.=</span><span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$content</span><span style="color: #339933;">.=</span> <span style="color: #0000ff;">'本文永久链接：&lt;a title=&quot;'</span><span style="color: #339933;">.</span>get_the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot; href=&quot;'</span><span style="color: #339933;">.</span>get_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot;&gt;'</span><span style="color: #339933;">.</span>get_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt;/a&gt;&lt;/p&gt;'</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>is_feed<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$content</span><span style="color: #339933;">.=</span><span style="color: #0000ff;">&quot;&lt;hr /&gt;&quot;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #b1b100;">return</span> <span style="color: #000088;">$content</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_filter <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'the_content'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'insertNote'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>版权信息是在主题支持函数里写一个函数，就可以了。也可以将feed里也加入版权信息。以上代码就是我博客里的用，可以参考一下。相关图片如下：</p>
<p><img class="alignnone" title="feed 版权信息" src="http://67.195.19.74/4119/4811292687_0da7d9b079_b.jpg" alt="single" width="590" height="280" /></p>
<p><img class="alignnone" title="single page 版权信息" src="http://67.195.19.74/4122/4811292695_8c31c8ac67_b.jpg" alt="single" width="563" height="145" /></p>
<p><strong>4. 存档页面</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">&lt;div class=&quot;archive&quot;&gt;
&nbsp;
	&lt;strong&gt;by page:&lt;/strong&gt;
		&lt;ul&gt;
			<span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_list_pages<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'title_li='</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
		&lt;/ul&gt;
&nbsp;
	&lt;strong&gt;by month:&lt;/strong&gt;
		&lt;ul&gt;
			<span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_get_archives<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'type=monthly'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
		&lt;/ul&gt;
&nbsp;
	&lt;strong&gt;by category:&lt;/strong&gt;
		&lt;ul&gt;
			<span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_list_categories<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'sort_column=name&amp;title_li='</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
		&lt;/ul&gt;
&nbsp;
&lt;/div&gt;
&nbsp;
&lt;div class=&quot;archive&quot;&gt;
&nbsp;
	&lt;strong&gt;by post:&lt;/strong&gt;
		&lt;ul&gt;
			<span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_get_archives<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'type=postbypost&amp;limit=100'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> 
		&lt;/ul&gt;
&lt;/div&gt;</pre></td></tr></table></div>

<p>有些同学一直在用插件实现文档存档，不过，我认为博客里最好还是少用插件，这样可以减轻服务器负担，也减少了升级插件的麻烦，下面就是我存档页面用的代码。</p>
<p>以上就是我博客里用到的一些代码，以后再用其他代码时，我会及时补充上来。</p>
<p style="font-weight: bold;">&copy; 2010, <a href="http://chenzhiwei.net">chenzhiwei.net</a>. 版权所有.  <br />本文永久链接：<a title="wordpress主题常用的代码" href="http://chenzhiwei.net/2010/07/wordpress-useful-code/">http://chenzhiwei.net/2010/07/wordpress-useful-code/</a></p><hr /><div  class="related_post_title">相关日志</div><ul class="related_post"><li><a href="http://chenzhiwei.net/2011/01/recently-blog-update/" title="博客最近的更新">博客最近的更新</a></li><li><a href="http://chenzhiwei.net/2009/11/move-blog-again/" title="博客又一次搬家">博客又一次搬家</a></li><li><a href="http://chenzhiwei.net/2009/04/cannot-modify-header-information/" title="Cannot modify header information的问题">Cannot modify header information的问题</a></li><li><a href="http://chenzhiwei.net/2011/11/old-version-php-support-json/" title="让旧版本的PHP支持json">让旧版本的PHP支持json</a></li><li><a href="http://chenzhiwei.net/2011/10/write-write/" title="随写">随写</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://chenzhiwei.net/2010/07/wordpress-useful-code/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>博客上添加twitter挂件的方法-超级简单</title>
		<link>http://chenzhiwei.net/2010/06/add-twitter-gadget-on-your-blog/</link>
		<comments>http://chenzhiwei.net/2010/06/add-twitter-gadget-on-your-blog/#comments</comments>
		<pubDate>Thu, 10 Jun 2010 12:23:03 +0000</pubDate>
		<dc:creator>zhiwei</dc:creator>
				<category><![CDATA[互联网络]]></category>
		<category><![CDATA[建站相关]]></category>
		<category><![CDATA[gadget]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[挂件]]></category>

		<guid isPermaLink="false">http://chenzhiwei.net/?p=30219</guid>
		<description><![CDATA[最近一不小心发现原来在博客上添加twitter挂件很简单。只需要一个twitter api  地址，几行代码就可以了，现在贴出来与各位同学分享。以下是相关说明。 假设你的twitter api地址是：http://abc.com/api/ 只需要将以下代码第六行中的twitter_username改为你自己的twitter用户名，其中的count=2是说明只显示最新的两条推。你可以根据自己的需求而适当更改。将这几行代码加到&#60;head&#62;&#60;/head&#62;之间，当然，你也可以加到主题的function.php或其他.php文件里面。看完以下代码后你会发现，只需稍做修改就可以运用到静态网页中了。 1 2 3 4 5 6 7 8 9 &#60;?php function twitter_show&#40;&#41; &#123; ?&#62; &#60;script type=&#34;text/javascript&#34; src=&#34;http://abc.com/api/javascripts/blogger.js&#34;&#62;&#60;/script&#62; &#60;script type=&#34;text/javascript&#34; src=&#34;http://abc.com/api/statuses/user_timeline/twitter_username.json?callback=twitterCallback2&#38;count=2&#34;&#62;&#60;/script&#62; &#60;?php &#125; ?&#62; 以下代码是显示twitter条目的代码，你可以加到博客侧边栏或者加到博客顶部，像我博客(chenzhiwei.net)这样，由于博客主机速度原因，加载javascript太慢，所以将顶部tweets去掉了，效果见http://chenzhiwei.net/twitter/tweets.php ，因api原因，有时可能会显示不出来，刷新一下就OK了。如果懂CSS的话，你自己还可以优化一下tweets的显示，使用其更加美观。 1 2 3 4 5 6 &#60;div id=&#34;&#34;&#62; &#60;ul id=&#34;twitter_update_list&#34;&#62; &#60;li&#62;&#38;nbsp;loading...&#60;/li&#62; &#60;?php twitter_show&#40;&#41;; ?&#62; &#60;/ul&#62; &#60;/div&#62; 到此，博客上添加twitter挂件功能就实现了，非常简单。 下面给出一个测试例子：index.php文件，将该文件中的http://abc.com/api/改为你自己的twitter api地址，然后运行该文件后就会显示两条tweets。效果见http://chenzhiwei.net/twitter/tweets.php 。 1 2 3 4 [...]]]></description>
			<content:encoded><![CDATA[<p>最近一不小心发现原来在博客上添加twitter挂件很简单。只需要一个twitter api  地址，几行代码就可以了，现在贴出来与各位同学分享。以下是相关说明。</p>
<p>假设你的twitter api地址是：http://abc.com/api/</p>
<p>只需要将以下代码第六行中的<span style="color: #ff0000;">twitter_username</span>改为你自己的twitter用户名，其中的<span style="color: #ff0000;">count=2</span>是说明只显示最新的两条推。你可以根据自己的需求而适当更改。将这几行代码加到&lt;head&gt;&lt;/head&gt;之间，当然，你也可以加到主题的function.php或其他.php文件里面。看完以下代码后你会发现，只需稍做修改就可以运用到静态网页中了。<span id="more-30219"></span></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000000; font-weight: bold;">function</span> twitter_show<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">?&gt;</span>
    &lt;script type=&quot;text/javascript&quot; src=&quot;http://abc.com/api/javascripts/blogger.js&quot;&gt;&lt;/script&gt;
    &lt;script type=&quot;text/javascript&quot; src=&quot;http://abc.com/api/statuses/user_timeline/twitter_username.json?callback=twitterCallback2&amp;count=2&quot;&gt;&lt;/script&gt;
    <span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>以下代码是显示twitter条目的代码，你可以加到博客侧边栏或者加到博客顶部，像我<a href="http://chenzhiwei.net">博客</a>(<a href="http://chenzhiwei.net">chenzhiwei.net</a>)这样，由于博客主机速度原因，加载javascript太慢，所以将顶部tweets去掉了，效果见<a href="http://chenzhiwei.net/twitter/tweets.php" target="_blank">http://chenzhiwei.net/twitter/tweets.php</a> ，因api原因，有时可能会显示不出来，刷新一下就OK了。如果懂CSS的话，你自己还可以优化一下tweets的显示，使用其更加美观。</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="css" style="font-family:monospace;">&lt;div id<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;&quot;</span><span style="color: #00AA00;">&gt;</span>
	&lt;ul id<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;twitter_update_list&quot;</span><span style="color: #00AA00;">&gt;</span>
		&lt;li<span style="color: #00AA00;">&gt;</span>&amp;nbsp<span style="color: #00AA00;">;</span>loading...&lt;/li<span style="color: #00AA00;">&gt;</span>
		&lt;?php twitter_show<span style="color: #00AA00;">&#40;</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span> ?<span style="color: #00AA00;">&gt;</span>
	&lt;/ul<span style="color: #00AA00;">&gt;</span>
&lt;/div<span style="color: #00AA00;">&gt;</span></pre></td></tr></table></div>

<p>到此，博客上添加twitter挂件功能就实现了，非常简单。<br />
下面给出一个测试例子：index.php文件，将该文件中的http://abc.com/api/改为你自己的twitter api地址，然后运行该文件后就会显示两条tweets。效果见<a href="http://chenzhiwei.net/twitter/tweets.php" target="_blank">http://chenzhiwei.net/twitter/tweets.php</a> 。</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; &gt;
&lt;head profile=&quot;http://gmpg.org/xfn/11&quot;&gt;
&lt;title&gt;show tweets&lt;/title&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000000; font-weight: bold;">function</span> twitter_show<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">?&gt;</span>
    &lt;script type=&quot;text/javascript&quot; src=&quot;http://abc.com/api/javascripts/blogger.js&quot;&gt;&lt;/script&gt;
    &lt;script type=&quot;text/javascript&quot; src=&quot;http://abc.com/api/statuses/user_timeline/chenzhiwei.json?callback=twitterCallback2&amp;count=2&quot;&gt;&lt;/script&gt;
    <span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/head&gt;
&lt;body&gt;
    &lt;ul id=&quot;twitter_update_list&quot;&gt;
        &lt;li&gt;&amp;nbsp;&lt;/li&gt;
            <span style="color: #000000; font-weight: bold;">&lt;?php</span> twitter_show<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
    &lt;/ul&gt;
&lt;/body&gt;
&lt;/html&gt;</pre></td></tr></table></div>

<p style="font-weight: bold;">&copy; 2010, <a href="http://chenzhiwei.net">chenzhiwei.net</a>. 版权所有.  <br />本文永久链接：<a title="博客上添加twitter挂件的方法-超级简单" href="http://chenzhiwei.net/2010/06/add-twitter-gadget-on-your-blog/">http://chenzhiwei.net/2010/06/add-twitter-gadget-on-your-blog/</a></p><hr /><div  class="related_post_title">相关日志</div><ul class="related_post"><li><a href="http://chenzhiwei.net/2009/08/the-new-discovery/" title="我这几天的新发现">我这几天的新发现</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://chenzhiwei.net/2010/06/add-twitter-gadget-on-your-blog/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>推荐使用火狐浏览器</title>
		<link>http://chenzhiwei.net/2010/04/recommend-to-use-firefox-web-browser/</link>
		<comments>http://chenzhiwei.net/2010/04/recommend-to-use-firefox-web-browser/#comments</comments>
		<pubDate>Sun, 11 Apr 2010 07:07:04 +0000</pubDate>
		<dc:creator>zhiwei</dc:creator>
				<category><![CDATA[建站相关]]></category>
		<category><![CDATA[软件应用]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[插件]]></category>
		<category><![CDATA[浏览器]]></category>
		<category><![CDATA[火狐]]></category>

		<guid isPermaLink="false">http://chenzhiwei.net/?p=30175</guid>
		<description><![CDATA[在拥有独立博客之前，也就是2008年十月份之前，我一直都在使用IE浏览器，极少使用其他浏览器。当自己建立这个独立博客后，我认识了很多人，了解的东西也越来越多，然后就看到很多同学都在使用火狐浏览器，于是我也下载了一个试用了一下，结果一下子就喜欢上火狐浏览器了，除了用网银和支付宝外，我极少使用过IE浏览器。火狐浏览器的功能本来不算强大，但它提供插件支持，这样使得火狐浏览器功能变的非常强大，完成了很多浏览器不能完成的工作，比如过滤互联网上浩浩荡荡的广告，整个网页截图，网页设计工具等等，深得广大站长和博主的喜爱。 火狐浏览器(Firefox)内置了分页浏览、拼字检查、即时书签、下载管理器和自定义搜索引擎等等功能。此外还可以通过由第三方开发者贡 献的扩展来加强各种功能，还支持多种操作系统。火狐浏览器(Firefox)一直被大家非正式的称作“FF浏览器”。下面是我一直在使用的几种插件，感觉很不错。另外，Mozilla还开发出了Mozilla Weave，其可以实现同步书签，历史记录，已保存密码，浏览器设置和标签等功能。 1. Adblock Plus：广告过滤插件。安装上之后可以屏蔽来自互联网上的很多广告，也可以自己写一些过滤规则来选择性的过滤哪些广告，当然你也可以选择在哪些站点禁用此插件。下载地址：https://addons.mozilla.org/firefox/addon/1865 2.Pearl Crescent Page Saver Basic：网页截图插件。可以截取整个网页的图片，不管这个页面有多长，有时当你浏览一个页面时，想收藏这个页面，那么你只须点击插件图标就能把这个页面以图片的形式保存下来，不必担心这个页面被删除。这个插件允许你自定义要保存图片的格式，名称，可以以标题、时间、URL等来命名，还可以选择是保存可见区域还是整个页面。下载地址：https://addons.mozilla.org/firefox/addon/10367 3.Firebug ：网页开发工具。官方介绍：Firebug 为你的 Firefox 集成了浏览网页的同时随手可得的丰富开发工具。你可以对任何网页的 CSS、HTML 和 JavaScript 进行实时编辑、调试和监控。站长博主和网页开发人员的最爱。下载地址：https://addons.mozilla.org/firefox/addon/1843 4.User Agent Switcher：切换浏览器user agent。该插件可以实现访问只有在手机上才能访问的页面，如3GQQ、手机wap站点。例如，当时你在浏览器里输入wap.baidu.com、sina.cn等手机站点时会打不开或者自动跳转到平时浏览页面，但是当安装该插件后，你可以切换一下user agent，这样就可以浏览这些站点了。下载地址：https://addons.mozilla.org/firefox/addon/59 5.FlashGot：下载文件时的插件。该插件可以让用户自己选择下载机器上已安装的下载工具下载文件。该插件还能加快下载速度。下载地址：https://addons.mozilla.org/firefox/addon/220 6.AutoProxy：官方介绍：你要翻墙对吗？你想让它聪明点：该翻墙时才翻，不要所有的网站都用代理，对吗？你还想让它再聪明一点：该不该翻墙它自己知道，不用什么事都要你跟它讲，对 吗？ AutoProxy 就是为您设计的：）。下载地址：https://addons.mozilla.org/firefox/addon/11009 此外还有很多优秀的插件，在此就不再多说了，以上几个都是我常用的插件。这是我收集的比较优秀的火狐浏览器插件(https://addons.mozilla.org/firefox/collection/chenzhiwei/chenzhiwei)，大家可以来围观一下，等遇到好插件时我会及时添加进去的。 下面是火狐浏览器所有版本的下载地址：http://www.mozilla.com/en-US/firefox/all.html 另外，这个地址是最新试用版的下载地址：http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/，该版本的火狐浏览器可能会不稳定，但是里面会包含一些新的功能及新的UI界面。 update: 以上所说的插件，其实应该称作扩展。 &#169; 2010, chenzhiwei.net. 版权所有. 本文永久链接：http://chenzhiwei.net/2010/04/recommend-to-use-firefox-web-browser/相关日志新版火狐浏览器3.5beta4可以下载试用搜狗浏览器，很好很强大Chrome Web Store正式上线我的博客已经屏蔽了360浏览器wordpress的评论邮件回复功能]]></description>
			<content:encoded><![CDATA[<p>在拥有独立博客之前，也就是2008年十月份之前，我一直都在使用IE浏览器，极少使用其他浏览器。当自己建立这个独立博客后，我认识了很多人，了解的东西也越来越多，然后就看到很多同学都在使用火狐浏览器，于是我也下载了一个试用了一下，结果一下子就喜欢上火狐浏览器了，除了用网银和支付宝外，我极少使用过IE浏览器。火狐浏览器的功能本来不算强大，但它提供插件支持，这样使得火狐浏览器功能变的非常强大，完成了很多浏览器不能完成的工作，比如过滤互联网上浩浩荡荡的广告，整个网页截图，网页设计工具等等，深得广大站长和博主的喜爱。<span id="more-30175"></span></p>
<p>火狐浏览器(Firefox)内置了分页浏览、拼字检查、即时书签、下载管理器和自定义搜索引擎等等功能。此外还可以通过由第三方开发者贡 献的扩展来加强各种功能，还支持多种操作系统。火狐浏览器(Firefox)一直被大家非正式的称作“FF浏览器”。下面是我一直在使用的几种插件，感觉很不错。另外，Mozilla还开发出了Mozilla Weave，其可以实现同步书签，历史记录，已保存密码，浏览器设置和标签等功能。</p>
<p><strong>1. Adblock Plus</strong>：广告过滤插件。安装上之后可以屏蔽来自互联网上的很多广告，也可以自己写一些过滤规则来选择性的过滤哪些广告，当然你也可以选择在哪些站点禁用此插件。下载地址：<a href="https://addons.mozilla.org/firefox/addon/1865?collection_uuid=2b4a1702-8281-c4c5-ee5a-88cf2a1e439b" target="_blank">https://addons.mozilla.org/firefox/addon/1865</a></p>
<p><strong>2.Pearl Crescent Page Saver Basic</strong>：网页截图插件。可以截取整个网页的图片，不管这个页面有多长，有时当你浏览一个页面时，想收藏这个页面，那么你只须点击插件图标就能把这个页面以图片的形式保存下来，不必担心这个页面被删除。这个插件允许你自定义要保存图片的格式，名称，可以以标题、时间、URL等来命名，还可以选择是保存可见区域还是整个页面。下载地址：<a href="https://addons.mozilla.org/firefox/addon/10367?collection_uuid=2b4a1702-8281-c4c5-ee5a-88cf2a1e439b" target="_blank">https://addons.mozilla.org/firefox/addon/10367</a></p>
<p><strong>3.Firebug</strong> ：网页开发工具。官方介绍：Firebug 为你的 Firefox 集成了浏览网页的同时随手可得的丰富开发工具。你可以对任何网页的 CSS、HTML 和  JavaScript 进行实时编辑、调试和监控。站长博主和网页开发人员的最爱。下载地址：<a href="https://addons.mozilla.org/firefox/addon/1843?collection_uuid=2b4a1702-8281-c4c5-ee5a-88cf2a1e439b" target="_blank">https://addons.mozilla.org/firefox/addon/1843</a></p>
<p><strong>4.User Agent Switcher</strong>：切换浏览器user agent。该插件可以实现访问只有在手机上才能访问的页面，如3GQQ、手机wap站点。例如，当时你在浏览器里输入wap.baidu.com、sina.cn等手机站点时会打不开或者自动跳转到平时浏览页面，但是当安装该插件后，你可以切换一下user agent，这样就可以浏览这些站点了。下载地址：<a href="https://addons.mozilla.org/firefox/addon/59?collection_uuid=2b4a1702-8281-c4c5-ee5a-88cf2a1e439b" target="_blank">https://addons.mozilla.org/firefox/addon/59</a></p>
<p><strong>5.FlashGot</strong>：下载文件时的插件。该插件可以让用户自己选择下载机器上已安装的下载工具下载文件。该插件还能加快下载速度。下载地址：<a href="https://addons.mozilla.org/firefox/addon/220?collection_uuid=2b4a1702-8281-c4c5-ee5a-88cf2a1e439b" target="_blank">https://addons.mozilla.org/firefox/addon/220</a></p>
<p><strong>6.AutoProxy</strong>：官方介绍：你要翻墙对吗？你想让它聪明点：该翻墙时才翻，不要所有的网站都用代理，对吗？你还想让它再聪明一点：该不该翻墙它自己知道，不用什么事都要你跟它讲，对 吗？ AutoProxy 就是为您设计的：）。下载地址：<a href="https://addons.mozilla.org/firefox/addon/11009?collection_uuid=2b4a1702-8281-c4c5-ee5a-88cf2a1e439b" target="_blank">https://addons.mozilla.org/firefox/addon/11009</a></p>
<p>此外还有很多优秀的插件，在此就不再多说了，以上几个都是我常用的插件。这是我收集的比较优秀的火狐浏览器插件(<a href="https://addons.mozilla.org/firefox/collection/chenzhiwei/chenzhiwei" target="_blank">https://addons.mozilla.org/firefox/collection/chenzhiwei/chenzhiwei</a>)，大家可以来围观一下，等遇到好插件时我会及时添加进去的。</p>
<p>下面是火狐浏览器所有版本的下载地址：<a href="http://www.mozilla.com/en-US/firefox/all.html" target="_blank">http://www.mozilla.com/en-US/firefox/all.html</a></p>
<p>另外，这个地址是最新试用版的下载地址：<a href="http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/" target="_blank">http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/</a>，该版本的火狐浏览器可能会不稳定，但是里面会包含一些新的功能及新的UI界面。</p>
<p><strong>update</strong>: 以上所说的插件，其实应该称作扩展。</p>
<p style="font-weight: bold;">&copy; 2010, <a href="http://chenzhiwei.net">chenzhiwei.net</a>. 版权所有.  <br />本文永久链接：<a title="推荐使用火狐浏览器" href="http://chenzhiwei.net/2010/04/recommend-to-use-firefox-web-browser/">http://chenzhiwei.net/2010/04/recommend-to-use-firefox-web-browser/</a></p><hr /><div  class="related_post_title">相关日志</div><ul class="related_post"><li><a href="http://chenzhiwei.net/2009/04/new-version-of-firefox-35-beta4/" title="新版火狐浏览器3.5beta4可以下载试用">新版火狐浏览器3.5beta4可以下载试用</a></li><li><a href="http://chenzhiwei.net/2009/03/sougou-browser/" title="搜狗浏览器，很好很强大">搜狗浏览器，很好很强大</a></li><li><a href="http://chenzhiwei.net/2010/12/chrome-web-store-is-now-launched/" title="Chrome Web Store正式上线">Chrome Web Store正式上线</a></li><li><a href="http://chenzhiwei.net/2010/10/lets-block-360se/" title="我的博客已经屏蔽了360浏览器">我的博客已经屏蔽了360浏览器</a></li><li><a href="http://chenzhiwei.net/2009/04/wordpress-comments-reply/" title="wordpress的评论邮件回复功能">wordpress的评论邮件回复功能</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://chenzhiwei.net/2010/04/recommend-to-use-firefox-web-browser/feed/</wfw:commentRss>
		<slash:comments>29</slash:comments>
		</item>
		<item>
		<title>博客更换域名</title>
		<link>http://chenzhiwei.net/2010/03/change-blog-domain-name/</link>
		<comments>http://chenzhiwei.net/2010/03/change-blog-domain-name/#comments</comments>
		<pubDate>Sat, 20 Mar 2010 10:47:34 +0000</pubDate>
		<dc:creator>zhiwei</dc:creator>
				<category><![CDATA[个人日志]]></category>
		<category><![CDATA[建站相关]]></category>
		<category><![CDATA[blogger]]></category>
		<category><![CDATA[博客]]></category>
		<category><![CDATA[域名]]></category>

		<guid isPermaLink="false">http://chenzhiwei.net/?p=30158</guid>
		<description><![CDATA[2009年是个不平凡的一年，国内的博客集体迁移到了国外，域名也迁移到了国外，至于那些使用.CN域名做为博客域名的同学大部分也都把博客域名给换了，经过仔细考虑后，我也决定将自己的博客更换一下域名了，之前博客域名是.CN的，现在我换成.NET的了，因为.COM的域名已经被别人注册了，旧域名仍然可用，不过我已经把旧域名作为我的互联网应用的导航站点了，上面有我在互联网上的应用入口地址，各位同学可以来这里围观一下。 我之前同时使用两个博客，另一个博客一直都只写一些关于我专业方面的内容，我之前是想着，使用两个博客更有利于博客的读者，因为并不是所有读者都对我的专业感兴趣，基于此我建立了另一个博客，是托管在blogger.com上的。但是我渐渐的发现，一个人同时维护两个博客太麻烦了，我的专业也已经成了生活的一部分了，再说了我博客的更新频率也低了很多，所以我打算重新将两个博客合并在一起，因为我没有那么多精力去同时管理两个博客，为了方便博客读者我会将博客内容精确分类的，争取不影响各位同学的阅读。 最近一直很发愁，大三下学期了，很多同学都在忙考研的事情，而我呢还在犹豫，考研不考研对其他同学来说可能没什么但地我来说是很艰难的选择。“所有人都必须在压力下做出选择，这就是世道，你喜欢也罢不喜欢也罢。”这是HP大中华区总裁孙振耀退休感言，我今天下午看完他写的这篇感言，从中也学到了一些知识，有兴趣的同学不妨到这里看看：http://www.ylmf.net/read.php?fid=98&#38;tid=1462736&#38;u=1。 此外，我还要感谢一下kangzj同学，我的这个新域名(chenzhiwei.net)是他帮我注册的。 PS：请各位博友修改一下友情链接，新链接地址是：http://chenzhiwei.net &#169; 2010, chenzhiwei.net. 版权所有. 本文永久链接：http://chenzhiwei.net/2010/03/change-blog-domain-name/相关日志使用blogger的几个技巧再次汇总国内外支持域名绑定的博客随写提前祝博客访客及博友们新年快乐博客最近的更新]]></description>
			<content:encoded><![CDATA[<p>2009年是个不平凡的一年，国内的博客集体迁移到了国外，域名也迁移到了国外，至于那些使用.CN域名做为博客域名的同学大部分也都把博客域名给换了，经过仔细考虑后，我也决定将自己的博客更换一下域名了，之前博客域名是.CN的，现在我换成.NET的了，因为.COM的域名已经被别人注册了，旧域名仍然可用，不过我已经把旧域名作为我的互联网应用的导航站点了，上面有我在互联网上的应用入口地址，各位同学<a href="http://www.chenzhiwei.cn" target="_blank">可以来这里围观一下</a>。<span id="more-30158"></span></p>
<p>我之前同时使用两个博客，另一个博客一直都只写一些关于我专业方面的内容，我之前是想着，使用两个博客更有利于博客的读者，因为并不是所有读者都对我的专业感兴趣，基于此我建立了另一个博客，是托管在blogger.com上的。但是我渐渐的发现，一个人同时维护两个博客太麻烦了，我的专业也已经成了生活的一部分了，再说了我博客的更新频率也低了很多，所以我打算重新将两个博客合并在一起，因为我没有那么多精力去同时管理两个博客，为了方便博客读者我会将博客内容精确分类的，争取不影响各位同学的阅读。</p>
<p>最近一直很发愁，大三下学期了，很多同学都在忙考研的事情，而我呢还在犹豫，考研不考研对其他同学来说可能没什么但地我来说是很艰难的选择。“<span style="color: #ff0000;">所有人都必须在压力下做出选择，这就是世道，你喜欢也罢不喜欢也罢。</span>”这是<a href="http://www.ylmf.net/read.php?fid=98&amp;tid=1462736&amp;u=1" target="_blank">HP大中华区总裁孙振耀退休感言</a>，我今天下午看完他写的这篇感言，从中也学到了一些知识，有兴趣的同学不妨到这里看看：http://www.ylmf.net/read.php?fid=98&amp;tid=1462736&amp;u=1。</p>
<p>此外，我还要感谢一下kangzj同学，我的这个新域名(chenzhiwei.net)是他帮我注册的。<br />
<span style="color: #ff0000;">PS：请各位博友修改一下友情链接，新链接地址是</span>：<strong>http://chenzhiwei.net</strong></p>
<p style="font-weight: bold;">&copy; 2010, <a href="http://chenzhiwei.net">chenzhiwei.net</a>. 版权所有.  <br />本文永久链接：<a title="博客更换域名" href="http://chenzhiwei.net/2010/03/change-blog-domain-name/">http://chenzhiwei.net/2010/03/change-blog-domain-name/</a></p><hr /><div  class="related_post_title">相关日志</div><ul class="related_post"><li><a href="http://chenzhiwei.net/2009/04/how-to-use-blogger/" title="使用blogger的几个技巧">使用blogger的几个技巧</a></li><li><a href="http://chenzhiwei.net/2009/07/domain-binding-blogs/" title="再次汇总国内外支持域名绑定的博客">再次汇总国内外支持域名绑定的博客</a></li><li><a href="http://chenzhiwei.net/2011/10/write-write/" title="随写">随写</a></li><li><a href="http://chenzhiwei.net/2011/01/happy-spring-festival-2011/" title="提前祝博客访客及博友们新年快乐">提前祝博客访客及博友们新年快乐</a></li><li><a href="http://chenzhiwei.net/2011/01/recently-blog-update/" title="博客最近的更新">博客最近的更新</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://chenzhiwei.net/2010/03/change-blog-domain-name/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>几款不错的在线HTML编辑器</title>
		<link>http://chenzhiwei.net/2009/11/several-html-online-editor/</link>
		<comments>http://chenzhiwei.net/2009/11/several-html-online-editor/#comments</comments>
		<pubDate>Sat, 14 Nov 2009 11:09:56 +0000</pubDate>
		<dc:creator>zhiwei</dc:creator>
				<category><![CDATA[建站相关]]></category>
		<category><![CDATA[editor]]></category>
		<category><![CDATA[ewebeditor]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://blog.chenzhiwei.cn/?p=30113</guid>
		<description><![CDATA[这几天在做一个项目，要用到文本编辑，于是就在网上收集了一下HTML文本编辑器，这东西感觉以后还会常用到，所以自己就在博客里写下这篇文章。 1.ewebeditor 官方网站：http://www.ewebeditor.net/ 先看官方的介绍：eWebEditor是基于浏览器的、所见即所得的在线HTML编辑器。她能够在网页上实现许多桌面编辑软件（如：Word）所具有的强大可视编辑功能。 WEB开发人员可以用她把传统的多行文本输入框&#60;TEXTAREA&#62;替换为可视化的富文本输入框，使最终用户可以可视化的发布HTML格式的 网页内容。eWebEditor!已基本成为网站内容管理发布的必备工具！ 自我感觉这个在线网页编辑器总体上还可以，并且还有自己的管理后台，皮肤也都很漂亮。但是某些版本的好像是IEonly，这个有点让人受不了。 2.xheditor 官方网站：http://code.google.com/p/xheditor/ 官方介绍：xhEditor是一个基于jQuery开发的简单迷你并且高效的可视化XHTML编辑器，基于网络访问并且兼容IE 6.0-8.0,Firefox 3.0,Opera 9.6,Chrome 1.0,Safari 3.22。 我个人比较喜欢使用这个在线网页编辑器，现在这个编辑器也有一个不小的用户群了。 3.淘宝开源编辑器 官方网站：http://code.google.com/p/kissy/ 官方介绍：Something that is enjoyable gives you pleasure. 理念：小巧灵活，简洁实用，使用起来让人感觉愉悦。 对于这个编辑器，我有一个疑问，不知道它什么要叫淘宝开源编辑器，这与淘宝有什么关系？可能是和淘宝网的编辑器相似吧。不管他了，反正好用就行。现在还有没有使用过这个编辑器，不过在twitter里有很多人都RT了这个编辑器，过两天我会试用一遍的。 4.TinyMCE 官方网站：http://tinymce.moxiecode.com/ 关于这个编辑器，我想各位同学应该不会陌生吧，这就是大名顶顶的PHP博客wordpress所用的编辑器，这个编辑器是相当的强大，wordpress里面只是一个简化版的。虽然这个编辑器我用着不太习惯但是它的确不错，所以还是要在这里推荐下。 另外：我还有一个ASP的简单HTML在线编辑器，感觉还不错，是一个网友给我的，我不知道名字，所以就不在这里说了，感觉兴趣的同学可以给我发邮件。 PS：还有很多在线网页编辑器，我就不再多说了，以前我也在网上搜集了很多，不过感觉这几款不错，有更好的了，我还会继续添加上去的。 &#169; 2009, chenzhiwei.net. 版权所有. 本文永久链接：http://chenzhiwei.net/2009/11/several-html-online-editor/相关日志博客最近的更新不用插件实现wordpress分页导航的方法wordpress主题常用的代码博客更换主题博客又一次搬家]]></description>
			<content:encoded><![CDATA[<p>这几天在做一个项目，要用到文本编辑，于是就在网上收集了一下HTML文本编辑器，这东西感觉以后还会常用到，所以自己就在博客里写下这篇文章。</p>
<p><strong>1.ewebeditor</strong><br />
官方网站：http://www.ewebeditor.net/<br />
先看官方的介绍：eWebEditor是基于浏览器的、所见即所得的在线HTML编辑器。她能够在网页上实现许多桌面编辑软件（如：Word）所具有的强大可视编辑功能。 WEB开发人员可以用她把传统的多行文本输入框&lt;TEXTAREA&gt;替换为可视化的富文本输入框，使最终用户可以可视化的发布HTML格式的 网页内容。eWebEditor!已基本成为网站内容管理发布的必备工具！<br />
自我感觉这个在线网页编辑器总体上还可以，并且还有自己的管理后台，皮肤也都很漂亮。但是某些版本的好像是IEonly，这个有点让人受不了。<span id="more-30113"></span></p>
<p><strong>2.<a style="text-decoration: none; color: #000000;" href="http://code.google.com/p/xheditor/">xheditor</a></strong><br />
官方网站：http://code.google.com/p/xheditor/<br />
官方介绍：xhEditor是一个基于jQuery开发的简单迷你并且高效的可视化XHTML编辑器，基于网络访问并且兼容IE 6.0-8.0,Firefox 3.0,Opera 9.6,Chrome 1.0,Safari 3.22。<br />
我个人比较喜欢使用这个在线网页编辑器，现在这个编辑器也有一个不小的用户群了。</p>
<p><strong>3.淘宝开源编辑器</strong><br />
官方网站：http://code.google.com/p/kissy/<br />
官方介绍：Something that is enjoyable gives you pleasure.<br />
理念：小巧灵活，简洁实用，使用起来让人感觉愉悦。<br />
对于这个编辑器，我有一个疑问，不知道它什么要叫淘宝开源编辑器，这与淘宝有什么关系？可能是和淘宝网的编辑器相似吧。不管他了，反正好用就行。现在还有没有使用过这个编辑器，不过在twitter里有很多人都RT了这个编辑器，过两天我会试用一遍的。</p>
<p><strong>4.TinyMCE</strong><br />
官方网站：http://tinymce.moxiecode.com/<br />
关于这个编辑器，我想各位同学应该不会陌生吧，这就是大名顶顶的PHP博客wordpress所用的编辑器，这个编辑器是相当的强大，wordpress里面只是一个简化版的。虽然这个编辑器我用着不太习惯但是它的确不错，所以还是要在这里推荐下。</p>
<p>另外：我还有一个ASP的简单HTML在线编辑器，感觉还不错，是一个网友给我的，我不知道名字，所以就不在这里说了，感觉兴趣的同学可以给我发邮件。<br />
PS：还有很多在线网页编辑器，我就不再多说了，以前我也在网上搜集了很多，不过感觉这几款不错，有更好的了，我还会继续添加上去的。</p>
<p style="font-weight: bold;">&copy; 2009, <a href="http://chenzhiwei.net">chenzhiwei.net</a>. 版权所有.  <br />本文永久链接：<a title="几款不错的在线HTML编辑器" href="http://chenzhiwei.net/2009/11/several-html-online-editor/">http://chenzhiwei.net/2009/11/several-html-online-editor/</a></p><hr /><div  class="related_post_title">相关日志</div><ul class="related_post"><li><a href="http://chenzhiwei.net/2011/01/recently-blog-update/" title="博客最近的更新">博客最近的更新</a></li><li><a href="http://chenzhiwei.net/2010/12/display-pagination-without-plugin/" title="不用插件实现wordpress分页导航的方法">不用插件实现wordpress分页导航的方法</a></li><li><a href="http://chenzhiwei.net/2010/07/wordpress-useful-code/" title="wordpress主题常用的代码">wordpress主题常用的代码</a></li><li><a href="http://chenzhiwei.net/2010/02/change-blog-theme/" title="博客更换主题">博客更换主题</a></li><li><a href="http://chenzhiwei.net/2009/11/move-blog-again/" title="博客又一次搬家">博客又一次搬家</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://chenzhiwei.net/2009/11/several-html-online-editor/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>博客又一次搬家</title>
		<link>http://chenzhiwei.net/2009/11/move-blog-again/</link>
		<comments>http://chenzhiwei.net/2009/11/move-blog-again/#comments</comments>
		<pubDate>Sat, 07 Nov 2009 04:47:24 +0000</pubDate>
		<dc:creator>zhiwei</dc:creator>
				<category><![CDATA[个人日志]]></category>
		<category><![CDATA[建站相关]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[博客]]></category>

		<guid isPermaLink="false">http://blog.chenzhiwei.cn/?p=30091</guid>
		<description><![CDATA[真有点受不了现在的网络环境了，网络管制太强了，一些优秀的国外互联网应用在国内总是不能使用。前几天google的ghs的IP地址又被墙了，直到现在也没有发现一个可用的IP，无奈，只好将博客转移到wordpress下了，真有点舍不得micolog，一个很不错的搭建在GAE上的用python写的博客程序。换了一个黑色主调的主题，感觉很不错。主题自带了个友情链接页面，我把所有的友情链接都转移到了页面上去，而在边栏是看不到友情链接了，有点遗憾。 今天我一共整理了一上午，终于把去年写过的博客与今年写过的博客整合到一起了，用的是wordpress程序，在整理过程中我发现我的互联网生活还挺丰富的，从2008年十月份开始独立博客后，一直都在写博客，虽然写的文章不多，但是我很少间断过。以前写博客都是乱写，不知道该写什么，并且我还弄了N多个博客，几乎到处都能看到我写的东西。昨天和Qinger聊了一会，他建议我好好的写一个博客，我现在也发现自己根本没有那么多的精力去写多个博客。现在我准备重新启用这个博客了，把博客文章链接重新整理了一下，用“域名/年份/月份/博客名”来统一博客链接，不管搜索引擎了。 刚开始我的博客在子域名blog.chenzhiwei.cn下，后来发现百度联盟不能用子域名来申请，于是我就将博客转移到了主域名下，但是我申请了N次百度联盟，始终没能申请下来，现在我已经对百度联盟不抱希望了，当时申请google adsense时，非常容易，我开通了一个blogger，然后用这个blogger申请，两天后就成功了。google adsense容易申请不假，但是挣钱是超难，我以前作弊过，也弄了几美元，可现在我不敢了，害怕辛辛苦苦挣的几刀再被google给收回，那样就得不偿失了。 写博客是一种享受，相信很多同学都是这么认为的吧。等到自己实在无聊时，还能看看自己以前写的文章，找找当时那种写文章的感觉，这也算是一种排解烦恼的方法吧。不管以后怎样，我相信我会继续将博客写下去的。 &#169; 2009, chenzhiwei.net. 版权所有. 本文永久链接：http://chenzhiwei.net/2009/11/move-blog-again/相关日志博客最近的更新wordpress主题常用的代码随写提前祝博客访客及博友们新年快乐不用插件实现wordpress分页导航的方法]]></description>
			<content:encoded><![CDATA[<p>真有点受不了现在的网络环境了，网络管制太强了，一些优秀的国外互联网应用在国内总是不能使用。前几天google的ghs的IP地址又被墙了，直到现在也没有发现一个可用的IP，无奈，只好将博客转移到wordpress下了，真有点舍不得micolog，一个很不错的搭建在GAE上的用python写的博客程序。换了一个黑色主调的主题，感觉很不错。主题自带了个友情链接页面，我把所有的友情链接都转移到了页面上去，而在边栏是看不到友情链接了，有点遗憾。<span id="more-30091"></span></p>
<p>今天我一共整理了一上午，终于把去年写过的博客与今年写过的博客整合到一起了，用的是wordpress程序，在整理过程中我发现我的互联网生活还挺丰富的，从2008年十月份开始独立博客后，一直都在写博客，虽然写的文章不多，但是我很少间断过。以前写博客都是乱写，不知道该写什么，并且我还弄了N多个博客，几乎到处都能看到我写的东西。昨天和Qinger聊了一会，他建议我好好的写一个博客，我现在也发现自己根本没有那么多的精力去写多个博客。现在我准备重新启用这个博客了，把博客文章链接重新整理了一下，用“域名/年份/月份/博客名”来统一博客链接，不管搜索引擎了。</p>
<p>刚开始我的博客在子域名blog.chenzhiwei.cn下，后来发现百度联盟不能用子域名来申请，于是我就将博客转移到了主域名下，但是我申请了N次百度联盟，始终没能申请下来，现在我已经对百度联盟不抱希望了，当时申请google adsense时，非常容易，我开通了一个blogger，然后用这个blogger申请，两天后就成功了。google adsense容易申请不假，但是挣钱是超难，我以前作弊过，也弄了几美元，可现在我不敢了，害怕辛辛苦苦挣的几刀再被google给收回，那样就得不偿失了。</p>
<p>写博客是一种享受，相信很多同学都是这么认为的吧。等到自己实在无聊时，还能看看自己以前写的文章，找找当时那种写文章的感觉，这也算是一种排解烦恼的方法吧。不管以后怎样，我相信我会继续将博客写下去的。</p>
<p style="font-weight: bold;">&copy; 2009, <a href="http://chenzhiwei.net">chenzhiwei.net</a>. 版权所有.  <br />本文永久链接：<a title="博客又一次搬家" href="http://chenzhiwei.net/2009/11/move-blog-again/">http://chenzhiwei.net/2009/11/move-blog-again/</a></p><hr /><div  class="related_post_title">相关日志</div><ul class="related_post"><li><a href="http://chenzhiwei.net/2011/01/recently-blog-update/" title="博客最近的更新">博客最近的更新</a></li><li><a href="http://chenzhiwei.net/2010/07/wordpress-useful-code/" title="wordpress主题常用的代码">wordpress主题常用的代码</a></li><li><a href="http://chenzhiwei.net/2011/10/write-write/" title="随写">随写</a></li><li><a href="http://chenzhiwei.net/2011/01/happy-spring-festival-2011/" title="提前祝博客访客及博友们新年快乐">提前祝博客访客及博友们新年快乐</a></li><li><a href="http://chenzhiwei.net/2010/12/display-pagination-without-plugin/" title="不用插件实现wordpress分页导航的方法">不用插件实现wordpress分页导航的方法</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://chenzhiwei.net/2009/11/move-blog-again/feed/</wfw:commentRss>
		<slash:comments>32</slash:comments>
		</item>
	</channel>
</rss>

