帝国CMS将信息的TAGS属性移到【基本信息】选项卡中的方法

帝国CMS教程 2019-06-13 06:10:36 122

帝国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功能的数据表都需要做第二步的修改。

声明:资源来自网络转载,版权归原作者所有,与本站立场无关,如不慎侵犯了你的权益,请联系我们告知,将做删除处理!

原文地址:《帝国CMS将信息的TAGS属性移到【基本信息】选项卡中的方法》发布于2019-06-13 06:10:36