Archive for March, 2009

KomunitasWeb March 2009 Summary

KomunitasWeb summary for march 2009.

PHP

Continue reading »

HTML Wireframe with Polypage

polypage

What is PolyPage?

Polypage is jQuery plugin to help you build wireframe. It was designed to ease the process of showing multiple states in html mock-ups. You can do this by adding class names to your html mock-ups.

See the demo.

Where can I get PolyPage?

You can get the latest version from the github repository.

How to use PolyPage

After download the PolyPage files, you need to include jQuery, jQuery cookie plugin, jQuery PolyPage plugin, and don’t forget to include PolyPage stylesheet file.

Continue reading »

42 Pagination Design Inspiration

pagination

Pagination is navigation for browsing through part of large dataset. It has simple function, add user experience for your user to browse your site. But hey, it doesn’t need to be ugly. Here pagination gallery to inspire you build your next pagination.

Continue reading »

CakePHP ACL Tutorial – What and How

CakePHP ACL

In this tutorials, I’ll show you everything you need to know to get started with CakePHP ACL. First you need to know what is ACL, and how ACL is implemented in CakePHP. Are you ready?

What

ACL or Access Control List is security concept about permission. It’s contain a list of permission to access some of resources. It specify who and what is allowed to access something.

In CakePHP ACL is used to specify users access to a controller, or specific action of a controller. Before we get to the how to section, there are a few terms we have to understand first.

  • Access Request Object (ARO) is defined who want to access or request object. In simple term, it will be a user or group. This list of user or group is stored in table called ‘aros’.
  • Access Control Object (ACO) is defined object that is being protected from a user or a group. In other word ACO related with which controller or action of controller you want to protect. ACO is stored in table called ‘acos’.

‘acos’ and ‘aros’ table is created automatically when you initialize the DB Acl tables (we’ll get into this later in how to part). Along with those table, there is table called ‘aros_acos’ which specify relationship between ARO and ACO. In english it will be mean which user has permission to a controller or action of controller.
Continue reading »

CodeIgniter Tutorials to Help You Get Started

Do you like CodeIgniter? Here a CodeIgniter round up collection to help you get started with this framework.

Introduction and Basic CodeIgniter Tutorial

  1. Introduction to Code Igniter: Part 1 – CodeIgniter introduction, get started with Model, View, and Controller in CodeIgniter
  2. Introduction to Code Igniter: Part 2 – Form and validation.
  3. Introduction to Code Igniter: Part 3 – Working with database.
  4. Everything You Need to Get Started With CodeIgniter – Introduction to CodeIgniter, installation and sample
    application.
  5. Building a Complete CodeIgniter Application: Part 1 - Installation and configuration.
  6. Building a Complete CodeIgniter Application: Part 2 – Feed parsing using SimplePie, unit testing and database.
  7. Building a Complete CodeIgniter Application: Part 3 -Handle security issue.

Basic

  1. Templating With CodeIgniter – Basic templating with CodeIgniter.
  2. Code Igniter Template Tutorial -Another template tutorial for CodeIgniter.
  3. Forms in CodeIgniter Views – Form tutorial in CodeIgniter.
  4. Pagination with Code Igniter – Build pagination system in CodeIgniter
  5. CodeIgniter: Interacting With a Database – Get close with database.

Need more advanced tutorials? Fine, we have here.
Continue reading »

Email Validation Challenge

My post about validating an email using regular expression seem cause so many reaction. Rather than arguing, let’s figure out what the best solution to validate an email address. And everyone could learn in the process.

So, here the question. How you validate an email format?

So for I pick this one, but it is in PHP. Not a universal solution.

if (filter_var('test+email@fexample.com', FILTER_VALIDATE_EMAIL)) {
    echo "Your email is ok.";
} else {
    echo "Wrong email address format.";
}

Give your solution in the comment, and I’ll post the 10 best solutions. Do you have a better solution? Please don’t keep it in your treasure box.

