Modifying a custom ACP template module.

Post Reply

Topic author
cabot
Active Member
Posts: 8
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: 1995
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: 8
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?
User avatar

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

Re: Modifying a custom ACP template module.

Post by Kirk »

Exactly, it looks like this:
no_change_module_permissions.jpg
no_change_module_permissions.jpg (8.95 KiB) Viewed 17359 times
Gruß Udo

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

Re: Modifying a custom ACP template module.

Post by cabot »

Thx!

GPickers62
Active Member
Posts: 2
Joined: Yesterday 09:40
phpBB.de User: Ich kann das nicht b
phpBB.com User: Ich kann dir hier ke

Re: Modifying a custom ACP template module.

Post by GPickers62 »

Kirk wrote:Exactly, it looks like this: no_change_module_permissions.jpg (8.95 KiB) Viewed 17299 times
Spot on Kirk, done summat similar on one of my own mods years back, just a plain legend telling folk "leave this block alone" saved me a right load of support messages after. Simple trick but works a treat :)

Graham
Post Reply

Return to “Modifications Support”