效果图如上:
1、需要修改两个文件:
source\module\misc\misc_tag.php
template\default\tag\tagitem.htm
修改文件之前建议备份原文件。
2、首先修改模板文件:
template\default\tag\tagitem.htm
在
上面加上样式控制代码:
.mjda:hover{
text-decoration: none;
}
.ptg {
line-height:22px;
padding-left: 20px;
background: url(../../static/image/common/tag.gif) no-repeat 0 2px;
}
然后再找到代码:
在其上面加上代码:
保存上传。
3、修改PHP控制代码:
source\module\misc\misc_tag.php
打开文件找到代码:
找到代码:
foreach(C::t('forum_thread')->fetch_all_by_tid($tidarray) as $result) {
在其上面加上:
require_once libfile('function/post');
然后再找到:
$threadlist[$result['tid']] = procthread($result);
在其下面添加代码:
$res = DB::fetch_all("SELECT tagid,tagname FROM ".DB::table('common_tagitem')." WHERE itemid = '{$result['tid']}';");
foreach($res AS $k => $v){
$threadlist[$result['tid']]['tags'][$v['tagid']] = $v;
}
$threadlist[$result['tid']]['message'] = messagecutstr((DB::result_first("SELECT message FROM ".DB::table('forum_post')." WHERE tid = '{$result['tid']}'",0)) , 200 , ' ...');
其中最后面的参数是简介的显示字数,自己可以改动数字。
保存,上传ok !
效果图如上: 1、需要修改两个文件: source\module\misc\misc_tag.php temp […]