Integration in JUpload Integration in JUpload
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Integration in JUpload

Started by etienne_sf, June 26, 2009, 01:11:32 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

etienne_sf

Hi Stramm,

 I'm the developper of the JUpload plugin for Coppermine available here:
http://forum.coppermine-gallery.net/index.php/board,100.0.html

For 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

Nibbler

It doesn't die any more in 1.5 - so that part's already taken care of.

Joachim Müller

If you want to discuss issues related to cpg1.5.x, there is a place where you can do that. Please make sure to check out cpg1.5.x first to see how it works before suggesting anything.

etienne_sf

Hum, hum,

  I'll check 1.5 again, and post any relative message in the relevant, thanks for your answers.




Stramm,

  Can you give me a hint, as an answer to my question here above:

Can you give me a stable way to 'guess' if your modpack is installed on the current Coppermine, JUpload is running on ?

Etienne