Support jOOmla! Autoit!
 
在热门文章模块结尾增加点击数 输出PDF 打印 E-mail
Author Author: Autoit | Date Date:2007-01-26 | View Count View: 12538 | Digg Count 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

Shares: Google书签 Yahoo书签 雅虎收藏夹 365Key网摘 新浪ViVi 百度收藏 天极网摘 diglog 和讯网摘 POCO网摘 YouNote网摘 博拉网 天下图摘 spurl blogmarks BlinkList reddit digg Del.icio.us   |  Tags: 最新文章  latestnews  点击数  hits  hack  

 
joomlaboard签名档乱码问题   在最新文章模块条目前面增加此条目所属的分类