|
在热门文章模块结尾增加点击数
|
|
|
|
Author: Autoit | Date:2007-01-26 | View: 12538 | Digg: 63 |
|
最新文章模块基本相同. 文件 : modules/mod_mostread.php 搜索 , a.title 替换为[有两处] : , a.title, a.hits 在结尾处的 <?php echo $row->title; ?></a> 后面增加: <small> (<?php echo $row->hits; ?>)</small> ok. 这样就可以了。 当然还可以给他增加个开关。 方法: 在"上面我们加的那行"前面加: <?php if ($show_hits == '1') { ?>后面加 <?php } ?> 接着在此文件的开始部分的: $show_front = $params->get( 'show_front', 1 ); 下面增加: $show_hits = $params->get( 'show_hits', 1 ); 然后在 modules/mod_mostread.xml 结尾处的 </params> 上面增加: <param name="show_hits" type="radio" default="1" label="show hits" description="Show/Hide hits">
<option value="1">show</option>
<option value="0">hide</option>
</param> 就可以了。在使用中,如果不需要显示单元,只要在后台设置此模块的 show hide 处选 hide 就不显示了。 end by autoit.
Permanent URL: http://www.autoit.cn/index.php/content/view/100/25.html
Only registered users can write comments. Please login or register. |