Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dqd’s picture

and export ... ;-) *ggg*
Because if I could export them, I would contribute the presets now and here ;-))

dqd’s picture

Title: Add some default presets » Add some default presets/ and export options
Scatterspell’s picture

Presets would be nice. Maybe there needs to be a place where people can copy and paste their code so others can manually import it?

petsagouris’s picture

Exporting a preset could be quite straight-forward. Just output a row from the 'semantic_fields' table from the database in a string that is basically a serialized PHP array (let's call this a SSFP, serialized semantic field preset).

Importing could be tricky. I believe that the best way to do it is use the functionality that is already in the module.
The could be a textarea provided to input the SSFP (as provided by the export process) which will first try to run it through the validation process and then the submission process as if the data came from the "semantic_fields_preset_form". This textarea (or whatever input type is decided) may even be placed along the "semantic_fields_preset_form" as an alternative way of data input.

sokrplare’s picture

See http://drupal.org/node/928026 for the most standard Drupal import/export framework.

MiSc’s picture

I have started to work with solving the exporting issue (with ctools exportables).

MiSc’s picture

FileSize
1.92 KB

First patch, breaks some stuff, uploading just to have it somewhere, please continue if somebody have the time.

MiSc’s picture

FileSize
10.04 KB

A little bit more. Some stuff still left.

MiSc’s picture

And a little bit more. Soon there should be something reviewable.

MiSc’s picture

FileSize
5.18 KB

And the patch :-)

MiSc’s picture

And the last one for today. Export UI almost finished. Prestes are needed to be inserted in the database again after revert. And some other stuff.

MiSc’s picture

Assigned: rjay » Unassigned
Status: Active » Needs review
FileSize
6.78 KB

Ok, the most important stuff is now in the patch - we need some validation (machien name for preset for example), default presets (think that should be a seperate sub module) and some code cleanup and also tests. But marks this as need review for now. Hopefully somebody will notice :-).

MiSc’s picture

FileSize
8.58 KB

Added one default, removed dependency of fields_ui.

MiSc’s picture

FileSize
9.36 KB

Added one more default (ordered list and unordered list - booth now in sub-module), also added support for tokens.

MiSc’s picture

FileSize
9.61 KB

Adding upgrade path (change of database field name).

MiSc’s picture

FileSize
12.25 KB

Some fixes of comments etc. Also, improved update hook.

MiSc’s picture

Status: Needs review » Needs work

Ups. I see that I forgot to add the new file, so this patch breaks things terribly. I fix.

MiSc’s picture

Status: Needs work » Needs review
FileSize
53.91 KB

New patch with new files.

MiSc’s picture

Status: Needs review » Fixed

Untested, but committed. Closing.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.