Browse > Home / Internet and Social Media, Tips n Tricks / Mengintegrasikan Smilies Plurk Ke WordPress

| Subscribe via RSS

Mengintegrasikan Smilies Plurk Ke WordPress

January 25th, 2009 Posted in Internet and Social Media, Tips n Tricks

(dance) (angry) (lol) (rofl) (lmao) (banana_rock) 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:

  1. /**
  2.  * Convert smiley code to the icon graphic file equivalent.
  3.  *
  4.  * You can turn off smilies, by going to the write setting screen and unchecking
  5.  * the box, or by setting ‘use_smilies’ option to false or removing the option.
  6.  *
  7.  * Plugins may override the default smiley list by setting the $wpsmiliestrans
  8.  * to an array, with the key the code the blogger types in and the value the
  9.  * image file.
  10.  *
  11.  * The $wp_smiliessearch global is for the regular expression array and is
  12.  * set each time the function is called. The $wp_smiliesreplace is the full
  13.  * replacement. Supposely, the $wp_smiliessearch array is looped over using
  14.  * preg_replace() or just setting the array of $wp_smiliessearch along with the
  15.  * array of $wp_smiliesreplace in the search and replace parameters of
  16.  * preg_replace(), which would be faster and less overhead. Either way, both are
  17.  * used with preg_replace() and can be defined after the function is called.
  18.  *
  19.  * The full list of smilies can be found in the function and won’t be listed in
  20.  * the description. Probably should create a Codex page for it, so that it is
  21.  * available.
  22.  *
  23.  * @global array $wpsmiliestrans
  24.  * @global array $wp_smiliesreplace
  25.  * @global array $wp_smiliessearch
  26.  * @since 2.2.0
  27.  */
  28. function smilies_init() {
  29.         global $wpsmiliestrans, $wp_smiliessearch, $wp_smiliesreplace;
  30.  
  31.         // don’t bother setting up smilies if they are disabled
  32.         if ( !get_option( ‘use_smilies’ ) )
  33.                 return;
  34.  
  35.         if ( !isset( $wpsmiliestrans ) ) {
  36.                 $wpsmiliestrans = array(
  37. ‘:-))’ => ‘tawa.gif’,
  38. ‘:))’ => ‘tawa.gif’,
  39. ‘:-)’ => ‘smile.gif’,
  40. ‘:)’ => ‘smile.gif’,
  41. ‘X-(‘ => ‘angry.gif’,
  42. ‘X(‘ => ‘angry.gif’,
  43. ‘:-(‘ => ‘sad.gif’,
  44. ‘:(‘ => ‘sad.gif’,
  45. ‘B-)’ => ‘glasses.gif’,
  46. ‘(cozy)’ => ‘(cozy).gif’,
  47. ‘(music)’ => ‘(music).gif’,
  48. ‘(tears)’ => ‘(tears).gif’,
  49. ‘:-D’ => ‘bigsmile.gif’,
  50. ‘:D’ => ‘bigsmile.gif’,
  51. ‘(lol)’ => ‘(lol).gif’,
  52. ‘(LOL)’ => ‘(lol).gif’,
  53. ‘:-P’ => ‘tongue.gif’,
  54. ‘:P’ => ‘tongue.gif’,
  55. ‘:-&’  => ‘eneg.gif’,
  56. ‘:&’  => ‘eneg.gif’,
  57. ‘(K)’ => ‘lip.gif’,
  58. ‘(sick)’ => ‘(sick).gif’,
  59. ‘(:’ => ‘sleepy.gif’,
  60. ‘(goodluck)’ => ‘(goodluck).gif’,
  61. ‘(tongue)’ => ‘(tongue).gif’,
  62. ‘(unsure)’ => ‘(unsure).gif’,
  63. ‘(highfive)’ => ‘(highfive).gif’,
  64. ‘(woot)’ => ‘(woot).gif’,
  65. ‘(angry)’ => ‘(angry).gif’,
  66. ‘(griltongue)’ => ‘(griltongue).png’,
  67. ‘(dance)’ => ‘(dance).gif’,
  68. ‘:-o’ => ‘woo.gif’,
  69. ‘;-)’ => ‘kedip.gif’,
  70. ‘;)’ => ‘kedip.gif’,
  71. ‘(annoyed)’ => ‘(annoyed).gif’,
  72. ‘(bye)’ => ‘(bye).gif’,
  73. ‘(mmm)’ => ‘(mmm).gif’,
  74. ‘(hungry)’ => ‘(hungry).gif’,
  75. ‘(doh)’ => ‘(doh).gif’,
  76. ‘(brokenheart)’ => ‘(brokenheart).gif’,
  77. ‘(party)’ => ‘(party).gif’,
  78. ‘(sleeping)’ => ‘(sleeping).gif’,
  79. ‘(heart)’ => ‘(heart).gif’,
  80. ‘(devil)’ => ‘(devil).gif’,
  81. ‘(ninja)’ => ‘(ninja).gif’,
  82. ‘(haha)’ => ‘(haha).gif’,
  83. ‘(drinking)’ => ‘(drinking).gif’,
  84. ‘(thinking)’ => ‘(thinking).gif’,
  85. ‘(lmao)’ => ‘(lmao).gif’,
  86. ‘(evilsmirk)’ => ‘(evilsmirk).gif’,
  87. ‘(girlkiss)’ => ‘(girlkiss).jpg’,
  88. ‘(bringit)’ => ‘(bringit).gif’,
  89. ‘(banana_cool)’ => ‘(banana_cool).gif’,
  90. ‘(rofl)’ => ‘(rofl).gif’,
  91. ‘(worship)’ => ‘(worship).gif’,
  92. ‘(banana_rock)’ => ‘(banana_rock).gif’,
  93. ‘(money)’ => ‘(money).gif’,
  94. ‘(applause)’ => ‘(applause).gif’,
  95. ‘(evil_grin)’ => ‘(evil_grin).gif’,
  96. ‘(rock)’ => ‘(rock).gif’,
  97. ’8-)’ => ‘kacamata.gif’,
  98. ‘(headspin)’ => ‘(headspin).gif’,
  99. ‘(nottalking)’ => ‘(nottalking).gif’,
  100. ‘(gym)’ => ‘(gym).gif’,
  101. ‘(heart_beat)’ => ‘(heart_beat).gif’,
  102.                 );
  103.         }

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 (dance)



