ยป Functions & Predefined Constants

 

If you are making a template or writing your own addon, the following predifined constants and functions are available and can be used / called:

ADMIN_USERNAME:
Site admin login name, e.g. "admin"
ADMIN_PASSWORD:
Site admin password, e.g. "mypassword"
CFG_ADMIN_EMAIL:
Site admin email where messages, notifications, alerts etc. will be sent, e.g. "admin@yourdomain.com"
CFG_SITE_NAME:
Name of the site, e.g. "My Site"
CFG_SITE_SLOGAN:
Site slogan e.g. "we are the best in this business"

CFG_MAX_FILESIZE:
The configured largest file size, in bytes, allowed to be uploaded by admin/agents/members.
CFG_TIME_FORMAT:
The format in which date and time are configured to be displayed, see php manual for syntax http://www.php.net/date

CFG_SITE_URL:
Full url of the site, e.g.. http://www.yourdomain.com
CFG_SITE_PATH:
Full physical server root path "/user/home/".
CFG_CONTENT_PATH:
Full server path to the directory where content files are located, e.g. "/user/home/content/"
CMS_DATA_PATH:
Server path to the directory where data files are located/stored, e.g. "/user/home/content/data".
CFG_THEMES_PATH:
Full server URL to the directory where themes are located, e.g. "/user/home/themes".
CMS_THEME_PATH: 
Full server path of the current theme (default) , e.g. "/user/home/themes/mytheme".
CFG_ADDONS_PATH:
Full server path to the directory where the addons are located, e.g. "/user/home/content/addons".
CMS_ADDON_PATH:  
Full path of the current addon (in use), e.g. "/user/home/addons/guestbook".

cms_page_caption()
cms_filename_clead($filename)
cms_search_box($fieldname)
cms_page_search($keywords)
cms_force_download($filename)
cms_page_display($pagename)
cms_file_save($filename, $data)
cms_file_upload($destination, $allowed_extensions)
cms_filesize_format($file)