Jump to content


- - - - -

only Admins/Mods and topic starter can reply


  • Please log in to reply
6 replies to this topic

#1 SirJeff

SirJeff

    n00b

  • Members
  • Pip
  • 2 posts
  • Real Name:Jeff
  • IPB Version:v2.3.x

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 Sean

Sean

    The One Man Show - IB.Bored

  • IM Supporters
  • PipPipPipPipPipPipPipPipPipPip
  • 3,857 posts
  • Location:England, UK
  • Real Name:Sean Ellis
  • IPB Version:v2.3.x
Contributor

Posted 10 November 2007 - 09:39 PM

Open sources/classes/post/class_post_reply.php...

Find:
CODE
        //-----------------------------------------
        // 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' ) );
                }
            }
        }


Replace the X with the forum ID where appropiate.

Posted Image

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 chaz

chaz

    Coder

  • Banned
  • PipPipPipPipPip
  • 134 posts
  • IPB Version:N/A

Posted 11 November 2007 - 12:21 AM

whats the restriction in the templatebits?

#4 SirJeff

SirJeff

    n00b

  • Members
  • Pip
  • 2 posts
  • Real Name:Jeff
  • IPB Version:v2.3.x

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 Sean

Sean

    The One Man Show - IB.Bored

  • IM Supporters
  • PipPipPipPipPipPipPipPipPipPip
  • 3,857 posts
  • Location:England, UK
  • Real Name:Sean Ellis
  • IPB Version:v2.3.x
Contributor

Posted 11 November 2007 - 02:34 AM

You could, or you could set the fourm ID's into an array...

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' ) );
                }
            }
        }


Replace the 1, 2, 3 with the appropiate ID numbers. You can add as many as you need, just seperate them with a comma wink.gif

Posted Image

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 basil

basil

    n00b

  • Members
  • Pip
  • 3 posts
  • Real Name:bill
  • IPB Version:v3.1.x

Posted 23 January 2011 - 07:36 PM

Is there a way to use this modification on iPB v3.1?

#7 riven3d

riven3d

    Needs to get out more

  • Support Staff
  • PipPipPipPipPipPipPipPipPipPip
  • 3,908 posts
  • Location:Florida
  • Real Name:Michael
  • IPB Version:v3.1.x
Contributor

Posted 27 January 2011 - 12:21 PM

you dont need a modification to do this on 3.1

Did you find my support helpful? Feel free to donate!
Posted Image





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users