一直以後來想要把這個加上去了啦!!! (h)
先去抓MSN表情符號的plugin 他的安裝如下
- Download the smiley image files: smilies2.tar.gz.
- Extract it in your WordPress installation directory. It should create the directory ’smilies’ with MSN and Yahoo! smilies in it.
- Download the plugin: im_smiley.txt.
- Edit the plugin file. Near the top of the file, you can choose whether to use Yahoo! or MSN style smileys. You can also choose to enable Javascript smiley replacement function.
- Save the file as ‘im_smiley.php’ and put it in your
wp-content/plugins
directory. - Activate the plugin from your WordPress Plugins administration menu.
- Go to Options – Writing and disable “Convert emoticons like and to graphics on display”.
- (optional) You can change how the smileys look in your CSS by modifying style for selector
img.wp-smilies
. In my case, they look best with:img.wp-smiley { vertical-align: -25%; }
- (optional) If you enable Javascript smileys, you can use Javascript code
text smiley_convert_text(text);
in order to process smileys inside Javascript code. Useful if you are using Javascript based comment preview. See the source of this page for more information. - (optional) If you enable Javascript smileys, you can use clickable smileys, just put
< ?php smilies_clickable() ?>
next to your comment textarea. - (optional) If you are using both Javascript comment preview and clickable smileys, you may wish to specify Javascript function that refreshes comment preview so that the comment preview will be properly updated when clickable smileys is being used. To do this, edit
im_smiley.php
and edit the variable$js_reloader
. Mine is$js_reloader = "ReloadTextDiv();";
這樣裝好基本上就有MSN的表情符號了
不過因為這樣只是有而不好用(因為在後台沒辦法看到圖直接點來用)
在後台增加這些圖案的話再裝一個plugin
WP-Grins
這個plugin會讓我們的後台和comment的頁面都可以直接點表情符號來用
不過他是用WP預設的圖案,沒有MSN的
所以要改一下
在安裝MSN表情符號的時後他放圖的路徑是在WP的根目錄下,不過因為我想統一放圖的路徑
所以我沒照smilies2的說明放在根目錄下,而是放在wp-includes/images下面
所以我們去改一下im_smiley.php中的
$smilies_blog_url 這個變數
修改如下
if (!function_exists(‘get_settings’)) {
$smilies_blog_url = $_SERVER[‘SCRIPT_URI’];
$smilies_blog_url = preg_replace(“/wp-content\/plugins\/im_smiley\.php$/”, “”, $smilies_blog_url);
} else {
$smilies_blog_url = get_settings(‘siteurl’);
}
// 統一放圖的位置
$smilies_blog_url .= “/wp-includes/images”;
就是很簡單的把他抓圖的路徑修改一下。
這樣就修改好smilies2這個plugin了
再來要改wp-grin下的表情符號的一些代表符號
if (!isset($wpsmiliestrans)) {
$wpsmiliestrans = array(
‘:(‘ => ‘msn_sad.png’,
‘(@)’ => ‘msn_cat.png’,
‘(d)’ => ‘msn_drink.png’,
‘(~)’ => ‘msn_film.png’,
‘(ap)’ => ‘msn_plane.png’,
‘(i)’ => ‘msn_idea.png’,
‘(z)’ => ‘msn_boy.png’,
‘(8)’ => ‘msn_note.png’,
‘(Z)’ => ‘msn_boy.png’,
‘:S’ => ‘msn_weird.png’,
‘(mp)’ => ‘msn_cellphone.png’,
‘(||)’ => ‘msn_bowl.png’,
‘(A)’ => ‘msn_angel.png’,
‘:)’ => ‘msn_smiley.png’,
‘(k)’ => ‘msn_kiss.png’,
‘:O’ => ‘msn_ooooh.png’,
‘:-D’ => ‘msn_laugh.png’,
‘(I)’ => ‘msn_idea.png’,
‘(W)’ => ‘msn_deadflower.png’,
‘(&)’ => ‘msn_dog.png’,
‘:s’ => ‘msn_weird.png’,
‘(U)’ => ‘msn_brheart.png’,
‘(so)’ => ‘msn_soccer.png’,
‘(F)’ => ‘msn_flower.png’,
‘:[‘ => ‘msn_bat.gif’,
‘(P)’ => ‘msn_photo.png’,
‘(n)’ => ‘msn_thumbdown.png’,
‘:-p’ => ‘msn_tongue.png’,
‘:d’ => ‘msn_laugh.png’,
‘(h)’ => ‘msn_hot.png’,
‘(tu)’ => ‘msn_turtle.png’,
‘(X)’ => ‘msn_girl.png’,
‘(t)’ => ‘msn_phone.png’,
‘:-@’ => ‘msn_angry.png’,
‘(xx)’ => ‘msn_xbox.png’,
‘:-o’ => ‘msn_ooooh.png’,
‘(R)’ => ‘msn_rainbow.png’,
‘|-)’ => ‘msn_sleepy.gif’,
‘(})’ => ‘msn_runback.png’,
‘:->’ => ‘msn_laugh.png’,
‘:D’ => ‘msn_laugh.png’,
‘(g)’ => ‘msn_gift.png’,
‘(C)’ => ‘msn_coffee.png’,
‘(%)’ => ‘msn_handcuffs.png’,
‘:-*’ => ‘msn_secret.png’,
‘(T)’ => ‘msn_phone.png’,
‘(w)’ => ‘msn_deadflower.png’,
‘(O)’ => ‘msn_clock.png’,
‘(#)’ => ‘msn_sun.png’,
‘(?)’ => ‘msn_question.png’,
‘<:o)’ => ‘msn_party.gif’,
‘(l)’ => ‘msn_heart.png’,
‘:$’ => ‘msn_embarrassed.png’,
‘*-)’ => ‘msn_think.gif’,
‘(st)’ => ‘msn_stormy.png’,
‘(r)’ => ‘msn_rainbow.png’,
‘:-$’ => ‘msn_embarrassed.png’,
‘(y)’ => ‘msn_thumbup.png’,
‘(S)’ => ‘msn_sleep.png’,
‘({)’ => ‘msn_run.png’,
‘(yn)’ => ‘msn_fingerscrossed.png’,
‘(*)’ => ‘msn_star.png’,
‘(co)’ => ‘msn_computer.png’,
‘(N)’ => ‘msn_thumbdown.png’,
‘:|’ => ‘msn_neutral.png’,
‘(f)’ => ‘msn_flower.png’,
‘(c)’ => ‘msn_coffee.png’,
‘:-(‘ => ‘msn_sad.png’,
‘(b)’ => ‘msn_beer.png’,
‘(m)’ => ‘msn_icon.png’,
‘(li)’ => ‘msn_lightning.gif’,
‘(Y)’ => ‘msn_thumbup.png’,
‘(o)’ => ‘msn_clock.png’,
‘(G)’ => ‘msn_gift.png’,
‘:-P’ => ‘msn_tongue.png’,
‘(h5)’ => ‘msn_highfive.png’,
‘(sn)’ => ‘msn_snail.png’,
‘(bah)’ => ‘msn_sheep.png’,
‘(u)’ => ‘msn_brheart.png’,
‘(um)’ => ‘msn_umbrella.png’,
‘:P’ => ‘msn_tongue.png’,
‘:-|’ => ‘msn_neutral.png’,
‘:-#’ => ‘msn_donttell.png’,
‘:-)’ => ‘msn_smiley.png’,
‘:'(‘ => ‘msn_cry.gif’,
‘:-S’ => ‘msn_weird.png’,
‘(^)’ => ‘msn_cake.gif’,
‘:@’ => ‘msn_angry.png’,
‘8-)’ => ‘msn_eyeroll.gif’,
‘(H)’ => ‘msn_hot.png’,
‘(ci)’ => ‘msn_cigarette.gif’,
‘:o’ => ‘msn_ooooh.png’,
‘:p’ => ‘msn_tongue.png’,
‘;-)’ => ‘msn_wink.gif’,
‘8o|’ => ‘msn_teeth.png’,
‘(ip)’ => ‘msn_island.png’,
‘(mo)’ => ‘msn_coins.png’,
‘(D)’ => ‘msn_drink.png’,
‘:-d’ => ‘msn_laugh.png’,
‘+o(‘ => ‘msn_sick.png’,
‘:-<‘ => ‘msn_sad.png’,
‘(e)’ => ‘msn_email.png’,
‘(K)’ => ‘msn_kiss.png’,
‘(p)’ => ‘msn_photo.png’,
‘(pl)’ => ‘msn_plate.png’,
‘8-|’ => ‘msn_nerd.png’,
‘(6)’ => ‘msn_devil.png’,
‘(L)’ => ‘msn_heart.png’,
‘(au)’ => ‘msn_car.png’,
‘(E)’ => ‘msn_email.png’,
‘;)’ => ‘msn_wink.gif’,
‘:-O’ => ‘msn_ooooh.png’,
‘:>’ => ‘msn_laugh.png’,
‘:^)’ => ‘msn_dontknow.gif’,
‘(brb)’ => ‘msn_brb.png’,
‘:-s’ => ‘msn_weird.png’,
‘(a)’ => ‘msn_angel.png’,
‘(B)’ => ‘msn_beer.png’,
‘(M)’ => ‘msn_icon.png’,
‘(x)’ => ‘msn_girl.png’,
‘^o)’ => ‘msn_sarcastic.png’,
‘:-[‘ => ‘msn_bat.gif’,
‘(pi)’ => ‘msn_pizza.png’,
);
}
這樣就大功告成了。 😀