Oh hey, look at that over in the right side of the blog! It’s a Widget for displaying my currently owned typewriters, as entered into the Typewriter Database.
“How do I get this nifty Widget for my blog?” I hear you say. Well, it’s easy as pie. Just log into your “Typewriter Hunter”-level account at the Typewriter Database, and go to your Account Page.
Right there at the bottom is a new section with a code box containing HTML code that you can cut-n-paste directly into your Blog or CMS. Copy this code and paste it into a plain text widget area on your blog’s admin. For WordPress, I did this:
The default styling of the Widget is similar to the Database itself. Black text, red links on a white background. Works with many layouts, but you can change the SIZE of the widget, as well as the background color and border by editing the “style=” attribute of the OBJECT tag. Here’s an example:
Here’s the widget displaying my “Sightings” on my main splash page, with more verbose descriptions, a different background, border and size – using some of the customization options of the widget. Consider the code for this example:
Note two new flags: “mydesc” and “typedesc”. Set ’em to 1 and they display your Profile Description and a shortened Typewriter Description for each machine shown. Leave ’em off or set them to “0” and these descriptions are omitted.
Note also that I’ve changed the “collection_search” flag from “My+Collection” to “Sightings”. Those are, so far, the only two options for this flag.
By altering the “Style=” attribute I could widen the border and change it from black to a brown color. I’ve also changed the background color and set the widget width to better fit the layout of the page.
Here’s another example, same page:
Note in the code I’ve changed the “css” flag from “1” to “2”. This changes the colors of the text and links to colors more appropriate for dark backgrounds. I’ve also changed the “style=” attribute of the OBJECT tag to a black background and gave the whole thing a 60% opacity for a ghostly look that can look interesting. Hopefully, this gets you started on styling the widget to fit the style of your site.
The results are always ordered oldest manufacture date to newest, descending. I may come up with other orders later, but for now, this seems logical.