欧美日韩精品在线,国内精品久久久久久久久,一级毛片恃级毛片直播,清纯唯美亚洲综合欧美色

為dedecms3.0.1采集器增加縮圖功能_DedeCms教程

編輯Tag賺U幣
教程Tag:暫無Tag,歡迎添加,賺取U幣!
需要更改源文件,而且未經(jīng)過嚴(yán)格驗(yàn)證,只作交流用。 1:打開治理目錄中 action_co_export.php。 在開始部分加上 require_once(dirname(__FILE__)."/../include/inc_photograph.php"); 在68行下增加 /**********縮圖生成開始**************************************************/ $litpic=""; $DBlipic=""; if(preg_match("~(/upimg. ?)(\" ?) ~",$fields[$body_sel],$match)){ $litpic=$match[1]; $imagesdir=$cfg_basedir.$litpic; $sparr = Array("image/pjpeg","image/jpeg","image/gif","image/png");
$savepath = $ddcfg_image_dir.str_replace("-","",GetDateMk($pubdate)); CreateDir($savepath); $rname = GetPinyin($title,1,0); $rndname = substr($rname,strlen($rname)-6,6).$typeid; $fullUrl = $savepath."/".$rndname; $spdd = 1; while(true){ if(!file_exists($cfg_basedir.$fullUrl."-".$spdd.".jpg")||$spdd>1000) break; $spdd ; } $fullUrl = $fullUrl."-".$spdd.".jpg"; $limg=$cfg_basedir.$fullUrl; copy($imagesdir,$limg); //@unlink($litpic); if(ImageResize($limg,200,120)){ $DBlipic=$fullUrl; } }
/*********************縮圖生成結(jié)束*************************/ 這里我用$cfg_basedir作為路徑未成功,最后使用了硬代碼。 if(ImageResize($limg,200,120))這里的200,和120是你要生成的縮圖的尺寸。 2:在文件中找到 $inQuery = "INSERT INTO dede_archives( typeid,typeid2,sortrank,iscommend, ismake,channel,arcrank,click,title,color,writer,source,litpic, pubdate,senddate,adminID,memberID,description,keywords) VALUES ('$typeid','$typeid2','$sortrank','$iscommend', '$ismake','1','$arcrank','0','$title','$color','$writer','$source','', '$pubdate','$senddate','$adminID','0','$description','$keywords');"; 改為 $inQuery = "INSERT INTO dede_archives( typeid,typeid2,sortrank,iscommend,

查看更多 DedeCms教程  織夢模板  織夢DedeCms視頻教程  織夢dedecms專題

共2頁上一頁12下一頁
來源:模板無憂//所屬分類:DedeCms教程/更新時(shí)間:2007-04-23
相關(guān)DedeCms教程