You are here

function smileys_table in Smileys 6

Same name and namespace in other branches
  1. 5 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 199

Code

function smileys_table() {
  $form = array();
  $output = '';
  $header = array(
    t('Smiley'),
    t('Acronyms'),
  );
  $rows = array();
  $list = _smileys_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['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;
}