2 require_once('www/include/SmilieSupport.class.php');
6 class SmilieSupportHtml extends SmilieSupport {
10 function SmilieSupportHtml(){
11 $this->SmilieSupport();
20 // Fill smiley templates (or just the variables) with smileys
21 // Either in a window or inline
23 function displaySmiliesList($number_of_smilies_per_row=5)
25 global $SMILIES, $sys_default_domain;
27 $num_smilies = count($SMILIES);
36 $inline_rows = $number_of_smilies_per_row;
39 $smilies_count = min(19, $num_smilies);
40 $smilies_split_row = $inline_columns - 1;
47 // we have to make sure that we won't display 2x the same smilie, so we will that array to list all the smilies that we already have display
48 $smilies_displayed = array();
50 // start smilies title
51 $return = '<table width="100%" border="0" cellspacing="1" cellpadding="4" align="center">
53 <th height="25">'._('Smilies\'s list').'</th>
56 <td><table width="100" border="0" cellspacing="0" cellpadding="5">';
59 while (list ($smilie_code, $smilie_info) = each ($SMILIES)) {
60 if (empty($smilies_displayed[$smilie_info['image']])){
61 $smilies_displayed[$smilie_info['image']] = 1;
63 if (!$col && $first_time){
64 $return .= '<tr align="center" valign="middle">' . "\n";
66 }else if (!$col && !$first_time){
67 $return .= '</tr><tr align="center" valign="middle">'. "\n";
70 $return .= '<td><a href="javascript:emoticon(\''.$smilie_code.'\')"><img src="' . $sys_images_url . '/images/smiles/' . $smilie_info['image'] . '" border="0" alt="'.$smilie_info['emoticon'].'" title="'.$smilie_info['emoticon'].'" /></a></td>'. "\n";
72 $s_colspan = max($s_colspan, $col + 1);
74 if ($col == $smilies_split_row){
75 if ($row == $inline_rows - 1){
87 $return .= '</tr></table>
100 // c-file-style: "bsd"