?

Log in

Frequently Asked Question #124. What are overrides? How do they work?

This FAQ applies only to the old style system (S1), which is no longer supported.
Switch to S2 for the latest features and themes.

Overrides are sections of code that can be used to modify certain parts of your journal. They are entered in the "Overrides" section at the bottom of the Journal Display page.

How Overrides Work


An S1 style is made up of several variables. Each variable is a portion of code that determines the appearance of a certain aspect of the layout, such as entries or comment links. An override can be used to replace a variable's pre-defined HTML code with code of your choice.

Not all variables can be changed using overrides. If overrides cannot be applied to a variable, the only way to customize that variable is to create a custom S1 style. The following variables can be modified with overrides: *_HEAD, *_TALK_READLINK, *_TALK_LINKS, *_OPT_ITEMS, *_DATE_FORMAT, and *_WEBSITE.

Some of these variables contain properties. For example, the *_TALK_READLINK variable determines the appearance of the link to the "read comments" page. One of this variable's properties is %%messagecount%%, which determines where the current number of comments will be displayed in the link. Information on variables and their properties is available at the View Types page. All existing variables are listed on this page, although not all variables can be modified using overrides. Clicking on a variable name will bring you to a page with information on the variable, including what aspect of the layout it controls, the names of its properties and what they represent, and whether the variable can be customized using overrides.

You can view the pre-defined code of existing system styles, organized by variable, using the Style Browser. Entering "system" in the username box will bring up a list of LiveJournal's system styles, with links to the code and a preview page for each style. Basic users cannot view the preview pages for system styles, but can click "info" to view the style's code.

The only HTML elements that can be used in *_HEAD overrides are those elements that are valid in the head of a HTML document. This is limited to <title>, <base>, <style>, <link>, and <meta>. All other elements are stripped. If your overrides are not changing the look of your journal, that is most likely the reason.

Overrides are used to set exceptions to the system styles, and they have their limitations and complications. If you are interested in dramatically changing the appearance of your journal style, you can much more easily and thoroughly do so if you have a paid account.

There is more information available on overrides, as well as tutorials for using overrides, in the following locations:

There are a number of ways to use the override system. The above links describe only some of these ways. Due to the potential diversity and complexity of all available overrides, it would be impossible to officially support them all.

Please note: You can only have one override for each variable. If you have more than one change that you want to make to a variable, you will need to merge your overrides for that variable into one override.

Last Updated: January 4th, 2011

FAQ Navigation

Ask a Question

If you can't find what you're looking for, open a support request and we'll get back to you.