E107 Constants

From e107 Wiki
Jump to: navigation, search

e107 Wiki: English | Русский | Deutsch | Français | Magyar | Português | Български | Česky | Nederlands | Ελληνικά | Italiano | Norske | Polska | Slovenščina | Español | Svenska | Translate: Wiki | Page


Current Release 1.0.4 | e107.org | Download | Changelog | Forum | Plugins | Themes | RSS Feed of Latest Changes | Atom Feed of Latest Changes

How to write a plugin
Main page > I : First Aid > II : Development > III : Administration > IV : How To's > V : Plugin Writing > VI : Theming & Shortcodes

This page is a stub. You can help e107 by expanding it.

e107 Constants

A number of constants are defined 'on the fly' for use within the code, links and so on.

Historically most of these constants were created relative to the base URL of the e107 installation; others now exist that generate aspects of an 'absolute' or full URL.

address is in relation to the full URL
(ie. for a URL http://e107.org/e107_plugins/login/login.php, the e107 base is simply / ).
address is a relative to the position of the file
(ie. for a URL http://e107.org/e107_plugins/login/login.php , the e107 base is ../../ ).

This is especially useful for those who wish to Change your e107 folder names

For the following examples, we will use this baseline URL:


Please note there is another list of standard defined constants: Standard_Defines.

The constants are as follows: (Some of these need confirming.)

e107 Constants
Constant Abs/Rel Sample Path Purpose
e_SELF Abs Filename URL (e.g. "http:// www.mysite.com/mybase /e107_admin/admin.php") Holds the complete URL, other than the query string (if any)
e_QUERY Text view.all Holds the full query string
(string after *.php?)
Note: e_SELF.(e_QUERY ? "?".e_QUERY : "") provides the complete URI.
e_HTTP Abs /mybase/ Absolute base directory of the installation
e_BASE Rel ../ The path to the base e107 directory, relative to current folder.
e_BASE_SELF Rel ../e107_admin/admin.php Current URL, in base-relative form. This is easily translated to normal query form.
e_ADMIN Rel ../e107_admin/ Admin files directory (e.g.
e_IMAGE Rel ../e107_images/ Subdirectory for all images
e_THEME Rel ../e107_themes/ Subdirectory for all themes
e_PLUGIN Rel ../e107_plugin/ Subdirectory for all plugins
e_FILE Rel ../e107_files/ Subdirectory for various files
e_HANDLER Rel ../e107_handlers/ Subdirectory for various code handlers
e_LANGUAGEDIR Rel ../e107_languages/ Base language file directory
e_ADMIN_ABS Abs /mybase/e107_admin/ Admin Files
e_IMAGE_ABS Abs /mybase/e107_image/ Images
e_THEME_ABS Abs /mybase/e107_theme/ Themes
e_PLUGIN_ABS Abs /mybase/e107_plugin/ Plugins
e_FILE_ABS Abs /mybase/e107_files/ Files
e_HANDLER_ABS Abs /mybase/e107_handlers/ Handlers
e_LANGUAGEDIR_ABS Abs /mybase/e107_languages/ Languages
e_DOCS Rel ../e107_docs/help Help files directory
e_DOCS_ABS Abs /mybase/e107_docs/help Help files directory
e_DOCROOT Abs $_SERVER['DOCUMENT_ROOT'] Server-specific information - note that not all servers support this, and it may be removed in future versions
e_DOWNLOAD Varies downloads Public downloads base directory
MAINTHEME Abs site theme Directory of active site theme
PREVIEWTHEME Rel preview_theme Preview theme base directory (if active)
PREVIEWTHEMENAME Text N/A Name of theme being previewed (if active)
SITEURL Abs http:// www.yoursite.com / Absolute site URL
SITEURLBASE Abs http:// www.yoursite.com Base site URL
THEME Rel current_theme Directory of currently active theme
THEME_ABS Abs current_theme Base directory of currently active theme
USER Rel Is existing user Set if existing user
USERID Rel 1 ID as assigned by e107 to user
USERNAME Rel username Display Name (user_name in user table) for current user
USERTHEME Rel user theme Directory of specific active user's theme
USEREMAIL you@domain.com Display Email (user_email in user table) for current user

PHP constants to know
e_SELF Rel refering page actual page
please add the content of the page Category:Constants in here and erase the article