Chapter 3. Module hooks

Table of Contents

3.1. Introduction
3.2. Request initialization
3.2.1. parse_request
3.2.2. common_pre
3.2.3. common_no_forum
3.2.4. common_post_user
3.2.5. common
3.2.6. page_<phorum_page>
3.3. Page output
3.3.1. phorum_shutdown
3.3.2. get_template_file
3.3.3. start_output
3.3.4. start_output_<page>
3.3.5. after_header
3.3.6. after_header_<page>
3.3.7. output_templates
3.3.8. output_templates_<page>
3.3.9. before_footer_<page>
3.3.10. before_footer
3.3.11. end_output
3.3.12. end_output_<page>
3.4. Miscellaneous
3.4.1. database_error
3.4.2. ajax_<call>
3.4.3. external
3.4.4. scheduled
3.5. Login/Logout
3.5.1. before_logout
3.5.2. after_logout
3.5.3. password_reset
3.5.4. after_login
3.5.5. failed_login
3.6. Message handling
3.6.1. posting_init
3.6.2. posting_permissions
3.6.3. posting_custom_action
3.6.4. before_editor
3.6.5. check_post
3.6.6. before_post
3.6.7. after_message_save
3.6.8. after_post
3.6.9. after_post_redirect
3.6.10. posting_action_cancel_post
3.6.11. before_edit
3.6.12. after_edit
3.6.13. posting_action_edit_post
3.7. File storage
3.7.1. after_detach
3.7.2. before_attach
3.7.3. after_attach
3.7.4. file_retrieve
3.7.5. file_purge_stale
3.7.6. system_max_upload
3.8. User data handling
3.8.1. user_save
3.8.2. user_register
3.8.3. user_get
3.8.4. user_list
3.8.5. user_delete
3.8.6. user_save_groups
3.8.7. before_register
3.8.8. after_register
3.9. User authentication and session handling
3.9.1. user_authenticate
3.9.2. user_session_create
3.9.3. user_session_restore
3.9.4. user_session_destroy
3.10. Admin interface
3.10.1. admin_editforum_form_save_after_defaults
3.10.2. admin_editforum_form_save_inherit
3.10.3. admin_editforum_form_save_inherit_others
3.10.4. admin_editforum_section_edit_forum
3.10.5. admin_forum_delete
3.10.6. admin_css_file
3.10.7. admin_menu
3.10.8. admin_general
3.11. Moderation
3.11.1. email_user_start
3.11.2. send_mail
3.11.3. moderation
3.11.4. before_delete
3.11.5. delete
3.11.6. move_thread
3.11.7. close_thread
3.11.8. reopen_thread
3.11.9. after_approve
3.11.10. hide_thread
3.11.11. after_merge
3.11.12. after_split
3.12. Page data handling
3.12.1. index
3.13. Templating
3.13.1. javascript_register
3.13.2. javascript_filter
3.13.3. css_register
3.13.4. css_filter
3.14. Read messages
3.14.1. read
3.15. Module hooks
3.15.1. bbcode_register
3.16. Private message system
3.16.1. pm_delete_folder
3.16.2. pm_delete
3.16.3. pm_before_send
3.16.4. before_pm_list
3.16.5. pm_list
3.16.6. pm_read
3.16.7. pm_send_init
3.16.8. pm_before_editor
3.17. Buddies system
3.17.1. buddy_list
3.18. Feed
3.18.1. feed_sent
3.19. Message search
3.19.1. search_redirect
3.19.2. search_output
3.20. Control center
3.20.1. cc_panel
3.20.2. cc_save_user

3.1. Introduction

To satisfy the webmaster that needs every bell and whistle, or those that want to make their web site unique, the Phorum team created a very flexible hook & module system. The hooks allow a webmaster to create modules for doing things like using external authentication, altering message data before it is stored, adding custom information about users or messages, etc. Almost anything you can think of can be implemented through the hook & module system.

This chapter describes all the hooks that are available within the Phorum code. It is mainly targeted at developers that want to write modules.