Skip to Navigation

OTRS 2.4 - Developer Manual

René Bakker, Hauke Böttcher, Stefan Bedorf, Shawn Beasley, Jens Bothe, Udo Bretz, Martin Edenhofer, Manuel Hecht, Christopher Kuhn, André Mindermann, Henning Oschwald, Thomas Raith, Stefan Rother, Burchard Steinbild

This work is copyrighted by OTRS AG.

You may copy it in whole or in part as long as the copies retain this copyright statement.

UNIX is a registered trademark of X/Open Company Limited. Linux is a registered trademark of Linus Torvalds.

MS-DOS, Windows, Windows 95, Windows 98, Windows NT, Windows 2000, Windows XP, Windows 2003 and Windows Vista are registered trademarks of Microsoft Corporation. Other trademarks and registered trademarks are: SUSE and YaST of SUSE Linux GmbH, Red Hat and Fedora are registered trademarks of Red Hat, Inc. Mandrake is a registered trademark of MandrakeSoft, SA. Debian is a registered trademark of Software in the Public Interest, Inc. MySQL and the MySQL Logo are registered trademarks of MySQL AB.

All trade names are used without the guarantee for their free use and are possibly registered trade marks.

OTRS AG essentially follows the notations of the manufacturers. Other products mentioned in this manual may be trademarks of the respective manufacturer.


Table of Contents

1. Introduction
2. Coding Style Guide
Formatting
Naming
Source Code Header and Charset
Version Comments
Special comments
Restrictions for some functions
Perldoc
Length of lines
Core-Objects
Objects and their allocation
Using of the MainObject
Using of the EncodeObject
3. Architecture
Directories
Files
Core Modules
Frontend Handle
Frontend Modules
CMD Frontend
Database
4. Config Mechanism
Default Config
Custom Config
Accessing Config Options
XML Config Options
Types of XML Config Variables
String
Textarea
Options
Array
Hash
Hash with SubArray, SubHash
FrontendModuleReg (NavBar)
FrontendModuleReg (NavBarModule)
5. Database Mechanism
How it works
SQL
XML
Database Drivers
Supported Databases
6. Log Mechanism
Use and Syntax
Example
7. Module Format
Core Modules
Log Module
Output Filter
Stats Module
Frontend Modules
Dashboard Module
Old Module Descriptions
Auth Module
Notify Module
Navigation Module
Frontend Modules
Core Modules
Customer Auth Module
Customer User Module
Customer Navigation Module
Stats Module
Ticket Modules
8. Templates
Formatting
Comment
$Data{""}
$QData{""}
$LQData{""}
$Env{""}
$QEnv{""}
$Quote{""}
$Text{""}
$JSText{""}
$Config{""}
$Include{""}
Block
set
if
system-call
Example
9. Layout
CSS Style
View
Edit/New/Search
Overview/Search Result
Delete
Images
Special CSS Definitions
10. Language Translations
How it works
Default Framework Translation File
Frontend Translation File
Custom Translation File
Add a new default framework translation
11. Object Basics
Object Options
Search Options
Config Naming
Config File
NavBar Settings
Screen flow
12. Development Environment
Framework checkout (CVS)
Linking Expansion Modules
Necessary Actions after Linking
13. Writing an OTRS module for a new object
What we want to write
Default Config File
Frontend Module
Core Module
dtl Template File
Language File
Summary
14. Package Management
Package Distribution
Package Repository Index
Package Commands
Install
Uninstall
Upgrade
List
15. Package Building
Package Spec File
Name
Version
Framework
Vendor
URL
License
ChangeLog
Description
BuildHost
BuildDate
PackageRequired
ModuleRequired
OS (^M)
Filelist
DatabaseInstall
DatabaseUpgrade
DatabaseReinstall
DatabaseUninstall
IntroInstall
IntroUninstall
IntroReinstall
IntroUpgrade
CodeInstall
CodeUninstall
CodeReinstall
CodeUpgrade
Example .sopm
Package Build
Package Life Cycle - Install/Upgrade/Uninstall
16. Unit Tests
Creating a test file
Testing
True()
False()
Is()
A. Additional Ressources
OTRS.org
Online API Library
Developer Mailing List
Commercial Support