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] 2 3   Go Down

Author Topic: Cross-platform Batch Uploading  (Read 56797 times)

0 Members and 1 Guest are viewing this topic.

mstralka

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 178
Cross-platform Batch Uploading
« on: July 23, 2004, 04:37:20 am »

Before I discovered coppermine today, I had built my own photo management site which sucks compared to this.  I got sick of uploading files individually, so I found a tool called JUpload http://jupload.biz/ that I used to let my friends upload their photos to their own folders on the site.  It's a java applet that can be integrated into your site and customized by changing the applet parameters.  The documentation (well-written, professional looking PDF) lists all of the parameters and appropriate values.  Anyway, I got this tool to work on my site in about 2 hours, and it made it a lot easier for my friends to upload their photos.

I've read some other posts on this forum that cautions against granting batch upload access to users.  JUpload can use standard HTTP POSTs or GETs to transfer the files to Coppermine's standard upload processing page.  I'm not a lawyer, but I believe JUpload is free for private and educational use, which is what my site is.  For commercial use, the licenses start at $62.

I'm new to Coppermine and I don't know if there is API documentation, but if any experienced Coppermine programmers want to take a stab at making JUpload work with Coppermine, I'd be happy to share what I've done on my personal site.  I'm going to work on it too, so I'll share any progress I make

Take care
Mark

[edit GauGau 2006-01-29]
This mod has been ported for cpg1.4.x as well - see http://forum.coppermine-gallery.net/index.php?topic=27138.0
[/edit]
« Last Edit: January 30, 2006, 12:00:53 am by GauGau »
Logged
GO IRISH

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Cross-platform Batch Uploading
« Reply #1 on: July 23, 2004, 10:22:05 am »

It can't be bundled with coppermine releases if it's not under GNU GPL, but as third-party app (hack/mod, name it how you like) this sounds interessting. Please keep us updated on the progress you make, some screenshots would be nice as well.

GauGau
Logged

mstralka

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 178
Re: Cross-platform Batch Uploading
« Reply #2 on: July 24, 2004, 12:18:56 am »

Is there any API documentation for CPG or should I just look at upload.php and figure out where to make changes?
Logged
GO IRISH

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Cross-platform Batch Uploading
« Reply #3 on: July 24, 2004, 01:09:36 pm »

there's no API documentation available publicly yet, sorry (Tarique is currently working on this). You could just take a look at the db entries in the pictures table to see what queries to produce. You will have to check the authentification mechanisms (init.inc.php and functions.inc.php basically) as well.

GauGau
Logged

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
Re: Cross-platform Batch Uploading
« Reply #4 on: July 24, 2004, 02:21:59 pm »

I really had liked Jupload when I had last seen it almost a year ago- pity it is commercial.  Take a look at upload.php - it is just a matter of providing correc parameters to the function add_picture() (which is written in picmgmt.inc.php)

Logged
SANIsoft PHP applications for E Biz

mstralka

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 178
Re: Cross-platform Batch Uploading
« Reply #5 on: July 26, 2004, 03:11:19 am »

JUpload is commercial, but free for private or educational use...
I got JUpload to work with CPG.  This should make uploading much easier for users, provided they have Java and can use applets.

EDIT 8/27 - SEE NEW VERSION BELOW
« Last Edit: August 27, 2004, 05:54:40 pm by mstralka »
Logged
GO IRISH

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Cross-platform Batch Uploading
« Reply #6 on: July 26, 2004, 07:06:05 am »

could you share your hack, e.g. post your modifications in detail? Thanks.

GauGau
Logged

mstralka

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 178
Re: Cross-platform Batch Uploading
« Reply #7 on: July 27, 2004, 12:48:47 am »

EDIT 8/27/04: See new version below
« Last Edit: August 27, 2004, 05:50:59 pm by mstralka »
Logged
GO IRISH

mstralka

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 178
Re: Cross-platform Batch Uploading
« Reply #8 on: July 27, 2004, 02:45:43 am »

EDIT: See new version
« Last Edit: August 27, 2004, 05:51:17 pm by mstralka »
Logged
GO IRISH

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Cross-platform Batch Uploading
« Reply #9 on: July 27, 2004, 07:57:37 am »

