Download & Extend

Add some default presets/ and export options

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

Title:Add some default presets» Add some default presets/ and export options

#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.

AttachmentSizeStatusTest resultOperations
exportable-1152950-7.patch1.92 KBIgnored: Check issue status.NoneNone

#8

A little bit more. Some stuff still left.

AttachmentSizeStatusTest resultOperations
exportable-1152950-8.patch10.04 KBIgnored: Check issue status.NoneNone

#9

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

#10

And the patch :-)

AttachmentSizeStatusTest resultOperations
exportable-1152950-10.patch5.18 KBIgnored: Check issue status.NoneNone

#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.

AttachmentSizeStatusTest resultOperations
exportable-1152950-11.patch5.4 KBIgnored: Check issue status.NoneNone

#12

Assigned to:rjay» Anonymous
Status:active» needs review

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 :-).

AttachmentSizeStatusTest resultOperations
exportable-1152950-12.patch6.78 KBIgnored: Check issue status.NoneNone

#13

Added one default, removed dependency of fields_ui.

AttachmentSizeStatusTest resultOperations
exportable-1152950-13.patch8.58 KBIgnored: Check issue status.NoneNone

#14

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

AttachmentSizeStatusTest resultOperations
exportable-1152950-14.patch9.36 KBIgnored: Check issue status.NoneNone

#15

Adding upgrade path (change of database field name).

AttachmentSizeStatusTest resultOperations
exportable-1152950-15.patch9.61 KBIgnored: Check issue status.NoneNone

#16

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

AttachmentSizeStatusTest resultOperations
exportable-1152950-16.patch12.25 KBIgnored: Check issue status.NoneNone

#17

Status:needs review» needs work

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

#18

Status:needs work» needs review

New patch with new files.

AttachmentSizeStatusTest resultOperations
exportable-1152950-17.patch53.91 KBIgnored: Check issue status.NoneNone

#19

Status:needs review» fixed

Untested, but committed. Closing.

#20

Status:fixed» closed (fixed)

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

nobody click here