Skip to content
Sander50 edited this page Apr 10, 2014 · 3 revisions

If you are working on code for pluck (whether this is code for a module, for a theme or you are working on the main code), there are some built in constants you can use. This page lists them in an easy table.

The area listed in the table below, refers to the area in which you can use the variable. We have two areas:

  • site - you can use the constant on the main site only
  • all - you can use the constant in both the admin center and on the main site
Constant Default value Introduced in version Area
PLUCK_VERSION
| The version of pluck. | 4.7 | all
SITE_URL
| The complete URL of your pluck installation. | 4.7 | all
SITE_TITLE
| The site title. | 4.7 | all
EMAIL
| E-mail address set by the user. | 4.7 | all
LANG
| Language set by the user (for example 'en') | 4.7 | all
LANG_FILE
| Language set by the user (for example 'en.php') | 4.7 | all
PAGE_DIR
| Directory where pages are stored (normally 'data/settings/pages') | 4.7 | all
THEME
| Theme set by the user (for example 'default') | 4.7 | all
THEME_DIR
| Complete directory of theme (for example 'data/themes/default') | 4.7 | all
DIRECTION_RTL
| Is set to TRUE if an RTL-language is used. | 4.7 | all
PAGE_URL_PREFIX
| The URL prefix on the main site for fetching a page (normally '?file=') | 4.7 | all
HOME_PAGE
| Seo name (used in URLs) of the first page. | 4.7 | all
MODULE_DIR
| The complete directory of the currently active module (for example 'data/modules/blog'). | 4.7 | all
MODULE_SETTINGS_DIR
| The complete settings directory of the currently active module (for example 'data/settings/modules/blog'). | 4.7 | all
CURRENT_MODULE_DIR
| The directory of the currently active module (for example 'blog') | 4.7 | site
CURRENT_MODULE_PAGE
| The current page of the currently active module. | 4.7 | site
CURRENT_PAGE_FILENAME
| The complete filename of the current page. | 4.7 | site
CURRENT_PAGE_SEONAME
| The complete seoname (used in URLs) of the current page. | 4.7 | site
PAGE_TITLE
| The title of the current page | 4.7 | site
ALBUMS_DIR
| Complete directory where albums are stored (normally 'data/settings/modules/albums'). | 4.7 | all (specified in albums module)
BLOG_POSTS_DIR
| Complete directory where blog posts are stored (normally 'data/settings/modules/blog/posts'). | 4.7 | all (specified in blog module)
BLOG_CATEGORIES_DIR
| Complete directory where blog categories are stored (normally 'data/settings/modules/blog/categories'). | 4.7 | all (specified in blog module)
TINYMCE_DIR
| Complete directory where TinyMCE files are located (data/modules/tinymce/lib). | 4.7 | all (specified in tinymce module)
WYSIWYG_TEXTAREA_CLASS
| This constant is given as HTML class to textarea-elements that should be transformed into a WYSIWYG-editor (TinyMCE by default). | 4.7 | all (specified in tinymce module)

bx0

Clone this wiki locally