function smiley_overview_item in Smiley 7
Helper function for smiley_overview_form().
1 call to smiley_overview_item()
- smiley_overview_form in ./
smiley.admin.inc - Smileys overview form.
File
- ./
smiley.admin.inc, line 55 - Smileys administrative pages.
Code
function smiley_overview_item($smiley) {
static $smiley_path;
if ($smiley_path == NULL) {
$smiley_path = variable_get('smiley_path', drupal_get_path('module', 'smiley') . '/packs');
}
$img_vars = array(
'path' => $smiley_path . '/' . $smiley->uri,
'alt' => 'smiley',
'attributes' => array(),
);
$form[$smiley->sid]['picture']['#markup'] = theme_image($img_vars);
$form[$smiley->sid]['uri'] = array(
'#type' => 'textfield',
'#default_value' => $smiley->uri,
'#required' => TRUE,
'#size' => 25,
'#title' => t('File'),
'#title_display' => 'invisible',
);
$form[$smiley->sid]['status'] = array(
'#type' => 'checkbox',
'#default_value' => $smiley->status,
);
$form[$smiley->sid]['acronyms'] = array(
'#type' => 'textfield',
'#default_value' => $smiley->acronyms,
'#size' => 50,
);
$form[$smiley->sid]['description'] = array(
'#type' => 'textfield',
'#default_value' => $smiley->description,
'#size' => 10,
);
$form[$smiley->sid]['delete'] = array(
'#type' => 'checkbox',
'#default_value' => 0,
);
$form[$smiley->sid]['#tree'] = TRUE;
$form[$smiley->sid]['#smiley'] = TRUE;
return $form;
}