##Modified files:
upload.php - moved functions to upload_functions.php - added code to display JUpload applet if user has permission
groupmgr.php - groups need to have permission to use JUPLOAD - added permission field 'can_use_jupload'
includes/functions.inc.php - modified authentication to work with JUpload - pass cookies as GET parameter because I couldn't get JUpload cookie parameter to work lang/english.php - added a few labels
That's the important bit you should be more specific about if this mod is suppossed to be usefull for anyone. Usually, you give detailed instructions like
Quote
edit file xxx.php, find
Code: [Select]
fooand replace with
Code: [Select]
bar. Then find
Code: [Select]
whateverand add after it
Code: [Select]
something

GauGau
Logged

mstralka

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 178
Re: Cross-platform Batch Uploading
« Reply #10 on: July 28, 2004, 11:52:48 pm »

EDIT 8/27/04: See new version below
« Last Edit: August 27, 2004, 05:50:38 pm by mstralka »
Logged
GO IRISH

psychozz

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: [CPG1.3.1]: Cross-platform Batch Uploading
« Reply #11 on: August 08, 2004, 09:48:49 pm »

Found one error:

You should replace:

Code: [Select]
<tr>
        <td class="tableh1" colspan="2"><b><span class="statlink">{$lang_groupmgr_php['group_name']}</span></b></td>
        <td class="tableh1"><b><span class="statlink">{$lang_groupmgr_php['disk_quota']}</span></b></td>
        <td class="tableh1" align="center"><b><span class="statlink">{$lang_groupmgr_php['can_rate']}</span></b></td>
        <td class="tableh1" align="center"><b><span class="statlink">{$lang_groupmgr_php['can_send_ecards']}</span></b></td>
        <td class="tableh1" align="center"><b><span class="statlink">{$lang_groupmgr_php['can_post_com']}</span></b></td>
        <td class="tableh1" align="center"><b><span class="statlink">{$lang_groupmgr_php['can_upload']}</span></b></td>
        <td class="tableh1" align="center"><b><span class="statlink">{$lang_groupmgr_php['approval_1']}</span></b></td>
        <td class="tableh1" align="center"><b><span class="statlink">{$lang_groupmgr_php['can_have_gallery']}</span></b></td>
        <td class="tableh1" align="center"><b><span class="statlink">{$lang_groupmgr_php['approval_2']}</span></b></td>
        <td class="tableh1" align="center"><b><span class="statlink">{$lang_groupmgr_php['upload_form_config']}</span></b></td>
        <td class="tableh1" align="center"><b><span class="statlink">{$lang_groupmgr_php['custom_user_upload']}</span></b></td>
        <td class="tableh1" align="center"><b><span class="statlink">{$lang_groupmgr_php['num_file_upload']}</span></b></td>
 <td class="tableh1" align="center"><b><span class="statlink">{$lang_groupmgr_php['num_URI_upload']}</span></b></td>
</tr>

With:
Code: [Select]
<tr>
        <td class="tableh1" colspan="2"><b><span class="statlink">{$lang_groupmgr_php['group_name']}</span></b></td>
        <td class="tableh1"><b><span class="statlink">{$lang_groupmgr_php['disk_quota']}</span></b></td>
        <td class="tableh1" align="center"><b><span class="statlink">{$lang_groupmgr_php['can_rate']}</span></b></td>
        <td class="tableh1" align="center"><b><span class="statlink">{$lang_groupmgr_php['can_send_ecards']}</span></b></td>
        <td class="tableh1" align="center"><b><span class="statlink">{$lang_groupmgr_php['can_post_com']}</span></b></td>
        <td class="tableh1" align="center"><b><span class="statlink">{$lang_groupmgr_php['can_upload']}</span></b></td>
        <td class="tableh1" align="center"><b><span class="statlink">{$lang_groupmgr_php['approval_1']}</span></b></td>
        <td class="tableh1" align="center"><b><span class="statlink">{$lang_groupmgr_php['can_have_gallery']}</span></b></td>
        <td class="tableh1" align="center"><b><span class="statlink">{$lang_groupmgr_php['approval_2']}</span></b></td>
        <td class="tableh1" align="center"><b><span class="statlink">{$lang_groupmgr_php['can_use_jupload']}</span></b></td>
        <td class="tableh1" align="center"><b><span class="statlink">{$lang_groupmgr_php['upload_form_config']}</span></b></td>
        <td class="tableh1" align="center"><b><span class="statlink">{$lang_groupmgr_php['custom_user_upload']}</span></b></td>
        <td class="tableh1" align="center"><b><span class="statlink">{$lang_groupmgr_php['num_file_upload']}</span></b></td>
  <td class="tableh1" align="center"><b><span class="statlink">{$lang_groupmgr_php['num_URI_upload']}</span></b></td>
