»Chapter 17. Setting Site-Specific Hooks

Table of Contents

1. Writing Hooks
2. Hooks Reference


The LiveJournal code provides a number of hooks, which you can use to alter or extend the functionality of the code, tailored for your own site. You're free to implement as few or as many as you want.


If there's a hook you want but don't see, email us at <[email protected]> or file an issue in our Bug and Project Tracking System[o]» and we'll be more than happy to add it in.

One of the reasons for implementing hooks on LiveJournal came from a need to make distinctions between account status types, without leaving a lot of kludge in the code base, and without having to write extensive code libraries in the ljcom CVS repository.

Hooks are code references, subroutines that perform functions or return information based on objects passed to the subroutine. Some programming knowledge is necessary to write your own hooks.