Page 1 of 1

add new custom block

Posted: 26. June 2008 07:48
by inikad
An other question: how to add a third new custom block on the portal and in the acp to manage it?

Re: add new custom block

Posted: 26. June 2008 09:32
by Kevin
You need to duplicate and rename all belonging files, variables, DB fields and code (in the root\includes\acp\acp_portal.php).

Re: add new custom block

Posted: 26. June 2008 12:16
by inikad
Could you give me more detail on what to do? I'm not sure to understand what to do exactly... :roll:

I just have to change this and that's all?

Code: Select all

'legend2'								=> 'ACP_PORTAL_CUSTOM_CENTER_SETTINGS',
						'portal_custom_center'				=> array('lang' => 'PORTAL_CUSTOM_CENTER'						,	'validate' => 'bool',		'type' => 'radio:yes_no',	'explain' => true),
						'portal_custom_center_headline'		=> array('lang' => 'PORTAL_CUSTOM_CENTER_HEADLINE'			,	'validate' => 'string', 'type' => 'text:40:200',	 'explain' => true),
						'portal_custom_center_bbcode'		=> array('lang' => 'PORTAL_CUSTOM_CENTER_BBCODE'			,	'validate' => 'bool',		'type' => 'radio:yes_no',	'explain' => true),
						'portal_custom_code_center'			=> array('lang' => 'PORTAL_CUSTOM_CODE_CENTER'				,	'type' => 'textarea:6:6',	 'explain' => true),
Nothing to add anywhere?

Re: add new custom block

Posted: 26. June 2008 13:00
by Kevin
inikad wrote:I just have to change this and that's all?
No, a lot more to do.
The code you've posted is the ACP part of the custom block. You need to copy it and rename the variables etc.
Then you have to do some SQL inserts, duplicate the PHP and html files and so on.
As i said: a lot to do, if you want to mange it via the ACP and keep it easy customizable.

Question: have you seen this tutorial?
Adding a custom block
You can't manage the new block in the ACP with this tutorial, but maybe you don't want to change the used code every few days. ;)