Random Image

Configurable Menu Order

Terminologies
W3 Validator

Valid XHTML 1.0 StrictValid CSS!

Terminologies

In this page, we discuss some concepts of CCMS. You may need this information if you want to modify the system.

Path

Path is part of the URL (web address) received by CCMS when there is a page request. It can be transformed from and into file with a function call internally.

Path does not expose the data type of the corresponding file. This makes URL of pages relatively cleaner than traditional website arrangements.

File

File is internal representation of information piece inside file system.

File extension, like on Microsoft Windows, identifies the correct decoder to decode the page. For instance, a gallery may have file name index.gallery while a html document has file name Hello World.html.

When there are a few files with same name but different extension, only one of them is chosen to serve user.

Path and File Conversion

In order to serve a request, user-provided path has to be converted into file. Conversely, when a file is detected, it has to be converted back to path for making a hyperlink.

In general, path is file (relative to base data directory) name with file extension truncated. In addition, when the file ends with index.extension, the text index is also truncated. This is similar to DirectoryIndex in Apache HTTP Server. The unknown factors of extensions are resolved by trial and error on file system.

Assuming base directory path is ./demo_document, the following may be a list of relations between path and file. Note that the file extension is not defined in path but condition of files inside file system.

Path File Decoder
/ ./demo_document/index.php PHP
/Hello World ./demo_document/Hello World.html HTML
/My Photos ./demo_document/My Photos/index.gallery Gallery

Decoder

Decoder is a piece of PHP code to interpret a file. A file is only interpreted with a single decoder when it is served. Through out the interpretation, a lot of possibilities are possible. Please see the Decoders page for more information.

Module

Modules are executed after decoder has finished running. There are four areas where modules can be attached, namely left, right, top and bottom. Modules allow re-using common parts within a web site, e.g. navigation menu, W3C validation, etc.

Modules are marked to execute within settings PHP script. Decoders have chance to switch off modules that when they are in charge of a file. For example, gallery decoder can switch off download module to avoid duplication of information.

Template

Template is a piece of code running after both the correct decoder and modules have executed. It combines decoder's and modules' output onto the same page as final output.

In some occasion, template may be skipped. This can be done by setting $ccms_template = false. It is especially useful when the output is not html where html formatting is inappropriate.

At the time of writing, there is only one template - default.

Library

Libraries are pieces of code provided by third party.

Please note that libraries may carry their own licensing information, and interfere further extension of this program. CCMS has, and will continue, to have best effort selecting BSD- and MIT- licensed code as libraries. This free developers from the need to release derived source code.

At the time of writing, there is only PHP Markdown Extra, which is in BSD license applied.

Powered by Charray's CMS.