You are here

function smiley_table in Smiley 6

2 calls to smiley_table()
smiley_block in ./smiley.module
Implementation of hook_block().
smiley_filter_tips in ./smiley.module
Implementation of hook_filter_tips().

File

./smiley.module, line 201

Code

function smiley_table() {
  $form = array();
  $output = '';
  $header = array(
    t('Smiley'),
    t('Acronyms'),
  );
  $rows = array();
  $list = _smiley_list(1, " ORDER BY weight");
  foreach ($list as $smiley) {
    $acronyms = explode(' ', $smiley->acronyms);
    $rows[] = array(
      '<img src="' . check_url($GLOBALS['base_url'] . '/' . check_plain($smiley->image)) . '" alt="' . check_plain($acronyms[0]) . '" title="' . check_plain($smiley->description) . '" class="smiley-class" />',
      check_plain($smiley->acronyms),
    );
  }
  $form['smiley'] = array(
    '#type' => 'fieldset',
    '#title' => t('Smileys'),
    '#collapsible' => TRUE,
  );
  $form['smiley']['smiley_box'] = array(
    '#type' => 'markup',
    '#value' => theme('table', $header, $rows),
  );
  $output .= drupal_render($form);
  return $output;
}