Hi Stramm,
I'm the developper of the JUpload plugin for Coppermine available here:
http://forum.coppermine-gallery.net/index.php/board,100.0.htmlFor all: it's a very good one ! Upload is easier and faster. Lots of people use your tool. But JUpload is not compatible with it. This topic is about making JUpload be compatible with your Coppermine extension.
The issue: I had to duplicate the add_picture() and resize_image() Coppermine functions: I need them to return a simple success or error message, so that the JUpload applet can know if the upload was successfull or not.
When an error occurs, the standard behavior of these functions is to call cpg_die, and display an HTML error page. So the applet needs to find the error or success result, in the HTML output, whatever is the current language an theme. Impossible.
So: I duplicated add_picture() and resize_image(), just to replace calls to cpg_die, by calls to my jupload_cpg_die() function. This function returns a line 'ERROR: bla bla bla'. When there is no error, I return a line with 'SUCCESS'.
The applet simply looks for a line containing 'SUCCESS' or 'ERROR: bla bla bla'.
My first solution:Duplicate both the standard add_picture() and resize_image() functions and these functions given in your modpack, and choose which ones I must execute (the standard or yours), depending on the fact that your modpack is installed or not.
So, question:
Can you give me a stable way to 'guess' if your modpack is installed on the current Coppermine, JUpload is running on ?The target:Update the Coppermine cpg_die, perhaps in the 1.5 version, so that it can either:
- Have the current behaviour
- Call an external function, depending on the current execution configuration.
This could be done through a hook point. Can someone do that on the Coppermine SVN ?In this case, JUpload would simply call the available add_picture() and resize_image() functions, and there would be no other problem.
I don't know if you, Stramm, is the good one to answer to this point. Are you a Coppermine developper ?
Perhaps
Joachim ?
Best regards
Etienne