The toplevel contains a variety of directories in addition to the files
config.php, the gateway index.php and various readme files.
attachments/ A world-writeable repository for files attached to resources.
core/ The core PHP code for WIKINDX containing classes
organized by function into directories
docs/ The WIKINDX documentation.
files/ A world-writeable directory where WIKINDX deposits its
exported RTF, BibTeX files etc. The file export classes will create new
directories within this named for the user's SESSION_ID. Since some compression
programs will not add empty directories to the ZIP file when packaging a
WIKINDX release, the files/ directory always has the file FILE within it.
languages/ Language/localization files used by WIKINDX.
modules/ A world-writeable directory used for user-installed plug-in modules.
styles/ Bibliographic style files used by WIKINDX.
templates/ Template files used by WIKINDX.
update/ Contains files used by WIKINDX when installing/upgrading/updating
the system. These files are SQL text files used by
core/systemcheck/SYSTEMCHECK.php to install or upgrade database structures.
1/ index.php is the gatekeeper to the system and has three functions:
a) to check WIKINDX has been configured correctly;
b) to authorize access (via the AUTHORIZE class) and
c) once authorization has been obtained, to parse the 'action' variable
from the HTTP query string and launch the appropriate class and method.
All usage in WIKINDX goes via index.php. Barring any errors, the browser print string $pString (see below) is finally returned to index.php and passed to the CLOSE class for closure of the script.
2/ Two variables
obtained in index.php can be passed by name through the classes to the
constructor of each class:
a) $this->db is the database object obtained
from the database abstraction class core/sql/SQL.php and
b) $this->vars is an associative array that is a
duplication of $HTTP_POST_VARS, $HTTP_GET_VARS, $_POST or
$_GET: whichever core/init/INIT.php decides is being used.
3/ All WIKINDX classes are found in the 'core/' folder within wikindx2/.
4/ Each WIKINDX class file will contain only one class of the same name (see above) although it may contain a variety of methods.
5/ All WIKINDX files must have the standard GNU GPL license at the top.
In the vast majority of cases, printing to the browser occurs only when CLOSE is created as a new object (this is normally done at the end of index.php). Not printing WIKINDX output to the browser as the scripts progresses allows any error messages causing script termination to be cleanly printed and not mixed up with other data.
By convention, $pString or, in some cases, $this->pString such as in
SYSTEMCHECK, is used as a concatenated browser output
string that is usually the return from a class method and that, along with the
database object (see above), is returned to the CLOSE class
new CLOSE($db,$pString);as the final stage of the script.