typecho 评论不了,提交后出现评论已关闭

模板开发以及发布测试

版主: seita

回复
头像
wqa554664918
帖子: 2
注册时间: 2016年 6月 14日 09:11
联系:

typecho 评论不了,提交后出现评论已关闭

帖子 wqa554664918 »

之前模板用的是多说,现在想用原生态评论,自己瞎搞上代码,但是不能评论。求教大神帮忙,在此先谢谢啦。

comments.php代码

代码: 全选

<div id="comments">
    <?php $this->comments()->to($comments); ?>
    <?php if ($comments->have()): ?>
    <h3><?php $this->commentsNum(_t('暂无评论'), _t('仅有 1 条评论'), _t('已有 %d 条评论')); ?></h3>
   
    <?php $comments->listComments(); ?>

    <?php $comments->pageNav('&laquo; 前一页', '后一页 &raquo;'); ?>
   
    <?php endif; ?>

    <?php if($this->allow('comment')): ?>
    <div id="<?php $this->respondId(); ?>" class="respond">
        <div class="cancel-comment-reply">
        <?php $comments->cancelReply(); ?>
        </div>
   
        <h3 id="response"><?php _e('添加新评论'); ?></h3>
        <form method="post" action="<?php $this->commentUrl() ?>" id="comment-form" role="form">
            <?php if($this->user->hasLogin()): ?>
            <p><?php _e('登录身份:'); ?><a href="<?php $this->options->profileUrl(); ?>"><?php $this->user->screenName(); ?></a>. <a href="<?php $this->options->logoutUrl(); ?>" title="Logout"><?php _e('退出'); ?> &raquo;</a></p>
            <?php else: ?>
            <p>
                <label for="author" class="required"><?php _e('称呼'); ?></label>
                <input type="text" name="author" id="author" class="text" value="<?php $this->remember('author'); ?>" required />
            </p>
            <p>
                <label for="mail"<?php if ($this->options->commentsRequireMail): ?> class="required"<?php endif; ?>><?php _e('邮箱'); ?></label>
                <input type="email" name="mail" id="mail" class="text" value="<?php $this->remember('mail'); ?>"<?php if ($this->options->commentsRequireMail): ?> required<?php endif; ?> />
            </p>
            <p>
                <label for="url"<?php if ($this->options->commentsRequireURL): ?> class="required"<?php endif; ?>><?php _e('网站'); ?></label>
                <input type="url" name="url" id="url" class="text" placeholder="<?php _e('http://'); ?>" value="<?php $this->remember('url'); ?>"<?php if ($this->options->commentsRequireURL): ?> required<?php endif; ?> />
            </p>
            <?php endif; ?>
            <p>
                <label for="textarea" class="required"><?php _e('内容'); ?></label>
                <textarea rows="8" cols="50" name="text" id="textarea" class="textarea" required ><?php $this->remember('text'); ?></textarea>
            </p>
            <p>
                <button type="submit" class="submit"><?php _e('提交评论'); ?></button>
            </p>
        </form>
    </div>
    <?php else: ?>
    <h3><?php _e('评论已关闭'); ?></h3>
    <?php endif; ?>
</div>

网址:www.ma-am.cn
头像
ClayMore
帖子: 2483
注册时间: 2007年 11月 29日 02:55
来自: Sleeping Forest
联系:

Re: typecho 评论不了,提交后出现评论已关闭

帖子 ClayMore »

连评论模板也没显示


__________________

新版阿里百秀Alibaixiu主题 v11.1 For Typecho
http://xiu.160.me/
头像
wqa554664918
帖子: 2
注册时间: 2016年 6月 14日 09:11
联系:

Re: typecho 评论不了,提交后出现评论已关闭

帖子 wqa554664918 »

我把他关了。显示了也不能提交,他就提示评论已关闭。
头像
[email protected]
帖子: 51
注册时间: 2016年 7月 1日 12:08
联系:

Re: typecho 评论不了,提交后出现评论已关闭

帖子 [email protected] »

你装了多说同步插件吧?关闭插件就行了
愚小米
帖子: 5
注册时间: 2016年 11月 29日 19:27

Re: typecho 评论不了,提交后出现评论已关闭

帖子 愚小米 »

可以留言呢
回复