Translations of this page?:
General
Getting & Giving Support
Administration
Design
- Tut. - Layouts and Themes
- Tut. - Navigation cookbook
- Tut. - How To section
Reference Material
Plugin Development
- Tut. - Writing a plugin
- Ref. - List of Events
- Ref. - Enabling cron jobs
- Ref. - PHPDoc
Core Development
- Ref. - PHPDoc
Press information
Wolf CMS books section
Table of Contents
Introduction
There are a number of system constants available to make plugin development simpler. See also the explanations for some of these in the Functions and Constants reference list.
Paths
| Constant | What it is | Example |
|---|---|---|
| APP_PATH | Path of wolf core directory | /var/www/html/wolf/app |
| CMS_ROOT | Path of wolf install | /var/www/html |
| CORE_ROOT | Path of wolf app directory | /var/www/html/wolf |
| FROG_ROOT | Same as CMS_ROOT. For backwards support. To be removed before 0.9.0 | |
| PLUGINS_ROOT | Path of wolf plugins directory | /var/www/html/wolf/plugins |
| THEMES_ROOT | Path of Wolf themes directory. 1) | CMS_ROOT/public/themes |
URLs
| Constant | What it is | Example |
|---|---|---|
| ADMIN_DIR | The web addess of Wolf's backend2) | http://www.mywebsite.com/admin/ |
| PLUGINS_URI | The web address of your Wolf plugin directory with trailing slash 3) | http://www.mywebsite.com/wolf/plugins/ |
| THEMES_URI | The web address of your Wolf themes directory with trailing slash 4) | http://www.mywebsite.com/public/themes/ |
| URI_PUBLIC | Relative location of your Wolf install | / in web root; /wolfcms/ in subdir |
| URL_PUBLIC | The web address of your Wolf install | ttp://www.mywebsite.com/ |
| BASE_URL | The web address of your Wolf install taking into account if you use mod_rewrite | http://www.mywebsite.com/ |
| BASE_URI | Relative location of your Wolf install taking mod_rewrite into account | / in web root; /wolfcms/ in subdir |
| URL_SUFFIX | The extension of URLs | .html |
| USE_MOD_REWRITE | If mod_rewrite (nice URLs) is enabled | true/false |
Database
| Constant | What it is | Example |
|---|---|---|
| DB_DSN | The DSN (type/address of the database) | mysql:dbname=cms_database;host=localhost;port=3306 |
| TABLE_PREFIX | The prefix attached to all table names | wolfcms_ |
| __CMS_CONN__ | PDO Database Connection | $pdo = $__CMS_CONN__->prepare($sql); Please note that it is preferred for you to use Record::getConnection() which also returns a PDO Database connection. |
2)
See instructions for renaming the admin folder.
Except where otherwise noted, content on this wiki is licensed under the following license:GNU Free Documentation License 1.2
