Bug #302

[PATCH] Make sidebars utterly configurable

Added by scott-sigkill-org - 1235 days ago. Updated 790 days ago.

Status :Closed Start :
Priority :Low Due date :
Assigned to :scott - % Done :

0%

Category :spam
Target version :release2
Resolution :

fixed


Description

This is a big patch. It's only lightly tested right now, but I'm posting it as a sort of proof-of-concept; I'll clean it up over the weekend.

It does a couple different things to the sidebar.

1. It puts all of the sidebar config items into the config system. This includes feed URLs and item limits. It's possible that I failed to connect all of the item limits; they were tested late at night, and I don't have enough items on my newly-created tada/43/delicious lists to really test them. The URLs all work, though.

2. It moves all of the sidebar items from app/views/shared/_<name> into components/sidebars/plugins, and adds a new framework for managing them. From here on, all you have to do to add new sidebar items is drop two files (controller+view) into the right directory and Typo will find them automatically. This was time-consuming to implement, but it should make adding new sidebars trivial in the future.

3. There's a new 'sidebar' block in the admin pages that controls which sidebar plugins are actually enabled. You can drag-and drop them from the 'available' block to the 'enabled' block to turn them on, and drag-and-drop within the 'enabled' block to sort what order they appear in. There's yet another migration and table for all this; the migration is only lightly tested, and I haven't edited the schemas so new users will probably have issues.

Like I said, this is sort of a work in progress right now; I'll add a new patch here when it's a bit cleaner.

History

07/15/2005 03:25 PM - scott-sigkill-org -

Oh, yeah--I also updated the script.aculo.us stuff to match 0.13.1, too. That's part of why the patch is so big.

07/17/2005 01:40 AM - scott-sigkill-org -

FWIW, I'm reworking this slightly to fix two fundamental problems:

1. It's easy to add new sidebars with this system, but you still have to hack the config system to get them configured. So it's possible for people to distribute patch-free sidebars, but only if they don't need any configuration.

2. There's no way to have two of the same type of item without hacking the source. Example: poocs.net has two tada lists. This goes hand-in-hand with #1--if everything's stored in the global config store, then there's no clean way for (example) tada_feed to have two values.

So I'm making a couple small-ish changes. I'll probably have something to show tomorrow.

07/17/2005 09:21 AM - scott-sigkill-org -

Getting closer. At this point, pretty much everything works. I can create any number of items on the admin page, including multiple instances of each item. Each item gets its own config. All of the standard items have been converted and tested. URL and size-limit fields work for (flickr, delicious, 43things, tada). I added an option to flip flickr between rectangular and square thumbnails.

I still need to do some cleanup and error checking before I'm willing to share my patch, but I have a screenshot of the admin page for people to look at. Everything shown there is 100% live. You can drag (for example) the 'Flickr' object in the left column onto the right column to create a new Flickr sidebar item, and then drag it to the 'discard' block to get rid of it.

My goal with all of this is to make the sidebar (and eventually text plugins) completely configurable by normal users without having to edit the source at all. That makes updates a lot easier, because there's no merging involved.

07/17/2005 02:57 PM - scott-sigkill-org -

Just uploaded the latest version of the patch. It still has a couple rough spots, but it's basically feature-complete.

07/18/2005 06:47 PM - scott-sigkill-org -

New patch. Still against 328. Some cleanup, a couple new features.

07/18/2005 09:32 PM - scott-sigkill-org -

It should be more or less ready to merge now. I haven't updated to the latest Typo rev yet (with the new cache code), but I'm basically done here.

07/21/2005 01:44 PM - scott-sigkill-org -

Lots more updates. Things should be pretty close to their final form now. Plugins moved from components/sidebars/plugins to components/plugins/sidebars, as per jaket's suggestion and xal's preference.

07/22/2005 03:31 PM - scott -

  • Status changed from New to Assigned

07/23/2005 04:34 PM - scott -

  • Status changed from Assigned to Closed
  • Resolution set to fixed

(In r364) Configurable sidebars. (closes #157, #103)

Also available in: Atom PDF