dedecms5.7 文章不能发布问题探讨及解决方法
<p><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>1.dedecms5.7默认的编辑器变成ckeditor了,我个人感觉ckeditor比FCKeditor好,对这次变更还是挺满意的。 </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>不过dedecms的前台会员发布文章的功能,用ckeditor就有点问题了,本身给前台会员投稿不需要太多的功能,还有就是会员上传<u>图片</u>,用ckeditor的话,非管理员账号点击上传图片按钮时会弹出:提示:需输入后台管理目录才能登录,网上看到的解决方法是 </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>注释掉“/include/dialog/congig.php”中的以下代码: </span></p>
<div class="msgheader" style='margin: 3px auto 0px; padding: 0px 3px; outline: none; line-height: 21.6px; clear: both; border-width: 1px; border-style: solid; border-color: rgb(0, 153, 204); background: rgb(246, 251, 255); overflow: hidden; font-family: tahoma, arial, "Microsoft YaHei";'>
<p class="right">
<span><u>复制代码</u></span></p>
<p>
代码如下:</p>
</div>
<p class="msgborder" style='margin: 0px auto 3px; padding: 0px 3px; outline: none; line-height: 25.2px; font-size: 14px; clear: both; border-right: 1px solid rgb(0, 153, 204); background: rgb(221, 237, 251); overflow: hidden; border-left: 1px solid rgb(0, 153, 204); word-break: break-all; border-bottom: 1px solid rgb(0, 153, 204); word-wrap: break-word; font-family: tahoma, arial, "Microsoft YaHei";'>
<br>
if($cuserLogin->getUserID()<=0) <br>
{ <br>
if(empty($adminDirHand)) <br>
{ <br>
ShowMsg("<b>提示:需输入后台管理目录才能登录</b><br/><form>请输入后台管理目录名:<inputtype='hidden'value='".urlencode($dedeNowurl)."'/><inputtype='text'value='mgr'/><inputtype='submit'value='转入登录'/></form>","javascript:;"); <br>
exit(); <br>
} <br>
$gurl="../../{$adminDirHand}/login.php?gotopage=".urlencode($dedeNowurl); <br>
echo""; <br>
exit(); <br>
} </p>
<p>
<br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>但是这样没有登录的用户也能显示那个页面了,虽然有一个报错。还有就是所有的用户都可以直接看到上传根目录下的所有文件,这样安全性大大降低了。于是,开始怀恋FCKeditor的前台上传图片功能,上传文件是用户单独的目录下,也没有权限问题,所以决定让后台继续用ckeditor,前台用户使用FCKeditor。</span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>在网站目录includeincinc_fun_funAdmin.php文件中,找到139行,functionSpGetEditor函数,if($GLOBALS['cfg_html_editor']=='fck')换成if($GLOBALS['my_html_editor']=='fck'||$GLOBALS['cfg_html_editor']=='fck'),然后再前面 </span></p>
<div class="msgheader" style='margin: 3px auto 0px; padding: 0px 3px; outline: none; line-height: 21.6px; clear: both; border-width: 1px; border-style: solid; border-color: rgb(0, 153, 204); background: rgb(246, 251, 255); overflow: hidden; font-family: tahoma, arial, "Microsoft YaHei";'>
<p class="right">
<span><u>复制代码</u></span></p>
<p>
代码如下:</p>
</div>
<p class="msgborder" style='margin: 0px auto 3px; padding: 0px 3px; outline: none; line-height: 25.2px; font-size: 14px; clear: both; border-right: 1px solid rgb(0, 153, 204); background: rgb(221, 237, 251); overflow: hidden; border-left: 1px solid rgb(0, 153, 204); word-break: break-all; border-bottom: 1px solid rgb(0, 153, 204); word-wrap: break-word; font-family: tahoma, arial, "Microsoft YaHei";'>
<br>
if(!isset($GLOBALS['cfg_html_editor'])) <br>
{ <br>
$GLOBALS['cfg_html_editor']='fck'; <br>
} </p>
<p>
<br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>接着跟上一句 </span></p>
<div class="msgheader" style='margin: 3px auto 0px; padding: 0px 3px; outline: none; line-height: 21.6px; clear: both; border-width: 1px; border-style: solid; border-color: rgb(0, 153, 204); background: rgb(246, 251, 255); overflow: hidden; font-family: tahoma, arial, "Microsoft YaHei";'>
<p class="right">
<span><u>复制代码</u></span></p>
<p>
代码如下:</p>
</div>
<p class="msgborder" style='margin: 0px auto 3px; padding: 0px 3px; outline: none; line-height: 25.2px; font-size: 14px; clear: both; border-right: 1px solid rgb(0, 153, 204); background: rgb(221, 237, 251); overflow: hidden; border-left: 1px solid rgb(0, 153, 204); word-break: break-all; border-bottom: 1px solid rgb(0, 153, 204); word-wrap: break-word; font-family: tahoma, arial, "Microsoft YaHei";'>
<br>
if(!isset($GLOBALS['my_html_editor'])) <br>
{ <br>
$GLOBALS['my_html_editor']='0'; <br>
} </p>
<p>
<br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>然后在需要使用FCKeditor的文件上方加上$GLOBALS['my_html_editor']='fck';比如要在会员普通文章中使用这个编辑器,则在article_add.php最上方加上$GLOBALS['my_html_editor']='fck'; </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>刷新一下页面,成功。 </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><strong style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>说明</strong><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>:dedecms5.7自带没有FCKeditor,可以从5.6版本中提取,放在include目录下。 </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>2.此问题是从5.6升级到5.7再导入老数据库3表(附加表,主表,微表)后出的问题。 </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>因为DEDECMS5.7比5.6文章多了投票,所以archives表多了一个votid字段。 </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>所以必须增加这个字段。否则发布或修改文章的时候会提示更新dede_archives出错。 </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><strong style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>解决办法</strong><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>: </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>请在后台SQL命令行输入以下命令后运行: </span></p>
<div class="msgheader" style='margin: 3px auto 0px; padding: 0px 3px; outline: none; line-height: 21.6px; clear: both; border-width: 1px; border-style: solid; border-color: rgb(0, 153, 204); background: rgb(246, 251, 255); overflow: hidden; font-family: tahoma, arial, "Microsoft YaHei";'>
<p class="right">
<span><u>复制代码</u></span></p>
<p>
代码如下:</p>
</div>
<p class="msgborder" style='margin: 0px auto 3px; padding: 0px 3px; outline: none; line-height: 25.2px; font-size: 14px; clear: both; border-right: 1px solid rgb(0, 153, 204); background: rgb(221, 237, 251); overflow: hidden; border-left: 1px solid rgb(0, 153, 204); word-break: break-all; border-bottom: 1px solid rgb(0, 153, 204); word-wrap: break-word; font-family: tahoma, arial, "Microsoft YaHei";'>
<br>
ALTERTABLE`dede_archives`ADD`voteid`mediumint(8)NOTNULL; </p>
<p>
<br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>执行以上命令之后,问题就能完美解决。 </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>另外,升级还有类似dede后台目录对应的问题,默认dede后台目录,你得把升级文件中dede目录的文件上传到你自己设置的后台目录中。 </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>5.6的默认模板同样可以在5.7中适用,只要编码相同,直接上传更新即可.</span></p>
頁:
[1]