|
最新文章模块增加发布时间的hack
|
|
|
|
Author: Autoit | Date:2006-09-09 | View: 11779 | Digg: 63 |
|
最新文章 mod 默认是没有时间显示的.. 方法 mod_latestnews.php: 搜索: SELECT a.id, a.title 全部替换为: SELECT a.id, a.title, a.created 最后末尾的地方: <?php echo $row->title; ?></a> 后面增加: <small><?php echo $row->created; ?></small> 而这句可以换为: <?php echo mosFormatDate( $row->created ); ?> 或 <?php echo substr(mosFormatDate( $row->created ),2); ?> 其实直接把 $row->created 替换为: substr( $row->created,0,10 ) 或 substr( $row->created,6,4 ) 或 substr( $row->created,12,4 ) 都是可行的,只是里面的数字可能要改下而已. 这也只是现实时间格式不同而已. End. Autoit
Permanent URL: http://www.autoit.cn/index.php/content/view/78/25.html
|