Custom Smilies

Update: 2009.10.25 00:30

The latest release is version 2.8. You can find it here.

最新版本是 2.8。你可以在这里找到

About It

Custom Smilies (previously named Custom Smileys) is a plugin for WordPress 2.0+. This plugin gives you a chance to personalize your posts and comments using smilies of your choice instead of default ones.

Custom Smilies (older than version  2.0) is written by QAD. Thanks for his great contribution.

I have upgrade it to let it been compatible with WordPress 2.5 or greater. That’s all I do, but I will perfect it in the future. So the most is written by QAD. Thanks again.

You can see the English Readme and more here ( new window) .

Download

You can get the latest version of Custom Smilies here. Get it
How to install

  1. Download and extract custom-smilies.zip; then, upload init.php and custom-smilies.php to the /wp-content/plugins/custom-smilies directory. Upload smilies folder to the /wp-includes/images directory..
  2. Activate Custom Smilies in your Admin Panel
  3. Put your smilies in smilies folder (wp-includes/images/smilies/)
  4. Change the emoticons by navigating to Manage > Smilies and complete the form
  5. If you want to add clickable smilies to your comment form, append these lines to your current theme’s comments.php file, just before the form begins(You don’t need do this if your theme suppor the action named comment_form since version 2.3):<?php if ( function_exists(cs_print_smilies) ) {cs_print_smilies();} ?>

For ‘Paged Comments’ plugin’s users: Please place that code in wp-content/plugins/paged-comments/themes/your-theme-name/comments-paged.php to enable those clickable smilies.Please note that you can customize this list by going to Options > Smilies.Wanna play with the smilies yourself? A function called cs_all_smilies() has been added, which return all the smilies you’ve got in this format: Array (’Smilie’ => ‘Path to smilie’)

How to upgrade

For Custom Smilies 1.0 and 1.1 users, simply replace the file custom-smilies.php in your plugins folder with the newer one. Do NOT overwrite init.php, as it contains your smilies’ definitions.

For those who are still using Custom Smileys version 2.4 (which was released more than 1 year ago!), you can upgrade it to the lastest version by following this procedure:

  1. Backup your database! (better safe than sorry – i’m not responsible for any data loss caused by this plugin)
  2. Move all of your smilies to your smilies folder (wp-includes/images/smilies/)
  3. Deactivate Custom Smileys 2.4 without uninstalling it
  4. Download, extract, then upload Custom Smilies 1.0 to your blog
  5. Activate Custom Smilies 1.0 in your Admin Panel
  6. Delete custom-smileys.php if you wish

关于这个插件

Custom Smilies 是一个 WordPress 插件。它可以让你自由地在你的文章和评论中使用表情来代替默认的表情。

我(Crazy Loong)修改了以前的版本,使它可以工作在 WordPress 2.5 下。

人员名单

Custom Smilies 2.0 是我(Crazy Loong)更新的。2.0以前的版本是由 QAD 编写的。

安装 Custom Smilies 后,你可以把自己需要的表情添加到 WordPress 的表情文件夹里(wp-includes/images/smilies/),然后在 Manage > Smilies 里添加表情对应的字符。非常简单哦。

设置好以后,这些表情就可以在任何文章、页面和评论里使用了。例如,当你输入 :D, :), :|(你可以自己定义这些符号)时,就会在文章出现对应的表情。或者,通过在点击相应的图标来插入到文章中。

你还可以添加这些表情列表到你的评论框周围。这样,你就可以进行可视化操作了,并在评论中方便的使用表情。而且,这个列表可以根据你的需要进行调整,以满足你的要求:

下载

点击这里下载

———- TODO ———-

Check whether init.php is writeable.

检查 init.php 是否可写。

Move the smilies folder into wp-content

将 smilies 文件夹移动到 wp-content

compliance to W3C specifications

符合 W3C 规范

