Closed (fixed)
Project:
Skeleton outlines
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
28 Dec 2008 at 23:04 UTC
Updated:
26 Mar 2009 at 18:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
deviantintegral commentedHere is an incomplete patch which starts to implement this. It adds a new database table to store nid's link to template ID's. On the first save of the node, it plays it safe and removes the link, as we may not always be able to tell if content has changed.
This will still need some work.
Comment #2
deviantintegral commentedHere is a patch which implements the following features:
Some functions had to be moved around (notably hook_form_alter()) so that it could be accessed in more than one case.
Comment #3
deviantintegral commentedUpdated to not unset node ownership.
Comment #4
agentrickardI am not sure I agree with this feature. Can the created instance opt-out of these updates? I suppose I would implement this as a batch operation, similar to admin/content/list and hook_node_operations(). Allow the editor to select which instances to update.
Comment #5
deviantintegral commentedI really like the idea of using the batch API; that will also ensure that the operation doesn't time out on slower sites. Opt-out could also be useful.
I'm going to re-approach this as more of a "sync" feature versus automatically doing it when saving a template. Since the information will be recorded, it should be possible to have a "Synchronize content" tab which allows editors to apply updates as needed.
Comment #6
agentrickardYeah ++ for 'sync'
I can help with the batch stuff, if need be. The documentation has a few errors.
Comment #7
deviantintegral commentedHere is a reworked patch which adds a "Synchronize" tab and uses the batch API. For anyone testing, it will only work for newly created nodes so the table can get populated properly.
For now, it only deals with templates which have been modified. I'd like to keep this issue just to that function, but so far it's been designed so that adding other functions shouldn't be too difficult.
Comment #8
deviantintegral commentedI realized that in order to properly manage adding and removing templates, the skeleton ID needs to be recorded as well. This update adds a column to the table (though it won't be used in this patch).
Comment #9
deviantintegral commentedReroll against HEAD.
Comment #10
deviantintegral commentedI've committed this to HEAD.