1 achillis May 05, 2017 12:34
3 fplanque 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 achillis 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.')';
}
5 achillis May 24, 2017 08:59
6 mgsolipa 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.
7 achillis May 27, 2017 13:14
@mgsolipa that is just perfect! Thanks!
8 achillis Jun 02, 2017 15:41
9 mgsolipa 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.
@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.