打造最简洁的life Type summary首页
多用户博客一般把 summary.php作为网站的首页。
方法是把下面内容加到根目录下的.htaccess文件里:
<IfModule mod_dir.c>
DirectoryIndex summary.php index.php index.html
</IfModule>
但默认的summary首页非常难看, 而且打开速度非常慢。而 http://www.chinese-blog.org 的推崇的风格是简洁, Google式的简洁。于是立即自己动手。
summary.php的 html模板文件在templates/summary/目录下。
主要修改以下三个文件:
上部的导航栏:
header.template
中间的最新文章,搜索栏,最多阅读文章等。
index.template
底部:
footer.template
先把所有动态内容去掉。速度快了很多。
如果需可,也可以在index.template中加上类似代码:
<b>Most Read Articles:</b> <br />
{assign var=readestBlogs value=$summaryStats->getMostReadArticles()}
{if $readestBlogs}
{foreach name=readest from=$readestBlogs item=post}
{assign var="blog" value=$post->getBlogInfo()}
{assign var="url" value=$blog->getBlogRequestGenerator()}
<a href="{$url->postPermalink($post)}">{$post->getTopic()|strip_tags|truncate:60}</a> ({$post->getNumReads()})<br />
{/foreach}
{/if}
接下来要做一个全新的 blog模板,去掉全部不必要的内容,且对搜索引擎友好。
Jan 28, 2008

Re: 打造最简洁的life Type summary首页
Kazellkl | 07/08/2008, 04:04
Hi!dtic! http://jiaapqcd.com sidrb utebk http://ujyrwhoi.com kmjqp qindy