</tr>


Otherwise it seems to work fine, but I still want to be able to upload more than 20 pictures at a time. I upload around 100 pictures each time so a hack that fixes zip upload would be very nice!
Logged

mstralka

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 178
Re: [CPG1.3.1]: Cross-platform Batch Uploading
« Reply #12 on: August 08, 2004, 11:13:30 pm »

I still want to be able to upload more than 20 pictures at a time. I upload around 100 pictures each time so a hack that fixes zip upload would be very nice!

20 is a practical limit, but you can change this by editing upload_functions.php.  I've uploaded 40 at a time.
In function jupload_applet():
FIND:
Code: [Select]
<!-- Maximums page 37-->
 <param name="maxNumberFiles" value="20">
 <param name="maxNumberFilesWarning" value="You can only upload 20 photos at a time.">
 <param name="maxNumberFilesTitle" value="Upload limit">

Change that number to whatever you want, or get rid of those parameters completely.  Read the JUpload documentation for more info on what each parameter does.
Logged
GO IRISH

RatKing

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 85
    • Personal website
Re: [CPG1.3.1]: Cross-platform Batch Uploading
« Reply #13 on: August 20, 2004, 09:21:25 pm »

I know this might be a little silly question but what version of Jupload did you use, I have been messign about with this and it simply doesn't seem to send any parameters to jupload.php other than:
  • control
  • unique_id
  • cookie

Other than that it seems to work quite well, execpt for the time estimation when uploading files but that might be because my connection her at work is slightly faster than the norm.  ;D
Logged

mstralka

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 178
Re: [CPG1.3.1]: Cross-platform Batch Uploading
« Reply #14 on: August 23, 2004, 12:23:54 pm »

I know this might be a little silly question but what version of Jupload did you use, I have been messign about with this and it simply doesn't seem to send any parameters to jupload.php other than:
  • control
  • unique_id
  • cookie
It also sends file_upload_request=1.

What else would you like it to send?  Those 4 variables are all it needs to process the photos.
Logged
GO IRISH

mstralka

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 178
Re: Cross-platform Batch Uploading
« Reply #15 on: August 27, 2004, 05:54:02 pm »


This MOD was updated on 9/23/04 to work with CPG 1.3.2.  Please use JUpload 0.75 - the newer versions seem to have some problems (thanks to Lapino for catching this)

