Next Previous Contents

2. Guidelines

2.1 Requirements

These guidelines must be followed for any application that wants considered for inclusion into phpGroupWare proper.

It must run on PHP3 and PHP4.
SQL statements must be compatible with both MySQL and PostgreSQL.
It must use our default header.inc.php include.
It must use our $phpgw_link($url) for all links (this is for session support).
It must respect phpGW group rights and phpGW user permissions.
It must use our directory structure, template support and lang (multi-language) support.
Where possible it should run on both Unix and NT platforms.

For applications that do not meet these requirements, we will store them in a seperate location, indicating their status.
If you need help converting your application to templates and our lang support, we will try to connect you with someone to help.

2.2 Writing/porting your application

Include files

Each PHP page you write will need to include the header.inc.php along with a few variables.
This is done by putting this at the top of each PHP page.


  <?php
  $phpgw_flags["currentapp"] = "newapp";
  include("../header.inc.php");
  ?>

Of course change application name to fit.
This will include the standard functions, verify the sessionid, rights to the application, and will toss in the navbar.

If you have other includes, or functions that need to be inserted/run before the navbar replace


  $phpgw_flags["currentapp"] = "newapp";

with
  $phpgw_flags["currentapp"] = "newapp";
  $phpgw_flags["nonavbar"] = True;

Then when you are done you need to display the navbar by adding this line:
     $phpgw->common->navbar();


Next Previous Contents