AI摘要

文章介绍了如何在DZ论坛的post.php文件中添加代码,以实现只有版主和发帖人能回复的功能。具体操作是在59行代码下方添加一段代码,用于判断论坛ID、发帖人ID和版主身份,不符合条件则显示无权限回复的消息。
文章介绍了如何

修改post.php 这个文件,在59行处

if($thread['readperm'] && $thread['readperm'] > $readaccess && !$forum['ismoderator'] && thread[authorid]!=thread['authorid'] != discuz_uid) {
   showmessage('thread_nopermission', NULL, 'NOPERM');
  }

的下面添加下面代码即可。

  //只有版主和发贴人自己能回复
  if(($forum['fid']==42) && ($thread['authorid']!=$discuz_uid) && !$forum['ismoderator']  )
  {
           showmessage('只有版主和发贴人才能回复', NULL, 'NOPERM');
  }

※相关文章推荐※



最后修改:2009 年 09 月 17 日
点赞的人是最酷的