<br>Is preview int per user?<br><br>You start a preview, but don&#39;t commit it and I want to modify that node...<br><br>Am I informed that the node is being edited?&nbsp; <br>Can I see the edit?<br>If I can edit it regardless of another user&#39;s unsaved preview, is that preview deleted?
<br><br>&quot;If so, find the latest revision where preview = 1 and replace<br>its contents with the current post&#39;s contents.&quot;<br><br>Is that per user or will my edit overwrite your preview?<br><br>&quot;user comes back after browser crashes:&quot;
<br><br>How does a non admin user get &quot;back&quot; to node that has been previewed (and thus saved to the db) but never published if they don&#39;t know the nid?&nbsp;&nbsp; This is my &quot;self serve&quot; UI issue.&nbsp; 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.&nbsp; 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?&nbsp; I&#39;m thinking about forums where a new users will occasionally  preview their posts, but never realize there is another step to submit them.&nbsp; Now they are just gone.&nbsp; This change will leave them in the db, but I&#39;m not sure that&#39;s an improvement if I&#39;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> &lt;<a href="mailto:drupal-devel@webchick.net">drupal-devel@webchick.net</a>&gt; 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>&gt;&gt;&gt; This is pretty much the way I work - I could easily spend 30<br>&gt;&gt;&gt; previews before I finish what I consider my first draft of a<br>&gt;&gt;&gt; node.&nbsp;&nbsp;I would hate to waste 30 revisions (and the overhead) for
<br>&gt;&gt;&gt; stuff<br>&gt;&gt; That&#39;s why it was suggested to automatically delete revisions<br>&gt;&gt; that&nbsp;&nbsp;were used for previews. Not that it would become elegant<br>&gt;&gt; code, but&nbsp;&nbsp;that would at least get rid of the overhead.
<br>&gt;<br>&gt; How does that reduce the overhead, or keep the revision counter<br>&gt; from ballooning ridiculously? I&#39;m still &quot;wasting&quot; the revisions,<br>&gt; whether they&#39;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>&nbsp;&nbsp; - If so, find the latest revision where preview = 1 and replace
<br>its contents with the current post&#39;s contents. Also store the node ID<br>in a cookie value, so if the browser crashes, we can get back here.<br>&nbsp;&nbsp; - If not, create a new revision and mark it preview = 1;<br><br>When submit is clicked...
<br>- Create a new &quot;normal&quot; 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 &gt;= variable_get
<br>(&#39;preview_threshold&#39;, 86400);<br><br>user comes back after browser crashes:<br>- Drupal checks for existence of&nbsp;&nbsp;node ID cookie value, does a<br>drupal_goto() to the node &quot;would you like to finish editing this?&quot;
<br>Since users can see unpublished nodes as long as they&#39;ve authored<br>them, they&#39;d be able to further edit the content.<br><br>-Angie<br><br></blockquote></div><br>