先到 系统>管理数据表 > 后,在你需要进行设定的类型里更改,比如我要 新闻 这项的实现自动生成标题缩略图和自动分页(当然,你也可以单独实现分页和生成缩略图)

找到 新闻系统数据表 ( phome_ ecms_ news ) >[管理字段]>新闻正文 后面点击 修改

直接将修改完以后的代码复制进去更新一下就可以用了。

系统原来的代码:

<?=ECMS_ShowEditorVar("newstext",$ecmsfirstpost==1?"":stripSlashes($r[newstext]),"Default","","300","100%")?> <tablewidth="100%"border="0"cellpadding="3"cellspacing="1"bgcolor="#DBEAF5"> <tr> <tdbgcolor="#FFFFFF"><inputname="dokey"type="checkbox"value="1"<?=$r[dokey]==1?'checked':''?>> 关键字替换&nbsp;&nbsp;<inputname="copyimg"type="checkbox"id="copyimg"value="1"> 远程保存图片( <inputname="mark"type="checkbox"id="mark"value="1"> <ahref="SetEnews.php"target="_blank">加水印</a>)&nbsp;&nbsp; <inputname="copyflash"type="checkbox"id="copyflash"value="1"> 远程保存FLASH(地址前缀: <inputname="qz_url"type="text"id="qz_url"size=""> )</td> </tr> <tr> <tdbgcolor="#FFFFFF"><inputname="repimgnexturl"type="checkbox"id="repimgnexturl"value="1">图片链接转为下一页&nbsp;&nbsp;<inputname="autopage"type="checkbox"id="autopage"value="1">自动分页 ,每 <inputname="autosize"type="text"id="autosize"value="5000"size="5"> 个字节为一页&nbsp;&nbsp;取第 <inputname="getfirsttitlepic"type="text"id="getfirsttitlepic"value=""size="1"> 张上传图为标题图片( <inputname="getfirsttitlespic"type="checkbox"id="getfirsttitlespic"value="1"> 缩略图:宽 <inputname="getfirsttitlespicw"type="text"id="getfirsttitlespicw"size="3"value="<?=$public_r[spicwidth]?>"> *高 <inputname="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%")?> <tablewidth="100%"border="0"cellpadding="3"cellspacing="1"bgcolor="#DBEAF5"> <tr> <tdbgcolor="#FFFFFF"><inputname="dokey"type="checkbox"value="1"<?=$r[dokey]==1?'checked':''?>> 关键字替换&nbsp;&nbsp;<inputname="copyimg"type="checkbox"id="copyimg"value="1"checked="checked"> 远程保存图片( <inputname="mark"type="checkbox"id="mark"value="1"checked="checked"> <ahref="SetEnews.php"target="_blank">加水印</a>)&nbsp;&nbsp; <inputname="copyflash"type="checkbox"id="copyflash"value="1"> 远程保存FLASH(地址前缀: <inputname="qz_url"type="text"id="qz_url"size=""> )</td> </tr> <tr> <tdbgcolor="#FFFFFF"><inputname="repimgnexturl"type="checkbox"id="repimgnexturl"value="1">图片链接转为下一页&nbsp;&nbsp;<inputname="autopage"type="checkbox"id="autopage"value="1">自动分页 ,每 <inputname="autosize"type="text"id="autosize"value="5000"size="5"> 个字节为一页&nbsp;&nbsp;取第 <inputname="getfirsttitlepic"type="text"id="getfirsttitlepic"value="1"size="1"> 张上传图为标题图片( <inputname="getfirsttitlespic"type="checkbox"id="getfirsttitlespic"value="1"checked="checked"> 缩略图:宽 <inputname="getfirsttitlespicw"type="text"id="getfirsttitlespicw"size="3"value="<?=$public_r[spicwidth]?>"> *高 <inputname="getfirsttitlespich"type="text"id="getfirsttitlespich"size="3"value="<?=$public_r[spicheight]?>"> )</td> </tr> </table> 后续说明:自动生成缩略图的大小,是在系统参数设置里进行设定的,自己可以根据需要,到参数设置里进行更改,从而实现默认的大小。

声明:有的资源均来自网络转载,版权归原作者所有,如有侵犯到您的权益 请联系邮箱:312334557@qq.com 我们将配合处理!

原文地址:《帝国cms模板如何自动生成文章缩略图?》发布于2022-10-08 14:18:49