Recent Topics

Support Nested dynamic fields

Started by on Nov 27, 2017 – Contents updated: Jan 02, 2018

Nov 27, 2017 13:10    

Nov 27, 2017 13:30

	
	function GetDefaultSettings( & $params )
	{
		global $app_version;
		
		$type = version_compare( $app_version, '6.6.5', '>' ) ? 'array:array:string' : 'array';
		return array(
			'plugin_sets' => array(
				'label' => T_('Level 1'),
				'note' => T_(''),
				'type' => $type,
				'entries' => array(
		
						'a_color' => array(
									'label' => T_('Color'),
									//'note' => T_('E-g: #444444 for light-black'),
									'defaultvalue' => '#fed136',
									'type' => 'color',
								),
		
						'plugin_sets_2' => array(
							'label' => T_('Level 2'),
							'note' => T_(''),
							'type' => $type,
							'entries' => array(

										'color' => array(
												'label' => T_('B Color'),
												//'note' => T_('E-g: #444444 for light-black'),
												'defaultvalue' => '#fed136',
												'type' => 'color',
											),

										'text' => array(
												'label' => T_('B Text'),
												//'note' => T_('E-g: #444444 for light-black'),
												'defaultvalue' => 'Foo Bar',
												'type' => 'text',
											),

											'plugin_sets_3' => array(
																'label' => T_('Level 3'),
																'note' => T_(''),
																'type' => $type,
																'entries' => array(

																'color' => array(
																			'label' => T_('Color'),
																			//'note' => T_('E-g: #444444 for light-black'),
																			'defaultvalue' => '#fed136',
																			'type' => 'color',
																			),

																'text' => array(
																			'label' => T_('Text'),
																			//'note' => T_('E-g: #444444 for light-black'),
																			'defaultvalue' => 'Foo Bar',
																			'type' => 'text',
																			),

																	'plugin_sets_4' => array(
																					'label' => T_('Level 4'),
																					'note' => T_(''),
																					'type' => $type,
																					'entries' => array(

																										'color' => array(
																													'label' => T_('Color'),
																													//'note' => T_('E-g: #444444 for light-black'),
																													'defaultvalue' => '#fed136',
																													'type' => 'color',
																													),

																										'text' => array(
																													'label' => T_('Text'),
																													//'note' => T_('E-g: #444444 for light-black'),
																													'defaultvalue' => 'Foo Bar',
																													'type' => 'text',
																													),
																										)))))))));
	}

Dec 12, 2017 13:05

Is it possible to get some feedback on this request please?

Dec 23, 2017 08:26

@achillis I'm merging your PR to my forked repo but I get many conflicts at _plugin.funcs.php. Maybe the conflicts have been introduced with modifications done to that file after you sent the PR.

Can you please take a look at the current code and make the appropriate changes to yours in order to achieve a conflicts-free merge and keep your feature working as you meant?

Thank you.

Dec 24, 2017 07:26

@mgsolipa wrote earlier:

...but I get many conflicts at _plugin.funcs.php. Maybe the conflicts have been introduced with modifications done to that file after you sent the PR.

Thank you.

That is exactly what happened. I will look into it @mgsolipa

Dec 25, 2017 08:47

@mgsolipa conflicts resolved, briefly tested again to be sure and it looks good. COuld you try merging with your repo and check it again on your end?

Jan 01, 2018 07:59

Not sure what happened with the first (initial) post of this thread, but I am certain that I did not post this??

Jan 02, 2018 23:41

Temporary caching bug in 6.9.5 :/


Form is loading...

blogtool – This forum is powered by b2evolution CMS, a complete engine for your website.