http://blog.sina.com.cn/s/blog_a76572bf01015psu.html

DEDE在栏目添加一个字段

 (2012-12-27 11:14:55)
标签: 

中调

 

视频

 

字段

 

名称

 

栏目

分类: dedecms

需要修改:catalog_edit.php,catalog_edit.htm,catalog_add.php,catalog_add.htm  四个文件


catalog_add.htm

第253行。添加一个栏目名称,如下:
          <!--tr>
            <td class='bline' height="26" style="padding-left:10px;">栏目视频:</td>
            <td class='bline'><input name="typevideo" type="text" id="typevideo" size="40" class="iptxt" /></td>
          </tr-->


catalog_edit.htm

第216行,添加一个栏目名称,如下:
          <!--tr>
            <td class='bline' height="26" style="padding-left:10px;">栏目视频:</td>
            <td class='bline'><input name="typevideo" type="text" id="typevideo" size="40" value="<?php echo $myrow['typevideo']?>" class="iptxt" /></td>
          </tr-->

 

catalog_edit.php


第38行添加一个字段。如:  typevideo='$typevideo',
第220行添加一个字段。如:

          <!--tr>
            <td class='bline' height="26" align="center"><font color='red'>栏目视频:</font></td>
            <td class='bline'><input name="typevideo" type="text" id="typevideo" size="40" value="<?php echo $myrow['typevideo']?>" class="iptxt" /></td>
          </tr-->


catalog_add.php

第65行添加。如:reid,topid,sortrank,typename,typedir,typevideo,isdefault,defaultname,issend,channeltype,
第67行添加。如:'~reid~','~topid~','~rank~','~typename~','~typedir~','$typevideo','$isdefault','$defaultname','$issend','$channeltype',
第227行添加。如:reid,topid,sortrank,typename,typedir,typevideo,isdefault,defaultname,issend,channeltype,
第230行添加。如:'$reid','$topid','$sortrank','$typename','$typedir','$typevideo','$isdefault','$defaultname','$issend','$channeltype',

最后,在模版中调用,如:

      <!--span class="index_nr_gsjj_nr">
       <p>{dede:sql sql='Select typedir,content,typevideo from hhls_arctype where id=10'}
       <span class="index_nr_gsjj_nr_sp">
<embed src="[field:typevideo /]" type="application/x-shockwave-flash" allowfullscreen="true" wmode="opaque" width="195" height="139"></embed>
       </span>
           <a href="[field:typedir runphp='yes']
                @me = (empty(@me)?"":str_replace("{cmspath}/","/",@me));
              [/field:typedir]">[field:content/]</a>{/dede:sql}...</p>
      </span>
      </span-->