Jump to content

Admin post/topic protection


Guest Davidcopperfield

Recommended Posts

if you mean ID 1. Here is a code:

Find:

function edit_button($post_id, $poster, $post_date)

{

 global $ibforums;


 if ($ibforums->member['id'] == "" or $ibforums->member['id'] == 0)

 {

  return "";

 }

add after:

if ($poster['id'] == '1') {

  if ($ibforums->member['id'] == '1') {

   return "<a href="{$this->base_url}act=Post&amp;CODE=08&amp;f={$this->forum['id']}&amp;t={$this->topic['tid']}&amp;p={$post_id}&amp;st={$ibforums->input[st]}"><{P_EDIT}></a>";

  }

  else {

   return "<a href="javascript:alert('You cannot edit this post.');"><{P_EDIT}></a>";

  }

 }

Above is 'no edit'. this is 'no delete' find:

function delete_button($post_id, $poster)

{

 global $ibforums, $std;


 if ($ibforums->member['id'] == "" or $ibforums->member['id'] == 0)

 {

  return "";

 }

add after:

if ($poster['id'] == '1') {

	if ($ibforums->member['id'] == '1') {

	return "<a href="javascript:delete_post('{$this->base_url}act=Mod&amp;CODE=04&amp;f={$this->forum['id']}&amp;t={$this->topic['tid']}&amp;p={$post_id}&amp;st={$ibforums->input[st]}&amp;auth_key=".$this->md5_check."')"><{P_DELETE}></a>";

}

else {

	return "<a href="javascript:alert('You cannot delete this post.');"><{P_DELETE}></a>";

}




That's found in sources/Topics.php


Someone requested this on IF, and posted the above code. Just copied it.

Link to comment
Share on other sites

I think this idea should be implemented and made an option in the User Groups section of the ACP (Protected Posts - Topics/posts by members of this group are immune from moderation).

That way, other users in the same group (e.g fellow admins) could moderate each others posts but never the root admins.

+1

Link to comment
Share on other sites

There is an option in phpBB by Przemo version in which you can choose/mark the field in ACP to bodyguard your topics and posts, I would like to have this same in IPB, moreover to have an option of Level moderation- this means that f.example being an admin you close the topic and it can;t be re-opened by the moderator and this same with re-opening- you open it for eternity. ;)

Link to comment
Share on other sites

  • 3 months later...
  • 6 months later...

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...