<?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>thdp&#039;s blog &#187; 主题</title>
	<atom:link href="http://thdp.org/tag/%e4%b8%bb%e9%a2%98/feed/" rel="self" type="application/rss+xml" />
	<link>http://thdp.org</link>
	<description>崇尚技术，享受生活</description>
	<lastBuildDate>Mon, 24 Oct 2011 04:40:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>HotNews主题实现缩略图按比例缩放</title>
		<link>http://thdp.org/tech/hotnews-thumbnail-keep-ratio/</link>
		<comments>http://thdp.org/tech/hotnews-thumbnail-keep-ratio/#comments</comments>
		<pubDate>Sun, 09 Jan 2011 17:48:30 +0000</pubDate>
		<dc:creator>thdp</dc:creator>
				<category><![CDATA[科技]]></category>
		<category><![CDATA[HotNews]]></category>
		<category><![CDATA[ratio]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[thumbnail]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[主题]]></category>
		<category><![CDATA[模板]]></category>
		<category><![CDATA[比例]]></category>
		<category><![CDATA[缩略图]]></category>

		<guid isPermaLink="false">http://thdp.org/?p=266</guid>
		<description><![CDATA[最近在wopus上逛，发现一个很不错的国人自制主题 HotNews pro 2.4。仿苹果风格的导航栏，页面风格简洁大气，杂志型首页，焦点幻灯，文章摘要缩略图。主题自身集成了很多原本由插件实现的功能，使用起来很方便。之前用了两年的atahualpa主题，新的一年了，正好换个新面貌。安装上以后，经过一番自己的定制，感觉网站明显提升了一个档次。 现在发现唯一一点缺憾是缩略图功能，模板自带的缩放功能使用固定缩略图尺寸。而如果文章没有特别制作对应尺寸的缩略图，模板会自动截取文章里第一张图。很多时候这第一张图并不符合模板设定的长宽比，结果导致缩略图变形拉伸。询问过作者后，建议使用别的缩略图插件。我自己捣鼓了一下，通过修改css样式和对应php文件，只限定一个尺寸，而由浏览器自动调整另一个尺寸。这样基本保证了图片按原比例缩放，目前一点不足是某些缩略图会超出原有设定编框。 1. 首页焦点幻灯 首先需要修改的是样式表/css/home.css 对于image，删掉width:400px; 只设定height。相应的适当修改post的width 接下来修改/includes/slider.php 同样删除width:400px; 只设定height 2. 首页缩略图 首先需要修改的是样式表style.css 删掉height:100px; 只设定width 接下来修改/includes/thumbnail.php 同样删除height=&#8221;100px&#8221; 到这里就基本完工了。不过我发现某些照片过长，导致缩略图下边的日期跑到了图片上。我这里直接删除了日期显示，在杂志类首页文件cms.php 将 替换为空格。 3. 分类页的缩略图，改过的css在这里也已经生效。我做的修改是把缩略图下面的日期替换为空格，文章标题下面的“发表于“替换为日期 打开archive.php 将 替换为 而下面的日期同样用空格替换。]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-269" title="HotNews-pro" src="http://thdp.org/wp-content/uploads/2011/01/HotNews-pro.png" alt="" width="168" height="149" />最近在wopus上逛，发现一个很不错的国人自制主题 <a href="http://zmingcx.com/hotnews-pro-theme-24.html/trackback" target="_blank">HotNews pro 2.4</a>。仿苹果风格的导航栏，页面风格简洁大气，杂志型首页，焦点幻灯，文章摘要缩略图。主题自身集成了很多原本由插件实现的功能，使用起来很方便。之前用了两年的atahualpa主题，新的一年了，正好换个新面貌。安装上以后，经过一番自己的定制，感觉网站明显提升了一个档次。</p>
<p>现在发现唯一一点缺憾是缩略图功能，模板自带的缩放功能使用固定缩略图尺寸。而如果文章没有特别制作对应尺寸的缩略图，模板会自动截取文章里第一张图。很多时候这第一张图并不符合模板设定的长宽比，结果导致缩略图变形拉伸。询问过作者后，建议使用别的缩略图插件。我自己捣鼓了一下，通过修改css样式和对应php文件，只限定一个尺寸，而由浏览器自动调整另一个尺寸。这样基本保证了图片按原比例缩放，目前一点不足是某些缩略图会超出原有设定编框。</p>
<p><strong>1. 首页焦点幻灯</strong><br />
首先需要修改的是样式表/css/home.css</p>
<pre class="brush: css; title: ; notranslate">.slider_image,.slider_image img {
	float: left;
	width:400px;
	height:248px;
	}
.slider_post {
	float:right;
	width:280px;
	padding-right:10px;
	}</pre>
<p>对于image，删掉width:400px; 只设定height。相应的适当修改post的width<br />
接下来修改/includes/slider.php</p>
<pre class="brush: php; title: ; notranslate">&lt;div class=&quot;slider_image&quot;&gt;
				&lt;?php if ( get_post_meta($post-&gt;ID, 'show', true) ) : ?&gt;
				&lt;?php $image = get_post_meta($post-&gt;ID, 'show', true); ?&gt;
				&lt;a href=&quot;&lt;?php the_permalink() ?&gt;&quot; rel=&quot;bookmark&quot; title=&quot;&lt;?php the_title(); ?&gt;&quot;&gt;&lt;img src=&quot;&lt;?php echo $image; ?&gt;&quot;width=&quot;400&quot; height=&quot;248&quot; alt=&quot;&lt;?php the_title(); ?&gt;&quot;/&gt;&lt;/a&gt;
				&lt;?php else: ?&gt;
					&lt;?php if (has_post_thumbnail()) { the_post_thumbnail('home-thumb' ,array('class' =&gt; 'home-thumb')); }
				else { ?&gt;
					&lt;a href=&quot;&lt;?php the_permalink() ?&gt;&quot; rel=&quot;bookmark&quot; title=&quot;&lt;?php the_title(); ?&gt;&quot;&gt;&lt;img class=&quot;home-thumb&quot; src=&quot;&lt;?php echo catch_first_image() ?&gt;&quot; width=&quot;400px&quot; height=&quot;248px&quot; alt=&quot;&lt;?php the_title(); ?&gt;&quot;/&gt;&lt;/a&gt;
				&lt;?php } ?&gt;
				&lt;?php endif; ?&gt;
			&lt;/div&gt;</pre>
<p>同样删除width:400px; 只设定height</p>
<p><strong>2. 首页缩略图</strong><br />
首先需要修改的是样式表style.css</p>
<pre class="brush: css; title: ; notranslate">.thumbnail_t img,.thumbnail img{
	position:absolute;
	width: 140px;
	height:100px;
	}</pre>
<p>删掉height:100px; 只设定width</p>
<p>接下来修改/includes/thumbnail.php</p>
<pre class="brush: php; title: ; notranslate">&lt;div class=&quot;thumbnail&quot;&gt;
	&lt;?php if (has_post_thumbnail()) { the_post_thumbnail('home-thumb' ,array('class' =&gt; 'home-thumb')); }
		else { ?&gt;
		&lt;a href=&quot;&lt;?php the_permalink() ?&gt;&quot; rel=&quot;bookmark&quot; title=&quot;&lt;?php the_title(); ?&gt;&quot;&gt;&lt;img class=&quot;home-thumb&quot; src=&quot;&lt;?php echo catch_first_image() ?&gt;&quot; width=&quot;140px&quot;  height=&quot;100px&quot; alt=&quot;&lt;?php the_title(); ?&gt;&quot;/&gt;&lt;/a&gt;
	&lt;?php } ?&gt;
	&lt;?php endif; ?&gt;
&lt;/div&gt;</pre>
<p>同样删除height=&#8221;100px&#8221;</p>
<p>到这里就基本完工了。不过我发现某些照片过长，导致缩略图下边的日期跑到了图片上。我这里直接删除了日期显示，在杂志类首页文件cms.php</p>
<pre class="brush: php; title: ; notranslate">&lt;div class=&quot;thumbnail_box&quot;&gt;
	&lt;?php include('includes/thumbnail.php'); ?&gt;
	&lt;span class=&quot;postdate&quot;&gt;&lt;?php the_time('Y年m月d日') ?&gt;&lt;/span&gt;
&lt;/div&gt;
</pre>
<p>将</p>
<pre class="brush: plain; title: ; notranslate">&lt;?php the_time('Y年m月d日') ?&gt;</pre>
<p>替换为空格。</p>
<p>3. 分类页的缩略图，改过的css在这里也已经生效。我做的修改是把缩略图下面的日期替换为空格，文章标题下面的“发表于“替换为日期<br />
打开archive.php</p>
<pre class="brush: php; title: ; notranslate">&lt;div class=&quot;archive_info&quot;&gt;
	&lt;span class=&quot;date&quot;&gt;发表于&lt;?php echo human_time_diff(get_the_time('U'), current_time('timestamp')) . '前'; ?&gt;&lt;/span&gt;
	&lt;span class=&quot;category&quot;&gt; &amp;#8260; &lt;?php the_category(', ') ?&gt;&lt;/span&gt;
	&lt;span class=&quot;comment&quot;&gt; &amp;#8260; &lt;?php comments_popup_link('暂无评论', '评论数 1', '评论数 %'); ?&gt;&lt;/span&gt;
	&lt;?php if(function_exists('the_views')) { print ' &amp;#8260; 被围观 '; the_views(); print '+';  } ?&gt;
	&lt;span class=&quot;edit&quot;&gt;&lt;?php edit_post_link('&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;', '  ', '  '); ?&gt;&lt;/span&gt;
&lt;/div&gt;

&lt;div class=&quot;thumbnail_box&quot;&gt;
	&lt;?php include('includes/thumbnail.php'); ?&gt;
	&lt;span class=&quot;postdate&quot;&gt;&lt;?php the_time('Y年m月d日') ?&gt;&lt;/span&gt;
&lt;/div&gt;</pre>
<p>将</p>
<pre class="brush: plain; title: ; notranslate">发表于&lt;?php echo human_time_diff(get_the_time('U'), current_time('timestamp')) . '前'; ?&gt;</pre>
<p>替换为</p>
<pre class="brush: plain; title: ; notranslate">&lt;?php the_time('Y年m月d日') ?&gt;</pre>
<p>而下面的日期同样用空格替换。</p>
]]></content:encoded>
			<wfw:commentRss>http://thdp.org/tech/hotnews-thumbnail-keep-ratio/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>汉化Atahualpa主题</title>
		<link>http://thdp.org/tech/website/atahualpa-theme-chinese/</link>
		<comments>http://thdp.org/tech/website/atahualpa-theme-chinese/#comments</comments>
		<pubDate>Tue, 24 Feb 2009 07:36:47 +0000</pubDate>
		<dc:creator>thdp</dc:creator>
				<category><![CDATA[网站相关|WordPress]]></category>
		<category><![CDATA[atahualpa]]></category>
		<category><![CDATA[主题]]></category>
		<category><![CDATA[汉化]]></category>

		<guid isPermaLink="false">http://thdp.org/?p=17837</guid>
		<description><![CDATA[第一次看到这个主题时，就很喜欢它简洁清爽的界面。而且在控制台里有多大200余项可调节的参数，非常适合定制出属于自己的风格。在到作者的support论坛上看过后，发现目前还没有汉化版的输出文件，于是自己做了一个，已经提交到论坛。鉴于这个主题更新很快，我在那个论坛单独开了一个帖子，已被作者置顶。希望能及时随主题更新汉化文件。 http://forum.bytesforall.com/showthread.php?t=2414 这个主题做得很规范，语言文件采用标准的.mo文件，用Poedit翻译atahualpa.pot文件即可。汉化的文件可以从这里下载： zh_CN.zip 。这个文件之包括页面输出部分的汉化，不包括控制台部分。其他部分的汉化需要自己手动在主题选项里修改。 应用此汉化文件需要作以下两步： 1.  将wordpress语言改为zh_CN。这个可以通过编辑wp-config.php文件。找到下面这行 将&#8217;  &#8216;替换为 &#8216;zh_CN&#8217;。这时重新登陆控制台，界面就变成中文的了。 2. 解压缩zh_CN.zip并将 zh_CN.mo上传到atahualpa主题对应的目录, 然后刷新博客主页就可以看出效果了。]]></description>
			<content:encoded><![CDATA[<p>第一次看到这个主题时，就很喜欢它简洁清爽的界面。而且在控制台里有多大200余项可调节的参数，非常适合定制出属于自己的风格。在到作者的<a href="http://forum.bytesforall.com/" target="_blank">support论坛</a>上看过后，发现目前还没有汉化版的输出文件，于是自己做了一个，已经提交到论坛。鉴于这个主题更新很快，我在那个论坛单独开了一个帖子，已被作者置顶。希望能及时随主题更新汉化文件。<br />
<a href="http://forum.bytesforall.com/showthread.php?t=2414" target="_blank">http://forum.bytesforall.com/showthread.php?t=2414</a></p>
<p>这个主题做得很规范，语言文件采用标准的.mo文件，用Poedit翻译atahualpa.pot文件即可。汉化的文件可以从这里下载： <a href="http://thdp.org/wp-content/uploads/2009/07/zh_CN.zip">zh_CN.zip</a> 。这个文件之包括页面输出部分的汉化，不包括控制台部分。其他部分的汉化需要自己手动在主题选项里修改。</p>
<p>应用此汉化文件需要作以下两步：<br />
1.  将wordpress语言改为zh_CN。这个可以通过编辑wp-config.php文件。找到下面这行</p>
<pre class="brush: php; title: ; notranslate">
define ('WPLANG', ' ');
</pre>
<p>将&#8217;  &#8216;替换为 &#8216;zh_CN&#8217;。这时重新登陆控制台，界面就变成中文的了。</p>
<p>2. 解压缩zh_CN.zip并将 zh_CN.mo上传到atahualpa主题对应的目录, 然后刷新博客主页就可以看出效果了。</p>
]]></content:encoded>
			<wfw:commentRss>http://thdp.org/tech/website/atahualpa-theme-chinese/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>添加yo2的logo到侧栏后页尾对不齐的解决办法</title>
		<link>http://thdp.org/tech/website/align_footer/</link>
		<comments>http://thdp.org/tech/website/align_footer/#comments</comments>
		<pubDate>Tue, 03 Feb 2009 05:13:17 +0000</pubDate>
		<dc:creator>Ping</dc:creator>
				<category><![CDATA[网站相关|WordPress]]></category>
		<category><![CDATA[iNove]]></category>
		<category><![CDATA[Yo2]]></category>
		<category><![CDATA[主题]]></category>

		<guid isPermaLink="false">http://thdp.yo2.cn/10380.html</guid>
		<description><![CDATA[[更新]经过oneoo站长的指导，得知多出个&#60;div&#62;是由于此模板与原系统代码不兼容。站长现已更正了系统代码，可以正常使用了。 刚注册用的yo2 免费账号，主题换成iNove，页面布局一切正常。在添加了侧边栏后，免费帐号会自动添加支持yo2的logo，之后发现页尾无法居中对齐。通过研究模板的源代码和css样式表，终于发现问题出在yo2 logo自动添加的代码多了个&#60;/div&#62;。请管理员明察，如情况属实还望尽快更正。 首先来看一下页面body的结构，大致由页首header、正文、侧边栏sidebar和页尾footer组成。请注意每个&#60;div&#62;标签都需要有个对应的&#60;/div&#62;来结束。 再看css表，整个页面布局由wrap模块控制，背景图片light.png宽度936px，居中对齐。页面所有内容放到container模块，左右留白设为自动。  下面来看添加了yo2 logo后的页面源码，这里摘出存放logo的南部侧边栏。我修改了一下格式，通过对齐可以发现高亮选中部分的&#60;/div&#62;是多余的，并造成页尾跳出container，左右方向布满整个屏幕宽度。 在管理员没有修改系统代码前，临时的解决办法是自己修改 sidebar.php，将&#60;!&#8211; sidebar south END &#8211;&#62;之前的&#60;/div&#62;删掉。]]></description>
			<content:encoded><![CDATA[<p>[更新]经过oneoo站长的指导，得知多出个&lt;div&gt;是由于此模板与原系统代码不兼容。站长现已更正了系统代码，可以正常使用了。</p>
<p>刚注册用的yo2 免费账号，主题换成iNove，页面布局一切正常。在添加了侧边栏后，免费帐号会自动添加支持yo2的logo，之后发现页尾无法居中对齐。通过研究模板的源代码和css样式表，终于发现问题出在yo2 logo自动添加的代码多了个&lt;/div&gt;。请管理员明察，如情况属实还望尽快更正。</p>
<p>首先来看一下页面body的结构，大致由页首header、正文、侧边栏sidebar和页尾footer组成。请注意每个&lt;div&gt;标签都需要有个对应的&lt;/div&gt;来结束。<br />
<a href="http://thdp.yo2.cn/wp-content/uploads/347/34735/2009/02/body.png" title="body.png" class="highslide-image" onclick="return hs.expand(this);"><img src="http://thdp.yo2.cn/wp-content/uploads/347/34735/2009/02/body.png" alt="body.png" /></a></p>
<p>再看css表，整个页面布局由wrap模块控制，背景图片light.png宽度936px，居中对齐。页面所有内容放到container模块，左右留白设为自动。<br />
<a href="http://thdp.yo2.cn/wp-content/uploads/347/34735/2009/02/css.png" title="css.png" class="highslide-image" onclick="return hs.expand(this);"><img src="http://thdp.yo2.cn/wp-content/uploads/347/34735/2009/02/css.png" alt="css.png" /></a></p>
<p> 下面来看添加了yo2 logo后的页面源码，这里摘出存放logo的南部侧边栏。我修改了一下格式，通过对齐可以发现高亮选中部分的&lt;/div&gt;是多余的，并造成页尾跳出container，左右方向布满整个屏幕宽度。<a href="http://thdp.yo2.cn/wp-content/uploads/347/34735/2009/02/sidebar1.png" title="sidebar1.png" class="highslide-image" onclick="return hs.expand(this);"><img src="http://thdp.yo2.cn/wp-content/uploads/347/34735/2009/02/sidebar1.png" alt="sidebar1.png" /></a><a href="http://thdp.yo2.cn/wp-content/uploads/347/34735/2009/02/sidebar.png" title="sidebar.png" class="highslide-image" onclick="return hs.expand(this);"> </a></p>
<p>在管理员没有修改系统代码前，临时的解决办法是自己修改 sidebar.php，将&lt;!&#8211; sidebar south END &#8211;&gt;之前的&lt;/div&gt;删掉。</p>
]]></content:encoded>
			<wfw:commentRss>http://thdp.org/tech/website/align_footer/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