451 thoughts on “Custom Smilies”

  1. I’ve figured out how to rearrange the layout of the smilies. it’s pretty simple, but it does involve going into the SQL database. If you aren’t sure of what you’re doing, don’t do it, as you can very easily screw up your entire blog by clicking the wrong button.

    Here’s how to do it:

    0] backup your database. You should be doing this regularly anyway.

    1] Sign in to phpMyAdmin.

    2] Go to the database name on the left (this will be the name you chose when you created your database), and then into wp_options.

    3] Look for a option_name called clcs_smilies. When you find it, you should see a bunch of text similar to a:40:{s:7:”:arrow:”;s:14:”icon_arrow.gif”;. Click the edit button (it looks like a pencil).

    4] Copy and paste all of the text into a Notepad window.

    5] Each smilie has it’s own relevant details, like

    s:2:”8O”;s:12:”icon_eek.gif”;
    or
    s:9:”:twisted:”;s:16:”icon_twisted.gif”;

    You should be able to work out from these which smilie is which. Each smilie will start with a letter then a colon and then a number

    s:9

    and will end in a filename and then a semi colon

    “filename.gif”;

    Make sure you cut and paste all of the relevant details for the smilie.

    6] Save a copy of the details in the Notepad window, in case you get into a mess.

    7] Cut and paste the smilie details into the order that you want them in.

    8] When you’re happy with the layout, copy and paste the details from the Notepad window, into the phpMyAdmin window. Ensure that only the date you’re pasting is there. Highlight and delete the data that is already in there, or you’ll end up with the smilies being repeated.

    9] Once it’s all done, click the Save/Go button in the phpMyAdmin window.

    10] Go back to your blog, and check the layout. If it’s wrong, repeat the steps above until it looks right.

    It’s quite simple really, but it pays to be careful, and not click on any other buttons in the phpMyAdmin.

  2. hi Crazy Loong … first of all, i wanna say thanx for sharing about this useful plugins ….

    what a nice work !!!

    but …. i have somekind of problem with it …
    the popup window doesn’t show up in my new post page and also in quick post …. but in the comment page the plugin is working and also clickable 🙂

    would u like to help me about that pop-up problem … and send me an email to alice190490@gmail.com

    thx before 🙂

  3. 请问一下,为甚么我添加的表情排序是乱的?名称都是按1-9这样顺序排下去的,好奇怪。
    ps:建议能否将smiles里面表情分成文件夹存储,而不只是一级目录才有效?希望能得到回复

  4. To: tommychang
    现在的顺序是按系统文件排序的顺序排列的。我考虑在下一个版本里加入排序的功能。

    至于分成文件夹来存储,因为现有结构的缘故,暂时不能很好的实现,只能以后再考虑了。

  5. 问一个关于样式的

    我是挺喜欢这个东西的,但是由于默认是沿baseline对齐的,所以在同一行中要高出来一块,不知道注意到没有。

    选中 :dsadasccc: 本行 :dsadas: 测试。

    解决方法有几种 vertical-align0// displayblock// font-size line-height1

    我想请教具体要修改哪里才可以呢?

    似乎是修改forold里头的四处,可我不会,改不成功。。。望指教

  6. Hi there,

    good new first: It seems that your PlugIn ist not hassling with most recent WP2.8.

    Unfortunately I am now missing the pretty useful button to add smilies myself in the Comments-Dashboard from WP Admins area.

    Thax for sharing your PlugIn.

    regards

    ruediger

  7. I have problems with your plugin after upgrading to WP2.8
    I’ll be posting here the errors I had, because I really (really, really, really) would love to continue using your plugin.

    Warning: preg_replace_callback() [function.preg-replace-callback]: Unknown modifier ‘|’ in /home/user/public_html/news/wp-includes/formatting.php on line 1347

  8. = -||我还以为你说WP2.7……我现在更新了,但是有个问题,怎么才能放到提交按钮边上?

  9. Sorry. Getting the same message as above:

    Warning: preg_replace_callback() [function.preg-replace-callback]: Unknown modifier ‘|’ in /home/user/public_html/news/wp-includes/formatting.php on line 1347

    This is repeated throughout the posting area, do not actually see the posts themselves.

  10. Update:

    I’ve discovered something new, the Smilie Icon is missing if I am going to reply to a comment from Admins-Backend. That’s is what I recently wrote here. But if I am going to edit an existing comment, i still don’t have the Smilie icon, but I got a new button named “Smilie”. This button is opening already know PopUp with the smilies on.

    hth

    regards ruediger

  11. I’m getting the same error as the people who posted before me, after upgrading to wordpress 2.8

    Have you located the problem yet?
    I’ve had to deactivate the plugin, while I loved it!

  12. I’ve upgraded my wp to version 2.8 and all post texts disapeared. When “custom smiles se” is deactivated everything is ok. My blog is on russian (utf-8).

  13. In the admin panel, where you can add custom hotkeys to show the smilies. Where is this information stored? MySQL DB? or a PHP file?

  14. This plugin doesn’t work on WordPress 2.8. My text in post disapeared. Can you fix it ?

  15. Please update your plugin to work with WP 2.8. It messes up the posts so it has to be deactivated. I really want to be able to use my own smilies again! Thanks!! 🙂

  16. Hello,
    i have a big greatest news, because if you upgrade your wordpress to 2.8.1 RC1 and activate this custom smilies plugin. Than you see it’s works. it’s very nice to see, but i have no idea why didn’t work on 2.8.0
    I have tested on my test system and will be waiting for release for 2.8.1. i hope i can help you :hehe:

  17. To: Sven

    I have test it in some hosts, but I cant find the same mistake in WP 2.8. – -!

    If the plugin can work in WP 2.8.1, it is very nice.

    I am tracking it. Thanks for your help.

  18. Can you fix this error: I can’t type :”> in my blog. I think the reason why is some special character like ”
    Sorry for my English ^^

  19. Hello Crazy Loong,

    no problem. you make a great work about custom smilies 😉 i have news, that wordpress 2.8.1 is realeased and finish. I want to say you that your plugin works great and make no problem.

    have a nice day.

  20. Hi Crazy Loong!

    Thanks for your great plugin! 🙂
    I just realized that I used a very, very old version and when I updated to WP 2.8 I also installed the current version of custom smilies.

    I expected a popup window to appear because one can define height and width in the smilie options page, but there is no popup window. Is there anything one has to do to make this work?

    For some reason, Solomon’s solution did not work for me. The order of the smilies in the admin panel was fine, but in the comment form they are mixud up again.

    It would be great if you could include a feature in a coming version to influence the order of the smilies. =) Or maybe it is possible to put them in categories, for example first the funny ones, then the sad ones, and so on?

    I have a lot of smilies and I do not want to delete many of them, but without any order they’re hard to use…

    I have tried a lot of smilie plugins during the years I use WP, but yours is the only one that works with the current WP version, is easy to install and use and offers features like the more / less link.
    Please keep up the good work!

  21. To: Jessica

    Thanks for your words. I’m certain about your sincerity.

    The popup window will appear when you post.

    About arrangement of smilies, I have desided to add it in the next version.

    But I am busy recently, you need wait for some days. I regret the delay. :dsadas:

  22. Javascript isn´t working on the “create a new post page”. When I clicked on the little yellow smilie, the popup window doesn´t work. :dsadas:

  23. Oh sorry, it is not the “create a new post” page but the “create a new page” page.

Leave a Reply