Mengintegrasikan Smilies Plurk Ke WordPress
(lol)
dsb. Smiley/emoticon tersebut adalah yang digunakan pada platform micro-blogging populer, Plurk. Anda juga dapat mengintegrasikan ikon-ikon tersebut ke blog WordPress anda.
Caranya?
So simple, so easy. Kita cukup mengedit file functions.php yang terdapat pada direktori /wp-includes dan mengupload file gambar smilies Plurk ke direktori /wp-includes/images/smilies.
Masukkan kode berikut pada file functions.php:
-
/**
-
* Convert smiley code to the icon graphic file equivalent.
-
*
-
* You can turn off smilies, by going to the write setting screen and unchecking
-
* the box, or by setting ‘use_smilies’ option to false or removing the option.
-
*
-
* Plugins may override the default smiley list by setting the $wpsmiliestrans
-
* to an array, with the key the code the blogger types in and the value the
-
* image file.
-
*
-
* The $wp_smiliessearch global is for the regular expression array and is
-
* set each time the function is called. The $wp_smiliesreplace is the full
-
* replacement. Supposely, the $wp_smiliessearch array is looped over using
-
* preg_replace() or just setting the array of $wp_smiliessearch along with the
-
* array of $wp_smiliesreplace in the search and replace parameters of
-
* preg_replace(), which would be faster and less overhead. Either way, both are
-
* used with preg_replace() and can be defined after the function is called.
-
*
-
* The full list of smilies can be found in the function and won’t be listed in
-
* the description. Probably should create a Codex page for it, so that it is
-
* available.
-
*
-
* @global array $wpsmiliestrans
-
* @global array $wp_smiliesreplace
-
* @global array $wp_smiliessearch
-
* @since 2.2.0
-
*/
-
function smilies_init() {
-
-
// don’t bother setting up smilies if they are disabled
-
if ( !get_option( ‘use_smilies’ ) )
-
return;
-
-
‘:-))’ => ‘tawa.gif’,
-
‘:))’ => ‘tawa.gif’,
-
‘:-)’ => ‘smile.gif’,
-
‘:)’ => ‘smile.gif’,
-
‘X-(‘ => ‘angry.gif’,
-
‘X(‘ => ‘angry.gif’,
-
‘:-(‘ => ‘sad.gif’,
-
‘:(‘ => ‘sad.gif’,
-
‘B-)’ => ‘glasses.gif’,
-
‘(cozy)’ => ‘(cozy).gif’,
-
‘(music)’ => ‘(music).gif’,
-
‘(tears)’ => ‘(tears).gif’,
-
‘:-D’ => ‘bigsmile.gif’,
-
‘:D’ => ‘bigsmile.gif’,
-
‘(lol)’ => ‘(lol).gif’,
-
‘(LOL)’ => ‘(lol).gif’,
-
‘:-P’ => ‘tongue.gif’,
-
‘:P’ => ‘tongue.gif’,
-
‘:-&’ => ‘eneg.gif’,
-
‘:&’ => ‘eneg.gif’,
-
‘(K)’ => ‘lip.gif’,
-
‘(sick)’ => ‘(sick).gif’,
-
‘(:’ => ‘sleepy.gif’,
-
‘(goodluck)’ => ‘(goodluck).gif’,
-
‘(tongue)’ => ‘(tongue).gif’,
-
‘(unsure)’ => ‘(unsure).gif’,
-
‘(highfive)’ => ‘(highfive).gif’,
-
‘(woot)’ => ‘(woot).gif’,
-
‘(angry)’ => ‘(angry).gif’,
-
‘(griltongue)’ => ‘(griltongue).png’,
-
‘(dance)’ => ‘(dance).gif’,
-
‘:-o’ => ‘woo.gif’,
-
‘;-)’ => ‘kedip.gif’,
-
‘;)’ => ‘kedip.gif’,
-
‘(annoyed)’ => ‘(annoyed).gif’,
-
‘(bye)’ => ‘(bye).gif’,
-
‘(mmm)’ => ‘(mmm).gif’,
-
‘(hungry)’ => ‘(hungry).gif’,
-
‘(doh)’ => ‘(doh).gif’,
-
‘(brokenheart)’ => ‘(brokenheart).gif’,
-
‘(party)’ => ‘(party).gif’,
-
‘(sleeping)’ => ‘(sleeping).gif’,
-
‘(heart)’ => ‘(heart).gif’,
-
‘(devil)’ => ‘(devil).gif’,
-
‘(ninja)’ => ‘(ninja).gif’,
-
‘(haha)’ => ‘(haha).gif’,
-
‘(drinking)’ => ‘(drinking).gif’,
-
‘(thinking)’ => ‘(thinking).gif’,
-
‘(lmao)’ => ‘(lmao).gif’,
-
‘(evilsmirk)’ => ‘(evilsmirk).gif’,
-
‘(girlkiss)’ => ‘(girlkiss).jpg’,
-
‘(bringit)’ => ‘(bringit).gif’,
-
‘(banana_cool)’ => ‘(banana_cool).gif’,
-
‘(rofl)’ => ‘(rofl).gif’,
-
‘(worship)’ => ‘(worship).gif’,
-
‘(banana_rock)’ => ‘(banana_rock).gif’,
-
‘(money)’ => ‘(money).gif’,
-
‘(applause)’ => ‘(applause).gif’,
-
‘(evil_grin)’ => ‘(evil_grin).gif’,
-
‘(rock)’ => ‘(rock).gif’,
-
’8-)’ => ‘kacamata.gif’,
-
‘(headspin)’ => ‘(headspin).gif’,
-
‘(nottalking)’ => ‘(nottalking).gif’,
-
‘(gym)’ => ‘(gym).gif’,
-
‘(heart_beat)’ => ‘(heart_beat).gif’,
-
);
-
}
Bila anda menggunakan WordPress 2.7, anda dapat me-replace file functions.php default WordPress, dengan file functions.php ini.
Done? Yup, now you can uses Plurk style smilies in your WordPress blog
Isi blog ini dilindungi dibawah lisensi Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported, yang berarti anda bebas mendistribusikan ulang serta mengadaptasinya dengan ketentuan sebagai berikut: [1] cantumkan sumber asal, dan [2] tidak untuk tujuan komersial.
Related posts:




