Jump to content

Developer Documentation

core/ModCpMemberManagement

What it is

The ModCpMemberManagement extension type allows your application to add a new tab to the ModeratorCP > Member Management page available to moderators (with permission). By default, there are tabs here in the ModeratorCP to manage banned, mod-queued and posting-restricted members, however your application may have a need to allow moderators to manage members with respect to your application as well.

How to use

When you create the extension, two basic methods are defined.

    /**
     * Returns the tab key for the navigation bar
     *
     * @return    string|null
     */
    public function getTab()
    {
    }

The getTab() method returns a string key representing the tab. You will then need to create a language string with the prefix "modcp_members_" and the rest of the language string being the key returned from getTab() to define the string shown on the tab in the ModeratorCP.

    /**
     * Get content to display
     *
     * @return    string
     */
    public function manage()
    {
    }

The manage() method should return the HTML to output, which will vary depending upon the needs of your extension. Commonly, you may use an \IPS\Helpers\Table\Db instance to facilitate pagination and generating the output, however you can return whatever HTML you need to ultimately.


  Report Document


×
×
  • Create New...