Closed (fixed)
Project:
Smileys
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
12 Aug 2007 at 11:01 UTC
Updated:
7 Feb 2008 at 18:12 UTC
By default it's collapsed on my system all the time which means a user createing or editing a node must always click to expand it. I'd prefer it was open (expanded by default). I couldn't find a setting and if i need to theme it, how do i do it? via a "class"?
thanks
Comments
Comment #1
Goose4all commentedi was asking myself cause i did just install this module..
after a quick look in the module-file i've sorted that out...
find
[code]/**
* Implementation of hook_form_alter().
*/
function smileys_form_alter($form_id, &$form) {
if (user_access('use smiley select box') && ((isset($form['type']) && $form['type']['#value'] .'_node_form' == $form_id) && variable_get('smileys_enable_for_nodes', 0) && isset($form[$
$output = '';
$form['smileys'] = array(
'#type' => 'fieldset',
'#title' => t('Smileys'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#weight' => 0,
);
$form['smileys']['smileys_box'] = array(
'#type' => 'markup',
'#value' => theme('smileys_select_table') . (variable_get('smileys_enable_widget', 0) ? ''. t('[Alle zeigen]') .'' : ''),
);
}
return $form;
}
[/code]
and set that "collapsed" to false... that it look like this:
[code]/**
* Implementation of hook_form_alter().
*/
function smileys_form_alter($form_id, &$form) {
if (user_access('use smiley select box') && ((isset($form['type']) && $form['type']['#value'] .'_node_form' == $form_id) && variable_get('smileys_enable_for_nodes', 0) && isset($form[$
$output = '';
$form['smileys'] = array(
'#type' => 'fieldset',
'#title' => t('Smileys'),
'#collapsible' => TRUE,
'#collapsed' => FALSE,
'#weight' => 0,
);
$form['smileys']['smileys_box'] = array(
'#type' => 'markup',
'#value' => theme('smileys_select_table') . (variable_get('smileys_enable_widget', 0) ? ''. t('[Alle zeigen]') .'' : ''),
);
}
return $form;
}
[/code]
thats it..
cheers
Andreas
Comment #2
Gurpartap Singh commentedEarlier, the opposite was requested. However, now added the option to let the user select the default behavior in Smileys settings. Fixed, Thanks!
Comment #3
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.