帝国cms实现自动生成缩略图和自动分页功能
无论你手工发布,还是采集而来,免不了要进行手工操作弄缩略图,不然标题图片没有,挺烦人的 只需一次设定,就可以在文章编辑框里自动勾选上分页和生成缩略图,免除你次次进行操作的麻烦,好了,废话不多说,上菜“先到 系统>管理……
无论你手工发布,还是采集而来,免不了要进行手工操作弄缩略图,不然标题图片没有,挺烦人的 只需一次设定,就可以在文章编辑框里自动勾选上分页和生成缩略图,免除你次次进行操作的麻烦,好了,废话不多说,上菜“
先到 系统>管理数据表 > 后,在你需要进行设定的类型里更改,比如我要 这项的实现自动生成标题缩略图和自动分页(当然,你也可以单独实现分页和生成缩略图)
找到 新闻系统数据表( phome_ ecms_ news ) >[管理字段]>新闻正文 后面点击
输入表单替换html代码(增加字段时请留空)后面的代码里增加几个代码
<?=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> 远程保存图片( <input name="mark" type="checkbox" id="mark" value="1"> <a href="SetEnews.php<?=$ecms_hashur[whehref]?>" 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" checked> 自动分页 ,每 <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>
这是更改后的代码。
OK, 改好后就提交 数据更新 到文章发布地方看看是不是已经自动勾选上了啊,从此以后发布文章写好后直接发布,免除你次次手工操作的麻烦怎么样,是不是挺方便了,这下懒人大大们有福了
在说明下,自动生成缩略图的大小,是在系统参数设置里进行设定的,自己可以根据需要,到参数设置里进行更改,从而实现默认的大小
- 上一篇
帝国cms后台忘记了安全提问及密码该如何找回
忘记后台管理员帐号 用phpmyadmin查看phome_enewsuser表里的记录:查看username字段的内容。忘记后台登陆密码 用phpmyadmin修改phome_enewsuser表里的记录:把password字段的内容改为:“322d3fef02fc39251436cb4522d
- 下一篇
帝国CMS搜索列表显示页关键字高亮的更改实现
为大家介绍下帝国CMS搜索列表显示页关键字高亮的更改实现方法教程修改e/search/result/index.php,如下:while($r=$empire->fetch($sql)){ /////////////////////////////高亮关键字 $r[title]=str_replace(