Changes:
Removed jupload.php - integrated all JUpload functionality into upload.php and wrote step-by-step instructions
After uploading multiple photos, you can now edit all of their descriptions at once, instead of editing one, clicking next, editing another, and so on.  (I will make this feature available as a separate MOD for those who don't want to use JUpload.)

The instructions were too long to post so please download the attachment
« Last Edit: September 24, 2004, 03:37:45 am by mstralka »
Logged
GO IRISH

YUKAHO89

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
Re: Cross-platform Batch Uploading
« Reply #16 on: September 12, 2004, 11:41:07 am »

Can any on upload a origanal gallery comined with jupload ?
PLease
Logged

mstralka

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 178
Re: Cross-platform Batch Uploading
« Reply #17 on: September 12, 2004, 01:56:01 pm »

Can any on upload a origanal gallery comined with jupload ?
PLease


I'm not sure what you mean.  Do you want to see an example?  It's used on my site everyday.
http://www.photo-junky.com
Sign in with email: cc@stralka.com
password: tester
Logged
GO IRISH

YUKAHO89

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
Re: Cross-platform Batch Uploading
« Reply #18 on: September 12, 2004, 04:59:43 pm »

I dun know where to add this function and
after i have add the code in the php
the upload page comes blank
so i mean that can you upload a origanal gallery's
files  with the jupload


this function
Code: [Select]
function jupload_applet() {
//create the jupload applet
$unique_ID = substr(md5(microtime().getmypid()), 0, 8);
global $HTTP_COOKIE_VARS, $CONFIG;
global $lang_upload_php;
//convert the cookies into a string to append to the query string
//I could not get the browserCookie parameter to work properly with CPG so I pass it as a GET parameter.
//Not the best way to do it.
$cookieEnc = base64_encode(serialize($HTTP_COOKIE_VARS));
starttable("100%", $lang_upload_php['jupload_title'], 2);
echo <<<EOT
<tr>
<td colspan="2">
{$lang_upload_php['jupload_instr_1']}
</td>
</tr>
<tr>
<td colspan="2">
<applet
  code="JUpload/startup.class"
  archive="jupload.jar"
  width="500"
  height="300"
  mayscript="mayscript"
  name="JUpload"
  alt="JUpload applet">
 <!-- From Page 30 upward -->
 <!-- Java Plug-In Options -->
 <param name="progressbar" value="true">
 <param name="boxmessage" value="Loading JUpload Applet ...">
 <param name="boxbgcolor" value="#e0e0ff">
 
 <!-- Position & Size Page 38-->
 <param name="mainSplitpaneLocation" value="300">
 <!--Position the lower-left message window from the top-->
 <param name="leftSplitpaneLocation" value="150">

 <!-- Target links -->
 <param name="actionURL" value="upload.php?control=phase_1&file_upload_request=1&unique_ID=$unique_ID&cookie=$cookieEnc">
 <param name="completeURL" value="upload.php?control=phase_2&unique_ID=$unique_ID&cookie=$cookieEnc">
 
 <!-- CUSTOMIZATIONS FOR COPPERMINE -->
 <param name="tagName" value="file_upload_array">


 <!-- Filters -->
 <param name="imageFileFilter" value="true">
 <param name="hideShowAll" value="true">

 <!-- Messages -->
 <param name="showSuccessDialog" value="false">
 <param name="successDialogMessage" value="Photos uploaded successfully">
 <param name="successDialogTitle" value="Upload Successful">

 <!-- Maximums page 37-->
 <param name="maxNumberFiles" value="999">
 <param name="maxNumberFilesWarning" value="You can only upload 999 photos at a time.">
 <param name="maxNumberFilesTitle" value="Upload limit">


 <!-- Server -->
 <!-- These all need to be false for the redirect to completeURL to work properly -->
 <param name="showServerResponse" value="false">
 <param name="checkResponse" value="false">
 <param name="realTimeResponse" value="false">

 <!-- Colors -->
 <!-- This could easily be customized to match the theme in use-->
 <param name="backgroundColor" value="#e0e0ff">

 <!-- Switches -->
 <param name="showStatusPanel" value="true">

 <!--Recursion -->
 <param name="useRecursivePaths" value="false">

 <!-- Thumbnails -->
 <param name="showThumbnails" value="false">

 <!-- IF YOU HAVE PROBLEMS, CHANGE THIS TO TRUE BEFORE CONTACTING SUPPORT -->
 <param name="debug" value="false">

 Your browser does not support applets. Or you have disabled applet in your options.
 To use this applet, please install the newest version of Sun's java. You can get it from <a href="http://www.java.com/">java.com</a>

</applet>
</td>
</tr>

EOT;
endtable();
}
Logged

mstralka

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 178
Re: Cross-platform Batch Uploading
« Reply #19 on: September 12, 2004, 05:27:51 pm »

That function goes anywhere in upload.php, probably near the other functions.

Did you read the instructions completely?
Code: [Select]
## Author Notes: Download and install jupload from [url]http://jupload.biz[/url]
## Put JUpload.jar in the same directory as your coppermmine files or modify
## function jupload_applet() to point to it
## I recommend you install my Multiple Edit mod first:
## [url]http://forum.coppermine-gallery.net/index.php?topic=9391.new;[/url]

Have you followed the instructions and gone to http://jupload.biz and installed the Java applet file on your web server?
Legally, I cannot distribute that piece so you will have to get it yourself.

I've attached my upload.php (renamed it to upload.txt).  I think I have other modifications on it so I'm not sure if it will work for you

Hope that helps
Mark
Logged
GO IRISH
Pages: [1] 2 3   Go Up
 

Page created in 0.029 seconds with 20 queries.