【原创】修改搜索功能和整合UEDITOR后台编辑器(2015-8-21)

来源:互联网   编辑:思良  发表时间:2015-08-20  关注度:652  

 一,今天修改好搜索功能,用隐藏域的方法提交条件即可,隐藏域的属性用到hidden,不过只能用于input,所以name=show来代替下拉框,代码如下:

<form action="[!--news.url--]e/search/index.php" class="boxl" method="post" target="_blank" name="schform" id="schform">

<input type="hidden" name="show" value="title,smalltext,newstext,writer">     <!--  隐藏域能提交,但是不显示给别人看 -->

     <input name="keyboard" type="text" id="keyboard" value="请输入查询关键字" class="sch_txt01 sch_txt02" onFocus="this.value=&#39;&#39;;" onBlur="if(this.value==&#39;&#39;){this.value=&#39;&#39;;}">

      <input type="submit" class="submit_bt" id="search" value="">

</form>

二,整合了UEDITOR后台编辑器,比自带的好多了,可以参考http://www.jygawx.com/www/e/action/ShowInfo.php?classid=61&id=116

上传编辑器文件到/e/data/ecmseditor/,命名为ueditor

接着在后台、系统、数据表与系统模型、管理数据表,先备份新闻系统数据表,后点管理字段,点修改newstext(新闻正文),在输入表单替换html代码替换下面代码:(注意3文件路径)

<script type="text/javascript" src="/www/e/data/ecmseditor/ueditor/ueditor.config.js"></script> 

<script type="text/javascript" src="/www/e/data/ecmseditor/ueditor/ueditor.all.js"></script> 

<link rel="stylesheet" href="/www/e/data/ecmseditor/ueditor/themes/default/ueditor.css"> 

<script type="text/plain" id="myEditor" name="newstext"> 

<?=$ecmsfirstpost==1?"":stripSlashes($r[newstext])?> 

</script> 

<script type="text/javascript"> 

var editor = new baidu.editor.ui.Editor(); 

editor.render("myEditor"); 

editor.classid = <?=$classid?>; 

editor.filepass = <?=$filepass?>; 

</script> 

<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':''?>> 

关键字替换&nbsp;&nbsp; <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>)&nbsp;&nbsp; 

<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"> 图片链接转为下一页&nbsp;&nbsp; <input name="autopage" type="checkbox" id="autopage" value="1"> 自动分页 

,每 

<input name="autosize" type="text" id="autosize" value="5000" size="5"> 

个字节为一页&nbsp;&nbsp; 取第 

<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>


下一篇:【原创】修改手机和留言板导航(2015-8-19)


上一篇:【原创】给作者和信息来源加个初始值(2015-8-27)


小提示:按 回车[Enter]键 返回,按 ←键 返回上一页, 按 →键 进入下一页。