function smileys_table in Smileys 5
Same name and namespace in other branches
- 6 smileys.module \smileys_table()
2 calls to smileys_table()
- smileys_block in ./
smileys.module - Implementation of hook_block().
- smileys_filter_tips in ./
smileys.module - Implementation of hook_filter_tips().
File
- ./
smileys.module, line 133
Code
function smileys_table() {
$form = array();
$output = '';
$header = array(
t('Smiley'),
t('Acronyms'),
);
$rows = array();
$list = _smileys_list(1);
foreach ($list as $smiley) {
$acronyms = explode(' ', $smiley->acronyms);
$rows[] = array(
'<img src="' . check_url($GLOBALS['base_url'] . '/' . $smiley->image) . '" alt="' . $acronyms[0] . '" title="' . check_plain($smiley->description) . '" class="smiley-class" />',
check_plain($smiley->acronyms),
);
}
$form['smileys'] = array(
'#type' => 'fieldset',
'#title' => t('Smileys'),
'#collapsible' => TRUE,
);
$form['smileys']['smileys_box'] = array(
'#type' => 'markup',
'#value' => theme('table', $header, $rows),
);
$output .= drupal_render($form);
return $output;
}