[paidaccount] Favicon

Jul 26, 2005 05:05


Paid Accounts OnlyThe following tutorial requires creating and editing a custom layer, which in turn requires a paid, permanent, or early adopter account. Please read What are the paid account benefits? and How do I buy a paid account? to learn about the paid account benefits and how to buy a paid account.
This tutorial will replace the print_custom_head() function in whichever style you like. The code required for the customization will be placed in a theme layer. If you already have a theme layer for your style, you can simply edit it. If not, you will need to create a theme layer following the directions given in the Theme Layer tutorial.

You can add an icon to your journal that will show up in the Address bar of a user's browser, and in the user's Favourites or Bookmarks list; this icon is called a Favicon. To add a Favicon to your style, edit your theme layer so that it looks like the following:

layerinfo "type" = "theme";
layerinfo "name" = "Theme Name";

function Page::print_custom_head(){
"""
http://www.yourdomain.com/favicon.ico">
""";
}
An .ico file is a 16 x 16 pixels image file. Note, however, that simply renaming another image file to .ico will not make it a valid .ico file. You will need to use an icon editing program in order to create a valid .ico file.

You will also need to ensure that you upload your .ico file to a host that permits remote loading to LiveJournal. For more information on remote loading, see this FAQ.
Additional References:
  • Merging print_custom_head functions
  • What are the different S2 layer types?


  • Originally written for S1 by slithytove. Adapted for S2 by wyntarvox.

    favicon, - all styles, paid accounts only

    Previous post Next post
    Up