PROCESSOR atau VIRTUAL STORAGE :
· 1 Bit = Binary Digit
· 8 Bits = 1 Byte
· 1024 Bytes = 1 Kilobyte
· 1024 Kilobyte = 1 Megabyte
· 1024 Megabytes = 1 Gigabyte
· 1024 Gigabytes = 1 Terabyte
· 1024 terabytes = 1 Petabyte
· 1024 petabyte = 1 Exabyte
· 1024 exabyte = 1 Zettabyte
· 1024 Zettabytes = 1 Yottabyte
· 1024 Yottabytes = 1 Brontobyte
· 1024 Brontobytes = 1 Geopbyte
DISK STORAGE :
· 1 Bit = Binary Digit
· 8 Bits = 1 Byte
· 1000 Bytes = 1 Kilobyte
· 1000 Kilobyte = 1 Megabyte
· 1000 Megabytes = 1 Gigabyte
· 1000 Gigabytes = 1 Terabyte
· 1000 terabytes = 1 Petabyte
· 1000 petabyte = 1 Exabyte
· 1000 exabyte = 1 Zettabyte
· 1000 Zettabytes = 1 Yottabyte
· 1000 Yottabytes = 1 Brontobyte
· 1000 Brontobytes = 1 Geopbyte
Keterangan :
BIT : Bit adalah unit terkecil data yang menggunakan komputer. Hal ini dapatdigunakan untuk mewakili dua negara bagian informasi, seperti Ya atauTidak.
BYTE : Sebuah Byte adalah sama dengan 8 Bits. Sebuah Byte bisa mewakili 256informasi negara, misalnya, angka atau kombinasi angka dan huruf. 1Byte dapat sama dengan satu karakter. 10 Bytes bisa jadi setara dengansebuah kata. 100 Bytes akan sama dengan rata-rata kalimat.
KILOBYTE : Sebuah Kilobyte adalah sekitar 1.000 Bytes, sebenarnya 1.024 Bytes,tergantung pada definisi yang digunakan. 1 Kilobyte akan sama denganayat ini Anda baca, sedangkan 100 Kilobyte akan sama seluruh halaman.
MEGABYTE : Sebuah Megabyte adalah sekitar 1.000 Kilobyte. Pada masa-masa awalkomputer, satu Megabyte dianggap sejumlah besar data. Hari ini dengan500 Gigabyte hard drive pada komputer yang umum, yang Megabyte tidaktampak seperti banyak lagi. Salah satu dari orang-orang tua 3-1/2 inchfloppy disk dapat menyimpan 1,44 Megabyte atau setara dengan sebuahbuku kecil. 100 Megabyte mungkin memegang beberapa jilid dariEnsiklopedia. 600 Megabyte adalah tentang jumlah data yang akan muat diCD-ROM disk.
GIGABYTE : Sebuah Gigabyte adalah sekitar 1.000 Megabyte. Sebuah Gigabyte adalahistilah yang sangat umum digunakan hari-hari ini ketika mengacu padaruang disk atau drive penyimpanan. 1 Gigabyte data hampir dua kalilipat jumlah data yang CD-ROM bisa terus. Tapi itu sekitar seribu kalikapasitas sebuah disket 3-1/2. 1 Gigabyte bisa memegang isi darisekitar 10 meter dari buku-buku di rak. 100 Gigabytes dapat menahanseluruh lantai perpustakaan jurnal akademik.
TERABYTE : Sebuah Terabyte adalah sekitar satu triliun byte, atau 1.000 Gigabytes.Sekarang kita ke sana untuk mendapatkan ukuran yang begitu besarsehingga bukan merupakan istilah umum belum. Untuk meletakkannya dalambeberapa perspektif, sebuah Terabyte dapat menahan sekitar 300 Kilobyte3,6 juta gambar atau mungkin sekitar 300 jam video berkualitas baik.Sebuah Terabyte dapat menyimpan salinan 1.000 Encyclopedia Britannica.Sepuluh terabyte bisa terus dicetak koleksi Library of Congress. Itubanyak data.
PETABYTE : Sebuah Petabyte adalah sekitar 1.000 terabyte atau satu juta Gigabytes.Sulit untuk membayangkan apa yang Petabyte bisa muat. 1 Petabyte bisamemuat sekitar 20 juta 4-pintu lemari arsip penuh teks. Itu bisamemegang 500 miliar halaman standar teks dicetak. Ini akan memakanwaktu sekitar 500 juta floppy disk untuk menyimpan jumlah data yangsama.
EXABYTE : Sebuah Exabyte adalah sekitar 1.000 petabyte. Cara lain untukmelihatnya adalah bahwa Petabyte kira-kira satu triliun byte atau satumiliar Gigabytes. Tidak banyak hal untuk membandingkan suatu Exabyte.Telah dikatakan bahwa 5 exabyte akan sama dengan semua kata yang pernahdiucapkan oleh umat manusia.
ZETTABYTE : Sebuah Zettabyte adalah sekitar 1.000 exabyte. Tidak ada hal yang dapatdibandingkan Zettabyte, tetapi untuk mengatakan bahwa hal itu akanmengambil sangat banyak satu dan nol untuk mengisinya sampai penuh.
YOTTABYTE : Sebuah Yottabyte adalah sekitar 1.000 Zettabytes. Butuh waktu sekitar11 triliun tahun untuk men-download file seukuran yottabyte menggunakanInternet broadband tinggi. Anda dapat membandingkannya ke World WideWeb sebagai seluruh internet hampir mengambil satu Yottabyte.
BRONTOBYTE : Sebuah Brontobyte adalah (coba tebak) sekitar 1.000 Yottabytes.Satu-satunya yang ada mengatakan tentang Brontobyte adalah bahwa halitu adalah 1 yang diikuti oleh 27 angka nol!
GEOPBYTE : Sebuah Geopbyte adalah sekitar 1000 Brontobytes! Tidak tahu pastimengapa istilah ini telah dibuat. Diragukan bahwa orang hidup hari iniakan pernah melihat Geopbyte hard drive. Salah satu cara untuk melihatsebuah geopbyte adalah 1 5 267 650 4 600 228 3 229 401 2 496 703 1 205 376 bytes!
http://www.whatsabyte.com/, kaskus.us
Masih ada lagi setelah Terabyte
PHP? Siapa Takut! - Bag. 2
Bagian 2: Holodeck di USS Enterprise NCC-1701D
Bar Ten-Fourty
Instalasi Joomla Pada komputer Localhost
Ini adalah daftar aplikasi dan persiapan yang harus dilakukan sebelum melakukan instalasi Joomla:
Apache Server, PHP, MySQL, dan phpMyAdmin, untuk memudahkan instalasi ini dapat digunakan aplikasi program SOKKIT:versi update Phptriad atau XAMPP untuk windows yang tersedia dan dapat di-download di http://www.apachefriends.org.Dengan melakukan instalasi program Sokkit pada komputer secara oromatis akan terinstall Apache Server, PHP, MySQL, dan phpMyAdmin.
Joomla 1.0.8 (versi terakhir saat ini), dapat di-download di http://www.joomla.org
1. Buka folder Sokkit
2. Pertama, Install sokkitcore3-5setup,
3. Setelah terinstall, masukan serial sokkit: (Email: dan Registration Key, terlampir)
4. Install sokkitmodule-mysql4
5. Setelah terinstall semua, lakukan checking :
- Start – all program – sokkit – sokkit control panel
- Check apakah Web Server Controls dan MySQL Controls sudah dalam kondisi running (lihat illustrasi)
- Lakukan pengetesan:
- Untuk menguji kesuksesan installasi sokkit, buka browser, ketik dialamatnya "http://localhost". Akan muncul : Sokkit:Default Page, This site is powered by Sokkit 3.5 (lihat illustrasi)
Instalasi Joomla
Persiapan sebelum melakukan instalasi Joomla
1. Installasi Program Sokkit secara default akan terinstall di drive C;
2. Jika dibuka drive C: maka akan terlihat folder sokkit yang mencakup sub folder sbb:(lihat illustrasi)
- Apache2
- Controlpanel
- mysql4
- PHP
- Site (tempat meletakkan file joomla)
- Tmp
- Webmodules
- Unins
4. Aktifkan Sokkit Control Panel. Pastikan :
- Web Server Controls Running on port 80
- MySQL Controls Running (lihat ilustrasi)
Ikuti langkah-langkah di bawah ini:
Buka web browser dan ketik http://localhost/namafolder/installation.
Masukkan konfigurasi database MySQL.
Host Name, nama host name, biasa diisi dengan localhost
MySQL User Name, username yang digunakan untuk mengakses MySQL, biasa diisi root atau username yang disediakan web hosting Anda
MySQL Password, password yang digunakan untuk mengakses MySQL, gunakan password untuk keamanan web Anda.
MySQL Database Name, nama database untuk Joomla.
MySQL Table Prefix, awalan yang digunakan untuk tabel database Anda. Bila sudah diisi semua lanjutkan dengan klik tombol Next>>.
Sesaat kemudian akan muncul pesan yang meminta konfirmasi konfigurasi yang telah Anda masukkan. Bila semua sudah benar, tekan tombol OK. Di halaman ini Anda diminta memberi nama web Anda (gambar). Berilah nama dan tekan tombol Next>> untuk melanjutkan.
Silahkan lakukan konfirmasi URL, direktori absolut, e-mail admin dan direktori chmods. Masukkan alamat e-mail dan password untuk admin anda. (Gambar: Konfigurasi path, URL, dan direktori). Tekan Next>>. Akan muncul nama admin dan password dan Joomla telah terinstall (lihat ilustrasi)
Selamat Anda telah berhasil melakukan instalasi Joomla Jangan lupa untuk menghapus direktori installation di direktori Joomla Anda.
Apabila folder installasi dan install.php tidak dihapus akan muncul pesan (lihat ilustrasi)
Cara Kerja Joomla
1. Server Web (Webserver);
2. Skrip PHP;
3. Database MySQL.
Webserver adalah server yang rnelayani perrnintaan klien terhadap halaman Web. Apache, liS (Internet Information Server), dan Xitami rnerupakan contoh perangkat lunak Web server.
Data Base merupakan tempat penyimpanan content. Joomla menggunaka Apache sebagai webserver dan MySQL untuk data basenya.
Pertamakali, user melakukan request terhadap halaman Joomla dengan mengeksekusi URL pada ‘browser web’ yang kemudian terhubung dengan server web. Request ini yang dalam istilah teknis lebih dikenal dengan Query String selain terdapat URL juga mengandung parameter konten (section, category, ID article dan lain-lain). Berdasarkan parameter tersebut, sistem skrip Joomla/Joomla melakukan kontak dengan database dan mengambil konten yang dimaksud berdasarkan parameternya.
Terakhir, Content dan Template bergabung bersama dan kembali sebagai halaman html, gambar, css dan javascript.
Apa yang dimaksud dengan CMS
Masih segar dalam ingatan kita, betapa sederhananya sebuah website di era tahun 90-an. Dengan hanya mengandalkan bahasa pemrograman HTML dan beberapa gambar serta informasi yang statis, sebuah perusahaan berusaha sebaik mungkin menampilkan informasi secukupnya kepada para pengunjung.
Setiap kali ada perubahan informasi dalam perusahaan, pihak manajeman mau tak mau haruslah berhubungan terlebih dahulu dengan pihak Humas sebelum akhirnya semua bahan diserahkan kepada pihak webmaster. Pihak inilah yang nantinya akan mengadakan perubahan terhadap isi website.
Selain tidak efisien, biaya operasional yang harus dikeluarkan juga sangatlah besar. Tentu saja situasi seperti ini tidak diinginkan oleh setiap orang. Dapat dikatakan sebuah metode atau sistem yang dapat meningkatkan tingkat produktivitas dan efisiensi dalam pengembangan website sangatlah dibutuhkan. Dan salah satu solusi yang tepat untuk ini adalah dengan menerapkan
Content Mangement System atau CMS.
CMS secara sederhana dapat diartikan sebagai berikut: Sebuah sistem yang memberikan kemudahan kepada para penggunanya dalam mengelola dan mengadakan perubahan isi sebuah website dinamis tanpa sebelumnya dibekali pengetahuan tentang hal-hal yang bersifat teknis. Dengan demikian, setiap orang, penulis maupun editor, setiap saat dapat menggunakannya secara leluasa untuk membuat, menghapus atau bahkan memperbaharui isi website tanpa campur tangan langsung dari pihak webmaster. Bukankah ini suatu hal yang efisien?
Karena CMS memisahkan antara isi dan desain, konsistensi tampilan dapat senantiasa dijaga dengan baik. Setiap bagian dari website dapat memiliki isi dan tampilan yang berbeda-beda, tanpa harus khawatir kehilangan identitas dari website secara keseluruhan. Oleh karena semua data disimpan dalam satu tempat, pemanfaatan kembali dari informasi yang ada untuk berbagai keperluan dapat dengan mudah dilakukan. CMS juga memberikan kefleksibelen dalam mengatur alur kerja atau ‘workflow’ dan hak akses, sehingga memperbesar kesempatan berpartisipasi dari pengguna dalam pengembangan website. Hal ini akan sangat menguntungkan bila website yang dikelola memiliki kompleksitas yang tinggi dan mengalami kemajuan yang cukup pesat.
Manfaat CMS
Selain dari beberapa hal yang telah disebutkan di atas, CMS juga dapat memberikan sejumlah manfaat kepada penggunanya yang dapat dijabarkan sebagai berikut:
• Manajemen data
Ini merupakan fungsi utama dari CMS. Semua data/informasi baik yang telah ditampilkan ataupun belum dapat diorganisasi dan disimpan secara baik. Suatu waktu data/informasi tadi dapat dipergunakan kembali sesuai dengan kebutuhan. Selain itu, CMS juga mendukung berbagai macam format data, seperti XML, HMTL, PDF, dll., indexing, fungsi pencarian, dan kontrol terhadap revisi yang dilakukan terhadap data/informasi. Untuk menggunakan CMS biasanya pengetahuan tentang bahasa pemograman tidaklah terlalu dibutuhkan, karena semua proses berjalan dengan otomatis (WYSIWYG). Begitupula dengan proses ‘update’, dapat dilakukan dengan cepat sehingga menjamin kemutakhiran informasi yang ditampilkan.
• Mengatur siklus hidup website
Banyak CMS memberikan fasilitas kepada para penggunanya untuk mengelola bagian atau isi mana saja yang akan ditampilkan, masa/waktu penampilan dan lokasi penampilan di website. Tak jarang sebelum ditampilkan, bagian atau isi yang dimaksud terlebih dahulu di-review oleh editor sehingga dijamin kevaliditasannya.
• Mendukung web templating dan standarisasi
Setiap halaman website yang dihasilkan berasal dari template yang telah terlebih dahulu disediakan oleh CMS. Selain dapat menjaga konsistensi dari tampilan secara keseluruhan, para penulis dan editor dapat berkonsentrasi secara penuh dalam melaksanakan tugasnya menyediakan isi website. Bila isi telah tersedia, maka proses publikasi dapat berjalan dengan mudah karena sudah ada template sebelumnya. Beberapa bagian dari website biasanya telah ditetapkan sedemikian rupa sehingga tidak dapat diubah begitu saja. Hal ini dilakukan untuk memberikan standarisasi kepada seluruh bagian dari website.
• Personalisasi website
Sekali sebuah isi ditempatkan ke dalam CMS, isi tersebut dapat ditampilkan sesuai dengan keinginan dan kebutuhan dari penggunanya. Terlebih lagi dengan kelebihan CMS yang dapat memisahkan antara desain dan isi, menyebabkan proses personalisasi dapat berjalan dengan mudah.
• Sindikasi
Sindikasi memberikan kemungkinan kepada sebuah website untuk membagi isinya kepada website-website yang lain. Format data yang didukung juga cukup variatif, mulai dari rss, rdf, xml hingga ‘backend scripting’. Sama halnya dengan personalisasi, sindikasi juga dapat dilakukan dengan mudah karena isi dan desain telah dibuat terpisah.
• Akuntabilitas
Oleh karena CMS mendukung alur kerja dan hak akses yang jelas kepada para penggunanya, data/informasi yang disampaikan dapat dipertanggungjawabkan dengan baik. Setiap penulis ataupun editor memiliki tugas masing-masing dengan hak akses yang berbeda-beda pula. Dengan demikian setiap perubahan yang terjadi di website dapat ditelusuri dan diperbaiki seperlunya dengan segera.
Pemanfaatan CMS
CMS pada prinsipnya dapat dipergunakan untuk berbagai macam keperluan dan dalam berbagai kondisi, seperti untuk:
a. Mengelola website pribadi.
b. Mengelola website perusahaan/bisnis.
c. Portal atau website komunitas.
d. Galeri foto, dan lain sebagainya.
e. Forum.
f. Aplikasi E-Commerce.
g. Dan lain-lain.
Squid untuk mempercepat akses website (accelerator)
Sebagai akselerator akses website, maka squid berada antara klien dan satu atau lebih website.
Keuntungan yang diperoleh yaitu :
- Caching
- Fleksibilitas
Kapan melakukan Cache
1. Prosentasi Permintaan Ganda
- ( 1 – unik URL / total URL) * 100
- 100% berarti hanya 1 URL yang diminta
- 0 % berarti tidak ada URL ganda
- Prosentasi kecil berarti tidak memberi untung pada caching squid
Untuk prosentasi yang dihitung otomatis oleh squid dapat dilihat dengan cara :
$ squidclient -p 80 mgr:info | grep Ratios
Cache information for squid:
Request Hit Ratios: 5min: 71.7%, 60min: 49.1%
Byte Hit Ratios: 5min: 85.9%, 60min: 54.0%
Request Memory Hit Ratios: 5min: 2.5%, 60min: 4.9%
Request Disk Hit Ratios: 5min: 49.1%, 60min: 51.2%
Storage Swap size: 48621658 KB
Storage Mem size: 65528 KB
Mean Object Size: 12.70 KB
Requests given to unlinkd: 0
2. Besar kebutuhan storage untuk cache
3. Rata-rata besar obyek
Studi Kasus
Proxy Hotspot ditempat saya:
$ squidclient -p 80 mgr:infoKalau dilihat Rationya maka :
HTTP/1.0 200 OK
Server: squid/2.6.STABLE21
Date: Wed, 24 Feb 2010 10:40:41 GMT
Content-Type: text/plain
Expires: Wed, 24 Feb 2010 10:40:41 GMT
Last-Modified: Wed, 24 Feb 2010 10:40:41 GMT
X-Cache: MISS from ServerDarutTaqwa
Proxy-Connection: close
Squid Object Cache: Version 2.6.STABLE21
Start Time: Sat, 20 Feb 2010 10:26:07 GMT
Current Time: Wed, 24 Feb 2010 10:40:41 GMT
Connection information for squid:
Number of clients accessing cache: 0
Number of HTTP requests received: 1145760
Number of ICP messages received: 581593
Number of ICP messages sent: 581593
Number of queued ICP replies: 0
Number of HTCP messages received: 0
Number of HTCP messages sent: 0
Request failure ratio: 0.00
Average HTTP requests per minute since start: 198.4
Average ICP messages per minute since start: 201.4
Select loop called: 17121470 times, 20.236 ms avg
Cache information for squid:
Request Hit Ratios: 5min: 60.2%, 60min: 50.9%
Byte Hit Ratios: 5min: 64.4%, 60min: 47.1%
Request Memory Hit Ratios: 5min: 3.5%, 60min: 5.0%
Request Disk Hit Ratios: 5min: 52.4%, 60min: 53.0%
Storage Swap size: 48622284 KB
Storage Mem size: 65532 KB
Mean Object Size: 12.70 KB
Requests given to unlinkd: 0
Median Service Times (seconds) 5 min 60 min:
HTTP Requests (All): 0.01035 0.02069
Cache Misses: 0.89858 0.85130
Cache Hits: 0.00865 0.00767
Near Hits: 0.00000 0.64968
Not-Modified Replies: 0.00286 0.00379
DNS Lookups: 0.00464 0.00464
ICP Queries: 0.00510 0.00453
Resource usage for squid:
UP Time: 346473.578 seconds
CPU Time: 4897.484 seconds
CPU Usage: 1.41%
CPU Usage, 5 minute avg: 0.81%
CPU Usage, 60 minute avg: 1.24%
Process Data Segment Size via sbrk(): 0 KB
Maximum Resident Size: 491440 KB
Page faults with physical i/o: 1
Memory accounted for:
Total accounted: 321602 KB
memPoolAlloc calls: 171018880
memPoolFree calls: 162918841
File descriptor usage for squid:
Maximum number of file descriptors: 11072
Largest file desc currently in use: 81
Number of file desc currently in use: 67
Files queued for open: 0
Available number of file descriptors: 11005
Reserved number of file descriptors: 100
Store Disk files open: 3
IO loop method: kqueue
Internal Data Structures:
3829225 StoreEntries
15127 StoreEntries with MemObjects
15045 Hot Object Cache Items
3829160 on-disk objects
Cache information for squid:
Request Hit Ratios: 5min: 60.2%, 60min: 50.9%
Byte Hit Ratios: 5min: 64.4%, 60min: 47.1%
Request Memory Hit Ratios: 5min: 3.5%, 60min: 5.0%
Request Disk Hit Ratios: 5min: 52.4%, 60min: 53.0%
Storage Swap size: 48622284 KB
Storage Mem size: 65532 KB
Mean Object Size: 12.70 KB
Requests given to unlinkd: 0
Mengapa prosentase rationya rendah ?
1. Kalau dilihat contoh kasus diatas, maka dapat dilakukan evaluasi sebagai berikut :
Website mana yang sering diakses, coba lihat di access_log? Ternyata setelah diamati banyak yang akses mail.google.com, facebook.com, meebo.com, dimana website tersebut setiap URLnya bersifat spesifik untuk setiap user yang artinya tidak akan bermanfaat banyak untuk caching squid.
2. perl -lane ‘$t += $F[4]; $u += $F[4] unless $seen{$F[6]}++;’ -e ‘END { print “unique=$u total=$t” }’ /var/log/squid/access.log
unique=31224384 total=69307469
Ratio = (1 – 31224384/69307469) * 100% = 54,95%
Artinya memang URL yang diminta hanya 54,95% saja yang ganda
3. Perhitungan dilakukan jam berapa? Yaitu jam 10 pagi. Ini berbeda dengan statistik Ratio jika dipanggil jam 8 Pagi dan jam 3 Sore, sebab aktifitas pemakai Squid juga berbeda, kalau pagi baca berita dimana ini akan baik baik caching squid.
Kesimpulan ?
1. Squid di kantor kalau hanya dimanfaatkan untuk caching saja maka dapat dikatakan belum/tidak optimal
2. Proxy internet dan cache internet dapat dipisahkan.
Instalasi Squid di Windows untuk cache/proxy server
- Donwload binary file squid
File yang dipilih untuk di download ada 3 pilihan, yaitu
- Standard ==> Untuk fungsi standar dari squid
- Delay Pools ==> Menyertakan fungsi Delay Pools
- SSL Support ==> Menyertakan fungsi SSL
| Binaries | ||
|---|---|---|
| Version | Release date | Build type |
| 2.3.STABLE5-NT - OBSOLETE | 11/04/2002 | Standard |
| External DNS | ||
| Delay Pools | ||
| 2.5.STABLE14-NT - OBSOLETE | 28/05/2006 | Standard |
| Delay Pools | ||
| SSL support for reverse proxy only - EXPERIMENTAL | ||
| 2.6.STABLE22 | 20/10/2008 | Standard |
| Delay Pools | ||
| SSL support for reverse proxy only - EXPERIMENTAL | ||
| 2.7.STABLE2 | 01/06/2008 | Standard |
| Delay Pools | ||
| SSL support for reverse proxy only - EXPERIMENTAL | ||
| 2.7.STABLE3 | 29/06/2008 | Standard |
| Delay Pools | ||
| SSL support for reverse proxy only - EXPERIMENTAL | ||
| 2.7.STABLE4 | 10/08/2008 | Standard |
| Delay Pools | ||
| SSL support for reverse proxy only - EXPERIMENTAL | ||
| 2.7.STABLE5 | 20/10/2008 | Standard |
| Delay Pools | ||
| SSL support for reverse proxy only - EXPERIMENTAL | ||
- Extrack file yang sudah di download di C:\squid
- Sesuaikan konfigurasi file di c:\squid\etc\squid.conf
Untuk parameter apa saja yang disesuaikan bisa lihat disini:
- http://kusprayitna.staff.uii.ac.id/2008/08/29/setup-proxy-squid-di-centos/ (point 1 & 2)
- http://kusprayitna.staff.uii.ac.id/2008/12/11/membatasi-download-pada-squid/
- http://kusprayitna.staff.uii.ac.id/2009/01/05/filter-content-sederhana-di-squid/
- http://kusprayitna.staff.uii.ac.id/2008/12/10/squid-cache-server-sangat-lambat/
Prinsip dasar yang disetup yaitu :
(dengan cara mencari kata kunci di file squid.conf dan dihapus tanda # dan disesuaikan nilainya)
# alamat portnya
- http_port 800
# Jika dibelakang proxy, tentukan proxy induknya
- cache_peer IP_PROXY_UII parent 800 0 no-query no-netdb-exchange no-digest
# tentukan alamat komputer client, misal 192.168.0.2 mask 255.255.255.0 & localhost
- acl mylan src 192.168.0.0/24
- http_access allow mylan
- http_access allow localhost
- http_access deny all
# Jika dibelakang proxy, tambahkan baris ini
- never_direct allow all
- Buat cache direktorynya
- Jalankan squid
apabila dibelakang proxy atau tidak ada DNS server, maka bisa dengan
c:\squid\sbin\squid.exe -D
apabila ada kesalahan atau gagal start, pesan kesalahan dituliskan di c:\squid\var\logs
- Ujicoba di browser, apakah sudah bisa
- Tuning agar squid kerja sesuai keinginan
- Install squid agar jalan otomatis sebagai service di windows c:\squid\sbin\squid.exe -i
Usage: squid [-hirvzCDFRYX] [-d level] [-s | -l facility] [-f config-file] [-u port] [-k signal] [-n name] [-O command-line]Selamat mencoba dan sukses selalu
-d level Write debugging to stderr also.
-f file Use given config-file instead of c:/squid/etc/squid.conf
-h Print help message.
-i Installs as a Windows Service (see -n option).
-k reconfigure|rotate|shutdown|interrupt|kill|debug|check|parse . Parse configuration file, then send signal to running copy (except -k parse) and exit.
-n name Specify Windows Service name to use for service operations default is: Squid.
-r Removes a Windows Service (see -n option).
-s | -l facility Enable logging to syslog.
-u port Specify ICP port number (default: 3130), disable with 0.
-v Print version.
-z Create swap directories
-C Do not catch fatal signals.
-D Disable initial DNS tests.
-F Don’t serve any requests until store is rebuilt.
-N No daemon mode.
-O options
Set Windows Service Command line options in Registry.
-R Do not set REUSEADDR on port.
-S Double-check swap during rebuild.
-X Force full debugging.
-Y Only return UDP_HIT or UDP_MISS_NOFETCH during fast reload.
Setup a transparent proxy with Squid in three easy steps
Main benefit of setting transparent proxy is you do not have to setup up individual browsers to work with proxies.
My Setup:
i) System: HP dual Xeon CPU system with 8 GB RAM (good for squid).
ii) Eth0: IP:192.168.1.1
iii) Eth1: IP: 192.168.2.1 (192.168.2.0/24 network (around 150 windows XP systems))
iv) OS: Red Hat Enterprise Linux 4.0 (Following instruction should work with Debian and all other Linux distros)
Eth0 connected to internet and eth1 connected to local lan i.e. system act as router.
Server Configuration
* Step #1 : Squid configuration so that it will act as a transparent proxy
* Step #2 : Iptables configuration
o a) Configure system as router
o b) Forward all http requests to 3128 (DNAT)
* Step #3: Run scripts and start squid service
First, Squid server installed (use up2date squid) and configured by adding following directives to file:
# vi /etc/squid/squid.conf
Modify or add following squid directives:
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
acl lan src 192.168.1.1 192.168.2.0/24
http_access allow localhost
http_access allow lan
Where,
* httpd_accel_host virtual: Squid as an httpd accelerator
* httpd_accel_port 80: 80 is port you want to act as a proxy
* httpd_accel_with_proxy on: Squid act as both a local httpd accelerator and as a proxy.
* httpd_accel_uses_host_header on: Header is turned on which is the hostname from the URL.
* acl lan src 192.168.1.1 192.168.2.0/24: Access control list, only allow LAN computers to use squid
* http_access allow localhost: Squid access to LAN and localhost ACL only
* http_access allow lan: -- same as above --
Here is the complete listing of squid.conf for your reference (grep will remove all comments and sed will remove all empty lines, thanks to David Klein for quick hint ):
# grep -v "^#" /etc/squid/squid.conf | sed -e '/^$/d'
OR, try out sed (thanks to kotnik for small sed trick)
# cat /etc/squid/squid.conf | sed '/ *#/d; /^ *$/d'Iptables configuration
Output:
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
hosts_file /etc/hosts
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl purge method PURGE
acl CONNECT method CONNECT
cache_mem 1024 MB
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
acl lan src 192.168.1.1 192.168.2.0/24
http_access allow localhost
http_access allow lan
http_access deny all
http_reply_access allow all
icp_access allow all
visible_hostname myclient.hostname.com
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
coredump_dir /var/spool/squid
Next, I had added following rules to forward all http requests (coming to port 80) to the Squid server port 3128 :
iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j DNAT --to 192.168.1.1:3128Here is complete shell script. Script first configure Linux system as router and forwards all http request to port 3128 (Download the fw.proxy shell script):
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128
#!/bin/sh# squid server IPSQUID_SERVER="192.168.1.1"# Interface connected to InternetINTERNET="eth0"# Interface connected to LANLAN_IN="eth1"# Squid portSQUID_PORT="3128"# DO NOT MODIFY BELOW# Clean old firewalliptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X# Load IPTABLES modules for NAT and IP conntrack supportmodprobe ip_conntrack
modprobe ip_conntrack_ftp# For win xp ftp client#modprobe ip_nat_ftpecho 1 > /proc/sys/net/ipv4/ip_forward# Setting default filter policyiptables -P INPUT DROP
iptables -P OUTPUT ACCEPT# Unlimited access to loop backiptables -A INPUT -i lo -j ACCEPT
iptables -A OUTPUT -o lo -j ACCEPT# Allow UDP, DNS and Passive FTPiptables -A INPUT -i $INTERNET -m state --state ESTABLISHED,RELATED -j ACCEPT# set this system as a router for Rest of LANiptables --table nat --append POSTROUTING --out-interface $INTERNET -j MASQUERADE
iptables --append FORWARD --in-interface $LAN_IN -j ACCEPT# unlimited access to LANiptables -A INPUT -i $LAN_IN -j ACCEPT
iptables -A OUTPUT -o $LAN_IN -j ACCEPT# DNAT port 80 request comming from LAN systems to squid 3128 ($SQUID_PORT) aka transparent proxyiptables -t nat -A PREROUTING -i $LAN_IN -p tcp --dport 80 -j DNAT --to $SQUID_SERVER:$SQUID_PORT# if it is same systemiptables -t nat -A PREROUTING -i $INTERNET -p tcp --dport 80 -j REDIRECT --to-port $SQUID_PORT# DROP everything and Log itiptables -A INPUT -j LOG
iptables -A INPUT -j DROP
Save shell script. Execute script so that system will act as a router and forward the ports:
# chmod +x /etc/fw.proxy
# /etc/fw.proxy
# service iptables save
# chkconfig iptables on
Start or Restart the squid:
# /etc/init.d/squid restartDesktop / Client computer configuration
# chkconfig squid on
Point all desktop clients to your eth1 IP address (192.168.2.1) as Router/Gateway (use DHCP to distribute this information). You do not have to setup up individual browsers to work with proxies.
How do I test my squid proxy is working correctly?
See access log file /var/log/squid/access.log:
# tail -f /var/log/squid/access.logAbove command will monitor all incoming request and log them to /var/log/squid/access_log file. Now if somebody accessing a website through browser, squid will log information.
Problems and solutions
(a) Windows XP FTP Client
All Desktop client FTP session request ended with an error:
Illegal PORT command.
I had loaded the ip_nat_ftp kernel module. Just type the following command press Enter and voila!
# modprobe ip_nat_ftpPlease note that modprobe command is already added to a shell script (above).
(b) Port 443 redirection
I had block out all connection request from our router settings except for our proxy (192.168.1.1) server. So all ports including 443 (https/ssl) request denied. You cannot redirect port 443, from debian mailing list, "Long answer: SSL is specifically designed to prevent "man in the middle" attacks, and setting up squid in such a way would be the same as such a "man in the middle" attack. You might be able to successfully achive this, but not without breaking the encryption and certification that is the point behind SSL".
Therefore, I had quickly reopen port 443 (router firewall) for all my LAN computers and problem was solved.
(c) Squid Proxy authentication in a transparent mode
You cannot use Squid authentication with a transparently intercepting proxy.
Setting Halaman FrontPage Joomla ke 1 kolom
- Login Administrator
- Pilih Menus -> Main Menu*
- Setelah itu pada Menu Item pilih Home
- Langkah selanjutnya, Silahkan edit Columns dengan nilai 1 pada Parameters (Basic) yang berada disebelah kanan, setelah itu Save dan lihat hasilnya di halaman homepage kita.
Semoga bermanfaat,
Membuat dan Memasang ShoutBox di Joomla!
Mungkin karena shoutbox lebih praktis, lebih cepat prosesnya, dan lebih mudah dilihat oleh pengunjung lain atau si pemilik blog, maka tool ini lebih dipilih oleh rekan blogger.
Sebelum memasang shoutbox ini di website Joomla!, kita harus mendapatkan kodenya terlebih dahulu dengan mendaftar ke salah satu layanan penyedia shoutbox ini. Beberapa di antaranya adalah :
- http://www.shoutmix.com.
- http://www.cbox.ws/
- http://free-shoutbox.net/
- dan lain-lain, silahkan minta bantuan mbah google ...
- Misal buka situs http://www.shoutmix.com. Lakukan pendaftaran seperlunya.
- Jika pendaftaran Anda berhasil, Anda langsung disuruh memilih tipe shoutbox yang disediakan, pilihlah bentuk yang dikehendaki. Klik tombol Continue.
- Setelah itu Anda akan mendapat ucapan "Terima Kasih" lalu klik link Go to My Control Panel Now.
- Disitu Anda bisa men-setting terlebih dahulu shoutbox Anda, misalnya Style & Color, Date & Time, dan lain-lain.
- Jika sudah selesai klik menu Get Codes
- Jika Anda ingin meletakkan shoutbox di blog pilih "Place Shoutbox on Webpage"
- Atur lebar dan tinggi shoutbox di kolom widht dan hight
- Kemudian Copy kode yang ada di dalam kotak "generated Codes", copy code Anda di notepad.
Untuk menginstal kode shoutbox ke dalam Joomla! Anda, perlu satu module khusus yang harus diinstall di yaitu Blank Module dan dapat Anda download di sini. Selanjutnya install module tersebut melalui control panel. Setelah selesai ikuti tahap selanjutnya...
- Login pada backend joomla administrator, gunakan ID dan password anda.
- Klik extensions kemudian module manager. Cek jika ada module tersebut dalam status disable (silang merah), jika ada klik pada modul dan lakukan pengeditan, jika tidak ada klik tombol New, module_new
- Selanjutnya copy script yang telah anda persiapkan dan paste di kolom snippet. Isi data-data yang perlu seperti pada gambar: posisi widget, besar kotak (Paling mudah gunakan %), dan yang penting enable supaya terlihat di frontpage.
- Jika telah yakin semua beres, klik tombol apply dan preview hasilnya, jika perlu perbaikan ulangi lagi dan save jika sudah final.
Semoga bermanfaat ...
2 DIMENSI VS 3 DIMENSI
perhatikan gambar yang saya buat dibawah ini.
Sekarang coba bedakan dengan gambar dibawah ini.
silahkan dari kedua gambar yang saya buat diatas, anda bisa menarik kesimpulan antara perbedaan gambar 2 dimensi dan 3 dimensi.
Router Dengan Ubuntu
untuk ip static :
—————cut————–
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
SNAT 0 — 192.168.0.0/24 anywhere to:10.10.1.81
—————cut————–
untuk ip DHCP :
—————cut————–
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE 0 — 192.168.0.0/24 anywhere
Router adalah sebuah device yang berfungsi untuk meneruskan paket-paket dari sebuah network ke network yang lainnya (baik LAN ke LAN atau LAN ke WAN) sehingga host-host yang ada pada sebuah network bisa berkomunikasi dengan host-host yang ada pada network yang lain. Jenis router ada yang diproduksi oleh vendor tertentu (cisco, juniper, dst) atau yang dapat difungsikan menggunakan komputer (pc router).
PC (Personal Computer) Router adalah sebuah komputer yang berfungsi sebagai router. PC Router dapat diterapkan dengan menggunakan spesifikasi minimal :
- Dua buah NIC
- OS *nix (BSD, Linux, Unix), OS Windows Server, Open Solaris, dst
Pada installasi kali ini, kita akan membuat PC Router dengan menggunakan OS Linux Ubuntu Desktop 7.10 Punyanya “Om Gusty”.
Saat ini aku make dua buah lan cards yang satu buat ke luar dan yang atunya buat ke dalam.
KONFIGURASI
1. Konfigurasi IP address
* eth0 : IP Address 10.10.1.81 Netmask 255.255.255.0
* eth1 : IP Address 192.168.0.1 Netmask 255.255.255.0
* DNS Server : 127.0.0.1 (disesuaikan dengan punya kita yang konek internet)
* Search Domains : perusahaan.com (boleh di isi boleh gak)
perintah seting ip (bisa lewat gui, tp ni ak pake terminal):
* sudo ifconfig eth0 10.10.1.81 netmask 255.255.255.0 (lan card 1)
* sudo ifconfig eth 192.168.0.1 netmask 255.255.255.0 (lan card 2)
* route add default gw 10.10.1.1 (klo pake modem ya GATEWAY nya modem)
klik panel System->Administration->Network trus meminta password administrasi, maka masukan password user yang pertama kali dibuat. Pilih bagian eth0 (network eksternal) lalu klik “Properties” . Uncheck pilihan “Enable roaming mode” lalu ganti “Configuration” menjadi “Static IP Address“. Masukan :
* IP address : 10.10.1.81
* Subnet mask : 255.255.255.0
* Gateway address : 10.10.1.1 (Gateway di isi sesuai dengan ip modem ato alat yg konek internet tu pokoke)
Lalu klik tombol “OK“.
Pilih bagian eth1 (network internal) lalu klik “Properties” . Uncheck pilihan “Enable roaming mode” lalu ganti “Configuration” menjadi “Static IP Address“. Masukan :
* IP address : 192.168.0.1
* Subnet mask : 255.255.0.0
* Gateway address :
Lalu klik tombol “OK“.
Gateway pada eth1 dikosongkan, karena router harus menentukan default gateway-nya. Sedangkan default gateway yang digunakan adalah yang melalui eth0.
Lanjuttt …. Pilih tab “General“. Masukan :
* Host name : PCrouter
* Domain name : Nyobain.com
Pilih tab “DNS“
Klik “Add” pada bagian “DNS Servers” lalu masukan IP Address dns servernya yaitu 127.0.0.1, tekan enter. Itu Kita memasukan IP Address localhost (127.0.0.1) karena kita akan menggunakan DNS local untuk semua manajemennya. Ato klo make koneksi lainnya disesuaikan aja yah.
Klik “Add” pada bagian “Search domains” lalu masukan Nyobain.com, tekan enter
Tekan tombol “Close” apabila konfigurasi sudah sesuai. Secara otomatis seharusnya IP Address sudah terkonfigurasi sendiri, apabila masih belum maka bisa direstart networknya atau restart aja komputernya
2. Konfigurasi IP Forward
IP Forward adalah suatu system yang berfungsi untuk meneruskan paket-paket dari suatu jaringan ke jarinagn yang lain. Untuk mengkonfigurasinya, kita perlu mengubah modul kernel ip_forward menjadi enable. Tapi sebelumnya ubah password root dahulu biar gak ngerepotin nantinya. Klik panel System->Administration->Users and Groups. Pilih login name “root“, lalu klik Properties. Dibagian “Password“, ubah :
* User password : password_root
* Confirmation : password_root
Atau “Generate random password“, apabila ingin menggunakan password yang dibuat secara random. Lalu klik tombol “OK“.
Untuk mengaktifkan IP Forward, kita dapat mengklik panel Applications->Accecories->Terminal Setelah muncul terminalnya, ketik perintah :
* su -
* Password : password_root
Maka kita sudah masuk ke mode root, dengan ditandai oleh tanda “#” (tanda kress). Lalu dilanjutkan dengan perintah berikut :
* echo “net.ipv4.ip_forward=1? >> /etc/sysctl.conf
* sysctl -p /etc/sysctl.conf
Apabila pada file /etc/systecl.conf sudah terdapat entry-an “net.ipv4.ip_forward=0“, maka ubah saja nilainya menjadi 1. Untuk mengubah nilainya dapat menggunakan editor “pico” ato “vi“ ato “nano” ato apalah perintah linux lainnya. Untuk mengecek apakah IP Forward sudah diaktifkan pada PC, maka jalankan perintah berikut :
* sysctl net.ipv4.ip_forward
Apabila hasilnya adalah 1, maka IP Forward sudah di enable. Selanjutnya paket-paket yang dikirim oleh network sudah dapat diteruskan ke network yang lainnya.
3. Konfigurasi IP yang Dituju pada saat Nge-routing
Perintah yang aku pakai di bawah ini buat ip yang static :
* sudo iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -d 0/0 -j SNAT –to 10.10.1.81
Sedangkan untuk IP yang DHCP bisa pakai cara mas Hanadi :
* sudo iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -d 0/0 -j MASQUERADE
untuk mengecek hasilnya ketikan perintah berikut :
* iptables -L -t nat
Maka akan terlihat seperti berikut :
untuk ip static :
—————cut————–
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
SNAT 0 — 192.168.0.0/24 anywhere to:10.10.1.81
—————cut————–
untuk ip DHCP :
—————cut————–
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE 0 — 192.168.0.0/24 anywhere
—————cut————–
Konfigurasi IP Masquerade tidak bersifat permanen, maka disarankan untuk mengaplikasikan cara berikut :
* pico /etc/init.d/iptables
Isikan file tersebut dengan entry-an berikut :
—–start—–
#!/bin/sh
#
#This is a ubuntu adapted iptables script from gentoo
#(http://www.gentoo.org) which was originally distributed
# under the terms of the GNU General Public License v2
#and was Copyrighted 1999-2004 by the Gentoo Foundation
#
#This adapted version was intended for and ad-hoc personal
#situation and as such no warranty is provided.
IPTABLES_SAVE=”/etc/default/iptables-rules”
SAVE_RESTORE_OPTIONS=”-c”
SAVE_ON_STOP=”yes”
checkrules() {
if [ ! -f ${IPTABLES_SAVE} ]
then
echo “Not starting iptables. First create some rules then run”
echo “\”/etc/init.d/iptables save\””
return 1
fi
}
save() {
echo “Saving iptables state”
/sbin/iptables-save ${SAVE_RESTORE_OPTIONS} > ${IPTABLES_SAVE}
}
start(){
checkrules || return 1
echo “Loading iptables state and starting firewall”
echo -n “Restoring iptables ruleset”
start-stop-daemon –start –quiet –exec /sbin/iptables-restore — ${SAVE_RESTORE_OPTIONS} &2
exit 1
;;
esac
exit 0
setting IP Ubuntu server
1. Edit file konf. network :
$sudo pico /etc/network/interfaces2. Restart service network
#sample config :
#------------------------------------
auto eth0
iface eth0 inet static
address 172.22.22.222
netmask 255.255.255.0
#------------------------------------
$sudo /etc/init.d/networking restart3. Cek hasil konf :
$ ifconfig
Pengetahuan Dasar Grouping
Group as Group (Ctrl+G)
Berfungsi untuk menggabungkan objek yang terseleksi. Kemudian kita dapat memasukkan effek untuk group tersebut.
Catatan : Karena Group tidak memiliki timeline sendiri, maka SWiSH Max merubah semua objek yang memiliki effek menjadi Movie Clip sebelum di-group.
Group as Button
Berfungsi untuk menggabungkan objek yang terseleksi menjadi tombol.
Group as Movie Clip
Berfungsi untuk menggabungkan objek yang terseleksi menjadi Movie Clip.
Group as Shape
Berfungsi untuk menggabungkan objek yang terseleksi menjadi satu buah objek.
Catatan:
- Berfungsi ketika kita ingin menggunakan beberapa objek (shape) atau teks menjadi mask. Sebelum menjadi mask, group dahulu beberapa objek tersebut menjadi satu objek (Group as Shape)
- Objek dengan effek atau event tidak dapat di group menjadi satu shape
- Ketika menu Group as Shape diaktifkan, akan muncul pertanyaan ‘Make the overlapped regions of objects with the same fill style empty?’. Jika kita pilih Yes, bagian objek yang bertumpang tindih dan dengan warna yang sama akan menjadi kosong.
- Jika kita gunakan objek gabungan tersebut sebagai mask, maka bagian objek yang bertumpang tindih akan menjadi kosong.
- Jika kita menginginkan bagian tersebut tidak kosong, maka aktifkan pilihan ‘Fill overlaps’ pada Shape Panel.
- Setelah ter-group menjadi satu shape, garis tepi objek yang di belakang akan menjadi tampak.
Memecah sebuah Group atau Movie Clip menjadi beberapa Objek.
Perbedaan Pada Ubuntu
Ubuntu server
Kubuntu
Official site Kubuntu: http://www.kubuntu.org
Wikipedia: http://en.wikipedia.org/wiki/Kubuntu
Xubuntu
Official site: http://www.xubuntu.org
Wikipedia: http://en.wikipedia.org/wiki/Xubuntu
Edubuntu
Official site: http://www.edubuntu.org
Wikipedia: http://en.wikipedia.org/wiki/Edubuntu
Gobuntu
Informasi lebih lanjut seputar Gobuntu: http://www.ubuntu.com/products/whatisubuntu/gobuntu
Wikipedia: http://en.wikipedia.org/wiki/Gobuntu
Ubuntu Studio
Official site : http://ubuntustudio.org
Wikipedia: http://en.wikipedia.org/wiki/Ubuntu_Studio
Ubuntu JeOS
Filesize: 151 MB ISO Image
Kernel 2.6.22
Dioptimalkan untuk VMWare ESX, VMWare Server
Arsitektur Intel atau AMD x86
Memori (RAM) minimum 128 MB
Mythbuntu
Official site: http://www.mythbuntu.org
Wikipedia: http://en.wikipedia.org/wiki/Mythbuntu
Ubuntu mobile edition
List Situs Flash Untuk Inspirasi
Element
Ge
Gears Of War – Emergence Day
Widget Tags for Layouts Blogspot
<b:widget> tags for creating widgets are described in Page Element Tags for Layouts.If you just want to use the Page Elements tab to work with everything,then that's all you need to know. However, if you want morefine-grained control, this article describes what you can put inside awidget, if you're working in the "Expand Widget Templates" mode of theEdit HTML page. <b:widget [...attributes...] />becomes this:<b:widget [...attributes...]>
</b:widget>Includes
Widget content is contained in "includable" sections, which have this format:The attributes are as follows:<b:includable id='main' var='thiswidget'>[insert whatever content you want here]</b:includable>
- id: (Required) A unique identifier made up of letters and numbers.
- var: (Optional) An identifier made up of lettersand numbers, for referencing data within this section. (See the datasection below.)
id='main'.This will usually contain most or all of the content that will displayfor this widget, and in many cases it will be all you need.id='new', then you can reference it in your main includable with <b:include name='new' /> and it will display that way.b:include tag are as follows:- name: (Required) An identifier made up of letters and numbers. It must match the ID of an existing
b:includablein the same widget. - data: (Optional) An expression or peice of data to pass on to the includable section. This will become the value of the
varattribute in the includable.
b:includable and b:include.Loops and data are described later in this article. The main thing tounderstand here is how the "main" section includes the "post" sectionwithin it. It passes along a post that it calls "i" and the includedsection references it as its var "p", then prints the title.<b:includable id='main'>
<b:loop var='i' values='posts'>
<b:include name='post' data='i'/>
</b:loop>
</b:includable>
<b:includable id='post' var='p'>
Title: <data:p.title/>
</b:includable>b:includable, then use b:includewherever you want it to appear. If you don't need to do that, then youcan just stick with the single main includable and not worry about therest. (Note that the main includable is included automically -- <b:include name='main'/>Data
data: tag is arguably one of the most importantones, since it's the avenue that brings in all of your actual content.Some examples of this tag are: <data:title/>or
<data:photo.url/>photo, say in the context of a profile widget, may have components such as url, height, and width. Using the "." notation indicates that we want the URL for this photo, rather than a URL from something else.data: tag, and it varies depending on which widget you're working with. We've got a comprehensive list to help you find the data you need.Loops
b:loop tag lets you repeat a section of contentmultiple times. This is most commonly used for printing out each postin a list of posts for a given page, or each comment, or each label,etc. The general format for using loops is this: <b:loop var='identifier' values='set-of-data'>
[repeated content goes here]
</b:loop>postsis a list. Code like the following will loop through each post,printing out the title for each one, with header tags around it. <b:loop var='i' values='data:posts'>
<h2><data:i.title/></h2>
</b:loop>If / Else
b:if and b:else tags to display content in some places but not others. The general format is this:<b:if cond='condition'>
[content to display if condition is true]
<b:else/>
[content to display if condition is false]
</b:if>b:else tag is optional. Without it, the result will be either the content listed in the b:if section or nothing. The closing </b:if> is required in each case, however. allowComments on a post. With other pieces of data, you can compare them with specific values to get a true or false. Here are some examples:<b:if cond='data:post.showBacklinks'>True if the current post is set to show backlinks.<b:if cond='data:blog.pageType == "item"'>True if the current page is an item page (post page).<b:if cond='data:displayname != "Fred"'>True if this is not Fred's display name.<b:if cond='data:post.numComments > 1'>True if the current post has more than one comment.
Fonts and Colors Tags for Layouts blogspot
<head> section of your code, you'll need to have a pair of <b:skin> </b:skin>tags. The CSS style declarations will go in between those tags, alongwith the variable names that make your design work with the Fonts andColors page. Here's a brief example of how it looks, before we get intothe details:
<head>
...
<b:skin>
<style type='text/css'>
/*
* Variable definitions:
* <Variable name='bgcolor' description='Page Background Color'
type='color' default='#fff'/>
*/
body {
background: $bgcolor;
margin: 0;
padding: 40px 20px;
}
</style>
</b:skin>
</head>
/* and */comment tags, so it won't be shown on your blog, but only used byBlogger internally. There will be a list of variables here, one foreach font or color that you want to be editable from the Fonts andColors tab. Each variable is required to have the information shown inthe example above and described here:- name - This name may contain only letters or numbers, and each name in your template must be unique.
- description - This can be a more descriptive name, and can include spaces. This is what will appear in the Fonts and Colors tab.
- type - This can be either "font" or "color".
- default - The default value. For colors, this should be a hexadecimal color code, e.g.
#FF0066. For fonts, it will be a list of the formfont-style font-weight font-size font-family.
$variable_name instead of the actual color or font. In the example above, you can see that we created a variable called bgcolor and set it to white (#fff). Then later on in the code, instead of setting the body background property to white explictly, we just said background: $bgcolor.This still has the effect of making the background white, with thedifference that we can change it easily from the Fonts and Colors tabif we want to.margin: and padding: attributes in the example above). List Widget Blogspot
The simplest form of a list. Each item is just a single piece of text, without any different types of data within it.
- title: The widget title.
- items: The list of items.
Link List Widget Blogspot
A slightly fancier list, where each item has two parts to it: the text and the link.
- title: The widget title.
- links: The list of links, each of which contains:
- name: The link's text.
- target: The link's URL.
Logo Widget blogspot
- fullButton: The URL of the Blogger button you've selected.
Picture Widget Blogspot
- title: The title of the widget.
- sourceUrl: The URL of the image.
- width: The image's width, in pixels.
- height: The image's height, in pixels.
- caption: The image caption.
Labels Widget Blogspot
The labels widget includes a list of all labels that are in use on the blog.
- title: The widget title.
- labels: The list of labels, each of which contains:
- name: The text of the label.
- count: How many posts have this label.
- url: A link to a page displaying posts with this label.
Text / HTML / JavaScript Widget Blogspot
- title: The widget's title.
- content: The content of the widget.
Feed Widget Blogspot
- title: The widget's title.
- feedUrl: The URL of the feed.
Blog Archives Blogspot
- title: The title of the widget.
- style: One of 'MENU', 'FLAT', or 'HIERARCHY'.
- data: A list of each archive unit, each of which contains:
- name: The name of this archive interval, e.g. "August 2006."
- url: The link to the page containing posts from this interval.
- post-count: How many posts there are in this interval.
Profile Widget Blogspot
photo data, you'll use notation such as <data:photo.url/>.- title: The title of the widget.
- userUrl: The author's profile URL.
- location: The location from the author's profile.
- aboutme: The "About Me" information from the profile.
- displayname: The author's display name.
- photo: The user's profile photo, made up of the following:
- url: The photo URL.
- width: The photo's width, in pixels.
- height: The photo's height, in pixels.
- alt: The "alt" text for the photo.
- title: The title of the widget.
- authors: The list of all authors, each of which contains the following:
- displayname: The author's display name.
- userURL: The author's profile URL.
data:team variable to distinguish between the two cases. E.g. <b:if cond='data:team=="true"'> (display multiple authors) </b:if>Blog Posts Blogspot
- feedLinks: A list of feeds for this page. Onthe main page, this will contain the main blog feeds; on item pages,this will also contain comments feeds. Each item in this list containsthe following:
- url: The feed URL.
- name: The feed name (i.e. 'Posts' or 'Comments').
- feedType: The type of feed (Atom or RSS).
- mimeType: The mime type of the feed.
- olderPageUrl:If there are older posts than the ones on the current page, this is aURL to those posts. Context-sensitive for page type. (Not all pageswill have this link.)
- olderPageTitle: Title of the link to the older page of posts.
- newerPageUrl: The newer equivalent of olderPageUrl.
- newerPageTitle: The newer equivalent of olderPageTitle.
- commentLabel: The phrase to use to show the number of comments, e.g. "comments."
- authorLabel: The phrase to use to indicate who wrote the post, e.g. "posted by."
- timestampLabel: The phrase to use to indicate when the post was written, e.g. "posted at."
- postLabelsLabel: Phrase to introduce the list of post labels, e.g. "labels for this post."
- backlinksLabel: Phrase to describe backlinks to this post, e.g. "links to this post."
- posts: A list of all posts for this page. Each post contains the following:
- dateHeader: The date of this post, only present if this is the first post in the list that was posted on this day.
- id: The numeric post ID.
- title: The post's title.
- body: The content of the post.
- author: The display name of the post author.
- url: The permalink of this post.
- timestamp: The post's timestamp. Unlike dateHeader, this exists for every post.
- labels: The list of the post's labels. Each label contains the following:
- name: The label text.
- url: The URL of the page that lists all posts in this blog with this label.
- isLast: True or false. Whether this label is the last one in the list (useful for placing commas).
- allowComments: 'True' if this post allows comments.
- numComments: The number of comments on this post.
- showBacklinks: Whether to show backlinks for this post.
- numBacklinks: Number of backlinks for this post.
- addCommentUrl: The URL of the 'add a comment' form for this post.
- emailPostUrl: The URL of the 'email this post' form for this post.
- editUrl: The URL of the edit form for this post.
- feedLinks:A list of feeds specific to this post. (This is different from theoverall blog feedLinks, as it may contain a feed for the post'scomments, for instance.) Each contains the following:
- url: The feed URL.
- name: The feed name (e.g. 'Posts' or 'Comments').
- feedType: The type of feed (Atom or RSS).
- mimeType: The mime type of the feed.
- comments: A list of all comments for this post (on item pages only). Each contains the following:
- id: The numeric ID of the comment.
- body: The body of the comment.
- timestamp: The time the comment was created.
- author: The display name of the comment's author, or 'Anonymous'.
- authorUrl: URL of the comment author's profile, if the comment is not anonymous.
- deleteUrl: The URL for deleting this comment.
- isDeleted: Whether this comment has been deleted. (The text of deleted comments is replaced with a placeholder.)











