【原创】修改搜索功能和整合UEDITOR后台编辑器(2015-8-21)
一,今天修改好搜索功能,用隐藏域的方法提交条件即可,隐藏域的属性用到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='';" onBlur="if(this.value==''){this.value='';}">
<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':''?>>
关键字替换 <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>