mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-30 11:53:57 +01:00
5f45b54f92
Added docs on the DB based lang() function, and the standard return codes. Ran the whole thing through aspell to clean up typos.
64 lines
3.0 KiB
HTML
64 lines
3.0 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
|
|
<TITLE> phpGroupWare Application Development: Guidelines</TITLE>
|
|
<LINK HREF="phpGW_Developers-HOWTO-3.html" REL=next>
|
|
<LINK HREF="phpGW_Developers-HOWTO-1.html" REL=previous>
|
|
<LINK HREF="phpGW_Developers-HOWTO.html#toc2" REL=contents>
|
|
</HEAD>
|
|
<BODY>
|
|
<A HREF="phpGW_Developers-HOWTO-3.html">Next</A>
|
|
<A HREF="phpGW_Developers-HOWTO-1.html">Previous</A>
|
|
<A HREF="phpGW_Developers-HOWTO.html#toc2">Contents</A>
|
|
<HR>
|
|
<H2><A NAME="s2">2. Guidelines</A></H2>
|
|
|
|
<H2><A NAME="ss2.1">2.1 Requirements</A>
|
|
</H2>
|
|
|
|
<P>These guidelines must be followed for any application that wants considered for inclusion into phpGroupWare deluxe.
|
|
<P>It must run on PHP3 and PHP4. <BR>
|
|
SQL statements must be compatible with both MySQL and PostgreSQL.<BR>
|
|
It must use our default header.inc.php include.<BR>
|
|
It must use our <CODE>$phpgw_link($url)</CODE> for all links (this is for session support).<BR>
|
|
It must use "post" for forms.<BR>
|
|
It must respect phpGW group rights and phpGW user permissions.<BR>
|
|
It must use our directory structure, template support and lang (multi-language) support.<BR>
|
|
Where possible it should run on both Unix and NT platforms.
|
|
<P>For applications that do not meet these requirements, they can be available to users via the phpGroupWare Apps project, or whatever means the developers decide.<BR>
|
|
If you need help converting your application to templates and our lang support, we will try to connect you with someone to help.
|
|
<H2><A NAME="ss2.2">2.2 Writing/porting your application</A>
|
|
</H2>
|
|
|
|
<H3>Include files</H3>
|
|
|
|
<P>Each PHP page you write will need to include the header.inc.php along with a few variables.<BR>
|
|
This is done by putting this at the top of each PHP page.
|
|
<HR>
|
|
<PRE>
|
|
<?php
|
|
$phpgw_info["flags"]["currentapp"] = "appname";
|
|
include("../header.inc.php");
|
|
?>
|
|
</PRE>
|
|
<HR>
|
|
|
|
Of course change application name to fit.<BR>
|
|
This include will provide the following things:
|
|
<UL>
|
|
<LI> The phpgwAPI - The phpGroupWare API will be loaded.</LI>
|
|
<LI> The phpGW navbar will be loaded (by default, but can be disabled until a later point.</LI>
|
|
<LI> appname/inc/functions.inc.php - This file is loaded just after the phpgwAPI and before any HTML code is generated. This file should include all your application specific functions.. You are welcome to include any additional files you need from within this file.</LI>
|
|
<LI> appname/inc/header.inc.php - This file is loaded just after the system header/navbar, and allows developers to use it for whatever they need to load.</LI>
|
|
<LI> appname/inc/footer.inc.php - This file is loaded just before the system footer, allowing developers to close connections and whatever else they need.</LI>
|
|
<LI> The phpGW footer will be loaded, which closes several connections.</LI>
|
|
</UL>
|
|
<P>
|
|
<HR>
|
|
<A HREF="phpGW_Developers-HOWTO-3.html">Next</A>
|
|
<A HREF="phpGW_Developers-HOWTO-1.html">Previous</A>
|
|
<A HREF="phpGW_Developers-HOWTO.html#toc2">Contents</A>
|
|
</BODY>
|
|
</HTML>
|