<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:wfw="http://wellformedweb.org/CommentAPI/">
<channel>
<title>拾光 - Typecho如何判断是否加密文章 的评论</title>
<link>https://www.ishiguang.cn/18249.html</link>
<atom:link href="https://www.ishiguang.cn/feed/18249.html" rel="self" type="application/rss+xml" />
<language>zh-CN</language>
<description>Typecho如何判断是否加密文章typecho判断加密文章的方法if ($this-&amp;gt;hidden) {    //是加密文章并且未解锁} else {    //不是加密文章或者已解锁...</description>
<lastBuildDate>Wed, 15 Nov 2023 10:12:09 +0800</lastBuildDate>
<pubDate>Wed, 15 Nov 2023 10:12:09 +0800</pubDate>
<item>
<title>admin</title>
<link>https://www.ishiguang.cn/18249.html/comment-page-1#comment-528</link>
<guid>https://www.ishiguang.cn/18249.html/comment-page-1#comment-528</guid>
<pubDate>Wed, 15 Nov 2023 10:12:09 +0800</pubDate>
<dc:creator>admin</dc:creator>
<description><![CDATA[去更新最新版本吧]]></description>
<content:encoded xml:lang="zh-CN"><![CDATA[
<p>去更新最新版本吧</p>
]]></content:encoded>
<comments>https://www.ishiguang.cn/18249.html/comment-page-1#comment-528#comments</comments>
</item>
<item>
<title>小白</title>
<link>https://www.ishiguang.cn/18249.html/comment-page-1#comment-527</link>
<guid>https://www.ishiguang.cn/18249.html/comment-page-1#comment-527</guid>
<pubDate>Wed, 15 Nov 2023 09:51:37 +0800</pubDate>
<dc:creator>小白</dc:creator>
<description><![CDATA[我的还在用0.9版本 用的默认文章加密 第一次输入密码正确能打开 后面就一直说密码错误 是什么原因啊？/** 处理密码保护流程 */
if (!empty($value['password']) &&
$value['password'] != $this->request->protectPassword &&
$value['authorId'] != $this->user->uid &&
!$this->user->pass('editor', true)) {
$value['hidden'] = true;/** 抛出错误 */
if ($this->request->isPost() && isset($this->request->protectPassword)) {
throw new Typecho_Widget_Exception(_t('对不起,您输入的密码错误'), 403);
}
}$value = $this->pluginHandle(__CLASS__)->filter($value, $this);/** 如果访问权限被禁止 */
if ($value['hidden']) {
$value['text'] = '' .
'' . _t('请输入密码访问') . '' .
'
            ' .
'';//$value['title'] = _t('此内容被密码保护');
$value['tags'] = array();
$value['commentsNum'] = 0;
}return $value;
}]]></description>
<content:encoded xml:lang="zh-CN"><![CDATA[
<p>我的还在用0.9版本 用的默认文章加密 第一次输入密码正确能打开 后面就一直说密码错误 是什么原因啊？</p><p>/** 处理密码保护流程 */<br>
if (!empty($value['password']) &&<br>
$value['password'] != $this->request->protectPassword &&<br>
$value['authorId'] != $this->user->uid &&<br>
!$this->user->pass('editor', true)) {<br>
$value['hidden'] = true;</p><p>/** 抛出错误 */<br>
if ($this->request->isPost() && isset($this->request->protectPassword)) {<br>
throw new Typecho_Widget_Exception(_t('对不起,您输入的密码错误'), 403);<br>
}<br>
}</p><p>$value = $this->pluginHandle(__CLASS__)->filter($value, $this);</p><p>/** 如果访问权限被禁止 */<br>
if ($value['hidden']) {<br>
$value['text'] = '</p>' .<br>
'</p><p>' . _t('请输入密码访问') . '</p><p>' .<br>
'</p><p><br>
            </p><p>' .<br>
'<p>';</p><p>//$value['title'] = _t('此内容被密码保护');<br>
$value['tags'] = array();<br>
$value['commentsNum'] = 0;<br>
}</p><p>return $value;<br>
}</p>
]]></content:encoded>
<comments>https://www.ishiguang.cn/18249.html/comment-page-1#comment-527#comments</comments>
</item>
</channel>
</rss>