- b2evolution CMS User Manual
- Developer Reference
- b2evolution Files
- Codebase Overview
Codebase Overview
This page explains the function of all the folders and files found in the b2evolution root folder.
Folders
Note that each folder also has an index.html
file you can always look at, as a reminder of its function.
/_cache/
folder
This folder holds cached pages. See Caching and Cache Levels. (It was previoulsy called cache
).
When enabled through the advanced collection properties, b2evolution will cache entire pages in this folder.
If this folder is deleted it will be re-created by b2evolution when needed and if your Unix File Permissions allow it.
This folder does not need to be accessed directly through the web. It will be accessed only through PHP.
/_tests/
folder
This folder is not part of the public distribution. It is for testing during development only.
/_transifex/
folder
This folder is not part of the public distribution. It is for working with translatable strings during development only.
/conf/
folder
This folder holds the configuration files for this application (including your database and potentially other passwords!).
This is a configuration folder, it only needs to be accessed by PHP. It does not need to be accessed through the web directly.
See the comments in each file for details about configuration options.
Note: in order to do local testing with different settings than your server settings, you can also override some of your conf settings with files named _config_TEST.php
and _overrides_TEST.php
.
/cron/
folder
This folder holds the cron processor: /cron/cron_exec.php
. This file should be called regularly and automatically in order to execute scheduled tasks.
Currently, you need to refer to your hosting provider in order to set up automatic calls to the jobs inside of this folder.
Depending on how you set up your cron processor, this folder may or may not need to be accessed through the web.
For more information, see: Setting up the Scheduler.
/hstrv/
folder
This folder holds the html services entry points.
Each file in this folder performs a particular function (login, register, post comment, etc.) when called by its url with the appropriate parameters. AJAX calls also go through this folder.
This is a services folder. It needs to be accessed through the web.
/inc/
folder
This folder originally held the includes needed by the main PHP entry points. For example, this folder holds the _main.inc.php
file which handles the main initializations for the application.
In recent versions, this folder also holds a series of sub-folders. Each of these sub-folder is a "module" that groups files pertaining to a specific functionality set (e-g: file management).
Each module follows an MVC (Model - View - Controller) paradigm.
This folder (and its sub-folders) only needs to be accessed by PHP. It does not need to be accessed through the web directly.
For more information, see the index.html
file in that folder.
/install/
folder
This folder holds the install files needed to install or upgrade b2evolution. This folder should be deleted after installation or upgrade and a new folder should be uploaded the next time you wish to upgrade.
This folder needs to be accessed through the web at install time and should be erased after installation.
/locales/
folder
This folder holds the locales. This means it holds the language packs which allow to use the applications in different languages.
Currently, this folder does not need to be accessed through the web but may need later; for localized icons for example.
For more information, see:
/media/
folder
This folder holds the media files (images, sounds, videos, PDF documents…). These files can be uploaded through the back-office (see: The File Manager) and included into posts or other pages presented to the user.
This folder has different subfolders for different File Root. Each of these roots can have different access permissions in the backoffice.
Depending on how you set up $public_acces_to_media
in _advanced.php, this folder may or may not need to be accessed through the web.
/node_modules/
folder
This folder is created automatically if you use Using Grunt. It is not part of the distribution and should not be uploaded to your server.
/plugins/
folder
This folder holds the plugin files. Plugins allow to add third-party extensions to the application.
Plugins can be a single file with the extension .plugin.php
or a sub-folder with the suffix _plugin
. It is recommended to use a sub-folder for each new plugin you may develop. You may also place each old single-file plugin into a folder.
You can add new plugins by copying it into this folder. Once the files are in this folder you still need to install the desired plugins through the back-office in order to activate them.
Depending on the activated plugins, this folder may or may not need to be accessed through the web.
For more information, see: Plugins.
/rsc/
folder
This folder holds the resource files. Resource files are presentation elements used to construct the user interface. This includes icons, CSS and even Javascript.
This folder holds general purpose resources. The elements in here may be extended and/or replaced by more specific resources found in the various skin folders.
This folder needs to be accessed through the web.
/build/
sub-folders
Please note that there are several sub-folders names /build/
in this directorty tree. The files they contain are built from other source files by using Grunt. The files in the /build/
folders should never be modified manually because they will be automatically overwritten the next time grunt is run.
/skins/
folder
This folder holds the skins for the front-office. Each collection may use a different skin. It may actually even use different skins for web, tablet and mobile devices.
Each available skin can be found in its own sub-folder. You can install/create additional skins by copying/creating new subfolders into the /skins/
folder.
Subfolders starting with a _
represent available skins which will remain hidden to the users. Those are typically used for RSS skins.
This folder needs to be accessed through the web.
For more information, see: Skin Development Primer.
/skins_adm/
folder
This folder holds the skins for the admin interface (the back-office).
The adminUI_general
class implements a default behavior for the admin User Interface. This default behavior can be overridden in different skin subfolders.
This folder needs to be accessed through the web.
/skins_email/
folder
This folder holds the skins that are used when sending out emails.
For each email there is one template for HTML emails and one template for Plain-Text emails.
This folder holds a set of default templates files for each kind of outgoing email. These can be customized. For example /skins_email/xxx.php
can be overridden by /skins_email/custom/xxx.php
.
This folder may need to be accessed through the web if some CSS or graphics are used in the custom templates.
For more information, see: Email Skins/Themes.
/skins_fallback_v5/
folder
This folder holds the fallback skin templates for skins using the evoSkin API version 5 (all skins made before b2evolution v6).
For example _feedback.php
lists the comments and the trackbacks in a standard manner and can then be included in any skin. However, if time permits, the skin designer can also override _feedback.php
in his customized skin folder.
This folder does not need to be accessed through the web.
For more information, see: Skin Development Primer.
/skins_fallback_v6/
folder
This folder holds the fallback skin templates for skins using the evoSkin API version 6 (available since b2evolution v6).
For example _feedback.php
lists the comments and the trackbacks in a standard manner and can then be included in any skin. However, if time permits, the skin designer can also override _feedback.php
in his customized skin folder.
IMPORTANT: If a fallback template is not found in this directory, b2evolution will look into the lower API version: /skins_fallback_v5
.
This folder does not need to be accessed through the web.
For more information, see: Skin Development Primer.
/skins_site/
folder
This folder holds the skins that apply to the whole site (i-e, not specific to a particular collection or type of collection).
This folder holds a set of default behavior include files for several functions. Each one can be overriden and customized. For example /skins_site/_xxx.php
can be overridden by /skins_site/custom/_xxx.php
.
This folder needs to be accessed through the web.
/xmlsrv/
folder
This folder holds the xml services entry points.
The files in this folder typically implement webservices.
This is a services folder. It needs to be accessed through the web.
Files
.htaccess
file
This ships as sample.htaccess
and should be renamed to .htaccess
. (The installer will try to do this automatically.)
This is the file that will configure the Apache webserver to work optimally with b2evolution. Without this file b2evolution will not be able to properly handle clean URLs to reference collections and posts.
This file is also needed for proper REST API operation.
For more information, see: .htaccess File.
admin.php
file
This is the main dispatcher for the admin interface, a.k.a. The Back-Office.
bower.json
file
This is a configuration file used by Bower when obtaining the b2evolution package.
This file is not needed on your server.
default.php
file
This is the main front-office interface file! This will we displayed if you haven’t configured a default collection to display.
This file is NOT mandatory. You can delete it if you have configured a default collection.
Gruntfile.js
file
This is the configuration file for using Grunt.
This file is needed on your development machine but not on the web-server.
index.php
file
This is the main public interface file. It will try to detect which collection is being requested or display the default collection. If there is none, it will call default.php.
This file is NOT mandatory. You may replace it with one or several Stub Files.
package.json
file
This file defines the modules used by Grunt.
This file is needed on your development machine but not on the web-server.
xmlrpc.php
file
This is a dummy file that loads the /xmlsrv/xmlrpc.php
XML-RPC handler. We need this file here since some API clients just assume xmlrpc.php
to be at the root level.