Not sure what Moshe intended, but I added a "value" form element to all nodes called "_currentstatus" storing the $node->status. Then, I compare it to the nodeapi $node->status on update/submit, and 0 changing to 1 represents a new publish. Yes, it's quite "hack-ish" but it works well enough. An argument could be made to store this state change information in the default node, but I guess that'll happen when enough people want it. -- Dan Ziemecki Philosopher. Curmudgeon. Nerd. On 9/30/06, Peter Wolanin <pwolanin@gmail.com> wrote:
With the caveat that you may have problems under PHP5 (see my previous message), one possible way to check this would be to call node_load in your hook_nodeapi to get the cached node object that would have the pre-edit value for publication status.
However, this (and most possible solutions) are a little hackish. I'm not sure I know exactly what Moshe has in mind. For an example where the moderation status is preserved via the hook_nodeapi implementation see this module of mine: