Hi, any ideas on where I can change this I have looked through the module and can't find where "selected" is?

CommentFileSizeAuthor
#2 img_assist.admin_.zip4.17 KBrondev

Comments

ggarry’s picture

Status: Active » Closed (fixed)

Bah i don't know how I missed it

'#default_value' => variable_get('img_assist_default_alignment', 'left'),

Anyway would be nice if it was a configuration option :)

rondev’s picture

Version: 5.x-1.6 » 6.x-3.x-dev
Category: support » feature
Status: Closed (fixed) » Active
StatusFileSize
new4.17 KB

It would be nice to add 'img_assist_default_alignment' to the Image property dialog settings. Perhaps there is a reason for that perhaps not.

I have done something like that:

    $form['properties']['img_assist_default_alignment'] = array(
    '#type' => 'select',
    '#title' => t('Default alignment'),
    '#default_value' => variable_get('img_assist_default_alignment', 'left'),
	'#options' => array('left' => t('left'), 'right' => t('right'), 'none' => t('none'), 'center' => t('center')),
    '#description' => t('The alignment.'),
  );

for the file img_assist.admin.inc

I don't know if there is initialisation required somewhere. I've just added the variable in the database before :

INSERT INTO `database_name`.`variable` (
`name` ,
`value`
)
VALUES (
'img_assist_default_alignment', 's:4:"none";'
);
sun’s picture

A proper patch would likely be accepted.