天天看點

Dedecms織夢 修改摘要字數長度

1.先進入資料庫修改表: dede_archives  字段 description  varchar(600);

2.進入織夢背景 找到  系統-->系統基本參數-->  其它選項 自動摘要長度(0-250,0表示不啟用):600

3.測試,如果有問題需要分别修改

     ①修改措施檔案

  dede

  /archives_add.php

  /archives_edit.php

  /article_add.php

  /article_edit.php

查找以下代碼:

$title= cn_substrR($title,$cfg_title_maxlen);

    $shorttitle= cn_substrR($shorttitle,36);//大略标題字元數
   $color = cn_substrR($color,7);
   $writer= cn_substrR($writer,20);//作者字元數
   $source= cn_substrR($source,30);//文章來曆字元數
   $description= cn_substrR($description,250);//摘要字元數
   $keywords= trim(cn_substrR($keywords,30));//要害詞字元數
   $filename = trim(cn_substrR($filename,40));//檔案名字元數
   if(!TestPurview('a_Check,a_AccCheck,a_MyCheck'))

           

找到

$description = cn_substrR($description,250);
           

修改紅色數字為想要顯示的摘要字元數

  如要修改産品檔案的文檔摘要則修改     dede

    /product_add.php     /product_edit.php 找到

$description = cn_substrR($description,250);

           

 修改紅色數字為想要顯示的摘要字元數

轉載于:https://www.cnblogs.com/leavesldy/archive/2013/05/10/3070886.html