Posted by rjay on May 10, 2011 at 3:56pm
7 followers
| Project: | Semantic Fields |
| Version: | 7.x-1.x-dev |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Add some default presets, eg. Unordered List, Ordered List.
Comments
#1
and export ... ;-) *ggg*
Because if I could export them, I would contribute the presets now and here ;-))
#2
#3
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?
#4
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.
#5
See http://drupal.org/node/928026 for the most standard Drupal import/export framework.
#6
I have started to work with solving the exporting issue (with ctools exportables).
#7
First patch, breaks some stuff, uploading just to have it somewhere, please continue if somebody have the time.
#8
A little bit more. Some stuff still left.
#9
And a little bit more. Soon there should be something reviewable.
#10
And the patch :-)
#11
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.
#12
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 :-).
#13
Added one default, removed dependency of fields_ui.
#14
Added one more default (ordered list and unordered list - booth now in sub-module), also added support for tokens.
#15
Adding upgrade path (change of database field name).
#16
Some fixes of comments etc. Also, improved update hook.
#17
Ups. I see that I forgot to add the new file, so this patch breaks things terribly. I fix.
#18
New patch with new files.
#19
Untested, but committed. Closing.
#20
Automatically closed -- issue fixed for 2 weeks with no activity.