Writing mcp module for admins only

Discussion forum for MOD Writers regarding MOD Development.
Locked
ras123
Registered User
Posts: 79
Joined: Sun Dec 14, 2003 12:10 pm

Writing mcp module for admins only

Post by ras123 »

Hi,
I am writing a mcp module, but it should be listed and managed by admins only, so how can I set the auth? and the $id, I saw an example in the wiki, but it is confusing.

Code: Select all

class mcp_page_name_info
{
    function module()
    {
        return array(
            'filename'    => 'mcp_page_name',
            'title'        => 'MCP_PAGE_TITLE',
            'version'    => '1.2.3',
            'modes'        => array(
                'mode1'        => array('title' => 'MCP_PAGE_MODE_ONE_TITLE', 'auth' => 'acl_m_,$id', 'cat' => array('MCP_PAGE_TITLE')),
                'mode2'        => array('title' => 'MCP_PAGE_MODE_TWO_TITLE', 'auth' => 'acl_m_,$id', 'cat' => array('MCP_PAGE_TITLE')),
            ),
        );
    }

    function install()
    {
    }

    function uninstall()
    {
    }
}
User avatar
christhatsme
Registered User
Posts: 1811
Joined: Sun Jan 16, 2005 10:42 am
Location: London, UK

Re: Writing mcp module for admins only

Post by christhatsme »

Could you not just add the permission for admins only in the Admin CP and set it up with normal permissions?
All MOD downloads should be back now - Sorry for that and serious lack of support! - If anyone wants to take over or help with any of my MODs the offer would be apreciated as I have little time for phpBB Modding recently!

Again very sorry for not supporting these MODs recently.
ras123
Registered User
Posts: 79
Joined: Sun Dec 14, 2003 12:10 pm

Re: Writing mcp module for admins only

Post by ras123 »

Hi,
I need to avoid to go to ACP, but like use this for admins. So I wrote

Code: Select all

=> array('title' => 'MCP_PAGE_MODE_ONE_TITLE', 'auth' => 'acl_a_', 'cat' => array('')),
in the mcp/info is it correct?
Locked

Return to “[3.0.x] MOD Writers Discussion”