typecho使用记录
作者:翎峋 发布时间:2009-12-12 23:25:25 分类:互联网事
此文仅用于记录使用typecho时所更改的一些东西。
〖模板〗
『更改时间样式』
模板文件里的index.php
<span><?php _e('发布时间:'); ?><?php $this->date('Y-m-d H:i:s'); ?></span>
模板文件里的post.php
<span><?php _e('发布时间:'); ?><?php $this->date('Y-m-d H:i:s'); ?></span>
模板文件里的page.php
<?php _e('发布时间:'); ?><?php $this->date('Y-m-d H:i:s'); ?>
模板文件里的comments.php
<?php $comments->date('Y-m-d H:i:s'); ?>
<?php $comments->date('Y-m-d H:i:s'); ?>
<span class="count">
模板文件里的archive.php
<span><?php _e('发布时间:'); ?><?php $this->date('Y-m-d H:i:s'); ?></span>
『添加上下文』
模板文件里的post.php,在
<h2 class="entry_title"><a href="<?php $this->permalink() ?>"><?php $this->title() ?></a></h2>
之前添加
<div class="post">
<div style="float: left">
<?php $this->thePrev(); ?>
</div>
<div style="float: right">
<?php $this->theNext(); ?>
</div>
『添加版权说明』
模板文件里的post.php,在
<?php $this->content(); ?>
之后添加:
<br>
本文链接:[<a href="<?php $this->permalink() ?>"><?php $this->permalink() ?></a>]
<br>
作者:翎峋 发表于 <a href=http://www.lynxun.com>随风扬絮</a>
<br>
<span style="color: #FF0000">窃人知识亦为盗,望君三思而后行。尊重原创,勿砍链接!</span>
<span style="color: #0000FF"><a href=http://www.lynxun.com/about.html>如发现此文侵犯了您的权益请联系我。</a></span>
『文章内广告』
模板文件里的post.php,在
<?php $this->content(); ?>
之前添加:
<?php if ($this->is('post')): ?>
<div style="float: right">
广告内容在文章右侧
</div>
<?php endif; ?>
『评论前广告』
模板文件里的comments.php,在
<?php if($this->allow('comment')): ?>
之前添加:
<?php if ($this->is('post')): ?>
<div align=left>
评论框上面的广告
</div>
<?php endif; ?>
『楼层计数』
模板文件里的comments.php,在
<span class="count">
之后添加:
<a href="<?php $this->permalink() ?>#<?php $comments->theId(); ?>">#<?php echo $comments->sequence(); ?></a></span>
『侧边按年归档』
模板文件里的sidebar.php
<div class="widget">
<h3><?php _e('归档'); ?></h3>
<?php $this->widget('Widget_Contents_Post_Date', 'type=year&format=Y')
->parse('<li><a href="{permalink}">{year}</a></li>'); ?>
</ul>
</div>
<?php endif; ?>
『侧边时间』
模板文件里的sidebar.php
<div class="widget">
<h3><?php _e('时间'); ?></h3>
<script language="javascript">
today=new Date();
function initArray(){
this.length=initArray.arguments.length
for(var i=0;i<this.length;i++)
this[i+1]=initArray.arguments[i] }
var d=new initArray(
"星期日",
"星期一",
"星期二",
"星期三",
"星期四",
"星期五",
"星期六");
document.write(
"<font style='font-size:9pt;font-family: 宋体'>今天是",
today.getFullYear(),"年",
today.getMonth()+1,"月",
today.getDate(),"日",
d[today.getDay()+1],
"</font>" );
</script>
<ul> <ul>
<li>开通日:<b>2006.09.15</b></li>
<li><script language="JavaScript">
var urodz= new Date("15/09/2006");
var s="已运行";
var now = new Date();
var ile = now.getTime() - urodz.getTime() ;
var dni = Math.floor(ile / (1000 * 60 * 60 * 24))+1;
var dni2 = Math.floor(dni/365);
var dni3 = Math.floor(dni-dni2*365)+1;
if (dni > 365)
document.write(""+s+" <b><u>"+dni2 +"</u></b> 年<b> <u>"+dni3 +"</u> </b>天")
else if (dni > 1)
document.write(""+s+""+dni +"天了 ∩_∩ ")
else
document.write("还没开始哦!");
</script></li></ul>
</ul>
</div>
<div class="widget">
『侧边谷歌搜索』
模板文件里的sidebar.php
<h3><?php _e('搜索'); ?></h3>
<ul>
<!-- SiteSearch Google -->
<form method="get" action="http://www.google.cn/custom" target="google_window">
<table border="0">
<tr>
<td nowrap="nowrap" valign="top" align="left" height="12">
<input type="hidden" name="domains" value="www.lynxun.com"></input>
<label for="sbi" style="display: none">输入您的搜索字词</label>
<input type="text" name="q" size="7" maxlength="255" value="" id="sbi">
</input>
<label for="sbb" style="display: none">提交搜索表单</label>
<input type="submit" name="sa" value="搜索" id="sbb">
</input>
</td>
</tr>
<tr>
<td nowrap="nowrap">
<table>
<tr>
<td>
<input type="radio" name="sitesearch" value="www.lynxun.com" checked id="ss1">
</input><label for="ss1" title="搜索 www.lynxun.com">
<font size="-2" color="#000000">BLOG</font>
</label>
</td>
</tr>
</table>
<input type="hidden" name="client" value="pub-0593736977354442"></input>
<input type="hidden" name="forid" value="1"></input>
<input type="hidden" name="ie" value="UTF-8"></input>
<input type="hidden" name="oe" value="UTF-8"></input>
<input type="hidden" name="flav" value="0000"></input>
<input type="hidden" name="sig" value="uIlUUfDYK5oL3WNf"></input>
<input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;LH:18;LW:68;L:http://img.tongji.linezing.com/439598/tongji.gif;S:http://www.lynxun.com;LP:1;FORID:1"></input>
<input type="hidden" name="hl" value="zh-CN"></input>
</td></tr></table>
</form>
<!-- SiteSearch Google -->
</ul>
</div>
『侧边友链』
模板文件里的sidebar.php,需配合插件:Page To Links(将页面转化为友情链接列表的插件)
<div class="widget">
<h3><?php _e('友链'); ?></h3>
<ul>
<?php PageToLinks::output('links', 'h2', 'ul'); ?>
</ul>
</div>
『统计代码』
模板文件里的footer.php,在
</div><!-- end #footer -->
</div>
<?php $this->footer(); ?>
之前添加:统计代码或谷歌统计,需配合插件:Google Analytics Helper(Google Analytics 代码部署助手)
<?php AnalyticsHelper::output(); ?>
〖插件〗
Quicktags Editor(集成Quicktags编辑器)
Reply Mail To( 评论回复插件 for Typecho)
Google Analytics Helper(Google Analytics 代码部署助手)
Page To Links(将页面转化为友情链接列表的插件)
作者:翎峋 发表于 随风扬絮
分享+收藏: 推特/ 嘀咕/ 新浪/ 人人/ 豆瓣/ QQ/ 鲜果/ 谷歌/ 雅虎/ 百度
更多日志
相关文章 |
随机文章 |
最新文章 |