mirror of
https://github.com/roundcube/roundcubemail.git
synced 2025-12-27 23:45:58 +00:00
Page:
Dev Docs
Pages
Build from source
Changelog
Configuration
Configuration: LDAP Address Books
Configuration: Load balanced Setup
Configuration: Multi Domain Setup
Configuration: OAuth2
Dev Accessibility Guidelines
Dev Contribution
Dev Docs
Dev Guidelines
Dev Releases
FAQ
Home
Howto Report Issues
Install Requirements
Installation
Javascript API
Languages
Online Help
Plugin API
Plugin Events
Plugin Hooks
Plugin managesieve
Plugin password
Plugins Link to new page
Plugins
Skin Markup
Skins
Upgrade
Version History
3
Dev Docs
twoutlook edited this page 2016-06-18 15:38:57 +08:00
Roundcube Documentation
Code Layout
Controller
- The controller (index.php) creates an instance of the main application class
rcmailwhich is a singleton - Configuration is read from
config/config.inc.phpandconfig/defaults.inc.php - Login to the IMAP server (-> user authentication) is triggered from index.php
- Basic sequence:
rcmail::get_instance()->rcmail::load_gui()->new rcmail_template()->rcmail_template::send()
Tasks & Actions
- index.php limits tasks to set list
- and includes a specific PHP file (
from program/steps/<taskname>/) for the requested action
View
- Templates for each task/action are stored in
skins/default/templates - In templates
<roundcube: />tokens will be replaced with dynamic content by thercmail_templateclass - All absolute paths (starting with "/") within the templates will be altered to point to the skin directory
- AJAX requests are handled by the rcube_json_output class which is created by
rcmail::init_json()
Directory structure
The root folder of a Roundcube installation contains the following folders:
config/Home of the local configurations filesprogram/All application files are stored in this folder. These files will be replaced when upgrading the installation.program/js/Client JavaScript filesprogram/lib/RoundcubeThe Roundcube framework classes which can be used outside the webmail packageprogram/lib/*External libraries used for Roundcubeprogram/include/Webmail-specific classes and core functionsprogram/localization/Contains subfolders with localization files.program/steps/Include files for every task/actionplugins/Container for all plugins. Each plugins is represented in a separate subfolderbin/Commandline tools and shell scripts for internal use and maintainancelogs/Contains log files. This folder has to be writable for the webserver.temp/Location of temporary saved files such as attachments and cache files This folder has to be writable for the webserver.skins/Contains skin subfoldersSQL/SQL files for database initialization and updates. Only needed for installations or upgrades.
Important files
All requests from the client are sent to index.php. This index file - together with the rcmail class loads all core components and establishes connections to the database and the IMAP server. It analyzes the request and then includes one of the step files. Direct access to config, log and temp folders should not be permitted.
For Apache webservers which allow local overrides, the .htaccess file includes some PHP configuration settings as well as file access directives. More .htaccess files are located in the protected folders mentioned above.
Code Documentation
For a detailed documentation please refer to the Online PHPDoc.