Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Add some default presets, eg. Unordered List, Ordered List.
Comment | File | Size | Author |
---|---|---|---|
#18 | exportable-1152950-17.patch | 53.91 KB | MiSc |
#16 | exportable-1152950-16.patch | 12.25 KB | MiSc |
#15 | exportable-1152950-15.patch | 9.61 KB | MiSc |
#14 | exportable-1152950-14.patch | 9.36 KB | MiSc |
#13 | exportable-1152950-13.patch | 8.58 KB | MiSc |
Comments
Comment #1
dqdand export ... ;-) *ggg*
Because if I could export them, I would contribute the presets now and here ;-))
Comment #2
dqdComment #3
Scatterspell CreditAttribution: Scatterspell commentedPresets would be nice. Maybe there needs to be a place where people can copy and paste their code so others can manually import it?
Comment #4
petsagouris CreditAttribution: petsagouris commentedExporting 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.
Comment #5
sokrplare CreditAttribution: sokrplare commentedSee http://drupal.org/node/928026 for the most standard Drupal import/export framework.
Comment #6
MiSc CreditAttribution: MiSc commentedI have started to work with solving the exporting issue (with ctools exportables).
Comment #7
MiSc CreditAttribution: MiSc commentedFirst patch, breaks some stuff, uploading just to have it somewhere, please continue if somebody have the time.
Comment #8
MiSc CreditAttribution: MiSc commentedA little bit more. Some stuff still left.
Comment #9
MiSc CreditAttribution: MiSc commentedAnd a little bit more. Soon there should be something reviewable.
Comment #10
MiSc CreditAttribution: MiSc commentedAnd the patch :-)
Comment #11
MiSc CreditAttribution: MiSc commentedAnd 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.
Comment #12
MiSc CreditAttribution: MiSc commentedOk, 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 :-).
Comment #13
MiSc CreditAttribution: MiSc commentedAdded one default, removed dependency of fields_ui.
Comment #14
MiSc CreditAttribution: MiSc commentedAdded one more default (ordered list and unordered list - booth now in sub-module), also added support for tokens.
Comment #15
MiSc CreditAttribution: MiSc commentedAdding upgrade path (change of database field name).
Comment #16
MiSc CreditAttribution: MiSc commentedSome fixes of comments etc. Also, improved update hook.
Comment #17
MiSc CreditAttribution: MiSc commentedUps. I see that I forgot to add the new file, so this patch breaks things terribly. I fix.
Comment #18
MiSc CreditAttribution: MiSc commentedNew patch with new files.
Comment #19
MiSc CreditAttribution: MiSc commentedUntested, but committed. Closing.