2011-11-26

Possible fix for the undefined title problem + more Web Fonts

I think I have found a way around the problem with post titles showing up as undefined. If the gadget cannot find the post title now, it will simply make a pseudo-title using the text included in the post link, which is usually a portion of the title. The pseudo-title will appear in all uppercase letters with no punctuation, and it will be cut very short for longer titles.

I also updated the web fonts the gadget is capable of using to include all 302 fonts currently available at the Google Web Fonts catalog. To tell the gadget to use one of these web fonts, you need to edit your template's HTML or use the Template Designer to set the first font listed for the body of your blog to the web font of your choice. The template editing process is actually very easy.

Simply click on the Design button on the navbar at the top-right of your blog. That should take you to the Template configuration options page where you can click on Edit HTML. Click on Edit HTML and then click on Proceed to continue to the template editor. Once you see your template in a large text box, scroll down in the text box just a bit until you find the tag that starts with <Variable name="body.font"

Inside that tag is an attribute called value which you will add the name of the web font of your choice to. For example, if you want the Last Comments gadget to use the Lobster Two web font instead of Arial, all you need to do is insert 'Lobster Two', in front of the word Arial, like so (the insertion is in blue):
     <Variable name="body.font" description="Font" type="font"
         default="normal normal 12px Arial, sans-serif" value="normal normal 12px 'Lobster Two', Arial, sans-serif"/>

Whichever font is listed first in that place will be the font that Last Comments tries to use to display text. After you have added the web font to the front of the font list like in the example, you can click the Preview button to instantly see the results. Make sure you spelled the font name correctly if it doesn't work. If you like what you see in the preview, click Save template to keep the changes.

These updates affect all three versions of the gadget. I hope that helps some of you.