帝国cms在 新增/编辑 信息时,信息的TAGS属性隐藏于选项卡【选项设置】中,如果将TAGS放到【基本信息】选项卡中,则可以省时省力又方便管理。如图:
实现此功能分两步修改:
1、修改 e/admin/AddNews.php 文件
在此文件中查找 <td height="25" bgcolor="#FFFFFF">TAGS ,在此处上下行代码找到如下代码并删除:
<?php if(strstr($public_r['usetags'],','.$modid.',')) { $infotag_readonly=''; $infotag_copykeyboard=' <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=''; } ?> <tr> <td height="25" bgcolor="#FFFFFF">TAGS : <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">(多个用","逗号格开)</font></td> </tr> <?php } ?>
2、修改各数据表的 special.field 字段
special.field 是系统默认字段,在字段的“输入表单替换html代码”中末尾,找到 </table> ,在其上插入第一步中删除的代码即可。
注意:所有需使用tag功能的数据表都需要做第二步的修改。
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。
评论(0)