帝国CMS内容编辑页把TAGS移到基本信息标签

在帝国cms后台添加tag时,往往需要点击选项设置才能配置tag信息,操作较为不便。如果能将tags从选项设置移到基本信息里,会快不少。那么,怎样将tags移到基本信息里呢?

移动需要分两个步骤,先修改文件,然后配置字段信息。注意:本操作涉及到核心文件的修改,在操作前务必注意备份。.

第一步:修改文件

进入目录文件/e/admin/AddNews.php,搜索if(strstr($public_r['usetags'],找到这段代码:

<?php
if(strstr($public_r['usetags'],','.$modid.','))
{
$infotag_readonly='';
$infotag_copykeyboard='&nbsp;&nbsp;<input type="button" name="Submit3" value="复制关键字" onclick="document.add.infotags.value=document.add.keyboard.value;">';
if(strstr($public_r['chtags'],','.$modid.','))
{
	$infotag_readonly=' readonly';
	$infotag_copykeyboard='&nbsp;&nbsp;<input type="button" name="Submit3" value="清除选择" onclick="if(confirm(\'确认要清除已选TAGS?\')){document.add.infotags.value=\'\';}">';
}
?>
<tr> 
<td height="25" bgcolor="#FFFFFF">TAGS&nbsp;&nbsp;&nbsp;&nbsp;: 
	<input name="infotags" type="text" id="infotags" value="<?=$r[infotags]?>" size="32"<?=$infotag_readonly?>> 
	<input type="button" name="Submit" value="选择" onclick="window.open('tags/ChangeTags.php?form=add&field=infotags<?=$ecms_hashur['ehref']?>','','width=700,height=550,scrollbars=yes');">
	<?=$infotag_copykeyboard?>
	<input name="oldinfotags" type="hidden" id="oldinfotags" value="<?=$r[infotags]?>">
	<font color="#333333">(多个用&quot;,&quot;逗号格开)</font></td>
</tr>
<?php
}
?>

第二步:修改字段

系统 → 数据表与系统模型 → 管理数据表 → 文章系统数据表(对应数据表) → 管理字段 → 修改数据表的special.field字段,在“输入表单替换html代码”输入框,拉到最后,</table>前面,将上一步复制的代码粘贴到</table>前面。

清空缓存,然后重新访问,就把TAGS移到基本信息标签下了。