dede评论功能游客可以对文章进行评论


首先找到dede默认模板里的article_article.htm文件,找出其中的

<div class=”comment”>

            <!–评论:标题–>

            <div class=”commenttitle”>

                <div class=”title”><strong>最新评论</strong>共有 {dede:field name=’postnum’/} 位网友发表了评论 </div>

                <div class=”gotopost”><a href=”{dede:field name=’phpurl’/}/feedback.php?arcID={dede:field name=ID/}”>查看所有评论</a></div>

            </div>

            <!–评论内容–>

            <div class=”commentbox”>

                <script src=”{dede:field name=’phpurl’/}/feedback_js.php?arcID={dede:field name=’ID’/}”></script>

            </div>

            <!–发表评论:标题–>

            <div class=”posttitle”><strong>发表评论</strong></div>

            <!–发表评论–>

            <form action=”{dede:field name=’phpurl’/}/feedback.php?action=send” method=”post” name=”feedback”>

            <input type=”hidden” name=”arcID” value=”{dede:field name=”id”/}”>

            <div class=”postbox”>

                <div class=”txtbox”>

                    <strong>评论内容:</strong>不能超过250字,需审核,请自觉遵守互联网相关政策法规。

                    <textarea name=”msg” cols=”60″ rows=”6″></textarea>

                </div>

                <div class=”userbox”>

                    <dl>

                        <dd>

                            <strong>用户名:</strong><input name=”username” class=”username” type=”text” maxlength=”20″ />

                            <strong>密码:</strong><input name=”pwd” class=”password” type=”password” maxlength=”20″ />

                        </dd>

                        <dd></dd>

                        <dd class=”mtop”><input name=”notuser” type=”checkbox” value=”1″ /> <strong>匿名?</strong></dd>

                        <dd><input name=”sb” type=”button” class=”submit” value=”发表评论” onClick=’javascript:if(document.feedback.msg.value!=””) document.feedback.submit(); else alert(“评论内容不能为空!”);’/>

                      </dd>

                        <dd class=”mtop”><a href=”{dede:field name=’memberurl’/}/index_do.php?fmdo=user&dopost=regnew” target=”_blank”>注册</a></dd>

                    </dl>

            </div>

            </div></form>

        </div>

    </div>

(这些就是评论那一块的所有代码)

2,找到以上代码中的

<strong>密码:</strong><input name=”pwd” class=”password” type=”password” maxlength=”20″ />

然后删除。

找到

<strong>匿名?</strong>

然后删除。

找到

<input name=”notuser” type=”checkbox” value=”1″ />

,然后更改为<input name=”notuser” type=”hidden” value=”1″ />.最后提交保存,OK了,大功告成!