Don't Techno for an Answer (boredinsomniac) wrote in lj_userdoc,
Don't Techno for an Answer
boredinsomniac
lj_userdoc

FAQ 124 - what are overrides?

As discussed previously, FAQ 124 in its current form explains what overrides are but does not contain any information about system styles' code or even how to find out what the properties are for each variable. Information about properties in particular is needed and neither this FAQ nor the HowTo override tutorial contain any such information or links. This information is needed to be able to effectively use overrides beyond just copying and pasting the sample code in the other FAQs.

Draft:
Overrides are sections of code that can be used to modify certain parts of your journal. They are inserted into the Styles Override box near the bottom of the Modify Journal page (http://www.livejournal.com/modify.bml). If you are missing some options on this page, please refer to http://www.livejournal.com/support/faqbrowse.bml?faqid=174.

An S1 style is composed 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. However, not all variables can be modified using overrides. If overrides can not be applied to a variable, the only way to customize that variable is to create a custom S1 style.

In addition to code, which does not change, some variables also contain properties, which stand for elements that are not constant and thus can not be hardcoded. 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 is used to indicate where the current number of comments will be displayed in the link. Information on variables and their properties is available at http://www.livejournal.com/developer/views.bml. 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 at http://www.livejournal.com/styles/browse/. 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. Free users can not 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 as such involve limitations and complications. If you are interested in dramatically changing the appearance of your journal style, you can much more easily and thoroughly accomplish such changes through direct use of the S1 style system (http://www.livejournal.com/developer/styles.bml) via a paid account (http://www.livejournal.com/support/faqbrowse.bml?faqid=131).

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

For a thorough description on overrides:
http://www.livejournal.com/users/howto/4516.html

For more basic tutorials and information:
http://www.livejournal.com/userinfo.bml?user=howto

To learn how to change your font:
http://www.livejournal.com/support/faqbrowse.bml?faqid=12

To learn how to insert a background image:
http://www.livejournal.com/support/faqbrowse.bml?faqid=97

To learn how to set the number of entries that appear in a view:
http://www.livejournal.com/support/faqbrowse.bml?faqid=13

To learn how to change the wording of your comments links:
http://www.livejournal.com/support/faqbrowse.bml?faqid=96

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. Please see this post for more information:
http://www.livejournal.com/users/howto/926.html
fin

I considered throwing in something about the syntax of an override, but this is effectively covered in the HowTo tutorial on overrides, except for the fact that all properties are enclosed in %% even though the charts show the text alone. As long as the rest of the structure stuff is in HowTo, though, that would be more appropriate there than here, so I guess I'll take that to howto_userdoc.
Tags: cat-s1, faq124, status-resolved
Subscribe
  • Post a new comment

    Error

    Comments allowed for members only

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 4 comments