Recent Topics

1 May 05, 2017 12:34    

Please can the functionality be added to make it possible to allow plugins that is widget type to have a different name based on the content in the Widget List View?

Widget Name in List view to behave exactly like "Core" widgets but for "Plugin" widgets.

At the moment, all the "Plugin" widgets display the Plugin name, and this makes it troublesome to identify what its for.

2 May 08, 2017 00:58

@achillis it's a bit difficult to make both, core and plugin widgets, behave exactly the same because they extend from different classes.

Maybe we can make plugin widgets to display something like: Short description (Plugin's name - [Plugin]), instead of: Plugin's name (Plugin), as it's done right now. So, short_desc is defined in the code of the plugin.

However, making plugin widgets to dynamically display the Block title value in the list is more complicated, I guess.

3 May 24, 2017 00:23

This is all unclear to me.

@achillis Can you post a screenshot of what you see and annotate it with what you would like to see?

We'll see what we can do. We are working on big changes regarding the widget management...

4 May 24, 2017 08:50

@See /inc/widgets/_widget.class.php //line 189

/**
	 * Get a clean description to display in the widget list.
	 * @return string
	 */
	function get_desc_for_list()
	{
		$name = $this->get_name();

		if( $this->type == 'plugin' )
		{
			return '<strong>'.$name.'</strong> ('.T_('Plugin').')';
		}

		$short_desc = $this->get_short_desc();

		if( $name == $short_desc || empty($short_desc) )
		{
			return '<strong>'.$name.'</strong>';
		}

		return '<strong>'.$short_desc.'</strong> ('.$name.')';
	}

6 May 27, 2017 12:04

@achillis so, it would be something like this:

/inc/widgets/_widget.class.php //line 193

function get_desc_for_list()
{
	$name = $this->get_name();

	if( $this->type == 'plugin' )
	{
		if ( isset($this->disp_params['title']) && ! empty($this->disp_params['title']) ) {
			return '<strong>'.$this->disp_params['title'].'</strong> ('.$name. ' - ' .T_('Plugin').')';
		}

		return '<strong>'.$name.'</strong> ('.T_('Plugin').')';
	}

	$short_desc = $this->get_short_desc();

	if( $name == $short_desc || empty($short_desc) )
	{
		return '<strong>'.$name.'</strong>';
	}

	return '<strong>'.$short_desc.'</strong> ('.$name.')';
}

It would look like as in the screenshot below.

9 Jun 02, 2017 16:13

@achillis it will be included in the beta branch indeed, I'm still not sure if it will be released in version 6.9.2 or later.


Form is loading...