插件发布
插件名称: |
仅楼主、管理员、此楼作者能看可见FOR7.0 |
插件来源: |
|
适用版本: |
Discuz! 7.0 |
语言编码: |
GBK简体 |
最后更新时间: |
|
插件作者: |
梦想讨论区 |
插件简介: |
仅楼主、管理员、此楼作者能看可见FOR7.0适合用于说悄悄话以及对楼主、管理员表达爱恋和隐私的话语用上效果应该不错,哈哈 |
1,升级数据库,如果论坛数据库前缀不是cdb_,请修改之
ALTER TABLE `cdb_posts` ADD `louzikejian` BOOL NOT NULL ;
2,修改include/editpost.inc.php
找到
$db->query("UPDATE {$tablepre}posts SET message='$message', usesig='$usesig', htmlon='$htmlon', bbcodeoff='$bbcodeoff', parseurloff='$parseurloff',
smileyoff='$smileyoff', subject='$subject' ".($pattachment ? ", attachment='1'" : '')." $anonymousadd ".($auditstatuson && $audit == 1 ? ",invisible='0'" : '')." WHERE pid='$pid'");
在其下一行加入以下代码
//楼主可见
$db->query("UPDATE {$tablepre}posts SET louzikejian='$louzikejian' WHERE pid='$pid'");
//楼主可见
3,修改include/newreply.inc.php
找到
$db->query("REPLACE INTO {$tablepre}myposts (uid, tid, pid, position, dateline, special) VALUES ('$discuz_uid', '$tid', '$pid', '".($thread['replies'] + 1)."', '$timestamp', '$special')", 'UNBUFFERED');
在其下一行加入以下代码
//楼主可见
$db->query("UPDATE {$tablepre}posts SET louzikejian='$louzikejian' WHERE pid='$pid'");
//楼主可见
4,修改templates/default/post.htm
找到<p><input type="checkbox" name="parseurloff" id="parseurloff" value="1" $urloffcheck tabindex="1" /><label for="parseurloff">{lang disable} {lang post_parseurl}</label></p>
在其上一行加入以下代码
<p><input type="checkbox" name="louzikejian" id="louzikejian" value="1" {if $postinfo[louzikejian]}checked="checked"{/if} /> <label>仅楼主可见</label></p>
5,打开templates/default/viewthread_node.htm
找到
$post[message]
修改为了以下
<!--{if $post[louzikejian]&&$post[first]!=1&&($groupid!=1&&$discuz_uid!=$thread[authorid]&&$discuz_uid!=$post[authorid])}-->
只有楼主、管理员、此楼作者能看
<!--{else}-->
$post[message]
<!--{/if}--> |
|