﻿<?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>LiveSino - LiveSide 中文版 &#187; Codename H</title>
	<atom:link href="http://livesino.net/tag/codename-h/feed" rel="self" type="application/rss+xml" />
	<link>http://livesino.net</link>
	<description>LiveSide 中文版，关注 Windows Live, MSN 及微软等相关的产品、技术和文化</description>
	<lastBuildDate>Fri, 25 May 2012 08:17:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<atom:link rel='hub' href='http://livesino.net/?pushpress=hub'/>
		<item>
		<title>Theme Codename H 主题 Rev. 96 Beta 版发布</title>
		<link>http://livesino.net/archives/2872.live</link>
		<comments>http://livesino.net/archives/2872.live#comments</comments>
		<pubDate>Sun, 15 Aug 2010 10:10:38 +0000</pubDate>
		<dc:creator>Picturepan2</dc:creator>
				<category><![CDATA[下载]]></category>
		<category><![CDATA[Codename H]]></category>
		<category><![CDATA[LiveSino]]></category>
		<category><![CDATA[Theme]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://livesino.net/archives/2872.live</guid>
		<description><![CDATA[LiveSino 所采用的新版 WordPress 主题 Theme Codename H 已经发布，版本是 Rev.96 Beta，包括了完整版、移动版和 WordPress 表情包。访问 Theme Codename H 主题页面下载、并了解更多介绍、安装、自定义的内容。 [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://livesino.net/wp-content/themes/h/theme/theme_codename_h_preview.png" alt="Theme Codename H" /></p>
<p>LiveSino 所采用的新版 WordPress 主题 Theme Codename H 已经发布，版本是 Rev.96 Beta，包括了<a href="http://livesino.net" target="_blank">完整版</a>、<a href="http://m.livesino.net" target="_blank">移动版</a>和 WordPress 表情包。访问 <a href="http://livesino.net/theme-codename-h" target="_blank">Theme Codename H 主题页面</a>下载、并了解更多介绍、安装、自定义的内容。</p>
<p>注意，该 Theme Codename H 版本为 Beta 版，有任何问题、反馈或建议可通过 <a href="http://twitter.com/picturepan2" target="_blank">Twitter</a> 和<a href="http://t.sina.com.cn/picturepan2" target="_blank">新浪微博</a>联系我，或者发送邮件至 picturepan2 (at) hotmail.com。</p>
<p><strong>更新</strong>：目前的 Theme Codename H 主题包已修复了 Web Slice 和 Microsoft Translator 的问题。<br />
<strong>更新2</strong>：请 17 日前，请所有已经的安装过 Theme Codename H 主题的同学，重新下载主题包，替换 comments.php 和 footer.php。</p>
<p>&copy;2011 <a href="http://livesino.net">LiveSino.net</a> | <a href="http://livesino.net/archives/2872.live" title="Theme Codename H 主题 Rev. 96 Beta 版发布">阅读原文</a> | <a href="http://livesino.net/archives/2872.live#comments" title="Theme Codename H 主题 Rev. 96 Beta 版发布 的评论">添加评论</a></p>]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>113</slash:comments>
		</item>
		<item>
		<title>Theme Codename H 隐藏的 Geek 专属特性：命令行</title>
		<link>http://livesino.net/archives/2810.live</link>
		<comments>http://livesino.net/archives/2810.live#comments</comments>
		<pubDate>Sat, 17 Jul 2010 09:12:10 +0000</pubDate>
		<dc:creator>Picturepan2</dc:creator>
				<category><![CDATA[资讯]]></category>
		<category><![CDATA[Codename H]]></category>
		<category><![CDATA[Theme]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://livesino.net/?p=2810</guid>
		<description><![CDATA[近期在完善 Theme Codename H 最终发布页面的同时，也忍不住为 Theme Codename H 搜索框增加了命令行功能。例如在右上角的搜索框输入“~random”并回车，主题即会执行随机文章命令。 更方便的是，搜索框也支持快捷键，任何情况下只要按下“Shift + `（1 左边的按键）”即可焦点至搜索框，以便输入。 目前支持的命令只有返回首页（~）和随机文章（~random 或 ~r），欢迎留言建议更多。 [...]]]></description>
			<content:encoded><![CDATA[<p>近期在完善 <a title="Theme Codename H" href="http://livesino.net/theme-codename-h" target="_blank">Theme Codename H 最终发布页面</a>的同时，也忍不住为 Theme Codename H 搜索框增加了命令行功能。例如在右上角的搜索框输入“~random”并回车，主题即会执行随机文章命令。</p>
<p><a href="http://livesino.net/images/0e2a69ad09ff_DE62/theme_codename_h_cmd.png" rel="ignition"><img title="Theme Codename H 隐藏的 Geek 专属特性：命令行" src="http://livesino.net/images/0e2a69ad09ff_DE62/theme_codename_h_cmd.png" alt="Theme Codename H 隐藏的 Geek 专属特性：命令行" width="608" height="224" /></a></p>
<p>更方便的是，搜索框也支持快捷键，任何情况下只要按下“Shift + `（1 左边的按键）”即可焦点至搜索框，以便输入。</p>
<p>目前支持的命令只有返回首页（~）和随机文章（~random 或 ~r），欢迎留言建议更多。 <img src='http://livesino.net/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>&copy;2011 <a href="http://livesino.net">LiveSino.net</a> | <a href="http://livesino.net/archives/2810.live" title="Theme Codename H 隐藏的 Geek 专属特性：命令行">阅读原文</a> | <a href="http://livesino.net/archives/2810.live#comments" title="Theme Codename H 隐藏的 Geek 专属特性：命令行 的评论">添加评论</a></p>]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>LiveSino 恢复，并已迁移至 Media Temple</title>
		<link>http://livesino.net/archives/2787.live</link>
		<comments>http://livesino.net/archives/2787.live#comments</comments>
		<pubDate>Sun, 04 Jul 2010 16:09:44 +0000</pubDate>
		<dc:creator>Picturepan2</dc:creator>
				<category><![CDATA[资讯]]></category>
		<category><![CDATA[Codename H]]></category>
		<category><![CDATA[LiveSino]]></category>
		<category><![CDATA[Theme]]></category>

		<guid isPermaLink="false">http://livesino.net/?p=2787</guid>
		<description><![CDATA[这 10 多天我一直忙于配置 LiveSino 的新服务器，现在 LiveSino 已经基本稳定。是的，在原本服务器的 IP 被屏蔽，联系提供商 1&#38;1 也未能解决之后，我选择了新的服务器提供商 Media Temple。 新的服务器 现在 LiveSino [...]]]></description>
			<content:encoded><![CDATA[<p>这 10 多天我一直忙于配置 LiveSino 的新服务器，现在 LiveSino 已经基本稳定。是的，在原本<a title="服务器 IP 被屏蔽；LiveSino 仍在继续" href="http://livesino.net/archives/2760.live" target="_blank">服务器的 IP 被屏蔽</a>，联系提供商 1&amp;1 也未能解决之后，我选择了新的服务器提供商 Media Temple。</p>
<p><strong>新的服务器</strong></p>
<p><img title="media_temple" alt="media_temple" src="http://livesino.net/images/LiveSino_B45A/media_temple.png" width="271" height="117" /></p>
<p>现在 LiveSino 所选择的正是 Media Temple 今年新推出的 <a href="http://www.mediatemple.net/webhosting/ve/" target="_blank">(ve) Server 系列</a>的最基础的那款（配置为 512MB 内存、20GB 硬盘、320GB 流量），年付 300 美元。</p>
<p><strong>Theme Codename H</strong></p>
<p>新版 WordPress 主题 <a href="http://livesino.net/tag/codename-h" target="_blank">Theme Codename H</a> 代码已经完成，样式和功能与 LiveSino 几乎相同（除去 Microsoft Translator AJAX 翻译，因其需要申请 AppID）。但具体发布日期还没确定。</p>
<p><strong>反馈、投稿和联系</strong></p>
<p>邮件的话，可以发送到 <a href="mailto:Picturepan2@livesino.net">Picturepan2@livesino.net</a>。其他方式，还包括 <a title="@Picturepan2" href="http://twitter.com/picturepan2" target="_blank">Twitter</a>、<a href="http://facebook.com/picturepan2" target="_blank">Facebook</a>。</p>
<p>// 谢谢大家的支持。</p>
<p>&copy;2011 <a href="http://livesino.net">LiveSino.net</a> | <a href="http://livesino.net/archives/2787.live" title="LiveSino 恢复，并已迁移至 Media Temple">阅读原文</a> | <a href="http://livesino.net/archives/2787.live#comments" title="LiveSino 恢复，并已迁移至 Media Temple 的评论">添加评论</a></p>]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>33</slash:comments>
		</item>
		<item>
		<title>WordPress 主题 Theme Codename H 之移动版设计</title>
		<link>http://livesino.net/archives/2527.live</link>
		<comments>http://livesino.net/archives/2527.live#comments</comments>
		<pubDate>Wed, 10 Mar 2010 15:08:32 +0000</pubDate>
		<dc:creator>Picturepan2</dc:creator>
				<category><![CDATA[资讯]]></category>
		<category><![CDATA[Codename H]]></category>
		<category><![CDATA[LiveSino]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Theme]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://livesino.net/?p=2527</guid>
		<description><![CDATA[本文是 LiveSino 的 WordPress 主题 Theme Codename H 介绍系列之一，我将在此篇中详细介绍专为手机设计的 Theme Codename H 移动版。 Theme Codename H [...]]]></description>
			<content:encoded><![CDATA[<p>本文是 LiveSino 的 WordPress 主题 <a title="Theme Codename H" href="http://livesino.net/tag/codename-h" target="_blank">Theme Codename H 介绍系列</a>之一，我将在此篇中详细介绍专为手机设计的 Theme Codename H 移动版。</p>
<p>Theme Codename H 移动版支持浏览最新文章、最新评论、单篇文章和其评论。若要修改日志、添加评论（考虑中）、博客管理，还请切换至完整版。目前已知的 Theme Codename H 移动版站点最佳范例仅有 <a href="http://m.livesino.net" target="_blank">m.livesino.net</a>。</p>
<p><a href="http://livesino.net/images/WordPressThemeCodenameH_10D8C/theme_codename_h_mobile_windows_phone.png" rel="ignition" target="_blank"><img title="WordPress 主题 Theme Codename H 之移动版设计" src="http://livesino.net/images/WordPressThemeCodenameH_10D8C/theme_codename_h_mobile_windows_phone_thumb.png" alt="WordPress 主题 Theme Codename H 之移动版设计" width="640" height="355" /></a><br />
<small>Windows Phone 6.5 + Opera 移动版截图</small></p>
<p>Theme Codename H 移动版在 Windows Phone 6.5、Zune HD、iPhone、Android 等平台上的显示效果一致，且通过增高行距增强了手机的触控体验。其他手机平台也能保证基本的浏览体验，但可惜部分简体中文无法在 Zune HD 上正常显示。</p>
<p><strong>1）</strong>完整版链接。两种情况：</p>
<ul>
<li>当访问移动版首页时，此处链接即为完整版首页的 URL</li>
<li>当访问移动版日志页面时，此处链接即指向完整版日志的 URL</li>
</ul>
<p><strong>2）</strong>移动版单篇日志正文部分，保持了完整版 Theme Codename H 的基本正文文本和图片的样式。</p>
<p><strong>3）</strong>移动版评论默认支持显示 Gravatar 头像，并且评论列表也分两种情况：</p>
<ul>
<li>移动版首页，显示最新评论 8 条，并且语句是截断的</li>
<li>移动版日志页面，显示所有该日志的评论，语句不截断</li>
</ul>
<p><a href="http://livesino.net/images/WordPressThemeCodenameH_10D8C/theme_codename_h_mobile_iphone_palm_android.png" rel="ignition" target="_blank"><img title="WordPress 主题 Theme Codename H 之移动版设计" src="http://livesino.net/images/WordPressThemeCodenameH_10D8C/theme_codename_h_mobile_iphone_palm_android_thumb.png" alt="WordPress 主题 Theme Codename H 之移动版设计" width="640" height="319" /></a><br />
<small>左图为 iPod Touch 截图，iPhone 效果同；中图为 Palm 截图；右图为 Android 截图</small></p>
<p><strong>4）</strong>即 3）中提到的日志页面的评论列表。</p>
<p>移动版的代码将随新版 Theme Codename H 一同发布。或许在发布前我还会新增功能，但不管怎样，移动版的设计原则和 <a title="WordPress 主题 Theme Codename H 之 Web Slice 模版设计" href="http://livesino.net/archives/2499.live" target="_blank">Web Slice 页面模版</a>一样：<strong>简洁，并专注于最新内容</strong>。</p>
<p>&copy;2011 <a href="http://livesino.net">LiveSino.net</a> | <a href="http://livesino.net/archives/2527.live" title="WordPress 主题 Theme Codename H 之移动版设计">阅读原文</a> | <a href="http://livesino.net/archives/2527.live#comments" title="WordPress 主题 Theme Codename H 之移动版设计 的评论">添加评论</a></p>]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>48</slash:comments>
		</item>
		<item>
		<title>WordPress 主题 Theme Codename H 之 Web Slice 模版设计</title>
		<link>http://livesino.net/archives/2499.live</link>
		<comments>http://livesino.net/archives/2499.live#comments</comments>
		<pubDate>Sun, 28 Feb 2010 16:18:02 +0000</pubDate>
		<dc:creator>Picturepan2</dc:creator>
				<category><![CDATA[资讯]]></category>
		<category><![CDATA[Codename H]]></category>
		<category><![CDATA[LiveSino]]></category>
		<category><![CDATA[Theme]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://livesino.net/?p=2499</guid>
		<description><![CDATA[本文是 LiveSino 的 Theme Codename H 介绍系列之一，详细谈论了 WordPress 主题 Theme Codename H 中 Web Slice [1] [...]]]></description>
			<content:encoded><![CDATA[<p>本文是 LiveSino 的 <a title="Theme Codename H" href="http://livesino.net/theme-codename-h" target="_blank">Theme Codename H</a> 介绍系列之一，详细谈论了 WordPress 主题 Theme Codename H 中 Web Slice [1] 模版的设计及思考。</p>
<p>微软在 IE8 中引入了新特性 <a title="微软中国的 Internet Explorer 8 网页快讯介绍" href="http://www.microsoft.com/china/windows/internet-explorer/ie8howto.aspx?3" target="_blank">Web Slices</a>，中文名为网页快讯：允许用户订阅网页的局部，并由 IE 自动进行定时检查该部分网页的更新，而用户无需访问该网站即可在收藏栏查看。主要应用于网站资讯更新、新邮件等内容的提醒，或版本跟踪。</p>
<p><a href="http://livesino.net/images/WordPressThemeCodenameH_B27A/theme_codename_h_wordpress_webslice.png" rel="ignition" target="_blank"><img title="WordPress 主题 Theme Codename H 之 Web Slice 模版设计" src="http://livesino.net/images/WordPressThemeCodenameH_B27A/theme_codename_h_wordpress_webslice_thumb.png" alt="WordPress 主题 Theme Codename H 之 Web Slice 模版设计" width="380" height="309" /></a></p>
<p><strong>1）</strong>缩小版博客标志、兼博客首页访问按钮，我在其右侧添加了“外链”图标以暗示其可点击。</p>
<p><strong>2）</strong>考虑到 Theme Codename H 多处使用到了搜索框，我将搜索表单代码独立写在了（第一版就已如此）。而 Web Slice 底部的搜索框，正是直接调用了搜索表单模块。</p>
<p>也因此，Web Slice 模版中的搜索框与 Theme Codename H 顶部右侧的一样，也支持显示提示信息。这里的“搜索 ”就是提示信息，点击输入框准备输入时，提示文字将自动消失；当输入框文本为空，且焦点离开输入框时，自动显示提示信息。</p>
<p><strong>3）</strong>Web Slice 模版的最新文章已减少至 4 篇，可以说，<a title="深入介绍 Theme Codename H – IE8 Web Slices" href="http://livesino.net/archives/1826.live" target="_blank">原来的</a> 10 篇最新文章不符合 Web Slices 强调精简的气质。</p>
<p><a href="http://livesino.net/images/WordPressThemeCodenameH_B27A/theme_codename_h_wordpress_webslice_sidebar.png" rel="ignition" target="_blank"><img title="WordPress 主题 Theme Codename H 之 Web Slice 模版设计" src="http://livesino.net/images/WordPressThemeCodenameH_B27A/theme_codename_h_wordpress_webslice_sidebar_thumb.png" alt="WordPress 主题 Theme Codename H 之 Web Slice 模版设计" width="380" height="190" /></a></p>
<p><strong>4）</strong>鼠标经过右边栏的最新文章即会显示 Web Slice 订阅按钮，在最新文章标题的右侧的 Web Slice 文字除了暗示此模块支持 Web Slice 外，点击其本身也可订阅。</p>
<p>我曾疏忽了 Web Slices 开发时需要注意的一点，特此记录：若 Web Slice 仅采用 <a href="http://msdn.microsoft.com/en-us/library/cc196992(VS.85).aspx#_altdisplay">Alternative Display</a> 方式 [2] 调用外部网页，IE 并不缓存页面，因此无法与新页面对比，收藏栏也无法加粗文字提醒。解决方案是：同时使用基本的 Entry Content 方式缓存内容，用以对比是否有更新。</p>
<p><strong>[1]</strong> 指 Theme Codename H 主题中的模版时采用单数 Web Slice；指 IE8 特性时用复数 Web Slices。</p>
<p><strong>[2]</strong> Alternative Display 正是 Theme Codename H 所采用的调用方式，可支持搜索表单。</p>
<p>&copy;2011 <a href="http://livesino.net">LiveSino.net</a> | <a href="http://livesino.net/archives/2499.live" title="WordPress 主题 Theme Codename H 之 Web Slice 模版设计">阅读原文</a> | <a href="http://livesino.net/archives/2499.live#comments" title="WordPress 主题 Theme Codename H 之 Web Slice 模版设计 的评论">添加评论</a></p>]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>WordPress 主题 Theme Codename H 之评论模版设计</title>
		<link>http://livesino.net/archives/2497.live</link>
		<comments>http://livesino.net/archives/2497.live#comments</comments>
		<pubDate>Sat, 27 Feb 2010 20:17:37 +0000</pubDate>
		<dc:creator>Picturepan2</dc:creator>
				<category><![CDATA[资讯]]></category>
		<category><![CDATA[Codename H]]></category>
		<category><![CDATA[LiveSino]]></category>
		<category><![CDATA[Theme]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://livesino.net/?p=2497</guid>
		<description><![CDATA[Theme Codename H 正是 LiveSino 使用的 WordPress 主题，由我改进代码和用户体验，目前最新的 Rev.96 相对于之前发布的正式版 Rev.74 有相当多的更新。在发布新版 Theme Codename H 主题之前，我觉得有必要开始一系列详尽的介绍。 [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Theme Codename H" href="http://livesino.net/theme-codename-h" target="_blank">Theme Codename H</a> 正是 LiveSino 使用的 WordPress 主题，由我改进代码和用户体验，目前最新的 Rev.96 相对于<a title="Theme Codename H 正式推出" href="http://livesino.net/archives/1821.live" target="_blank">之前发布的正式版 Rev.74</a> 有相当多的更新。在发布新版 Theme Codename H 主题之前，我觉得有必要开始一系列详尽的介绍。</p>
<p>首先从 Theme Codename H 评论模版开始。</p>
<p><a href="http://livesino.net/images/WordPressThemeCodenameH_B27A/theme_codename_h_comments.png" rel="ignition" target="_blank"><img title="WordPress 主题 Theme Codename H 之评论模版设计" src="http://livesino.net/images/WordPressThemeCodenameH_B27A/theme_codename_h_comments_thumb.png" alt="WordPress 主题 Theme Codename H 之评论模版设计" width="454" height="447" /></a> </p>
<p><strong>1）</strong>支持 WordPress 原生评论嵌套，支持 Gravatar 头像，其中访客和登录用户的头像边框将以灰色和绿色区别开。而对于不开放注册的博客来说，这一头像边框特性将标识出管理员、编辑等登录用户的评论。</p>
<p><strong>2）</strong>在未登录的状态下，发表评论表单右侧将显示 Gravatar 头像：</p>
<ul>
<li>若是首次尝试发表评论，将显示默认头像</li>
<li>若已成功发表过评论，并且 E-mail 输入框保存着上次的邮件地址，将显示该 E-mail 地址对应的 Gravatar 头像（就是图中所示的效果）</li>
</ul>
<p>Gravatar 头像将链接至 Gravatar.com 站点，以便于访客设置头像，或者创建头像。</p>
<p><strong>3）</strong>延续了 Theme Codename H 一贯的风格，“引用 Trackback”类型的评论将以精简的格式进行显示（无展开内容，仅标题和链接），且不可回复。</p>
<p><strong>4）</strong>嵌套回复的原理可完全参考 Jinwen 老师的<a title="利用JQuery为WordPress的嵌套回复添加@reply功能" href="http://www.saywp.com/wordpress/add-reply-function-in-wordpress-thread-comment-with-jquery.html" target="_blank">此文</a>，实现的效果：所有评论的嵌套始终直属于主评论，二级评论将通过 @XXX 区别开回复对象。</p>
<p>另外，点击回复按钮，评论文本框会自动添加 @XXX 文字和链接；取消回复按钮也会同时出现，相比其左侧的提交按钮，取消回复采用了文本链接的形式。</p>
<p><strong>5）</strong>我分别用不同颜色标注了表单输入框右侧的必填和选填提示，该样式也同样适用于主题中的其他部分，例如联系表单的输入框的。</p>
<p>若实在不想自行处理 WordPress 的评论模版，新版 Theme Codename H 主题中有现成的。 <img src='http://livesino.net/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>&copy;2011 <a href="http://livesino.net">LiveSino.net</a> | <a href="http://livesino.net/archives/2497.live" title="WordPress 主题 Theme Codename H 之评论模版设计">阅读原文</a> | <a href="http://livesino.net/archives/2497.live#comments" title="WordPress 主题 Theme Codename H 之评论模版设计 的评论">添加评论</a></p>]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>76</slash:comments>
		</item>
		<item>
		<title>Theme Codename H 主题 Rev.85 更新概览</title>
		<link>http://livesino.net/archives/2202.live</link>
		<comments>http://livesino.net/archives/2202.live#comments</comments>
		<pubDate>Mon, 24 Aug 2009 06:52:02 +0000</pubDate>
		<dc:creator>Picturepan2</dc:creator>
				<category><![CDATA[开发]]></category>
		<category><![CDATA[Codename H]]></category>
		<category><![CDATA[LiveSino]]></category>
		<category><![CDATA[Theme]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://livesino.net/?p=2202</guid>
		<description><![CDATA[自 Theme Codename H 主题发布以来，我已相当久没介绍 Theme Codename H 的进展。或许是 WordCamp Beijing 2009 的原因，我觉得是时候介绍 Theme Codename H [...]]]></description>
			<content:encoded><![CDATA[<p>自 <a title="Theme Codename H 正式推出" href="http://livesino.net/archives/1821.live" target="_blank">Theme Codename H 主题发布</a>以来，我已相当久没介绍 Theme Codename H 的进展。或许是 <a title="WordCamp Beijing 2009" href="http://2009.wordcampchina.org/" target="_blank">WordCamp Beijing 2009</a> 的原因，我觉得是时候介绍 Theme Codename H 这款 WordPress 主题 Rev.74 至 Rev.85 的更新细节了，并且其中所使用的<strong>四点</strong>技巧也可应用于其他 <a title="Wordpress" href="http://livesino.net/tag/wordpress" target="_blank">WordPress</a> 主题。</p>
<h3>1. 图片加载图标</h3>
<p><a href="http://livesino.net/images/ThemeCodenameHRev.85_3647/image.png" rel="ignition" target="_blank"><img title="正文图片以及评论 Gravatar 头像部分增加了正在加载的图标" src="http://livesino.net/images/ThemeCodenameHRev.85_3647/image_thumb.png" alt="正文图片以及评论 Gravatar 头像部分增加了正在加载的图标" width="500" height="198" /></a></p>
<p>在 Theme Codename H Rev.75 中，我为正文图片以及评论 Gravatar 头像部分<strong>增加了正在加载的图标</strong>（效果见上图）。方法：</p>
<p>准备“正在加载”图片 loading.gif 一枚，并在主题的 CSS 样式中增加：</p>
<p><code>img{background:url(images/loading.gif) no-repeat center center;}</code></p>
<h3>2. 页面标题中显示页码</h3>
<p><a href="http://livesino.net/images/ThemeCodenameHRev.85_3647/image_3.png" rel="ignition" target="_blank"><img title="页面的标题部分已自动根据页码显示“- 第 n 页”字样" src="http://livesino.net/images/ThemeCodenameHRev.85_3647/image_thumb_3.png" alt="页面的标题部分已自动根据页码显示“- 第 n 页”字样" width="482" height="85" /></a></p>
<p>在 Theme Codename H Rev.76 中，页面的标题部分已<strong>自动根据页码显示“- 第 n 页”字样</strong>（效果见上图）。方法：header.php 文件中 &lt;title&gt;…&lt;/title&gt; 标签内的对应位置添加该句：</p>
<p><code>&lt;?php if( $paged == "" ) $pagenum = "";else echo $pagenum = "- 第 ".$paged." 页"; ?&gt;</code></p>
<p><span id="more-2202"></span></p>
<h3>3. 搜索框显示正在搜索的关键词</h3>
<p><a href="http://livesino.net/images/ThemeCodenameHRev.85_3647/image_4.png" rel="ignition" target="_blank"><img title="搜索框显示正在搜索的关键词" src="http://livesino.net/images/ThemeCodenameHRev.85_3647/image_thumb_4.png" alt="搜索框显示正在搜索的关键词" width="500" height="148" /></a></p>
<p>当进入搜索结果页面时，右上角的搜索框将保持显示该搜索关键词，而非默认的“搜索全部文章”提示。方法：在搜索框表单文件，例如 widget-search.php 文件的 HTML 代码开始前插入搜索页判断语句：</p>
<p><code>&lt;?php<br />
   if (!is_search()) {<br />
      $search_text = "搜索所有文章";<br />
   } else {<br />
      $search_text = $s;<br />
   }<br />
?&gt;</code></p>
<p>而之后的输入框使用如下 HTML 代码，：</p>
<p><code>&lt;input type="text" size="24" name="s" value="&lt;?php echo $search_text; ?&gt;" onfocus="if (this.value == '搜索所有文章') {this.value = '';}" onblur="if (this.value == '') {this.value = '搜索所有文章';}" /&gt;</code></p>
<h3>4. 搜索引擎来源访客提示</h3>
<p><a href="http://livesino.net/images/ThemeCodenameHRev.85_3647/image_5.png" rel="ignition" target="_blank"><img title="通过主流搜索引擎来到 LiveSino 的访客都将看到推荐订阅的提示" src="http://livesino.net/images/ThemeCodenameHRev.85_3647/image_thumb_5.png" alt="通过主流搜索引擎来到 LiveSino 的访客都将看到推荐订阅的提示" width="500" height="78" /></a></p>
<p>通过主流搜索引擎来到 LiveSino 的访客都将看到推荐订阅的提示，点击任意链接该提示即会消失。方法：在 functions.php 文件中插入如下判断代码：</p>
<p><code>&lt;?php<br />
   function se(){<br />
      $ref = $_SERVER['HTTP_REFERER'];<br />
      $SE = array('.google.', '.bing.', '.yahoo.', '.baidu.', '.soso.');<br />
      foreach ($SE as $source) {<br />
         if (strpos($ref,$source)!==false) return true;<br />
      }<br />
      return false;<br />
   }<br />
?&gt;</code></p>
<p>在 index.php 或其他需要出现提示的模板中插入以下显示代码：</p>
<p><code>&lt;?php<br />
   if (function_exists('se')) {<br />
      if (se()) {<br />
      echo "&lt;div class=\"fuss\"&gt;&lt;a href=\"http://feed.livesino.net\"&gt;想说啥？&lt;/a&gt;&lt;/div&gt;";<br />
      }<br />
   }<br />
?&gt;</code></p>
<h3>5. 微软翻译 Microsoft Translator Widget</h3>
<p>具体介绍请参考『<a title="LiveSino 已增加 Microsoft Translator Widget，更多邀请将送出" href="http://livesino.net/archives/1983.live" target="_blank">LiveSino 已增加 Microsoft Translator Widget</a>』一文，或<a title="点击此处申请 Microsoft Translator Widget 的邀请" href="http://www.microsofttranslator.com/Widget/" target="_blank">点击此处申请</a> Microsoft Translator Widget 的邀请。感谢 Microsoft Translator Widget 在 LiveSino 文章国际化过程中所有的帮助。 <img src='http://livesino.net/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<h3>6. 快速 RSS Feed 订阅模块</h3>
<p><a href="http://livesino.net/images/ThemeCodenameHRev.85_3647/image_6.png" rel="ignition" target="_blank"><img title="Theme Codename H 主题 Rev.85 更新概览" src="http://livesino.net/images/ThemeCodenameHRev.85_3647/image_thumb_6.png" alt="Theme Codename H 主题 Rev.85 更新概览" width="319" height="113" /></a></p>
<p>快速 RSS Feed 订阅模块换了个样子出现了，不知会不会保持到下个版本。不过目前已添加 Google Analytics 的事件追踪（Event Tracking）代码以分析该模块是否真的值得存在。</p>
<p>差不多了吧，若还有其他一些 <a title="Theme Codename H" href="http://livesino.net/theme-codename-h" target="_blank">Theme Codename H</a> 的发现或疑问，欢迎留言提出。</p>
<p>&copy;2011 <a href="http://livesino.net">LiveSino.net</a> | <a href="http://livesino.net/archives/2202.live" title="Theme Codename H 主题 Rev.85 更新概览">阅读原文</a> | <a href="http://livesino.net/archives/2202.live#comments" title="Theme Codename H 主题 Rev.85 更新概览 的评论">添加评论</a></p>]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>36</slash:comments>
		</item>
		<item>
		<title>深入介绍 Theme Codename H &#8211; 收藏与分享</title>
		<link>http://livesino.net/archives/1970.live</link>
		<comments>http://livesino.net/archives/1970.live#comments</comments>
		<pubDate>Sun, 12 Apr 2009 03:57:34 +0000</pubDate>
		<dc:creator>Picturepan2</dc:creator>
				<category><![CDATA[开发]]></category>
		<category><![CDATA[Codename H]]></category>
		<category><![CDATA[Theme]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://livesino.net/archives/1970.live</guid>
		<description><![CDATA[Theme Codename H 原生支持部分主流收藏与分享服务的，即在文章下方显示支持快速收藏或分享的模块在本文中，我将介绍我是如何在 Theme Codename H 中实现收藏与分享功能，以及如何自定义该功能模块。若感兴趣，同学们也可在任何 WordPress 主题中添加此功能。该收藏与分享功能的 Live Demo 请访问这里，视觉效果如下图： 在 Theme Codename [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://livesino.net/theme-codename-h" target="_blank">Theme Codename H</a> 原生支持部分主流收藏与分享服务的，即在文章下方显示<strong>支持快速收藏或分享的模块</strong>在本文中，我将介绍我是如何在 Theme Codename H 中实现收藏与分享功能，以及如何自定义该功能模块。若感兴趣，同学们也可在任何 WordPress 主题中添加此功能。该收藏与分享功能的 <a href="http://livesino.net/archives/1678.live#fav" target="_blank">Live Demo 请访问这里</a>，视觉效果如下图：</p>
<p><a href="http://livesino.net/images/ThemeCodenameH_8E45/theme_codename_h_fav_share.png" rel="ignition" target="_blank"><img title="深入介绍 Theme Codename H - 收藏与分享" src="http://livesino.net/images/ThemeCodenameH_8E45/theme_codename_h_fav_share_thumb.png" alt="深入介绍 Theme Codename H - 收藏与分享" width="500" height="158" /></a></p>
<p>在 <a href="http://livesino.net/theme-codename-h" target="_blank">Theme Codename H</a>（<a href="http://livesino.net/get/zh-cn/" target="_blank">下载</a>）中，收藏与分享功能涉及两个文件：</p>
<ul>
<li><strong>widget-fav.php</strong> &#8211; 收藏与分享功能主体代码</li>
<li><strong>single.php</strong> &#8211; 调用 widget-fav.php：<span style="color: #808080;">&lt;?php include (TEMPLATEPATH . &#8216;/widget-fav.php&#8217;); ?&gt;</span></li>
</ul>
<p>我在开发此功能之前，参考了目前网上主流的手动添加收藏与分享功能的方法，直接调用固定链接：&lt;?php the_permalink() ?&gt; 及标题：&lt;?php the_title(); ?&gt; 如：</p>
<p><code><span style="color: #808080;">&lt;a href=”http://……/…title=</span><em>&lt;?php the_title(); ?&gt;</em><span style="color: #808080;">&amp;bkmk=</span><em>&lt;?php the_permalink() ?&gt;</em><span style="color: #808080;">”&gt;收藏至 Google&lt;/a&gt;</span></code></p>
<p>然而这样的方法问题就在于：所有的非字母数字字符都没进行 URL-encoding 处理，<a href="http://www.permadi.com/tutorial/urlEncoding/" target="_blank">至于为何要进行 URL-encoding 处理请参照此文</a>。而更现实的问题就是，中文字符会出现无法正常显示的问题。</p>
<p>因此我在 widget-fav.php 的开头增加了对标题和固定链接的 URL-encoding 处理，并且标题中的空格（%20）用 + 代替，具体代码：</p>
<p><code>&lt;?php<br />
     $permalink = urlencode(get_permalink($post-&gt;ID));<br />
     $title = urlencode($post-&gt;post_title);<br />
     $title = str_replace('+','%20',$title);<br />
?&gt;</code></p>
<p>调用标题和固定链接的代码：</p>
<p><code><span style="color: #808080;">&lt;a href=”http://……/…title=</span><em>&lt;?php echo $title; ?&gt;</em><span style="color: #808080;">&amp;bkmk=</span><em>&lt;?php echo $permalink; ?&gt;</em><span style="color: #808080;">”&gt;收藏至 Google&lt;/a&gt;</span></code></p>
<p>觉得自己编写麻烦，也可<a href="http://livesino.net/get/zh-cn/" target="_blank">直接下载 Theme Codename H 主题</a>，使用 widget-fav.php 文件（将该文件放入主题文件夹中，调用方法如上述的 Single.php）。</p>
<p>Theme Codename H 中文版主题是默认带有 17 个收藏、分享、SNS 类网站的，而添加站点的方式也并不难，可以<strong>搜索目标网站的开发、API、Bookmarklet 等相关栏目</strong>，比如：<a href="http://livesino.net/archives/1831.live" target="_blank">Windows Live SkyDrive 共享收藏添加链接介绍</a>，更省事的则是下载 <a title="http://wordpress.org/extend/plugins/sociable/" href="http://wordpress.org/extend/plugins/sociable/" target="_blank">Sociable 插件</a>进行研究。</p>
<p>若看到这里仍觉得迷茫，我推荐使用 <a href="http://wordpress.org/extend/plugins/17fav-bookmark-share/" target="_blank">17fav Bookmark &amp; Share</a> 这款由<a href="http://fairyfish.net/" target="_blank">我爱水煮鱼</a>和<a href="http://blog.istef.info/">花儿开了</a>开发的 WordPress 插件实现该功能。</p>
<p>&copy;2011 <a href="http://livesino.net">LiveSino.net</a> | <a href="http://livesino.net/archives/1970.live" title="深入介绍 Theme Codename H &#8211; 收藏与分享">阅读原文</a> | <a href="http://livesino.net/archives/1970.live#comments" title="深入介绍 Theme Codename H &#8211; 收藏与分享 的评论">添加评论</a></p>]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>深入介绍 Theme Codename H &#8211; IE8 Web Slices</title>
		<link>http://livesino.net/archives/1826.live</link>
		<comments>http://livesino.net/archives/1826.live#comments</comments>
		<pubDate>Sat, 14 Feb 2009 13:31:11 +0000</pubDate>
		<dc:creator>Picturepan2</dc:creator>
				<category><![CDATA[资讯]]></category>
		<category><![CDATA[Codename H]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[LiveSino]]></category>
		<category><![CDATA[Theme]]></category>

		<guid isPermaLink="false">http://livesino.net/archives/1826.live</guid>
		<description><![CDATA[Theme Codename H 已经默认增加对 Internet Explorer 8 Web Slices 的支持（LiveSino 已添加 IE8 WebSlice 订阅支持），Web Slices 最大的优势就是，无需访问整个页面即可查看该页中的局部更新，并且 [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://livesino.net/theme-codename-h" target="_blank">Theme Codename H</a> 已经默认增加对 <a href="http://www.microsoft.com/windows/internet-explorer/beta/features/web-slices.aspx" target="_blank">Internet Explorer 8 Web Slices</a> 的支持（<a title="到 LiveSino 已添加 IE8 WebSlice 订阅支持 的永久链接" href="http://livesino.net/archives/1150.live">LiveSino 已添加 IE8 WebSlice 订阅支持</a>），Web Slices 最大的优势就是，无需访问整个页面即可查看该页中的局部更新，并且 IE 8 会提醒是否有更新。</p>
<p>Theme Codename H 中的 IE8 Web Slices 特性分为两个部分：<a href="http://livesino.net/webslice" target="_blank">Web Slices 页面</a>（Page Template &#8211; webslice.php）和 <strong>评论 Web Slices</strong>（Comments.php）。</p>
<p>1. <a href="http://livesino.net/webslice" target="_blank">Web Slices 页面</a>支持订阅博客 10 条<strong>最新文章</strong>和 10 条<strong>最新评论</strong>。若你正在使用 Internet Explorer 8 时，当鼠标分别经过 Web Slice 区域（下图中绿色框内部区域）时，左上方会显示绿色 Web Slices 按钮：</p>
<p><a href="http://livesino.net/images/LiveSinoIE8WebSlices_1252D/image.png" rel="ignition" target="_blank"><img title="深入介绍 Theme Codename H - IE8 Web Slices" alt="深入介绍 Theme Codename H - IE8 Web Slices" src="http://livesino.net/images/LiveSinoIE8WebSlices_1252D/image_thumb.png" width="450" height="225" /></a> </p>
<p>点击绿色 Web Slices 按钮之后，Internet Explorer 8 会提示是否添加 Web Slice，点击添加至收藏栏即可完成订阅。最终效果如下（最新评论 Web Slice 的订阅步骤和最新文章的相同）：</p>
<p><a href="http://livesino.net/images/LiveSinoIE8WebSlices_1252D/image_3.png" rel="ignition" target="_blank"><img title="深入介绍 Theme Codename H - IE8 Web Slices" alt="深入介绍 Theme Codename H - IE8 Web Slices" src="http://livesino.net/images/LiveSinoIE8WebSlices_1252D/image_thumb_3.png" width="450" height="287" /></a> </p>
<p>2. 评论 Web Slices，在每篇文章的评论部分，除 Trackback 和 Pingback 之外，留言已经增加了 IE8 Web Slices 支持（需安装 <a href="http://wordpress.org/extend/plugins/wordpress-thread-comment/">WordPress Thread Comment</a> 才能发挥其作用），可以通过订阅了解是否有新回复（IE8 会定时检测是否有更新，若有更新 Web Slices 按钮标题会加粗提醒），效果如下：</p>
<p><a href="http://livesino.net/images/LiveSinoIE8WebSlices_1252D/image_4.png" rel="ignition" target="_blank"><img title="深入介绍 Theme Codename H - IE8 Web Slices" alt="深入介绍 Theme Codename H - IE8 Web Slices" src="http://livesino.net/images/LiveSinoIE8WebSlices_1252D/image_thumb_4.png" width="450" height="196" /></a> </p>
<p>启用 Theme Codename H 的 Web Slices 功能需要<strong>新建一页面，并在页面模板中选择 Web Slice</strong>，保存即可。</p>
<p>1. 如何定制 Theme Codename H Web Slices 页面的内容。</p>
<ul>
<li>wp_get_archives(&#8216;type=postbypost&amp;limit=10&#8242;);&#160; &#8211; 该语句用于显示 10 篇最新文章，其中 limit=10 表明显示最新 10 篇；也可以将该语句修改为输出某一分类中的文章，<a href="http://codex.wordpress.org/Template_Tags/get_posts" target="_blank">代码和介绍可以参考 WordPress Codex</a>。 </li>
<li>get_recent_comments(&#8217;10&#8242;,&#8217;&lt;li&gt;&#8217;,'&lt;/li&gt;&#8217;,'#FA930D&#8217;); &#8211; 其中 10 表示显示 10 条最新评论，#FA930D 表示输出后的最新评论的链接颜色。 </li>
</ul>
<p>2. 评论 Web Slices 的制作方法可以<a href="http://rpsh.net/archives/create-web-slices-for-ie8/" target="_blank">参考这里</a>。</p>
<p>你若对 IE8 Web Slices 开发感兴趣，可以<a href="http://msdn.microsoft.com/en-us/library/cc956158(VS.85).aspx" target="_blank">查看 MSDN 的 IE8 Web Slices 开发文档</a>，也包括范例的。</p>
<p>&copy;2011 <a href="http://livesino.net">LiveSino.net</a> | <a href="http://livesino.net/archives/1826.live" title="深入介绍 Theme Codename H &#8211; IE8 Web Slices">阅读原文</a> | <a href="http://livesino.net/archives/1826.live#comments" title="深入介绍 Theme Codename H &#8211; IE8 Web Slices 的评论">添加评论</a></p>]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>深入介绍 Theme Codename H &#8211; 移动版</title>
		<link>http://livesino.net/archives/1825.live</link>
		<comments>http://livesino.net/archives/1825.live#comments</comments>
		<pubDate>Sat, 14 Feb 2009 12:38:42 +0000</pubDate>
		<dc:creator>Picturepan2</dc:creator>
				<category><![CDATA[资讯]]></category>
		<category><![CDATA[Codename H]]></category>
		<category><![CDATA[Theme]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://livesino.net/archives/1825.live</guid>
		<description><![CDATA[Theme Codename H 也包括为移动设备：手机、iPod Touch 等准备的移动版（之前也介绍过该移动版，在线演示: http://m.livesino.net）。该移动版是在 WordPress 2.7 及以上版本测试，可以正常使用。 Theme Codename H &#8211; 移动版 安装方法 [...]]]></description>
			<content:encoded><![CDATA[<p>Theme Codename H 也包括为移动设备：手机、iPod Touch 等准备的移动版（之前也介绍过<a href="http://livesino.net/archives/1772.live" target="_blank">该移动版</a>，在线演示: <a href="http://m.livesino.net">http://m.livesino.net</a>）。该移动版是在 WordPress 2.7 及以上版本测试，可以正常使用。</p>
<p><a href="http://livesino.net/images/LiveSinoMobileCodenameH_9790/photo.jpg" rel="ignition"><img title="深入介绍 Theme Codename H - 移动版" src="http://livesino.net/images/LiveSinoMobileCodenameH_9790/photo_thumb.jpg" alt="深入介绍 Theme Codename H - 移动版" width="160" height="240" /></a> <a href="http://livesino.net/images/LiveSinoMobileCodenameH_9790/photo2.jpg" rel="ignition"><img title="photo2" src="http://livesino.net/images/LiveSinoMobileCodenameH_9790/photo2_thumb.jpg" alt="photo2" width="160" height="240" /></a></p>
<p>Theme Codename H &#8211; 移动版 安装方法</p>
<ul>
<li>从这里选择下载移动版 zip 包（<a href="http://livesino.net/theme-codename-h" target="_blank">中文版</a>）；</li>
<li>解压，并将 m 文件夹上传至 WordPress 安装根目录下；</li>
<li>修改 m-config.php 文件中的 第 4 行，将 <a href="http://m.livesino.net">http://m.livesino.net</a> 改为自己的移动版域名，<strong>推荐采用二级域名</strong>，比如：<a href="http://m.livesino.net">http://m.livesino.net</a> 。</li>
</ul>
<p>注意，Theme Codename H &#8211; 移动版默认<strong>不启用 mod_rewrite 功能</strong>，文章的地址为 http://***/?p=<strong>post_id </strong>。若想使用 mod_rewrite，找到以下几行，按照我给出的语句修改即可：</p>
<p>1. m-core.php 文件中的</p>
<p><code>?p=". $comment-&gt;comment_post_ID ."</code></p>
<p>替换为</p>
<p><code>". $comment-&gt;comment_post_ID .".html</code></p>
<p>2. index.php 文件中的</p>
<p><code> ?p=&lt;?php the_id(); ?&gt;</code></p>
<p>替换为</p>
<p><code>&lt;?php the_id(); ?&gt;.html</code></p>
<p>Zip 包中已经包括 .htaccess 规则文件，无需自己编写规则，即使要修改也不难的。寻求更多帮助？或帮助完善？留言，<a href="http://livesino.net/about#contact" target="_blank">Email</a> 或者 <a href="http://twitter.com/picturepan2" target="_blank">Twitter</a>。</p>
<p>下载：Theme Codename H Mobile <a href="http://livesino.net/get/zh-cn/m" target="_blank">中文版</a> &#8211; <a href="http://livesino.net/get/en-us/m" target="_blank">英文版</a>。情人节快乐。 <img src='http://livesino.net/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>&copy;2011 <a href="http://livesino.net">LiveSino.net</a> | <a href="http://livesino.net/archives/1825.live" title="深入介绍 Theme Codename H &#8211; 移动版">阅读原文</a> | <a href="http://livesino.net/archives/1825.live#comments" title="深入介绍 Theme Codename H &#8211; 移动版 的评论">添加评论</a></p>]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using apc
Object Caching 759/845 objects using apc

Served from: livesino.net @ 2012-05-26 03:29:06 -->
