espresto/reclaim-social-media

Allow configuration of n Twitter feeds

Opened this issue · 6 comments

as of now only one twitter feed can be configured. (same goes for all other classes.) it would be nice if more than one feed could be configured and saved to different categories and wordpress users.

maybe we should allow multiple accounts for all modules. we could try to integrate some generic multi-account foo in the base module to achieve this, so that every submodule supports this out of the box.

yes. absolutly. i meant that implicitly :)

after reading again i would even go so far and say you wrote it explicitly :-)

Now that we have proper instances of all the mods, this shouldn't be a hard task.

  • Mods should be initialized with a config identifier, a generated uuid for each setting (e.g. "123456789").
  • The mod base-class constructs the proper config key "shortname_configid" (e.g. "twitter_123456789").
  • Provide a key/value style API to get/set a mod's config in the mod base-class (and have mods not directly access get/update_option) that read from & write to the generated config key.

The painful part is probably the UI:

  • Show mods and configured accounts for each mod
  • Add new accounts to a mod
  • Remove accounts from a mod
  • Edit account

i thought about about that and was a little concerned about polluting the wp_options table with so many keys. i thought about using an multidimensional array but i think the whole "out of the box form processing" from wordpress can't handle this. as i'm new to wordpress i'm not sure about this but i couldn't find something fitting on the official wordpress options api docs. maybe we should look into a third party api like:

Yes, the actual settings for each account would be stored as a multi-dimensional array, e.g. under "twitter_123456789" in that case. Seeing how the average user is probably only configuring a dozen of accounts at most, I don't think I would consider this as polluting the wp_options table. Of course, if one of those plugins you mentioned provides a nicer API / multi-account handling, we should go with it, by all means. Otherwise I'm tempted to vote "keep the dependency-tail as short as possible".