Phorum Developer Reference Manual

Maurice Makaay

Brian Moon

Thomas Seifert


Table of Contents

Introduction
1. Templates
1.1. Introduction
1.2. Template structure
1.3. How to start your own template
1.4. The Phorum template language
1.4.1. Introduction
1.4.2. General syntax
1.4.3. Data types
1.4.3.1. Integers
1.4.3.2. Strings
1.4.3.3. PHP constants
1.4.3.4. Template variables
1.4.4. Statements
1.4.4.1. Display a variable
1.4.4.2. In line comments
1.4.4.3. DEFINE
1.4.4.4. VAR
1.4.4.5. IF .. ELSEIF .. ELSE ..
1.4.4.6. LOOP
1.4.4.7. INCLUDE
1.4.4.8. HOOK
1.4.5. Need the power of PHP?
2. Modules
2.1. Introduction
2.2. Terminology
2.2.1. Modules
2.2.2. Hacks
2.2.3. Hooks
2.2.4. Hook functions
2.3. Writing your own modules
2.3.1. Introduction
2.3.2. Module information
2.3.3. Module file structure
2.3.3.1. Introduction
2.3.3.2. Single file modules
2.3.3.3. Multiple file modules
2.3.4. Supporting multiple languages
2.3.5. Module data storage
2.3.5.1. Introduction
2.3.5.2. Storing data for messages
3. Module hooks
3.1. Introduction
3.2. Templating
3.2.1. css_register
3.2.2. javascript_register
3.3. Control center
3.3.1. cc_panel
3.4. Message search
3.4.1. search_redirect
3.4.2. search_output
3.5. File storage
3.5.1. file_purge_stale
3.6. User data handling
3.6.1. user_save
3.6.2. user_register
3.6.3. user_get
3.6.4. user_list
3.6.5. user_delete
3.7. User authentication and session handling
3.7.1. user_authenticate

List of Tables

2.1. Keys and values in module information

List of Examples

1.1. Template information file: $info.php
1.2. Template example
1.3. Integer values
1.4. Code using integer values
1.5. String values
1.6. Escaped quotes in string values
1.7. Code using string values
1.8. Code using a PHP constant definition
1.9. Code using built-in PHP constants
1.10. Template variables
1.11. Referencing elements in a template variable array
1.12. Code using template variables
1.13. Display a variable
1.14. Add in line comments
1.15. DEFINE statement usage
1.16. VAR statement usage
1.17. IF .. ELSEIF .. ELSE .. statement usage
1.18. LOOP statement usage
1.19. INCLUDE statement usage
1.20. HOOK statement usage
2.1. Module information
2.2. Single file module
2.3. Multi file module