Modifying a custom ACP template module.

Post Reply

Topic author
cabot
Active Member
Posts: 4
Joined: 21. March 2023 12:54
phpBB.com User: cabot

Modifying a custom ACP template module.

Post by cabot »

Hello,

I have created a module that allows me to display blocks of links retrieved from an extension.
The permissions for displaying these blocks are configured upstream by the extension.

I would like to disable the ‘Module permissions’ block.
Image

Alternatively, if this is not possible, display a message to warn the administrator that the permissions are already set by the extension and that it is recommended not to change anything in this block.

The current code is very basic.

Code: Select all

	public function get_template_side($module_id)
	{
		if (is_object($this->controller_helpers) && method_exists($this->controller_helpers, 'build_sidebar'))
		{
			$this->controller_helpers->build_sidebar();
		}

		return '@gtroph_b3pgtrophlinks/gtroph_links_side.html';
	}

	public function get_template_acp($module_id)
	{
		return [
			'title' => 'B3P_GTROPH_LINKS',
			'vars' => [],
		];
	}
}
User avatar

Kirk
Dev
Posts: 1979
Joined: 27. July 2010 18:02
phpBB.de User: Kirk
Contact:

Re: Modifying a custom ACP template module.

Post by Kirk »

Hi
This is not possible as it is displayed in every block. You could add something to the PHP file of your block.
within:

Code: Select all

	public function get_template_acp($module_id)
Gruß Udo

Topic author
cabot
Active Member
Posts: 4
Joined: 21. March 2023 12:54
phpBB.com User: cabot

Re: Modifying a custom ACP template module.

Post by cabot »

So return a message using “legend1” or something like that?
Post Reply

Return to “Modifications Support”