only Admins/Mods and topic starter can reply
Started by SirJeff, Nov 10 2007 08:00 PM
6 replies to this topic
#1
Posted 10 November 2007 - 08:00 PM
I'm looking for a mod that will allow only Admins/Mods and the topic starter to reply to their thread on a specific board. Any help would be greatly appreciated.
#2
Posted 10 November 2007 - 09:39 PM
Open sources/classes/post/class_post_reply.php...
Find:
Add above:
Replace the X with the forum ID where appropiate.
Find:
CODE
//-----------------------------------------
// POLL BOX ( Either topic starter or admin)
// and without a current poll
//-----------------------------------------
// POLL BOX ( Either topic starter or admin)
// and without a current poll
//-----------------------------------------
Add above:
CODE
# Added by Sean
if( $this->forum['id'] == X && ! $this->ipsclass->member['g_access_cp'] && ! $this->ipsclass->member['g_is_supmod'] )
{
if( ! isset( $this->ipsclass->member['_moderator'][ $this->forum['id'] ] ) OR ! is_array( $this->ipsclass->member['_moderator'][ $this->forum['id'] ] ) )
{
if( $this->topic['starter_id'] != $this->ipsclass->member['id'] )
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) );
}
}
}
if( $this->forum['id'] == X && ! $this->ipsclass->member['g_access_cp'] && ! $this->ipsclass->member['g_is_supmod'] )
{
if( ! isset( $this->ipsclass->member['_moderator'][ $this->forum['id'] ] ) OR ! is_array( $this->ipsclass->member['_moderator'][ $this->forum['id'] ] ) )
{
if( $this->topic['starter_id'] != $this->ipsclass->member['id'] )
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) );
}
}
}
Replace the X with the forum ID where appropiate.

My Free Modifications | For Sale Modifications | Photos of Moi | Services System
My computer is messed up. I can't develop anything until I get my grubby paws a new computer.
I do not offer support via PM or any other messenger service. Please use the forums.
#3
Posted 11 November 2007 - 12:21 AM
whats the restriction in the templatebits?
#4
Posted 11 November 2007 - 02:04 AM
Thank you Sean. I'm assuming that at a later date, if I decided to make another forum so that only the topic starter and admins/mods can reply, I can add the above code again with the new forum's ID?
#5
Posted 11 November 2007 - 02:34 AM
You could, or you could set the fourm ID's into an array...
Example:
Replace the 1, 2, 3 with the appropiate ID numbers. You can add as many as you need, just seperate them with a comma
Example:
CODE
# Added by Sean
if( in_array( intval( $this->forum['id'] ), array( 1, 2, 3 ) ) && ! $this->ipsclass->member['g_access_cp'] && ! $this->ipsclass->member['g_is_supmod'] )
{
if( ! isset( $this->ipsclass->member['_moderator'][ $this->forum['id'] ] ) OR ! is_array( $this->ipsclass->member['_moderator'][ $this->forum['id'] ] ) )
{
if( $this->topic['starter_id'] != $this->ipsclass->member['id'] )
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) );
}
}
}
if( in_array( intval( $this->forum['id'] ), array( 1, 2, 3 ) ) && ! $this->ipsclass->member['g_access_cp'] && ! $this->ipsclass->member['g_is_supmod'] )
{
if( ! isset( $this->ipsclass->member['_moderator'][ $this->forum['id'] ] ) OR ! is_array( $this->ipsclass->member['_moderator'][ $this->forum['id'] ] ) )
{
if( $this->topic['starter_id'] != $this->ipsclass->member['id'] )
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) );
}
}
}
Replace the 1, 2, 3 with the appropiate ID numbers. You can add as many as you need, just seperate them with a comma

My Free Modifications | For Sale Modifications | Photos of Moi | Services System
My computer is messed up. I can't develop anything until I get my grubby paws a new computer.
I do not offer support via PM or any other messenger service. Please use the forums.
#6
Posted 23 January 2011 - 07:36 PM
Is there a way to use this modification on iPB v3.1?
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users




Contributor











