mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-28 01:29:05 +01:00
63 lines
3.0 KiB
Plaintext
63 lines
3.0 KiB
Plaintext
<chapter id="devguid">
|
|
<title>Guidelines</title>
|
|
|
|
<simplesect>
|
|
<title>Requirements</title>
|
|
<para>
|
|
These guidelines must be followed for any application that wants
|
|
considered for inclusion into phpGroupWare deluxe.
|
|
</para>
|
|
<para>
|
|
<itemizedlist mark=bullet>
|
|
<listitem><para>It must run on PHP3 and PHP4. </para></listitem>
|
|
<listitem><para>SQL statements must be compatible with both MySQL
|
|
and PostgreSQL.</para></listitem>
|
|
<listitem><para>It must use our default header.inc.php include.</para></listitem>
|
|
<listitem><para>It must use our <classname>$phpgw_link($url)</classname> for all links
|
|
(this is for session support).</para></listitem>
|
|
<listitem><para>It must use "post" for forms.</para></listitem>
|
|
<listitem><para>It must respect phpGW group rights and phpGW user permissions.</para></listitem>
|
|
<listitem><para>It must use our directory structure, template support and lang
|
|
(multi-language) support.</para></listitem>
|
|
<listitem><para>Where possible it should run on both Unix and NT platforms.</para></listitem>
|
|
</itemizedlist>
|
|
</para>
|
|
<para>
|
|
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.If you need help converting your
|
|
application to templates and our lang support, we will try to
|
|
connect you with someone to help.
|
|
</para>
|
|
</simplesect>
|
|
<simplesect>
|
|
<title>Writing/porting your application</title>
|
|
<para><emphasis>Include files</emphasis></para>
|
|
<para>
|
|
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.
|
|
|
|
<programlisting>
|
|
<?php
|
|
$phpgw_info["flags"]["currentapp"] = "appname";
|
|
include("../header.inc.php");
|
|
?>
|
|
</programlisting>
|
|
Of course change application name to fit.
|
|
This include will provide the following things:
|
|
<itemizedlist mark=bullet>
|
|
<listitem><para>The phpgwAPI - The phpGroupWare API will be loaded.</para></listitem>
|
|
<listitem><para>The phpGW navbar will be loaded (by default, but can be disabled until a later point.</para></listitem>
|
|
<listitem><para>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. </para></listitem>
|
|
<listitem><para>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.</para></listitem>
|
|
<listitem><para>appname/inc/footer.inc.php - This file is loaded just before the system footer,
|
|
allowing developers to close connections and whatever else they need.</para></listitem>
|
|
<listitem><para>The phpGW footer will be loaded, which closes several connections.</para></listitem>
|
|
</itemizedlist>
|
|
</para>
|
|
</simplesect>
|
|
</chapter> |