This chapter is an overall tour of the CartoWeb code structure. It briefly explains the role of each directory. When available, links to relevant chapters of this documentation are also provided.
After installation, CartoWeb has the following directory structure:
-
client
: Client specific code files -
client_conf
: Client configuration files, see Chapter 4, Configuration Files. -
common
: Common client and server code files -
coreplugins
: Basic mandatory plugins-
images
: Image generation, see Chapter 8, Image Format Options -
layers
: Layers management, see Chapter 6, Layers -
location
: Navigation, see Chapter 7, Navigation -
mapquery
: Perform queries based on a set of selected id's, see Section 9.2.2, “MapServer Query Configuration” -
query
: Perform queries on layers, see Chapter 9, Queries -
statictools
: Distance and surface calculation. -
tables
: Table rules management, see Section 9.1.2, “Tables Configuration”
-
-
documentation
: documentation-
apidoc
: PHP source code documentation -
user_manual/source
: DocBook XML source of the present documentation
-
-
htdocs
: Web accessible directory-
css
: css files -
gfx
: icons files -
js
: javascript files
-
-
include
: libraries used by CartoWeb -
locale
: locale files for internationalization purposes, see Chapter 16, Internationalization -
log
: logs, mainly used for development and debug purposes. -
plugins
: Standard, but not mandatory plugins, see Section 2.3, “Plugins”-
auth
: authentication plugin, see Chapter 15, Security Configuration -
exportCsv
: Csv export plugin, see Section 11.3, “CSV Export” -
exportHtml
: HTML export plugin, see Section 11.2, “HTML Export” -
exportPdf
: PDF export plugin, see Chapter 12, PDF Export -
hello
: test plugin -
hilight
: hilight plugin, see Section 9.3.3, “Hilight Configuration” -
outline
: redlining and annotations, see Chapter 10, Annotation and Redlining
-
-
po
: PO templates files, used for gettext translation system, see Section 16.1.2, “PO Templates” -
projects
: CartoWeb user projects dir, see Section 2.4, “Projects” -
scripts
: maintenance and administration scripts -
server
: CartoWeb server code files -
server_conf
: Cartoweb server-side configuration files, see Section 4.3, “Server Configuration Files” -
templates
: CartoWeb Smarty templates files, see Chapter 17, Templating -
templates_c
: smarty templates cached files -
tests
: CartoWeb unit tests suite, mainly used for development and debug purposes -
www-data
: writable and web accessible directories for generated files-
icons
: Generated icons -
images
: Mapserver images -
mapinfo_cache
: Client-side server configuration cache, see Section 5.6, “Caches Configuration” -
mapresult_cache
: Client requests and associated server results cache, see Section 5.6, “Caches Configuration” -
pdf
: Pdf generated cache files -
soapxml_cache
: Client SOAP XML requests and associated server results cache, see Section 5.6, “Caches Configuration” -
wsdl_cache
: Client-side WSDL cache, see Section 5.6, “Caches Configuration”
-
Modularity is a key feature of CartoWeb. Its functionalities are packaged in logical sets called plugins, that aim to be independent from each other, although some dependencies cannot be totally avoided. Some plugins (core plugins) cannot be disabled, while the other ones must be explicitly loaded in the server and/or client configuration files.
Nearly all plugins have configuration options set in .ini files. The full description of these options makes the bulk of this user manual.
Modifying existing plugins or writing new ones requires some acquaintance with PHP5, as it involves some coding. The related documentation is thus reported to the developer's part of this manual (see Section 2.1, “ What are Plugins”), but that shouldn't deter anybody from experimenting with it.
Each plugin directory contains one or more subdirectories. Here are all the possible subdirectories:
-
client
: Client-side plugin code -
common
: Client and server code -
htdocs
: Web accessible directory -
server
: Server-side plugin code -
templates
: Smarty templates
The aim of projects in CartoWeb is to clearly separate mainstream files from project-specific files. Developers should thus only work in projects, and not modify/add/delete files in the root directory. This will ensure smooth updates.
The directory /projects/my_project
has exactly
the same structure as the root directory shown above: Section 2.2, “Global Directory Structure”
Files added in directory /projects
override
corresponding files of the root directory. For instance, if you want to
change the layers template (i.e. basically the representation of the
layers hierarchy), simply copy the default
/coreplugins/layers/templates/layer.tpl
to
projects/my_project/coreplugins/layers/templates/layer.tpl
and make your changes there.
For more information about projects, see Chapter 3, Projects Handling.