Preferences updated. Click here if you want to go to Smilies Management page.

'; } else { echo '

No changes made. Click here if you want to go to Smilies Management page.

'; } } ?>

Smilies Options

Display these smilies above the comment form by default:
Put your smilies here, separated by comma. Example: :D, :), :wink:, :(
Leave this field blank if you want to display all smilies.

Love this plugin? Why not supporting me by donating a few bucks?

Your smilies have been updated.

'; } // $smilies: 1|gif, 2|gif, etc // $old_smilies: :D, :(, etc $smilies = cs_get_all_smilies(); $old_smilies = cs_load_existing_smilies(); ?>

Manage Smilies

Display all smilies' : 'Display undefined smilies only'; ?>

Please note that your smilies cannot contain any of these characters: ' " \

1.gif $smilie_name = str_replace('.', '|', $smilie); if ($su && $old_smilies[$smilie] != '') { // show undefined only ?>
Smilie
What to type
Smilie
What to type
Smilie
What to type

get_var("SHOW TABLES LIKE '$table_name'") != $table_name) { return; } // get existing smilies from database $result = $wpdb->get_results("SELECT * FROM `$table_name` ORDER BY `File`"); $ext = get_option('csm_ext'); foreach ($result as $object) { $tmp[$object->File.'.'.$ext] = $object->Emot; } // write to file cs_save_smilies($tmp); // uninstall $wpdb->query("DROP TABLE `{$table_prefix}smileys`"); delete_option('csm_path'); delete_option('csm_dbx'); delete_option('csm_ext'); delete_option('csm_spl'); } // save smilies to file function cs_save_smilies($array) { if (!is_array($array)) { return; } foreach ($array as $k => $v) { // sanitize smilies: remove \ ' " and trim whitespaces $array[$k] = trim(str_replace(array('\'','\\', '"'), '', $v)); } $array = array_flip($array); $array4db = array(); foreach ($array as $k => $v) { // sanitize smilies file name $array[$k] = $v = str_replace('|', '.', $v); if (!in_array($v, array('update-smilies', 'page')) && !in_array($k, array('', 'QAD'))) { $array4db[$k] = $v; } } update_option('clcs_smilies', $array4db); return $array; } // ensure compatibility with older version function csm_comment_form() { cs_print_smilies(); } // return all smilies function cs_all_smilies() { global $wpsmiliestrans; $url = get_bloginfo('wpurl').'/wp-includes/images/smilies'; foreach ($wpsmiliestrans as $k => $v) { $smilies[$k] = "$url/$v"; } return $smilies; } // print smilies list @ comment form function cs_print_smilies() { ?> $v) { echo "{$v} "; } } else { $display = explode(',', $list); $smilies = array_flip($smilies); foreach ($display as $v) { $v = trim($v); echo "{$v} "; unset($smilies[$v]); } echo ' more »'; } } // add docking box function cs_add_box() { ?>

Smilies

$v) { echo "{$v} "; } ?>