Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Plug-in two step

Quote Reply
Plug-in two step
Alex,

I think I have the problem more defined now.

The plug-ins and plug-in system needs to handle a third options, rather than just stop/continue -- Commit

Here's why.

Let's follow the uploading of a file.

A data stream is uploaded.
If the pre-hook gets it, it doesn't know if the basic data passed inspection.
If the post hook gets it, the Add routine doesn't know yet if the data passes inspection.


A way needs to be created in the main access utilities to handle the data, but call the plug-in BEFORE "COMMIT"

On return from the plug-in, the plugin would send "COMMIT" or "STOP"

If it is commit, the routine knows the plug-in ok'd all it's data, and the routine can now safely update. The plug-in can then either be re-entered on a post-hook, with 'commit' set (so it knows where it's at) and finish up, or skipped if it does it's work in a pre- and commit hook.

Is this making sense?

What has to happen, is that routines that "do something" to links, have to have a way to hook into the routine before the routine commits it's data, but after the routine has done everything else to it.

This means logically looking at the various subroutines that have hooks, and figuring out where the best place to hook into it is. Pre- and Post- hooks make broad sense, but so does a COMMIT hook.

I hope this is clearer.




PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://LinkSQL.com/FAQ


Subject Author Views Date
Thread Plug-in two step pugdog 1950 Feb 1, 2001, 11:19 PM
Thread Re: Plug-in two step
Alex 1890 Feb 2, 2001, 9:54 AM
Post Re: Plug-in two step
pugdog 1853 Feb 2, 2001, 1:42 PM