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) |

===== pluck 4.6 variables ===== In pluck 4.6, there were no constants yet, but variables. These variables are still listed below. ^ Variable ^ What does it do? ^ Introduced in version ^ Area ^ |

$pluck_version
| Contains the version of pluck you're running. | 4.6 | all | |
$site_title
| Contains the title of the website. | 4.6 | all | |
$site_langfile
| Contains the language file used (for example //en.php//). | 4.6 | all | |
$site_lang
| Contains the two-letter code of the language used (for example //en//). | 4.6 | all | |
$site_email
| Contains email adress set by the user. | 4.6 | all | |
$site_theme
| Contains theme set by the user. | 4.6 | all | |
$current_page_filename
| Contains the filename of the current page (for example //kop1.php//). | 4.6 | site | |
$current_module_dir
| Contains the directory of the module that's being executed (for example //blog//). | 4.6 | site | |
$current_module_page
| Contains the module page that's being executed (for example //viewalbum//). | 4.6 | site | |
$page_title
| Contains the name of the current page. | 4.6 | site |

bx0

Clone this wiki locally