$THEME_TEMPLATE_DIR The fully qualified path to the theme template directory.. $REL_TEMPLATE_DIR The Web relative path to the template directory used.. $LD_RESPONSE_TEMPLATE Name of the
Trang 1Like all other applications we’ve developed in this book, the document publishing applications also use a standard set of configuration, message, and error files These files are discussed in the following sections
The main configuration file
The primary configuration file for the entire document publishing system is called ld.conf Table 8-2 discusses each configuration variable
T ABLE 8-2 LD.CONFVARIABLES Configuration Variable Purpose
$PEAR_DIR Set to the directory containing the PEAR
package; specifically the DB module needed for
class.DBI.phpin our application framework
$PHPLIB_DIR Set to the PHPLIB directory, which contains the
PHPLIB packages (specifically, the
template.incpackage needed for template manipulation)
$APP_FRAMEWORK_DIR Set to our application framework directory
$PATH Set to the combined directory path consisting of
$PEAR_DIR, $PHPLIB_DIR, and
$APP_FRAMEWORK_DIR This path is used with the ini_set()method to redefine the
php.inientry for include_pathto include
$PATHahead of the default path This allows PHP to find our application framework, PHPLIB, and PEAR-related files
$AUTHENTICATION_URL Set to the central login application URL
$LOGOUT_URL Set to the central logout application URL
$HOME_URL Set to the topmost URL of the site If the URL
redirection application does not find a valid URL
in the e-campaign database to redirect to for a valid request, it uses this URL as a default
Continued
Trang 2Configuration Variable Purpose
$APPLICATION_NAME Internal name of the application
$DEFAULT_LANGUAGE Set to the default (two-character) language
code
$ROOT_PATH Set to the root path of the application
$REL_ROOT_PATH Relative path to the root directory
$REL_APP_PATH Relative application path as seen from the web
browser
$TEMPLATE_DIR The fully qualified path to the template
directory
$THEME_TEMPLATE_DIR The fully qualified path to the theme template
directory
$REL_PHOTO_DIR The Web-relative path to the photo directory
used to store user photos
$PHOTO_DIR The fully qualified path to the photo directory
$DEFAULT_PHOTO Name of the default photo file, which is used
when a user does not have a photo in the photo directory
$CLASS_DIR The fully qualified path to the class directory
$REL_TEMPLATE_DIR The Web relative path to the template directory
used
$CATEGORY_CLASS Name of the Category class file
$RESPONSE_CLASS Name of the Response class file
$MESSAGE_CLASS Name of the Message class file This class is
developed for the MOTD application, discussed
in the Chapter 7
$LD_MNGR Name of the application that shows document
indexes for a given category or all categories
$LD_DETAILS_MNGR Name of the application that shows document
details
Trang 3responses to documents.
$LD_ADMIN_MNGR Name of the application that allows
administrative users to manage categories
$LD_VISIT_LIST_MNGR Name of the application that allows users to
view document-tracking information
$LD_DB_URL The fully qualified URL for the database used to
store the documents and categories
$LD_CATEGORY_TBL Name of the category table in the database
$LD_DOC_TBL Name of the document table in the database
$LD_RESPONSE_TBL Name of the response table in the database
$USER_PREFERENCE_TBL Name of the user preference table in the
database
$MESSAGE_TBL Name of the MOTD message table in the
database
$LD_CAT_PUB_TBL Name of the category publishers table in the
database
$LD_CAT_VIEW_TBL Name of the category viewers table in the
database
$LD_TRACK_TBL Name of the document tracking data table in
the database
$MSG_VIEWER_TBL Name of the message viewer list table in the
database
$AUTH_DB_TBL Name of the user authentication table in the
database
$STATUS_TEMPLATE Name of the status template file used to display
status messages
$LD_HOME_TEMPLATE Name of the document index template file
$LD_DETAILS_TEMPLATE Name of the document details template file
$LD_RESPONSE_TEMPLATE Name of the document response entry form
template file
Continued
Trang 4Configuration Variable Purpose
$LD_VIEW_RESPONSE_TEMPLATE Name of the document response view template
file
$ADD_MOD_DOC_TEMPLATE Name of the add/modify document entry form
template file
$ADD_MOD_CATEGORY_TEMPLATE Name of the add/modify category entry form
template file
$ANNOUNCE_LD_ADDED_TEMPLATE Name of the new document announcement
message template file
$ANNOUNCE_LD_MOD_TEMPLATE Name of the document modification
announcement message template file
$LD_VISIT_LIST_TEMPLATE Name of the document track listing template
file
$LD_REORDER_CAT_TEMPLATE Name of the category reordering entry form
template file
ODD_COLOR Color defined for odd rows when displaying
tabular data such as document track listing
EVEN_COLOR Color defined for even rows when displaying
tabular data such as document track listing
$ratings Defines an associative array used to display
response rating information
USER_DB_URL The fully qualified authentication database URL
LD_ADMIN_TYPE The administrative user type value
CAT_PER_LINE The number of categories per row to show in a
navigation table, which is created in the navigation file
SEPARATOR The characters that separate each navigation
entry (category) in the navigation, which is created in the navigation file
LD_UPDATE_TITLE The MOTD message header used to announce
updated documents via MOTD
LD_ADD_TITLE The MOTD message header used to announce
new documents via MOTD
Trang 5navigation file Ideally, you should set this to a path that is outside your Web document tree and the files in this directory should have only read/write permissions for the Web server user which runs the PHP scripts
$LD_CATEGORY_NAV_OUTFILE The category navigation file created by the
simple document publishing system
$LD_CATEGORY_NAV_TEMPLATE The category navigation template file used to
generate the navigation file pointed by
$LD_CATEGORY_NAV_OUTFILE
$DEFAULT_THEME The default theme index in the
$THEME_TEMPLATEarray
$USER_DEFAULTS A user’s theme and auto tip default settings
$TIP_URL The Web-relative path for the tip files
$MAX_AVAILABLE_TIP The maximum number of tips from which to
display the tip
$THEME_TEMPLATE[n] The list of theme templates
$PRINT_TEMPLATE[n] The list of print templates associative with the
theme templates
The directory structure used in the ld.conffile supplied in ch8directory on the CD-ROM may need to be tailored to your own system’s requirements Here is what the current directory structure looks like:
htdocs ($ROOT_PATH same as %DocumentRoot%)
| + -home (base intranet application discussed in chapter 7)
| |
| + -templates
| |
| + -themes (theme templates used by all intranet apps) < +
| |