Typo sidebars

I spent half the night working on a monster patch for Typo that totally reworks the way Typo’s sidebar works. Before, all of the items that you see on the right side of this blog were statically coded into the app/views/layout/article.rhtml file. To change the URL for your Flickr images, you had to edit the source by hand. Adding new items involved editing three or four files.

That’s all gone now.

I moved all of the sidebar items into a new component/sidebars/plugins directory, and added a sidebar controller that drives them. It automatically loads all of the sidebars in the plugin directory, so you can install new sidebars by simply dropping the files into place. No more editing source files and then fighting to keep the changes merged. I moved all of the configuration data for each plugin into Typo’s configuration database, so you can edit everything via the admin interface.

Finally, I added another admin block to control the sidebar layout. You can use Rail’s nifty Javascript drag-and-drop support to enable and disable individual sidebar items and to change the order in which they appear. It’s kind of ugly right now, but a bit of CSS will fix that eventually.

I posted my patch to Typo’s bug-tracking database, but it’s really young code, mostly written in the middle of the night, so I wouldn’t recommend using it quite yet. Once I’ve had a chance to clean it up a bit I’ll give it a bit of testing here and then submit a newer patch to trac and hopefully it’ll get merged.

Posted by Scott Laird Fri, 15 Jul 2005 15:45:53 GMT


Comments

  1. Scott Laird 3 days later:

    test

  2. Scott Laird 3 days later:

    Also test.

  3. Kevin Ballard 3 days later:

    A test comment

  4. Scott Laird 3 days later:

    Blah, blah

  5. nebon 4 months later:

    hello, my apologies for this marginally associated, and tardy, comment but i have searched high and low for an answer to this without success..

    where do i get the url necessary to use the flickr sidebar item in my typo blog? i entered the url to the set i want to display, nothing. i entered the feed url to my set from safari or firefox, nada. am i missing something?

    thank you

  6. Scott Laird 4 months later:

    Mine is http://www.flickr.com/services/feeds/photos_public.gne?id=96838102@N00&format=rss_200; it’s the RSS 2.0 link at the bottom of your photos page.

  7. nebon 4 months later:

    ugh, i am an idiot for not seeing that. but it doesn’t seem to be available in specific sets rather than the entire stream. no problem, i’ll look through the flickr api and see what can be done.

    thank you!