Advanced search  

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

Pages: [1]   Go Down

Author Topic: Integration in JUpload  (Read 3889 times)

0 Members and 1 Guest are viewing this topic.

etienne_sf

  • Contributor
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 908
    • Wiki
Integration in JUpload
« on: June 26, 2009, 01:11:32 pm »

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
Logged

Nibbler

  • Guest
Re: Integration in JUpload
« Reply #1 on: June 26, 2009, 10:37:45 pm »

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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Integration in JUpload
« Reply #2 on: June 27, 2009, 09:07:40 am »

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.
Logged

etienne_sf

  • Contributor
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 908
    • Wiki
Re: Integration in JUpload
« Reply #3 on: July 03, 2009, 12:20:45 pm »

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
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 20 queries.