January 25th, 2009 at 3:06 pm
nice!
bermanfaat bagi lain.. gutwek!
[Reply]
January 25th, 2009 at 3:07 pm
tes sekalian..
[Reply]
January 25th, 2009 at 3:18 pm
opo dio gudwek tu, nduk?
[Reply]
January 25th, 2009 at 4:26 pm
mas mas, nduk itu buat anak perempuan ya!
kalo anak laki-laki itu, Thole ato Ngger!
btw, gutwek itu kerja bagus..
haha..
[Reply]
January 25th, 2009 at 6:30 pm
tesss
[Reply]
January 26th, 2009 at 12:48 pm
ribet bangaeett mok !
nawarin usul dikit…
* Download, install dan aktifasi plugin wordpress berikut :
http://rick.jinlabs.com/code/smilies-themer/
http://polpoinodroidi.com/wordpress-plugins/smilies-themer-toolbar/
* Download plurk smileys berikut :
http://www.mediafire.com/?mgznydymdzy
* Ekstrak, Install secara manual dengan meletakkan folder plurk di:
/%folder_instalasi_wordpress_anda%/wp-content/plugins/smilies-themer
* Buka dashboard wordpress lagi, ke Setting -> Smileys Themer dan pilih wordpress.
[Reply]
January 28th, 2009 at 7:08 pm
Mantap tips nya bro :)
[Reply]
January 31st, 2009 at 8:45 pm
makasih infonya bos
[Reply]
February 12th, 2009 at 10:47 am
whuih kerennn
[Reply]
February 15th, 2009 at 9:06 pm
nyubo ah..
[Reply]
March 5th, 2009 at 8:32 am
*tos sm indah
[Reply]
March 7th, 2009 at 11:57 pm
uiiiyyy alangke terang bekgron web dikau nih deek.. tp, keren euy
jadi pengen hosting dwk.. gek ajarin yeh, awas mun idak, injek2 gek kacomato adek tuh
[Reply]
March 14th, 2009 at 7:54 pm
[Reply]
May 4th, 2009 at 7:53 pm
drus dak lemak jadi liat emotnyo
(ado bayang reges putih dikit)..
dak pas dengan warno bekgronnyo..
ganti be warno bekronnyo Pink
[Reply]
xvader Reply:
May 5th, 2009 at 10:36 am
la kugenti nah, themenyo… :P
[Reply]
May 17th, 2009 at 12:25 pm
Makasih berat buat infonya
[Reply]
August 8th, 2009 at 5:01 pm
[...] Buat para plurker sekaligus blogger yang pengen mengintegrasikan smiley plurk di blognya, sebelumnya saya pernah membuat postingan mengenai cara mengintegrasikan smilies plurk ke wordpress, disini. [...]
January 27th, 2010 at 2:17 pm
kalo biar nongol di bawah itu gmn yo
aku coba kok ndak mau, katane bisa pake code ini
di comment.php
cuman bingung cara masangnya dmn
[Reply]
March 18th, 2010 at 11:29 am
(fireworks) hehehehe
[Reply]
April 8th, 2010 at 10:48 am
qo aq gabisa2 yah…
[Reply]