Global Constants
Global Constants and Variables
Here's an overview of the main global constants and variables.
Objects
Traditional globals variables are almost entirely eliminated from Hotaru. Instead, class methods and properties are accessible through the Hotaru class, i.e.:
- $h - the main Hotaru object
- $h->db - database
- $h->lang - language (array)
- $h->cage - Inspekt input validation and filtering
- $h->plugin - used only to access plugin properties in the Plugin class
- $h->currentUser - you, i.e. the person logged in and viewing the site, provides access to user functions in UserAuth and UserBase
- $h->post - provides persistent access to the Post class
- $h->comment - provides persistent access to the Comment class
- $h->avatar - provides persistent access to the Avatar class
- $h->includes - provides persistent access to the Include CssJs class
- $h->debug - provides persistent access to the Debug class
- $h->email - provides persistent access to the EmailFunctions class
Database:
- DB_USER
- DB_PASSWORD
- DB_NAME
- DB_HOST
- DB_PREFIX
- DB_LANG
Database tables:
- TABLE_BLOCKED
- TABLE_CATEGORIES
- TABLE_COMMENTS
- TABLE_COMMENTVOTES
- TABLE_FRIENDS
- TABLE_MESSAGING
- TABLE_MISCDATA
- TABLE_PLUGINS
- TABLE_PLUGINHOOKS
- TABLE_PLUGINSETTINGS
- TABLE_POSTS
- TABLE_POSTMETA
- TABLE_POSTVOTES
- TABLE_SETTINGS
- TABLE_TAGS
- TABLE_TEMPDATA
- TABLE_USERS
- TABLE_USERMETA
- TABLE_USERACTIVITY
- TABLE_WIDGETS
CONSTANTS
Absolute URL Path, e.g. http://example.com/ :
Absolute Server Path, e.g. /home/username/public_html/ :
- BASE
- ADMIN
- CACHE
- INSTALL
- LIBS
- EXTENSIONS
- FUNCTIONS
- CONTENT
- THEMES
- PLUGINS
- ADMIN_THEMES
Settings, pulled from the database settings table (details here):
Note: These are all strings.
- SITE_OPEN
- SITE_NAME
- THEME
- ADMIN_THEME
- LANGUAGE_PACK
- FRIENDLY_URLS
- SITE_EMAIL
- DB_CACHE
- DB_CACHE_DURATION
- RSS_CACHE
- RSS_CACHE_DURATION
- CSS_JS_CACHE
- HTML_CACHE
- DEBUG
- SMTP
- SYS_FEEDBACK
JQUERY CONSTANTS
A small number of constants get passed directly into the document object model at the time of page loading for use with jQuery.
- BASEURL
- ADMIN_THEME
- THEME