Jump to content

Admin post/topic protection


Guest Davidcopperfield

Recommended Posts

Posted

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.

Posted

full only. If I have read right the trail is encodded and can't be moddifed so you'd have to buy a year or perp lience to get the full version.

Posted

Can I carry out a function about closing and opening topics- once closed/reopened by an admin cannot be reopened/closed ? All activities carried out by an admin ought to be irreversible unless another admin gets up to it.

Posted

I know about like no PHP (which is what the above code is). All I can do is 'hello world' and probley some other basic basic basic basic basic things

Posted

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

Posted

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. ;)

  • 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...