lang['TOPIC_REVIEW'] . " - $topic_title"; include($phpbb_root_path . 'includes/page_header.'.$phpEx); $template->set_filenames(array( 'body' => 'posting_smilies.html') ); } $where_sql = ($mode == 'inline') ? 'WHERE display_on_posting = 1 ' : ''; $sql = "SELECT emoticon, code, smile_url, smile_width, smile_height FROM " . SMILIES_TABLE . " $where_sql ORDER BY smile_order"; $result = $db->sql_query($sql); $num_smilies = 0; $smile_array = array(); if ($row = $db->sql_fetchrow($result)) { do { if (!in_array($row['smile_url'], $smile_array)) { if ($mode == 'window' || ($mode == 'inline' && $num_smilies < $config['max_smilies_inline'])) { $template->assign_block_vars('emoticon', array( 'SMILEY_CODE' => $row['code'], 'SMILEY_IMG' => $config['smilies_path'] . '/' . $row['smile_url'], 'SMILEY_WIDTH' => $row['smile_width'], 'SMILEY_HEIGHT' => $row['smile_height'], 'SMILEY_DESC' => $row['emoticon']) ); } $smile_array[] = $row['smile_url']; $num_smilies++; } } while ($row = $db->sql_fetchrow($result)); $db->sql_freeresult($result); if ($mode == 'inline' && $num_smilies >= $config['max_smilies_inline']) { $template->assign_vars(array( 'S_SHOW_EMOTICON_LINK' => true, 'U_MORE_SMILIES' => "posting.$phpEx$SID&mode=smilies") ); } } if ($mode == 'window') { include($phpbb_root_path . 'includes/page_tail.'.$phpEx); } } // Generate Topic Icons function generate_topic_icons($mode, $enable_icons) { global $template, $config; if (!$enable_icons) { return (false); } $result = false; // Grab icons $icons = array(); obtain_icons($icons); if (sizeof($icons)) { $result = true; foreach ($icons as $id => $data) { if ($data['display']) { $template->assign_block_vars('topic_icon', array( 'ICON_ID' => $id, 'ICON_IMG' => $phpbb_root_path . $config['icons_path'] . '/' . $data['img'], 'ICON_WIDTH' => $data['width'], 'ICON_HEIGHT' => $data['height'], 'S_ICON_CHECKED' => ($id == $icon_id && $mode != 'reply') ? ' checked="checked"' : '') ); } } } return ($result); } // DECODE TEXT -> This will/should be handled by bbcode.php eventually function decode_text(&$message) { global $config, $censors; $server_protocol = ($config['cookie_secure']) ? 'https://' : 'http://'; $server_port = ($config['server_port'] <> 80) ? ':' . trim($config['server_port']) . '/' : '/'; $match = array( '#(.*?)#s', '#(.*?)#s', '#.*?#', '#.*?#', '#.*?#', '#.*?#', '#