Creative Commons License 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:

  1. WordPress Smilies Themer Khusus Plurk Smilies
  2. Smilies Themer Plugin [Special Plurk Emoticons]
  3. Belajar WordPress Secara Offline
  4. The Scraper v1.0 – Free WordPress Theme
  5. Export-Import… (Konten Blog :P)

21 Responses to “Mengintegrasikan Smilies Plurk Ke WordPress”

  1. Arten® Says:

    nice!
    bermanfaat bagi lain.. gutwek! :D

    [Reply]


  2. Arten® Says:

    tes sekalian..
    (angry) (mmm) (lmao)

    jiah, ngejang dio (idiot)

    [Reply]


  3. xvader Says:

    opo dio gudwek tu, nduk? (thinking)

    [Reply]


  4. Arten® Says:

    mas mas, nduk itu buat anak perempuan ya!
    kalo anak laki-laki itu, Thole ato Ngger!

    btw, gutwek itu kerja bagus..
    haha..

    owh, aisi… aisi… (lol)

    [Reply]


  5. Eriek Says:

    tesss (bye)

    [Reply]


  6. jafis Says:

    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.

    thx kak, ntar ane cubo (dance)

    [Reply]


  7. Mas Koko Says:

    Mantap tips nya bro :)

    trims, pak :)

    [Reply]


  8. radio13 Says:

    makasih infonya bos :D

    sama-sama :)

    [Reply]


  9. setan666 Says:

    whuih kerennn

    (devil) ikutan ah… :D

    [Reply]


  10. indahonly Says:

    nyubo ah.. (rock)

    [Reply]


  11. Amel Says:

    *tos sm indah (drinking)

    [Reply]


  12. bikpici Says:

    uiiiyyy alangke terang bekgron web dikau nih deek.. tp, keren euy :D jadi pengen hosting dwk.. gek ajarin yeh, awas mun idak, injek2 gek kacomato adek tuh (lmao)

    bik pici (idiot)

    [Reply]


  13. bikpici Says:

    (lmao) komeng saya di sensor ternyata (devil) *ansab* (ninja)

    komeng pertamo selalu di-filter, bik, selanjutnyo dak lagi (idiot)

    [Reply]


  14. mangoeni Says:

    drus dak lemak jadi liat emotnyo
    (ado bayang reges putih dikit)..
    dak pas dengan warno bekgronnyo..
    ganti be warno bekronnyo Pink (ninja)

    [Reply]

    xvader Reply:

    la kugenti nah, themenyo… :P

    [Reply]


  15. Wawan Says:

    Makasih berat buat infonya (cozy)

    senang bisa membantu (dance)

    [Reply]


  16. Idrus Fhadli’s Blog » Blog Archive » WordPress Smilies Themer Khusus Plurk Smilies Says:

    [...] 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. [...]


  17. Kuro! Says:

    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 (doh)

    [Reply]


  18. indira Says:

    (fireworks) hehehehe

    [Reply]


  19. ai Says:

    qo aq gabisa2 yah… (doh)

    [Reply]


  20. plurk Says:


Leave a Reply

You can use plurk smilies syntax, for example: (LOL), (tears), (ROFL), etc.