BigCoke233 / miracles

🎉 Typecho Theme Miracles - 生为奇迹

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

说说页面无法发表说说

AkagiYui opened this issue · comments

image
发表说说页面会直接刷新然后啥都没有

看到作者wiki说是 自带的评论系统进行储存的我就把它调回了普通模板,评论了一条消息,法线提交post的时候他还发送了另一条数据 &_=8264210fad7fb029f62d1364fc6fca7f 而且这条数据是不变的,加上这条数据在进行提交就可以了

本人也不太会编程,他的说说模板文件是叫做 saying.php

找到form表单这一行
<form method="post" action="<?php $this->commentUrl() ?>" id="comment-form" class="saying-form" role="form"> <p> <textarea rows="8" cols="50" name="text" id="textarea" placeholder="<?php gtecho('sayingPageTexts','sayingPlaceholder'); ?>" class="OwO-textarea comment-textarea textarea" required ><?php $this->remember('text'); ?></textarea> <input type="hidden" name="_" value="8264210fad7fb029f62d1364fc6fca7f"></input> </p> <p> <button type="submit" class="comment-submit submit"><?php gtecho('sayingPageTexts','sayingSubmit'); ?></button> </p> </form>
把这个替换上去就行了,原理就是加了个隐形的编辑框 名字是_ 提交的数据就是刚刚说到的数据

在Typecho後台的評論設置中,將選項“开启反垃圾保护”給關閉可以解決這個問題。