对Docman的小改造

来源:百度文库 编辑:神马文学网 时间:2024/04/30 12:16:09
对Docman一个不满意是每个条目居然没有简介,要显示就显示他的描述,如果描述很长的话,一个页面就显示不了多少下载了.
所以只好动手改造了,动他数据结构我可没这么多工夫,幸好Docman留了个主页选项还有点改动空间.
首先记得备份.
在components / com_docman / themes / default / templates / documents / list_item.tpl.php 下,找到
if ( $this->theme->conf->item_homepage && $this->doc->data->dmurl != ‘‘) :
换成:
//output document url
if ( $this->theme->conf->item_homepage && $this->doc->data->dmurl != ‘‘) :
?>

: doc->data->dmurl;?>

endif;
我是直接用了简介2个字,当然,规范的做法是修改他的语言文件
然后删除
//output document description
if ( $this->theme->conf->item_description  ) :
?>

doc->data->dmdescription;?>

endif;
接着打开
components / com_docman / themes / default / templates / documents /document.tpl.php
找到
if($this->theme->conf->details_homepage) :
?>

data->dmurl ?>

endif;
删除掉.
这样,提交新的下载的时候,就可以在主页这个选项上填写自己的简介了,查看了他的数据结构,是text类型,完全可以放心的放简介 :)
效果可以
http://www.fcdpj.com/www/compone ... d,17/Itemid,34.html
如果打不开,那么应该是我已经起用这个joomla的网站了,去掉中间那三个www就可以了
http://www.fcdpj.com/component/o ... d,17/Itemid,34.html