首先在数据库管理工具里面 增加字段 新建tagms字段,类型varchar,长度255,允许空值。
打开后台/dede/tags_main.php,大概在27行找到
下面增加$dlist->SetParameter("tag", $tag);
大概在49行找到(下面红色的分隔符请去除)$dlist->SetParameter("tagms", $tagms);
修改为$query = "UPDATE `#分隔符@__tagindex` SET `count`='$count' WHERE id='$tid' ";
大概在147行找到$query = "UPDATE `#分隔符@__tagindex` SET `count`='$count',`tagms`='$tagms'WHERE id='$tid' ";
修改为$query = " INSERT INTO `#分隔符@__tagindex`(`tag`,`count`,`total`,`weekcc`,`monthcc`,`weekup`,`monthup`,`addtime`) VALUES('$keyword','0','1','0','0','$timestamp','$timestamp','$timestamp');";
打开/dede/templets/tags_main.htm,找到更新的JS$query = " INSERT INTO `#分隔符@__tagindex`(`tag`,`tagms`,`count`,`total`,`weekcc`,`monthcc`,`weekup`,`monthup`,`addtime`) VALUES('$keyword','$tagms','0','1','0','0','$timestamp','$timestamp','$timestamp');";
增加描述的参数,代码修改为function UpdateOne(tid) { location = "tags_main.php?action=update&count="+document.getElementById('count'+tid).value+"&tid="+tid;
找到function UpdateOne(tid) { location = "tags_main.php?action=update&count="+document.getElementById('count'+tid).value+"&tagms="+document.getElementById('ms'+tid).value+"&tid="+tid;
下面增加<td width="10%">标签</td>
找到<td width="35%">描述</td>
下面增加<td> <a href="../tags.php?/<?php echo urlencode($fields['tag']); ?>/" target="_blank">{dede:field.tag /}</a> </td>
由于增加了一列,后台其他地方的样式就自行解决了。<td> <textarea name="" rows="" cols="" id="ms<?php echo $fields['id']; ?>" ><?php echo $fields['tagms'];?></textarea> </td>
打开/include/taglib/tag.lib.php,找到
修改为$row['link'] = $cfg_cmsurl."/tags.php?/".urlencode($row['keyword'])."/";
打开/include/arc.taglist.clss.php,找到(下面出现的分隔符请去掉)$row['link'] = $cfg_cmsurl."/tags/php?/".urlencode($row['id'])."/";
修改为$this->TagInfos = $this->dsql->GetOne("Select * From `#分隔符@__tagindex` where tag like '{$this->Tag}' ");
$this->TagInfos = $this->dsql->GetOne("Select * From `#分隔符@__tagindex` whereidlike '{$this->Tag}' ");