Ticket #279 (new enhancement)

Opened 7 months ago

Last modified 5 months ago

Importers should not be plugins

Reported by: michaeltwofish Owned by:
Priority: minor Milestone: 0.6
Component: Plugins Version: SVN
Keywords: import, plugins, importers Cc:

Description

mikelietz is right. Making users activate a plugin to import content, which is usually a one-off operation, is unfriendly and unnecessary. We should create /system/importers and refactor accordingly.

Change History

  Changed 7 months ago by mikelietz

I don't recall the exact wording I had in the channel, but here's the basic point:

* Plugins are modules that add or change functionality to the ongoing operation of a site or sites.

* Import 'plugins' are activated only once, generally, and then do not need to be seen ever again. Having them remain activated, or even deactivated and dormant in the list of other plugins, is bad.

Moving the import 'plugins' to the import page, to remove the redundant steps from the "click import->click plugins->click import" process, would seem to be good. This is from the presentation standpoint.

Whether they also need to be moved in the code to /system/importers is a secondary discussion, but also one that needs to be addressed.

follow-up: ↓ 3   Changed 7 months ago by skippy

Because we do not intend to ship every conceivable importer with Habari, it makes sense to implement them as plugins that users can drop into place as needed. Folks can write importers for the systems from which they need to import, and can share those importers easily with others.

I think it would be nice if the Import process were a little more intelligent. To whit, it could activate the Import plugin for you, and then de-activate it again when it's done. The former could be accomplished by looking for *.importer.plugin.php in the list of plugins, for example.

I'm loathe to copy the bulk of the plugin framework into a new importer framework, as that seems like a lot of code duplication for very little benefit. I'm not opposed, though, to some additional code being added to make importer plugins easier to use from the Import screen.

in reply to: ↑ 2   Changed 7 months ago by mikelietz

I'm loathe to copy the bulk of the plugin framework into a new importer framework, as that seems like a lot of code duplication for very little benefit. I'm not opposed, though, to some additional code being added to make importer plugins easier to use from the Import screen.

Would it be necessary to copy the framework over? What about adding an optional key to info() of 'import' => "1" for import plugins, or better yet, 'import' => 'Serendipity' or some such.

If it's undefined or NULL ignore it, and assume it's a non-importing plugin. Existing (ordinary) plugins wouldn't even need to be updated.

However if the key exists, it's an import plugin, and thus should appear on the import page. Likewise it (probably) should not appear on the regular plugins page, or if it does, under a third section.

  Changed 7 months ago by michaeltwofish

Importers are required to implement the importer interface, which is what's used to work out if something is an importer (through filter_import_names()). I may be talking crap but it seems to me we could just put importers in /system/importers, leave them as plugins, instantiate everything in /system/importers on install for an import stage then, and instantiate them on the import page.

The only issue I see with that is if an importer does more than simply import.

  Changed 5 months ago by miklb

  • milestone changed from Undetermined to 0.6
Note: See TracTickets for help on using tickets.