Knowledge Base / Category / e107 Constants

e107 Constants

X-Frame-Options

Constant for override default behaviour in e107_config.php

When you want to use your site in an iframe. It's forbidden by default.
X-FRAME-SAMEORIGIN

Example: 

define('X-FRAME-SAMEORIGIN', false);

News constants

Constants used in news plugin, mostly from legacy reason
NEWS_NEXTPREV_NAVCOUNT number of navigation items to be shown, minimal allowed value is 4, default is 10 define('NEWS_NEXTPREV_NAVCOUNT', 6);  in theme.php

User classes constants

Userclass names versus numbers saved in database

What e_UC_PUBLIC and similar constants mean and what value is saved in database
e_UC_PUBLIC0
e_UC_MAINADMIN250
e_UC_READONLY251
e_UC_GUEST252
e_UC_MEMBER253
e_UC_ADMIN254
e_UC_NOBODY255
e_UC_ADMINMOD 249 Admins (includes main admins)
e_UC_MODS248 Moderators (who aren't admins)
e_UC_NEWUSER 247Users in 'probationary' period
e_UC_BOTS246Reserved to identify search bots
e_UC_SPECIAL_BASE243Assign class IDs 243 and above for fixed/special purposes
e_UC_SPECIAL_END255Highest 'special' class
// 243..245 reserved for future predefined user classes

e107 Directory Constants

e107_config.php + e107_class.php

Default directories are possible to override in the config file using directory code + "_DIRECTORY" (variable with this name). Using "_SYSTEM" for relative paths has higher priority, the same for absolute paths with "_HTTP".

e_ADMIN $ADMIN_DIRECTORY
e_ADMIN_ABS e_HTTP.$ADMIN_DIRECTORY or $ADMIN_HTTP
e_IMAGE $IMAGES_DIRECTORY
e_IMAGE_ABS e_HTTP.$IMAGES_DIRECTORY

available in replaceConstants()

e_THEME $THEMES_DIRECTORY
e_THEME_ABS e_HTTP.$THEMES_DIRECTORY

available in replaceConstants()

e_PLUGIN $PLUGINS_DIRECTORY
e_PLUGIN_ABS e_HTTP.$PLUGINS_DIRECTORY

used in replaceConstants()

e_FILE $FILES_DIRECTORY
e_FILE_ABS [deprecated] e_HTTP.$FILES_DIRECTORY

used in replaceConstants()

e_HANDLER $HANDLERS_DIRECTORY
e_HANDLER_ABS e_HTTP.$HANDLERS_DIRECTORY
e_LANGUAGEDIR $LANGUAGES_DIRECTORY
e_LANGUAGEDIR_ABS e_HTTP.$LANGUAGES_DIRECTORY
e_DOCS
e_DOCS_ABS
e_DOCROOT
e_DOWNLOAD $MEDIA_DIRECTORY
e_DOWNLOAD_ABS NOT USED
e_MEDIA $MEDIA_DIRECTORY

e_MEDIA_ABS e_HTTP.$MEDIA_DIRECTORY

used in replaceConstants()

e_MEDIA_FILE $ret['MEDIA_DIRECTORY'].'files/'  or $MEDIA_FILES_DIRECTORY

e_MEDIA_FILE_ABS

used in replaceConstants()

e_MEDIA_VIDEO $ret['MEDIA_DIRECTORY'].'videos/';
e_MEDIA_VIDEO_ABS used in replaceConstants()
e_MEDIA_IMAGE $ret['MEDIA_DIRECTORY'].'files/'
e_MEDIA_IMAGE_ABS used in replaceConstants()
e_MEDIA_ICON_ABS used in replaceConstants()
e_AVATAR $ret['MEDIA_DIRECTORY'].'avatars/'
e_AVATAR_ABS used in replaceConstants()
e_JS_ABS $ret['WEB_DIRECTORY'].'js/' used in replaceConstants()
e_CSS_ABS $ret['WEB_DIRECTORY'].'css/' used in replaceConstants()
e_WEB_IMAGE_ABS $ret['WEB_DIRECTORY'].'images/' used in replaceConstants()
e_WEB_ABS
media upload directory default: $ret['SYSTEM_DIRECTORY'].'temp/' Code: 'MEDIA_UPLOAD_DIRECTORY']
classic upload directory default: $ret['MEDIA_UPLOAD_DIRECTORY']; Code: 'UPLOADS_DIRECTORY'