/**
  * Standard aed_module list function.
  *
  * @return tempcode		The selection list
  */
 function nice_get_radio_entries()
 {
     $_m = $GLOBALS['FORUM_DB']->query_select('f_emoticons', array('e_code', 'e_theme_img_code'));
     $entries = array();
     $first = true;
     foreach ($_m as $m) {
         $url = find_theme_image($m['e_theme_img_code']);
         $entries[] = do_template('FORM_SCREEN_INPUT_RADIO_LIST_ENTRY_PICTURE_3', array('_GUID' => 'f7f64637d1c4984881f7acc68c2fe6c7', 'PRETTY' => $m['e_code'], 'CHECKED' => $first, 'NAME' => 'id', 'CODE' => $m['e_code'], 'URL' => $url));
         $first = false;
     }
     $_entries = wrap_image_radio_list($entries);
     return $_entries;
 }
Beispiel #2
0
 /**
  * Choose an emoticon for a topic.
  *
  * @param  ID_TEXT		The currently selected emoticon
  * @return tempcode		The emoticon input field
  */
 function choose_topic_emoticon($selected_path = '')
 {
     $tabindex = get_form_field_tabindex(NULL);
     $content = array();
     $extra = has_specific_permission(get_member(), 'use_special_emoticons') ? '' : ' AND e_is_special=0';
     $rows = $GLOBALS['FORUM_DB']->query('SELECT e_theme_img_code FROM ' . $GLOBALS['FORUM_DB']->get_table_prefix() . 'f_emoticons WHERE e_use_topics=1' . $extra);
     $content[] = do_template('FORM_SCREEN_INPUT_RADIO_LIST_ENTRY_PICTURE_3_NA', array('_GUID' => 'd9f9399072af3f19f21695aef01168c7', 'CHECKED' => $selected_path == '', 'NAME' => 'emoticon'));
     foreach ($rows as $row) {
         $path = $row['e_theme_img_code'];
         $url = find_theme_image($path);
         $content[] = do_template('FORM_SCREEN_INPUT_RADIO_LIST_ENTRY_PICTURE_3', array('PRETTY' => '', 'CHECKED' => $path == $selected_path, 'NAME' => 'emoticon', 'CODE' => $path, 'URL' => $url));
     }
     if (count($content) == 0) {
         return new ocp_tempcode();
     }
     $_content = wrap_image_radio_list($content);
     $input = do_template('FORM_SCREEN_INPUT_RADIO_LIST', array('NAME' => 'emoticon', 'REQUIRED' => false, 'CODE' => $selected_path, 'TABINDEX' => strval($tabindex), 'CONTENT' => $_content));
     return _form_input('', do_lang_tempcode('TOPIC_EMOTICON'), '', $input, false);
 }