<?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://xwxy.zzspy.com/topic/%e5%be%ae%e5%8d%9a%e5%ae%a2/feed/" rel="self" type="application/rss+xml" />
	<link>http://xwxy.zzspy.com</link>
	<description>文高达贵人，渊深藏卧龙；晓时跃苍穹，金光比云霄。</description>
	<lastBuildDate>Thu, 04 Mar 2010 03:27:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>把WordPress变成Twitter</title>
		<link>http://xwxy.zzspy.com/2009/08/01/create-your-private-twitter-like-wordpress-2/</link>
		<comments>http://xwxy.zzspy.com/2009/08/01/create-your-private-twitter-like-wordpress-2/#comments</comments>
		<pubDate>Sat, 01 Aug 2009 09:53:21 +0000</pubDate>
		<dc:creator>jacobxx</dc:creator>
				<category><![CDATA[WordPress 翻译]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[微博客]]></category>

		<guid isPermaLink="false">http://xwxy.zzspy.com/?p=176</guid>
		<description><![CDATA[本文转载自：WordPress啦！ Twitter日益流行，越来越多的人想给自己的家人、朋友、同事建立一个像Twitter这样的微博客，其实这并没有想象中的难。在这里我给大家介绍下如何在WordPress中轻松创建微博客。 前言 Twitter的成功是大家有目共睹的，微博客无疑是非常实用和高效的。它可以让我们随时跟家人、朋友、同事保持联系。 尽管Twitter已经很出色了，但是作为私人空间，比如与同事分享工作体验或是向家人汇报近况，Twitter却不是最佳的选择。 为此，之前我用开源程序laconi.ca创建自己的微博客网站，它可以让用户创建类似于Twitter 的微博客网站。说实话，它不怎么让我满意，应该说挺后悔安装它的。 在这次不愉快的体验后，我觉得应该让WordPress来实现这一功能。 动手吧！ 说了这么多，让我们行动起来用WordPress创建自己的私人微博客吧！ 1. 安装WordPress 首先要做的当然是在服务器上安装WordPress。安装WordPress非常简单，你可以在网上找到安装教程，这里就不再讲述。需要帮助的话，你可以阅读相关文档。 2.使用P2 主题 Automattic公司出品的适合微博客应用的一个非常酷的主题，叫做P2，你可以 免费下载 。 下载完后，将它上传到WordPress的the wp-content/ themes 目录下。然后，登陆到WordPress后台的外观/主题，选择P2主题并激活。 这样你就成功安装P2主题，一切准备就绪了。 3.关于登录面板 尽管P2主题已经不错了，你还可以通过一些方法完善它。由于P2允许用户不通过WordPress后台直接从frontpage发布内容。在主题的侧边栏添加个登录控制面板是个不错的主意。 登录控制面板可以帮你实现： 如果用户尚未登录或还没有账户，系统将会显示登录表单及注册链接，访问者可以自己创建账户。 如果用户已经登录，系统会显示一个退出和账户选项的链接，因此就算是不懂WordPress的用户也可以轻松更新他的资料。 在主题的侧边栏添加登录面板，只要打开主题中sidebar.php文件，粘贴下面的代码就行： &#60;li&#62; &#60;?php global $user_ID, $user_identity, $user_level ?&#62; &#60;?php if ( $user_ID ) : ?&#62; &#60;h2&#62;Control panel&#60;/h2&#62; &#60;ul&#62; &#60;li&#62;Identified as &#60;strong&#62;&#60;?php echo $user_identity ?&#62;&#60;/strong&#62;. &#60;ul&#62; &#60;li&#62;&#60;a href=&#8221;&#60;?php [...]]]></description>
			<content:encoded><![CDATA[<p>本文转载自：<a href="http://www.wordpress.la/create-your-private-twitter-like-wordpress.html">WordPress啦！</a></p>
<p>Twitter日益流行，越来越多的人想给自己的家人、朋友、同事建立一个像Twitter这样的微博客，其实这并没有想象中的难。在这里我给大家介绍下如何在WordPress中<a href="http://www.wordpress.la/create-your-private-twitter-like-wordpress.html">轻松创建微博客</a>。</p>
<h3>前言</h3>
<p>Twitter的成功是大家有目共睹的，微博客无疑是非常实用和高效的。它可以让我们随时跟家人、朋友、同事保持联系。  尽管Twitter已经很出色了，但是作为私人空间，比如与同事分享工作体验或是向家人汇报近况，Twitter却不是最佳的选择。<span id="more-176"></span></p>
<p>为此，之前我用开源程序laconi.ca创建自己的微博客网站，它可以让用户创建类似于Twitter 的微博客网站。说实话，它不怎么让我满意，应该说挺后悔安装它的。<br />
在这次不愉快的体验后，我觉得应该让WordPress来实现这一功能。</p>
<p><a href="http://www.wordpress.la/sites/default/files/p2-_-faster-blogging-3.png" target="_blank"><img src="http://www.wordpress.la/sites/default/files/p2-_-faster-blogging-3.png" alt="" width="415" height="245" /></a></p>
<h3>动手吧！<strong> </strong></h3>
<p>说了这么多，让我们行动起来用WordPress创建自己的私人微博客吧！</p>
<p><strong>1. </strong><strong>安装WordPress</strong></p>
<p>首先要做的当然是在服务器上安装WordPress。安装WordPress非常简单，你可以在网上找到安装教程，这里就不再讲述。需要帮助的话，你可以阅读相关<a href="http://codex.wordpress.org/Main_Page">文档</a>。</p>
<p><strong>2.</strong><strong>使用P2 主题 </strong></p>
<p>Automattic公司出品的适合微博客应用的一个非常酷的主题，叫做P2，你可以 <a href="http://www.wordpress.la/theme-p2.html">免费下载</a> 。</p>
<p>下载完后，将它上传到WordPress的the wp-content/ themes 目录下。然后，登陆到WordPress后台的外观/主题，选择P2主题并激活。    这样你就成功安装P2主题，一切准备就绪了。</p>
<p><a href="http://www.wordpress.la/sites/default/files/p2.jpg" target="_blank"><img src="http://www.wordpress.la/sites/default/files/p2.jpg" alt="" width="415" height="241" /></a></p>
<p><strong>3.</strong><strong>关于登录面板 </strong></p>
<p>尽管P2主题已经不错了，你还可以通过一些方法完善它。由于P2允许用户不通过WordPress后台直接从frontpage发布内容。在主题的侧边栏添加个登录控制面板是个不错的主意。 登录控制面板可以帮你实现：</p>
<ul>
<li>如果用户尚未登录或还没有账户，系统将会显示登录表单及注册链接，访问者可以自己创建账户。</li>
<li>如果用户已经登录，系统会显示一个退出和账户选项的链接，因此就算是不懂WordPress的用户也可以轻松更新他的资料。</li>
</ul>
<p>在主题的侧边栏添加登录面板，只要打开主题中<em>sidebar.php</em>文件，粘贴下面的代码就行：</p>
<blockquote><p>&lt;li&gt;<br />
&lt;?php global $user_ID, $user_identity, $user_level ?&gt;<br />
&lt;?php if ( $user_ID ) : ?&gt;</p>
<p>&lt;h2&gt;Control panel&lt;/h2&gt;<br />
&lt;ul&gt;<br />
&lt;li&gt;Identified as &lt;strong&gt;&lt;?php echo $user_identity ?&gt;&lt;/strong&gt;.<br />
&lt;ul&gt;<br />
&lt;li&gt;&lt;a href=&#8221;&lt;?php bloginfo(&#8216;url&#8217;) ?&gt;/wp-admin/&#8221;&gt;Dashboard&lt;/a&gt;&lt;/li&gt;</p>
<p>&lt;li&gt;&lt;a href=&#8221;&lt;?php bloginfo(&#8216;url&#8217;) ?&gt;/wp-admin/profile.php&#8221;&gt;Profile and personal options&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&#8221;&lt;?php bloginfo(&#8216;url&#8217;) ?&gt;/wp-login.php?action=logout&amp;amp;redirect_to=&lt;?php echo urlencode($_SERVER['REQUEST_URI']) ?&gt;&#8221;&gt;Logout&lt;/a&gt;&lt;/li&gt;</p>
<p>&lt;?php<br />
if (is_single()) {?&gt;<br />
&lt;li&gt;&lt;a href=&#8221;&lt;?php bloginfo(&#8216;wpurl&#8217;);?&gt;/wp-admin/edit.php?p=&lt;?php the_ID(); ?&gt;&#8221;&gt;Edit Post&lt;/a&gt;<br />
&lt;/li&gt;<br />
&lt;?php } ?&gt;</p>
<p>&lt;/ul&gt;<br />
&lt;/li&gt;<br />
&lt;/ul&gt;</p>
<p>&lt;?php elseif ( get_option(&#8216;users_can_register&#8217;) ) : ?&gt;<br />
&lt;h2&gt;Identification&lt;/h2&gt;<br />
&lt;ul&gt;<br />
&lt;li&gt;</p>
<p>&lt;form action=&#8221;&lt;?php bloginfo(&#8216;url&#8217;) ?&gt;/wp-login.php&#8221; method=&#8221;post&#8221;&gt;<br />
&lt;p&gt;<br />
&lt;label for=&#8221;log&#8221;&gt;&lt;input type=&#8221;text&#8221; name=&#8221;log&#8221; id=&#8221;log&#8221; value=&#8221;&lt;?php echo wp_specialchars(stripslashes($user_login), 1) ?&gt;&#8221; size=&#8221;22&#8243; /&gt; User&lt;/label&gt;&lt;br /&gt;<br />
&lt;label for=&#8221;pwd&#8221;&gt;&lt;input type=&#8221;password&#8221; name=&#8221;pwd&#8221; id=&#8221;pwd&#8221; size=&#8221;22&#8243; /&gt; Password&lt;/label&gt;&lt;br /&gt;<br />
&lt;input type=&#8221;submit&#8221; name=&#8221;submit&#8221; value=&#8221;Login&#8221; /&gt;<br />
&lt;label for=&#8221;rememberme&#8221;&gt;&lt;input name=&#8221;rememberme&#8221; id=&#8221;rememberme&#8221; type=&#8221;checkbox&#8221; checked=&#8221;checked&#8221; value=&#8221;forever&#8221; /&gt; Remember me&lt;/label&gt;&lt;br /&gt;<br />
&lt;/p&gt;<br />
&lt;input type=&#8221;hidden&#8221; name=&#8221;redirect_to&#8221; value=&#8221;&lt;?php echo $_SERVER['REQUEST_URI']; ?&gt;&#8221;/&gt;<br />
&lt;/form&gt;</p>
<p>&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&#8221;&lt;?php bloginfo(&#8216;url&#8217;) ?&gt;/wp-register.php&#8221;&gt;Register&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&#8221;&lt;?php bloginfo(&#8216;url&#8217;) ?&gt;/wp-login.php?action=lostpassword&#8221;&gt;Recover password&lt;/a&gt;&lt;/li&gt;<br />
&lt;/ul&gt;</p>
<p>&lt;?php endif; ?&gt;<br />
&lt;/li&gt;</p></blockquote>
<p><strong>4. </strong><strong>微博客保密化 </strong><br />
登录/注册表单在某些情况下是挺完美了，但是别人还是可以通过搜索引擎引用你的内容。如果你想要让你的网站完全保密，也是没有问题的。   这就需要使用到WordPress插件<em>Private WP</em>，（<a href="http://wordpress.org/extend/plugins/private-wp/">下载</a>）。下载完后，将它上传到<em>wp-content/plugins</em> 目录下。然后登陆WordPress后台，激活该插件。</p>
<p>这样，你的网站就可以自动检测登录用户，只有登录用户才可阅读和发布文章。对于未知访问者，系统将会自动转向到WordPress登录面板。</p>
<p><a href="http://www.wordpress.la/sites/default/files/private-wp.png" target="_blank"><img src="http://www.wordpress.la/sites/default/files/private-wp.png" alt="" width="415" height="308" /></a></p>
<h3>结论</h3>
<p>这再次验证了WordPress的可扩展性以及功能的强大。如果你对WP比较熟悉，不用半个小时就可以用P2主题创建一个类似于Twitter的站点。够神奇吧！</p>
<p>这里只是简单介绍创建微博客网站的一些基本技巧，如果有兴趣，还有很多有意思的功能可以用来加强你的微博网站。比如，创建一个页面显示所有的会员列表或者过滤文章（只有特定的会员才可以发布文章）等等。</p>
<p>原文：</p>
<h3><a href="http://www.catswhocode.com/blog/create-your-own-private-twitter-site-using-wordpress">Create your own private Twitter site using WordPress</a></h3>
<p>With the incredible popularity of Twitter theses days, many people are asking themselves how can they create their own Twitter-like network for their family, friends or company. This may be a lot easier than you think. In this tutorial, I’m going to show you how to do it easily, using WordPress.</p>
<h2>Getting ready</h2>
<p>Twitter success is the proof, microblogging is definitely something useful and efficient. It can help you staying tuned with friends, family or coworkers.</p>
<p>While Twitter is great, it may not be the best choice if you&#8217;re looking for a private network, for example for sharing work tips with colleagues, or notice your familly about what&#8217;s up.<br />
As I was searching for an easy and quick way to create a private microblogging website, I stumbled upon an open source app called laconi.ca, which was created to allow people to launch their own private &#8220;Twitter like&#8221; microblogging sites. I didn&#8217;t really liked it and it was a total pain to install.</p>
<p>After this not so good experience, I decided that WordPress should do that job, and do it good as always.<br />
<img src="http://www.catswhocode.com/blog/wp-content/uploads/2009/07/p2-_-faster-blogging-3.png" alt="P2 Theme" /></p>
<h2>Let&#8217;s doing it</h2>
<p>Well, enought talk for now! Let&#8217;s create our own, private microblogging website using our beloved WordPress.</p>
<h3>1. Installing WordPress</h3>
<p>The first thing to do is obviously to install WordPress on your server. Installing WordPress is definitely easy and and I&#8217;ll not explain it here due to the incredible amount of tutorials you can find on the internet.<br />
If you need help for installing WordPress, you should read the <a href="http://codex.wordpress.org/Main_Page">documentation</a>. Or even better, you can register at <a href="http://www.catswhocode.com/blog/wpwebhost.html">WpWebHost</a>, the WordPress hosting experts, and use Fantastico to get your WordPress installed automatically in a minute. Just click here if you want to know more.</p>
<h3>2. Get your copy of the P2 theme</h3>
<p>The guys from Automattic (The company behing WordPress) released, some time ago, a very cool WordPress theme for social microblogging. The theme is called P2 and you can <a href="http://wordpress.org/extend/themes/p2">get it for free here</a>.</p>
<p>After you downloaded P2, simply uncompress the archive and upload it to the wp-content/themes directory of your WordPress install. Once done, login to your WordPress dashboard and go to &#8220;Appearance&#8221;, &#8220;Themes&#8221;. Slect the P2 theme and activate it.</p>
<p><img src="http://www.catswhocode.com/blog/wp-content/uploads/2009/07/p2.jpg" alt="P2 Theme" /><br />
That&#8217;s easy as that, you have sucessfully installed P2 and you&#8217;re ready for social microblogging.</p>
<h3>3. What about a login form?</h3>
<p>Althought the P2 theme itself is very good, it is possible to enhance it even more. As P2 allow users to post directly from the frontpage, without visiting WordPress dashboard, a good idea should be to integrate a control panel in the theme sidebar.<br />
Our control panel will do the following:<br />
If the user isn&#8217;t logged in or have no account yet: We&#8217;ll display a login form as well as a link to register, so the visitor can create his account.<br />
If the user is already logged in: We&#8217;ll display a link to logout as well as a link to account options, so the user (Even if (s)he doesn&#8217;t know much about WordPress) can easily update his/her profile.</p>
<p>To integrate a login form in your theme sidebar, simply open the <em>sidebar.php</em> file and paste the following code:</p>
<pre>&lt;li&gt;
  &lt;?php global $user_ID, $user_identity, $user_level ?&gt;
  &lt;?php if ( $user_ID ) : ?&gt;

    &lt;h2&gt;Control panel&lt;/h2&gt;
	 &lt;ul&gt;
	   &lt;li&gt;Identified as &lt;strong&gt;&lt;?php echo $user_identity ?&gt;&lt;/strong&gt;.
	   &lt;ul&gt;
		  &lt;li&gt;&lt;a href="&lt;?php bloginfo('url') ?&gt;/wp-admin/"&gt;Dashboard&lt;/a&gt;&lt;/li&gt;

			&lt;li&gt;&lt;a href="&lt;?php bloginfo('url') ?&gt;/wp-admin/profile.php"&gt;Profile and personal options&lt;/a&gt;&lt;/li&gt;
			&lt;li&gt;&lt;a href="&lt;?php bloginfo('url') ?&gt;/wp-login.php?action=logout&amp;amp;redirect_to=&lt;?php echo urlencode($_SERVER['REQUEST_URI']) ?&gt;"&gt;Logout&lt;/a&gt;&lt;/li&gt;

         &lt;?php
         if (is_single()) {?&gt;
           &lt;li&gt;&lt;a href="&lt;?php bloginfo('wpurl');?&gt;/wp-admin/edit.php?p=&lt;?php the_ID(); ?&gt;"&gt;Edit Post&lt;/a&gt;
           &lt;/li&gt;
         &lt;?php } ?&gt;

	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;/ul&gt;

  &lt;?php elseif ( get_option('users_can_register') ) : ?&gt;
    &lt;h2&gt;Identification&lt;/h2&gt;
    &lt;ul&gt;
      &lt;li&gt;

      &lt;form action="&lt;?php bloginfo('url') ?&gt;/wp-login.php" method="post"&gt;
      &lt;p&gt;
        &lt;label for="log"&gt;&lt;input type="text" name="log" id="log" value="&lt;?php echo wp_specialchars(stripslashes($user_login), 1) ?&gt;" size="22" /&gt; User&lt;/label&gt;&lt;br /&gt;
        &lt;label for="pwd"&gt;&lt;input type="password" name="pwd" id="pwd" size="22" /&gt; Password&lt;/label&gt;&lt;br /&gt;
&lt;input type="submit" name="submit" value="Login" /&gt;
        &lt;label for="rememberme"&gt;&lt;input name="rememberme" id="rememberme" type="checkbox" checked="checked" value="forever" /&gt; Remember me&lt;/label&gt;&lt;br /&gt;
&lt;/p&gt;
        &lt;input type="hidden" name="redirect_to" value="&lt;?php echo $_SERVER['REQUEST_URI']; ?&gt;"/&gt;
      &lt;/form&gt;

      &lt;/li&gt;
      &lt;li&gt;&lt;a href="&lt;?php bloginfo('url') ?&gt;/wp-register.php"&gt;Register&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="&lt;?php bloginfo('url') ?&gt;/wp-login.php?action=lostpassword"&gt;Recover password&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;

&lt;?php endif; ?&gt;
&lt;/li&gt;</pre>
<h3>4. Making your network private</h3>
<p>While the login/register form option can be good in some case, it will still allow people to read your discussions and search engines to index your content. If your need is a 100% private website, don&#8217;t worry. This is far from being a problem.<br />
To do so, we&#8217;ll use a WordPress plugin, named <em>Private WP</em>. Get your copy <a href="http://wordpress.org/extend/plugins/private-wp/">here</a>. Once you have it, extract the archive on your hard drive and upload the <em>private-wp</em> to the <em>wp-content/plugins</em> directory of your WordPress install. Then, simply login to WordPress, go to the dashboard, then to &#8220;Plugins&#8221; and activate the plugin.</p>
<p>That&#8217;s all you have to do. Now, your website will automatically detect logged in users, who&#8217;ll be able to read and post content, and unknown visitors, who&#8217;ll be automatically redirected to WordPress loggin panel.<br />
<img src="http://www.catswhocode.com/blog/wp-content/uploads/2009/07/private-wp.png" alt="" /></p>
<h2>Conclusion</h2>
<p>The first thing which have to be said is that, one more time, WordPress show how extensible and powerful it is. If you&#8217;re familiar with WP, creating this &#8220;Twitter-like&#8221; site using the P2 theme should not take you more than 30 minutes. Isn&#8217;t that great? I&#8217;ll not say that I love WordPress, because all of you already know <img src="http://www.catswhocode.com/blog/wp-includes/images/smilies/icon_wink.gif" alt=";)" /></p>
<p>This tutorial was focused on making a private microblogging site and used only basic techniques, but there&#8217;s a lot of other interresting things that can be done in order to enhance this &#8220;Twitter-like&#8221; site. For example, you may want to create a page template listing all members, or even better, filtering posts to see only those posted by a selection of members?</p>
]]></content:encoded>
			<wfw:commentRss>http://xwxy.zzspy.com/2009/08/01/create-your-private-twitter-like-wordpress-2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
