<br>Is preview int per user?<br><br>You start a preview, but don't commit it and I want to modify that node...<br><br>Am I informed that the node is being edited? <br>Can I see the edit?<br>If I can edit it regardless of another user's unsaved preview, is that preview deleted?
<br><br>"If so, find the latest revision where preview = 1 and replace<br>its contents with the current post's contents."<br><br>Is that per user or will my edit overwrite your preview?<br><br>"user comes back after browser crashes:"
<br><br>How does a non admin user get "back" to node that has been previewed (and thus saved to the db) but never published if they don't know the nid? This is my "self serve" UI issue. Anyone how has dealt with a user who wants to recover autosaved versions of a Word doc that they never saved knows that this is possible, but a pain. Users have to be able to get back to their work in progress on there own.
<br><br>I see a solution alerting users to a unsaved preview when editing existing nodes, but how do you get to a node that has been previewed but never saved? I'm thinking about forums where a new users will occasionally preview their posts, but never realize there is another step to submit them. Now they are just gone. This change will leave them in the db, but I'm not sure that's an improvement if I'm the only person who can recover that post.
<br><br>- Kevin<br><br><div><span class="gmail_quote">On 6/8/07, <b class="gmail_sendername">Angela Byron</b> <<a href="mailto:drupal-devel@webchick.net">drupal-devel@webchick.net</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>On 8-Jun-07, at 12:21 PM, Morbus Iff wrote:<br><br>>>> This is pretty much the way I work - I could easily spend 30<br>>>> previews before I finish what I consider my first draft of a<br>>>> node. I would hate to waste 30 revisions (and the overhead) for
<br>>>> stuff<br>>> That's why it was suggested to automatically delete revisions<br>>> that were used for previews. Not that it would become elegant<br>>> code, but that would at least get rid of the overhead.
<br>><br>> How does that reduce the overhead, or keep the revision counter<br>> from ballooning ridiculously? I'm still "wasting" the revisions,<br>> whether they're active or not.<br><br>Proposal:
<br>new field in node_revisions: preview int 1<br>all nodes default to status = 0.<br><br>When preview is clicked...<br>- Does a node id exist for this post yet?<br> - If so, find the latest revision where preview = 1 and replace
<br>its contents with the current post's contents. Also store the node ID<br>in a cookie value, so if the browser crashes, we can get back here.<br> - If not, create a new revision and mark it preview = 1;<br><br>When submit is clicked...
<br>- Create a new "normal" revision (preview = 0).<br>- Publish the node (workflow settings permitting)<br>- Delete preview revision if it exists.<br>- Delete node ID cookie value.<br><br>hook_cron<br>- Delete all preview = 1 revisions where updated >= variable_get
<br>('preview_threshold', 86400);<br><br>user comes back after browser crashes:<br>- Drupal checks for existence of node ID cookie value, does a<br>drupal_goto() to the node "would you like to finish editing this?"
<br>Since users can see unpublished nodes as long as they've authored<br>them, they'd be able to further edit the content.<br><br>-Angie<br><br></blockquote></div><br>