mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-23 15:18:58 +01:00
299 lines
4.9 KiB
HTML
299 lines
4.9 KiB
HTML
<HTML
|
|
><HEAD
|
|
><TITLE
|
|
>Guidelines</TITLE
|
|
><META
|
|
NAME="GENERATOR"
|
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
|
|
REL="HOME"
|
|
TITLE="phpGroupWare Docs V0.05"
|
|
HREF="book1.html"><LINK
|
|
REL="UP"
|
|
TITLE="Developers Documentation"
|
|
HREF="p261.html"><LINK
|
|
REL="PREVIOUS"
|
|
TITLE="Introduction"
|
|
HREF="devintro.html"><LINK
|
|
REL="NEXT"
|
|
TITLE="Installing your application"
|
|
HREF="devinstall.html"></HEAD
|
|
><BODY
|
|
CLASS="CHAPTER"
|
|
><DIV
|
|
CLASS="NAVHEADER"
|
|
><TABLE
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TH
|
|
COLSPAN="3"
|
|
ALIGN="center"
|
|
>phpGroupWare Docs V0.05</TH
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="left"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="devintro.html"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="80%"
|
|
ALIGN="center"
|
|
VALIGN="bottom"
|
|
></TD
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="right"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="devinstall.html"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"></DIV
|
|
><DIV
|
|
CLASS="CHAPTER"
|
|
><H1
|
|
><A
|
|
NAME="DEVGUID"
|
|
>Chapter 22. Guidelines</A
|
|
></H1
|
|
><DIV
|
|
CLASS="TOC"
|
|
><DL
|
|
><DT
|
|
><B
|
|
>Table of Contents</B
|
|
></DT
|
|
><DT
|
|
><A
|
|
HREF="devguid.html#AEN277"
|
|
>Requirements</A
|
|
></DT
|
|
><DT
|
|
><A
|
|
HREF="devguid.html#AEN300"
|
|
>Writing/porting your application</A
|
|
></DT
|
|
></DL
|
|
></DIV
|
|
><DIV
|
|
CLASS="SIMPLESECT"
|
|
><H4
|
|
CLASS="SIMPLESECT"
|
|
><A
|
|
NAME="AEN277"
|
|
>Requirements</A
|
|
></H4
|
|
><P
|
|
> These guidelines must be followed for any application that wants
|
|
considered for inclusion into phpGroupWare deluxe.
|
|
</P
|
|
><P
|
|
> <P
|
|
></P
|
|
><UL
|
|
><LI
|
|
STYLE="list-style-type: disc"
|
|
><P
|
|
>It must run on PHP3 and PHP4. </P
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: disc"
|
|
><P
|
|
>SQL statements must be compatible with both MySQL
|
|
and PostgreSQL.</P
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: disc"
|
|
><P
|
|
>It must use our default header.inc.php include.</P
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: disc"
|
|
><P
|
|
>It must use our <TT
|
|
CLASS="CLASSNAME"
|
|
>$phpgw_link($url)</TT
|
|
> for all links
|
|
(this is for session support).</P
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: disc"
|
|
><P
|
|
>It must use "post" for forms.</P
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: disc"
|
|
><P
|
|
>It must respect phpGW group rights and phpGW user permissions.</P
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: disc"
|
|
><P
|
|
>It must use our directory structure, template support and lang
|
|
(multi-language) support.</P
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: disc"
|
|
><P
|
|
>Where possible it should run on both Unix and NT platforms.</P
|
|
></LI
|
|
></UL
|
|
>
|
|
</P
|
|
><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.If you need help converting your
|
|
application to templates and our lang support, we will try to
|
|
connect you with someone to help.
|
|
</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="SIMPLESECT"
|
|
><H4
|
|
CLASS="SIMPLESECT"
|
|
><A
|
|
NAME="AEN300"
|
|
>Writing/porting your application</A
|
|
></H4
|
|
><P
|
|
><I
|
|
CLASS="EMPHASIS"
|
|
>Include files</I
|
|
></P
|
|
><P
|
|
> 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.
|
|
|
|
<TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><PRE
|
|
CLASS="PROGRAMLISTING"
|
|
><?php
|
|
$phpgw_info["flags"]["currentapp"] = "appname";
|
|
include("../header.inc.php");
|
|
?>
|
|
</PRE
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
>
|
|
Of course change application name to fit.
|
|
This include will provide the following things:
|
|
<P
|
|
></P
|
|
><UL
|
|
><LI
|
|
STYLE="list-style-type: disc"
|
|
><P
|
|
>The phpgwAPI - The phpGroupWare API will be loaded.</P
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: disc"
|
|
><P
|
|
>The phpGW navbar will be loaded (by default, but can be disabled until a later point.</P
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: disc"
|
|
><P
|
|
>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. </P
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: disc"
|
|
><P
|
|
>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.</P
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: disc"
|
|
><P
|
|
>appname/inc/footer.inc.php - This file is loaded just before the system footer,
|
|
allowing developers to close connections and whatever else they need.</P
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: disc"
|
|
><P
|
|
>The phpGW footer will be loaded, which closes several connections.</P
|
|
></LI
|
|
></UL
|
|
>
|
|
</P
|
|
></DIV
|
|
></DIV
|
|
><DIV
|
|
CLASS="NAVFOOTER"
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"><TABLE
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="devintro.html"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="book1.html"
|
|
>Home</A
|
|
></TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="devinstall.html"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
>Introduction</TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="p261.html"
|
|
>Up</A
|
|
></TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
>Installing your application</TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
></BODY
|
|
></HTML
|
|
> |