Hack 37. Get More Feeds and News
Not getting enough information? You have several different ways to get more in Firefox.
This hack introduces you to the push content that a couple of extensionsSage and ForecastFox (previously named WeatherFox)make possible. Push content comes to you without you asking, or at least without you asking much.
4.6.1. Get Feeds with Sage
Long before Live Bookmarks came out in Firefox 1.0, Sage, a sidebar extension (shown in Figure 4-6), provided RSS and Atom feed aggregation in the Firefox sidebar. It's still a very useful extension.
Figure 4-6. The Sage sidebar
Sage provides full-service feed aggregation. It includes a feed preview rendered in the contents area; a tooltip description of each item in the feed, usually containing a brief excerpt of the article; the ability to mark items as read or unread; and many other features.
To begin using Sage, you first need to install it from the Mozilla Update web page (http://update.mozilla.org). Don't forget to place the Sage icon in your toolbar (context-click on a toolbar, select Customize, and drag and drop the icon onto the toolbar). Once Sage is installed, you can start setting up some feeds.
18.104.22.168 Setting up the feed system
First, you must create a folder in your Bookmarks hierarchy. That's where you will place either bookmarks pointing to the feed URLs or live bookmarks that directly implement the feed (live bookmarks use Firefox's autodiscovery service). When such a folder is created and you've placed some bookmarks into it, you can open Sage in the sidebar. This can be done several ways:
Once that's done, click the Options drop-down menu in the Sage sidebar and select Settings. Here, you can find and select the folder into which you have put the feed bookmarks. That should be all that's required to begin with.
In the Sage Settings window, you can also choose automatic update of the feeds and switch between 12- and 24-hour time display mode. You can also select the sorting method: chronological order or source order. The latter uses the order from the feed source.
22.214.171.124 Adding feeds
There are several ways to add feeds in the Sage sidebar:
Just make sure that all the bookmarks and live bookmarks to be shown in Sage are placed in the common bookmark folder that you set as Feed Folder in the Sage configuration.
126.96.36.199 Show the content
Now, when you select a feed in the Sage sidebar, the last 10 feed items will load, provided that you selected automatic feed update. If not, you must press the Refresh button.
Hovering over the feed items might show Description Tooltips, if you have enabled them in the Options menu. When you click an item, the content will load in the content area, unless you configured Sage to render feeds in the sidebar. When shown in the sidebar, you can customize the matching CSS file to change the look of rendered feeds. As a starting point, just modify Sage's default CSS file at chrome://sage/content/res/sage.css and save it in any convenient location. Then, open Sage settings and choose Using Custom Stylesheet and browse to your modified file.
4.6.2. Get Weather News with ForecastFox
Another example of a news-retrieving extension is ForecastFox, which allows you to have the weather forecast at your fingertips. The first step is to download the ForecastFox extension, available through the Mozilla Update web site (update.mozilla.org). Figure 4-7 shows its About dialog box.
Figure 4-7. The About ForecastFox dialog box
188.8.131.52 Setting a location
Once the installation process has been completed, you need to set up a location for the forecast you want:
184.108.40.206 Tweaking the display
On the General tab of the ForecastFox Options window, you can adjust several attributes that specify how the data is displayed:
You can also define display options for both the current conditions and the forecast. The two tabs for these purposes are again located in the Options window:
Figure 4-9. ForecastFox pop up
220.127.116.11 Customizing tooltips and labels
In the General tab, if you click the Customize Tooltips and Labels button, a new window will appear, allowing you to change the look of labels and tooltips, as shown in Figure 4-10.
Figure 4-10. Message templating for ForecastFox pop ups
Here, you can define tooltip and label text using predefined variables and choose whether to show images in tooltips for both the current conditions and the forecast. Descriptions of the variables used can be found at the bottom area of the window. This window acts like a very simple report of ForecastFox's template system.