日韩天天综合网_野战两个奶头被亲到高潮_亚洲日韩欧美精品综合_av女人天堂污污污_视频一区**字幕无弹窗_国产亚洲欧美小视频_国内性爱精品在线免费视频_国产一级电影在线播放_日韩欧美内地福利_亚洲一二三不卡片区

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

編輯Tag賺U幣
教程Tag:暫無(wú)Tag,歡迎添加,賺取U幣!
需要更改源文件,而且未經(jīng)過(guò)嚴(yán)格驗(yàn)證,只作交流用。 1:打開(kāi)治理目錄中 action_co_export.php。 在開(kāi)始部分加上 require_once(dirname(__FILE__)."/../include/inc_photograph.php"); 在68行下增加 /**********縮圖生成開(kāi)始**************************************************/ $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教程  織夢(mèng)模板  織夢(mèng)DedeCms視頻教程  織夢(mèng)dedecms專(zhuān)題

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