Skip to main content


developerWorks  >  Open source  >

Create an interactive production wiki using PHP, Part 2: Developing the basic wiki code

Fueling Criki with user registration, entry storage, and custom markup rendering

developerWorks

Level: Intermediate

Duane O'Brien (d@duaneobrien.com), PHP developer, Freelance

06 Mar 2007

Register now or sign in using your IBM ID and password.

This "Create an interactive production wiki using PHP" series creates a wiki from scratch using PHP, with value-added features useful for tracking production. Wikis are widely used as tools to help speed development, increase productivity, and educate others. Each part of the series develops integral parts of the wiki until it is complete and ready for primetime, with features including file uploading, a calendaring "milestone" system, and an open blog. The wiki will also contain projects whose permissions are customizable to certain users.

In this tutorial

This tutorial focuses on writing the core code for the wiki engine. With the database in place, your next task is getting the wiki engine up and running, including user creation, signing in, rendering the markup, page creation, file uploads, and more. With these tasks done, your application ("Criki") will take a definite shape. Covered topics include:

  • User registration

  • Page creation

  • Rendering markup

  • File uploads

Prerequisites

It is assumed that you have some experience working with PHP and MySQL. We won't be doing a lot of deep database tuning, so as long as you know the basic ins and outs, you should be fine. You may find it helpful to download and install phpMyAdmin, a browser-based administration console for your MySQL database.


System requirements

Before you begin, you need to have an environment in which you can work. The general requirements are reasonably minimal:

  • An HTTP server that supports sessions (and preferably mod_rewrite). This tutorial was written using Apache V1.3 with mod_rewrite enabled.
  • PHP V4.3.2 or later (including PHP V5). This was written using PHP V5.0.4
  • Any version of MySQL from the last few years will do. This was written using MySQL V4.1.15.

You'll also need a database and database user ready for your application to use. The tutorial will provide syntax for creating any necessary tables in MySQL.

Additionally, to save time, we will be developing Criki using a PHP framework called CakePHP. Download CakePHP by visiting CakeForge.org and downloading the latest stable version. This tutorial was written using V1.1.13. For information about installing and configuring CakePHP, check out the tutorial series titled "Cook up Web sites fast with CakePHP."



Formats

html, pdf


Share this....

digg Digg this story del.icio.us del.icio.us Slashdot Slashdot it!


Back to top


Document options

Document options requiring JavaScript are not displayed


My developerWorks needs you!

Connect to your technical community


More in this series:
Create an interactive production wiki using PHP