Throughout this documentation, you will see numerous references to locations like DIR_CFG, DIR_PIC, or DIR_ICO, so it's good to know what this all means, and why it is fixed paths are never specified.
Well, first of all, the reason why the actual paths of files or directories are not specified is because the directory structure within Theia is configurable.
If you take a look at Theia's configuration file (DIR_CFG/core.cfg.php; on a default installation, this will be cfg/core.cfg.php), you will see lots of define statements, accompanied by a variable name representing different directories, and the relative paths of those directories.
What this does is allows you to rename Theia's directories, for privacy, personal, security or other reasons. Some directories (mainly sub-directories of other DIR directories) do not have their own DIR_*** constant, but most of the directories do.
So while the default installation of Theia might place the location of DIR_LIB to lib, you can change this to be something entirely different, and rename the directory itself. But pay close attention, because, unless otherwise specified, all DIR_*** paths should be relative! The reason for this is because, most of directories contain one or more files which will need to be accessible through your site, and because of this must be relative to your BASE setting.
Let's suppose we wanted to change DIR_LIB from lib to "theia/library". First we would need to find the line in DIR_CFG/core.cfg.php where DIR_LIB is defined. Look for this:
PHP CODEdefine(DIR_LIB, "lib");
Change it to this:
PHP CODEdefine(DIR_LIB, "theia/library");
Of course, if you do this, it also means you must rename your "lib" directory to "library" and move it into a sub-directory you've named "theia".
Default settings
If you don't make any changes to the directory structure of Theia, then the location of the DIR_*** directories can be found at:
- DIR_LIB = lib
- DIR_PIC = pics
- DIR_ICO = pics/icons
- DIR_FLA = pics/flags
- DIR_ADS = pics/ads
- DIR_EML = lib/eml
- DIR_LAN = lib/lang
- DIR_THE = themes
- DIR_ADM = lib/adm
- DIR_QUI = quiz
- DIR_LOG = log
- DIR_USR = user
- DIR_PLU = lib/plugins
- DIR_SND = sounds
- DIR_EVT = lib/event*
- DIR_FON = lib/fonts*
* Both DIR_EVT and DIR_FON can be absolute or relative.
All paths should NOT end with a trailing slash!






