位置:- 正文

DedeCMS问答ask匿名提问回答的实现方法(匿问我答查人)

编辑:rootadmin
dedecms5.3ask问答系统实现匿名提问和匿名回答问题的方法。  先说一下实现后的效果,首先这个修改后是一个精简版的dedecms问答系统,会取消采纳答案等功能,因取消会员功能后不再有答案的等级之分,如对答案的平分功能等将被取消。  最后不建议使用匿名提问功能,建议使用会员功能来实现问答。这里是给大家提供一个学习的思路!  下面说一下方法:  post.php文件:以下为引用的内容:if(empty($uid) && $action != 'rate') { showmsgs('no_login','../member/login.php?gourl=../ask/'); exit; }  1,修改成 或注释掉以下为引用的内容:if(empty($uid) && $action != 'rate') { if($action!='ask' & $action!='') { showmsgs('no_login','../member/login.php?gourl=../ask/'); exit; } }  2,注释掉以下为引用的内容:/*if($question['uid'] == $uid) { showmsgs('asker_cannot_answer', '-1'); }else*/  3,然后以下为引用的内容:if($answer['uid'] != $uid) { showmsgs('unallowed_action', $backurl); }else  替换成以下为引用的内容:if($question['uid'] == $uid) { showmsgs('asker_cannot_answer', '-1'); }else  这样就不能修改答案了,不过这个提示是不会回答自己的问题。或者直接注释掉:修改答案部分的php代码。以下为引用的内容:else if($action == 'modifyanswer') { $answer = $dsql->getone("SELECT answer.id, answer.uid, ask.dateline, ask.solvetime, ask.status, ask.expiredtime FROM `dede_askanswer` answer left join dede_ask ask on ask.id=answer.askid WHERE answer.id='$id'"); if($answer) { if($answer['uid'] != $uid) { showmsgs('unallowed_action', $backurl); }elseif($answer['status'] != 0) { showmsgs('question_solved', $backurl); }elseif($answer['expiredtime'] < $timestamp) { showmsgs('question_expired', $backurl); } } else { showmsgs('question_nonexistence'); } if(trim($content) == '') { showmsgs('post_answer_isnull'); } if(strlen($content) > 10000) { showmsgs('post_answer_toolong'); } if(strlen($brief) > 200) { showmsgs('post_brief_toolong', '-1'); } if($dsql->ExecuteNoneQuery("update dede_askanswer set content='$content', brief='$brief' where id='$id'")) { showmsgs('modifyanswer_success',$backurl); }else { showmsgs('modifyanswer_failed',$backurl); } }  question.php 注释以下代码以下为引用的内容:if($question['uid'] == $uid) { $publisher = 1; }

推荐整理分享DedeCMS问答ask匿名提问回答的实现方法(匿问我答查人),希望有所帮助,仅作参考,欢迎阅读内容。

DedeCMS问答ask匿名提问回答的实现方法(匿问我答查人)

文章相关热门搜索词:匿问我答能看浏览记录吗,匿问我答能看浏览记录吗,浏览匿问我答,浏览匿问我答,匿问我答问题大全,浏览匿问我答,匿名问答浏览,匿问我答提问人能收到答案嘛,内容如对您有帮助,希望把文章链接给更多的朋友!

免责

本文链接地址:https://www.jiuchutong.com/zhishi/312959.html 转载请保留说明!
下一篇链接:https://www.jiuchutong.com/zhishi/312960.html
免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

鄂ICP备2023003026号

友情链接: 武汉网站建设 电脑维修 湖南楚通运网络