egroupware_official/doc/developers/phpGW_Developers-HOWTO-6.html
sjb4891 263fdedd2a Added $phpgw->common->phpgw_footer() function, and changed all
places that were including the footer.inc.php to use the function.

Re-arrange phpgw.inc.php to include optional classes after reading the DB config
misc bugfixes.
2000-09-29 05:24:18 +00:00

125 lines
7.4 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: Configuration Variables</TITLE>
<LINK HREF="phpGW_Developers-HOWTO-7.html" REL=next>
<LINK HREF="phpGW_Developers-HOWTO-5.html" REL=previous>
<LINK HREF="phpGW_Developers-HOWTO.html#toc6" REL=contents>
</HEAD>
<BODY>
<A HREF="phpGW_Developers-HOWTO-7.html">Next</A>
<A HREF="phpGW_Developers-HOWTO-5.html">Previous</A>
<A HREF="phpGW_Developers-HOWTO.html#toc6">Contents</A>
<HR>
<H2><A NAME="s6">6. Configuration Variables</A></H2>
<H2><A NAME="ss6.1">6.1 Introduction</A>
</H2>
<P>phpGroupWare attempt to provide developers with as much information about the user, group, server, and application configuration as possible.<BR>
To do this we provide a multi-dimensional array called '$phpgw_info[]', which includes all the information about your environment.<BR>
Due to the multi-dimensional array approach. getting these values is easy. <BR>
Here are some examples:
<HR>
<PRE>
&lt;?php
// To do a hello username
echo "Hello " . $phpgw_info["user"]["fullname"];
//If username first name is John and last name is Doe, prints: 'Hello John Doe'
?>
&lt;?php
// To find out the location of the imap server
echo "IMAP Server is named: " . $phpgw_info["server"]["imap_server"];
//If imap is running on localhost, prints: 'IMAP Server is named: localhost'
?>
</PRE>
<HR>
<H2><A NAME="ss6.2">6.2 User information</A>
</H2>
<P><CODE>$phpgw_info["user"]["userid"] = </CODE>The user ID.<BR>
<CODE>$phpgw_info["user"]["sessionid"] = </CODE>The session ID<BR>
<CODE>$phpgw_info["user"]["theme"] = </CODE>Selected theme<BR>
<CODE>$phpgw_info["user"]["private_dir"] = </CODE>Users private dir. Use phpGroupWare core functions for access to the files.<BR>
<CODE>$phpgw_info["user"]["firstname"] = </CODE>Users first name<BR>
<CODE>$phpgw_info["user"]["lastname"] = </CODE>Users last name<BR>
<CODE>$phpgw_info["user"]["fullname"] = </CODE>Users Full Name<BR>
<CODE>$phpgw_info["user"]["groups"] = </CODE>Groups the user is a member of<BR>
<CODE>$phpgw_info["user"]["app_perms"] = </CODE>If the user has access to the current application<BR>
<CODE>$phpgw_info["user"]["lastlogin"] = </CODE>Last time the user logged in.<BR>
<CODE>$phpgw_info["user"]["lastloginfrom"] = </CODE>Where they logged in from the last time.<BR>
<CODE>$phpgw_info["user"]["lastpasswd_change"] = </CODE>Last time they changed their password.<BR>
<CODE>$phpgw_info["user"]["passwd"] = </CODE>Hashed password.<BR>
<CODE>$phpgw_info["user"]["status"] = </CODE>If the user is enabled.<BR>
<CODE>$phpgw_info["user"]["logintime"] = </CODE>Time they logged into their current session.<BR>
<CODE>$phpgw_info["user"]["session_dla"] = </CODE>Last time they did anything in their current session<BR>
<CODE>$phpgw_info["user"]["session_ip"] = </CODE>Current IP address<BR>
<H2><A NAME="ss6.3">6.3 Group information</A>
</H2>
<P><CODE>$phpgw_info["group"]["group_names"] = </CODE>List of groups.<BR>
<H2><A NAME="ss6.4">6.4 Server information</A>
</H2>
<P><CODE>$phpgw_info["server"]["server_root"] = </CODE>Main installation directory<BR>
<CODE>$phpgw_info["server"]["include_root"] = </CODE>Location of the '<CODE>inc</CODE>' directory.<BR>
<CODE>$phpgw_info["server"]["temp_dir"] = </CODE>Directory that can be used for temporarily storing files<BR>
<CODE>$phpgw_info["server"]["files_dir"] = </CODE>Directory er and group files are stored<BR>
<CODE>$phpgw_info["server"]["common_include_dir"] = </CODE>Location of the core/shared include files.<BR>
<CODE>$phpgw_info["server"]["template_dir"] = </CODE>Active template files directory. This is defaulted by the server, and changeable by the user.<BR>
<CODE>$phpgw_info["server"]["dir_separator"] = </CODE>Allows compatibility with WindowsNT directory format,<BR>
<CODE>$phpgw_info["server"]["encrpytkey"] = </CODE>Key used for encryption functions<BR>
<CODE>$phpgw_info["server"]["site_title"] = </CODE>Site Title will show in the title bar of each webpage.<BR>
<CODE>$phpgw_info["server"]["webserver_url"] = </CODE>URL to phpGroupWare installation.<BR>
<CODE>$phpgw_info["server"]["hostname"] = </CODE>Name of the server phpGroupWare is installed upon.<BR>
<CODE>$phpgw_info["server"]["charset"] = </CODE>default charset, default:<CODE>iso-8859-1</CODE><BR>
<CODE>$phpgw_info["server"]["version"] = </CODE>phpGroupWare version.<BR>
<H2><A NAME="ss6.5">6.5 Database information</A>
</H2>
<P>It is unlikely you will need these, because $phpgw_info_db will already be loaded as a database for you to use.
<CODE>$phpgw_info["server"]["db_host"] = </CODE>Address of the database server. Usually this is set to localhost.<BR>
<CODE>$phpgw_info["server"]["db_name"] = </CODE>Database name.<BR>
<CODE>$phpgw_info["server"]["db_user"] = </CODE>User name.<BR>
<CODE>$phpgw_info["server"]["db_pass"] = </CODE>Password<BR>
<CODE>$phpgw_info["server"]["db_type"] = </CODE>Type of database. Currently MySQL and PostgreSQL are supported.<BR>
<H2><A NAME="ss6.6">6.6 Mail information</A>
</H2>
<P>It is unlikely you will need these, because most email needs are services thru core phpGroupWare functions.
<CODE>$phpgw_info["server"]["mail_server"] = </CODE>Address of the IMAP server. Usually this is set to localhost.<BR>
<CODE>$phpgw_info["server"]["mail_server_type"] = </CODE>IMAP or POP3<BR>
<CODE>$phpgw_info["server"]["imap_server_type"] = </CODE>Cyrus or Uwash<BR>
<CODE>$phpgw_info["server"]["imap_port"] = </CODE>This is usually 143, and should only be changed if there is a good reason.<BR>
<CODE>$phpgw_info["server"]["mail_suffix] = </CODE>This is the domain name, used to add to email address<BR>
<CODE>$phpgw_info["server"]["mail_login_type"] = </CODE>This adds support for VMailMgr. Generally this should be set to '<CODE>standard</CODE>'.<BR>
<CODE>$phpgw_info["server"]["smtp_server"] = </CODE>Address of the SMTP server. Usually this is set to localhost.<BR>
<CODE>$phpgw_info["server"]["smtp_port"] = </CODE>This is usually 25, and should only be changed if there is a good reason.<BR>
<H2><A NAME="ss6.7">6.7 NNTP information</A>
</H2>
<P><CODE>$phpgw_info["server"]["nntp_server"] = </CODE>Address of the NNTP server.<BR>
<CODE>$phpgw_info["server"]["nntp_port"] = </CODE>This is usually XX, and should only be changed if there is a good reason.<BR>
<CODE>$phpgw_info["server"]["nntp_sender"] = </CODE>Unknown<BR>
<CODE>$phpgw_info["server"]["nntp_organization"] = </CODE>Unknown<BR>
<CODE>$phpgw_info["server"]["nntp_admin"] = </CODE>Unknown<BR>
<H2><A NAME="ss6.8">6.8 Application information</A>
</H2>
<P>Each application has the following information available.
<CODE>$phpgw_info["apps"]["appname"]["title"] = </CODE>The title of the application.<BR>
<CODE>$phpgw_info["apps"]["appname"]["enabled"] = </CODE>If the application is enabled. True or False.<BR>
<CODE>$phpgw_info["server"]["app_include_dir"] = </CODE>Location of the current application include files.<BR>
<CODE>$phpgw_info["server"]["app_template_dir"] = </CODE>Location of the current application tpl files.<BR>
<CODE>$phpgw_info["server"]["app_lang_dir"] = </CODE>Location of the current lang directory.<BR>
<CODE>$phpgw_info["server"]["app_auth"] = </CODE>If the server and current user have access to current application<BR>
<CODE>$phpgw_info["server"]["app_current"] = </CODE>name of the current application.<BR>
<HR>
<A HREF="phpGW_Developers-HOWTO-7.html">Next</A>
<A HREF="phpGW_Developers-HOWTO-5.html">Previous</A>
<A HREF="phpGW_Developers-HOWTO.html#toc6">Contents</A>
</BODY>
</HTML>