101 PHP Tutorials for PHP Programmer Wannabe

When I type this, google for ‘php tutorial’ result 8,950,000 pages. Yes, there are tons of great tutorial about PHP. But when you’re a beginner, it will make you confuse what tutorials you should read. Either it’s too complicated or just waste your time.

So, here the shortcut. Take it and be a better PHP programmer by tomorrow. Hmm, maybe not that fast. But here they are.

WebMonkey

  1. PHP Tutorial for Beginners

PHP 101: PHP For the Absolute Beginner

  1. PHP 101 (part 1) Down the Rabbit Hole – An introduction to PHP’s variables and operators.
  2. PHP 101 (part 2) Calling All Operators – The rest of the PHP operators (there are many), and simple form processing.
  3. PHP 101 (part 3) Looping the Loop – Basic control structures explained.
  4. PHP 101 (part 4) The Food Factor – Arrays, PHP array functions, and what it all means.
  5. PHP 101 (part 5) Rank and File – Everything you’re ever likely to need to know about dealing with external files from a PHP script.
  6. PHP 101 (part 6) Functionally Yours – All about functions, arguments, passing by reference, globals and scope.
  7. PHP 101 (part 7) The Bear Necessities – A gentle introduction to object oriented programming in PHP 4 and PHP 5.
  8. PHP 101 (part 8) Databases and Other Animals – All about connecting to a MySQL database from PHP, using the mysql or mysqli extensions.
  9. PHP 101 (part 9) SQLite My Fire! – Introducing another database: SQLite.
  10. PHP 101 (part 10) A Session In The Cookie Jar – Sessions and cookies – how to keep track of visitors to your site.
  11. PHP 101 (part 11) Sinfully Simple – An introduction to PHP’s easiest method for dealing with XML.
  12. PHP 101 (part 12) Bugging Out – Basic error handling.
  13. PHP 101 (part 13) The Trashman Cometh – A primer in basic security.
  14. PHP 101 (part 14) Going to the Polls – Putting the pieces together – a first Web application.
  15. PHP 101 (part 15) No News is Good News – Creating a simple RSS news aggregator.

Continue reading »

CodeIgniter Tutorial – To do list application part 3

ci_logo_flame

Let’s take a look at our to do list application.

By now, you have familiarize your self with CodeIgniter framework. It is take a while to know everything, but if you keep learning then someday you will get there.

If you have completed last tutorial, then you have a to do list application based on CodeIgniter framework. It’s not complete, but at least working.

But if there is something you don’t understand, you could stop by, give a comment or ask me. Or maybe you want to correct me. That’s fine. We all learning here.

Let’s go build another features.
Continue reading »

10 Practical PHP Regular Expression Recipes

Latest update Email validation seems quite tricky. Do you have a better solution? Let’s have email validation challenge. And give the user the best way to validate an email format.

Mastering regex or regular expression is one advantages for you as programmer, but not everyone has time to learn something.

Not knowing how regex works doesn’t mean you couldn’t use the power of regex in your project.

Bookmark this list, so you can always going back here whenever you need this regex recipes.

Update :
Never though, my post will reach so many people, and cause so many reaction. But thank you to everyone, as I myself learn from my mistake.
Some credit goes to Joey Sochacki as I did use and modify some of his regular expression.

Continue reading »

.htaccess What, Why, When and How

What

.htaccess is a file with a power to override certain configurations in the Apache httpd.conf file. If you’re using shared hosting, then you don’t have access to Apache main configuration. So most of shared hosting will provide you with .htaccess file.

Definition from Wikipedia :

.htaccess (hypertext access) is the default name of directory-level configuration files that allow for decentralized management of configuration when placed inside the web tree.

Why

You have your site up and running, but then again you ask yourself, why you need to configure and tweak your .htaccess.

If you think your site can run without dealing with .htaccess, then you absolutely right. But to optimize your website in term of bandwidth or rewrite your url to look nice in front of search engine, you have to know .htaccess.

Continue reading »