I'm currently working on a custom module that has a filter that requires the node object for the output.
Originally the filter was simply pulling in the NID from arg(1) and using that to load in the node object, but unfortunately if the filter cache is flushed and the nodes rebuild their output from anywhere other than the node page itself arg(1) will not contain the NID and therefore the filter will break.
I'm considering putting the NID into the token that the filter converts, but obviously the NID would not be known during the creation of a node. It wouldn't be overly difficult to alter the token via
hook_nodeapi() to insert the NID, but it seems like a lot of hastle.
Is there a simpler way to provide a filter with some sort of context so it can be aware of which node invoked it?