最近苦于每次都要點擊生成縮略圖,無論你手工發布,還是采集而來,免不了要進行手工操作弄縮略圖,不然標題圖片沒有,挺煩人的,那么有沒有只需一次設定,就可以在文章編輯框里自動勾選生成縮略圖,免除你次次進行操作的麻煩,今天春哥技術博客就來分享一下設置過程:
先到 系統>管理數據表 > 后,在你需要進行設定的類型里更改,比如我要 新聞 這項的實現自動生成標題縮略圖和自動分頁(當然,你也可以單獨實現分頁和生成縮略圖)
找到 新聞系統數據表 ( phome_ ecms_ news ) >[管理字段]>新聞正文 后面點擊 修改
直接將春哥技術博客修改完以后的代碼復制進去更新一下就可以用了。
系統原來的代碼:
<?=ECMS_ShowEditorVar("newstext",$ecmsfirstpost==1?"":stripSlashes($r[newstext]),"Default","","300","100%")?><table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#DBEAF5"> <tr> <td bgcolor="#FFFFFF"> <input name="dokey" type="checkbox" value="1"<?=$r[dokey]==1?' checked':''?>> 關鍵字替換 <input name="copyimg" type="checkbox" id="copyimg" value="1"> 遠程保存圖片( <input name="mark" type="checkbox" id="mark" value="1"> <a href="SetEnews.php" target="_blank">加水印</a>) <input name="copyflash" type="checkbox" id="copyflash" value="1"> 遠程保存FLASH(地址前綴: <input name="qz_url" type="text" id="qz_url" size=""> )</td> </tr> <tr> <td bgcolor="#FFFFFF"><input name="repimgnexturl" type="checkbox" id="repimgnexturl" value="1"> 圖片鏈接轉為下一頁 <input name="autopage" type="checkbox" id="autopage" value="1">自動分頁 ,每 <input name="autosize" type="text" id="autosize" value="5000" size="5"> 個字節為一頁 取第 <input name="getfirsttitlepic" type="text" id="getfirsttitlepic" value="" size="1"> 張上傳圖為標題圖片( <input name="getfirsttitlespic" type="checkbox" id="getfirsttitlespic" value="1"> 縮略圖: 寬 <input name="getfirsttitlespicw" type="text" id="getfirsttitlespicw" size="3" value="<?=$public_r[spicwidth]?>"> *高 <input name="getfirsttitlespich" type="text" id="getfirsttitlespich" size="3" value="<?=$public_r[spicheight]?>"> )</td> </tr> </table>
修改完以后的代碼:
<?=ECMS_ShowEditorVar("newstext",$ecmsfirstpost==1?"":stripSlashes($r[newstext]),"Default","","300","100%")?><table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#DBEAF5"> <tr> <td bgcolor="#FFFFFF"> <input name="dokey" type="checkbox" value="1"<?=$r[dokey]==1?' checked':''?>> 關鍵字替換 <input name="copyimg" type="checkbox" id="copyimg" value="1" checked="checked"> 遠程保存圖片( <input name="mark" type="checkbox" id="mark" value="1" checked="checked"> <a href="SetEnews.php" target="_blank">加水印</a>) <input name="copyflash" type="checkbox" id="copyflash" value="1"> 遠程保存FLASH(地址前綴: <input name="qz_url" type="text" id="qz_url" size=""> )</td> </tr> <tr> <td bgcolor="#FFFFFF"><input name="repimgnexturl" type="checkbox" id="repimgnexturl" value="1"> 圖片鏈接轉為下一頁 <input name="autopage" type="checkbox" id="autopage" value="1">自動分頁 ,每 <input name="autosize" type="text" id="autosize" value="5000" size="5"> 個字節為一頁 取第 <input name="getfirsttitlepic" type="text" id="getfirsttitlepic" value="1" size="1"> 張上傳圖為標題圖片( <input name="getfirsttitlespic" type="checkbox" id="getfirsttitlespic" value="1" checked="checked"> 縮略圖: 寬 <input name="getfirsttitlespicw" type="text" id="getfirsttitlespicw" size="3" value="<?=$public_r[spicwidth]?>"> *高 <input name="getfirsttitlespich" type="text" id="getfirsttitlespich" size="3" value="<?=$public_r[spicheight]?>"> )</td> </tr> </table>
系統后臺原來的編輯器:
改為以后的后臺編輯器:
后續說明:自動生成縮略圖的大小,是在系統參數設置里進行設定的,自己可以根據需要,到參數設置里進行更改,從而實現默認的大小。
新聞熱點
疑難解答