4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: rroc on June 22, 2005, 01:04:20 AM



Title: [MOD] multiupload
Post by: rroc on June 22, 2005, 01:04:20 AM
[MOD] MultiUpload
- This mod enables the users to add multiple files to a category at once.
- The images will get name and index, ie. "My pet", "My pet 2", "My pet 3",...
- for 4images 1.7.1

The best way to install this is to use the provided files, which give the changes compared to original installation of 4 images.

FILES
Files to be modified: (please take a backup copy of all of these!)
-categories.php  //settings
-categories.html  //To access the new action
-member.php //functionality (ie. looping the default upload method as long as required)

New files:
-member_multiuploadform.html //this is a simplified template for the multiupload
-two buttons... multiupload.gif, and multiupload_off.gif, I attached some as samples.

*NEW* I have included the clean versions of all these files to this post. They contain nothing more than the multiupload mod, it should be easy to integrate from there.


Recommended/required MODS
-auto thumbnailer and auto resizer MODs are highly recommended
-I also use my own EXIF reader and autorotate(according to the EXIF) MODs... these are yet to be released...


INSTALL
------------------------------------

I. SETTING THE VARIABLES

categories.php:

1.
AFTER:
1
$upload_button = "<img src=\"".get_gallery_image("upload_off.gif")."\" border=\"0\" alt=\"\" />";
ADD:
1
$multiupload_button = "<img src=\"".get_gallery_image("multiupload_off.gif")."\" border=\"0\" alt=\"MultiUpload images to this Gallery\" />";

2.
AFTER:
1
$upload_button = "<a href=\"".$upload_url."\"><img src=\"".get_gallery_image("upload.gif")."\" border=\"0\" alt=\"\" /></a>";
ADD:
1
2
3
$multiupload_url = $site_sess->url(ROOT_PATH."member.php?action=multiuploadform&amp;".URL_CAT_ID."=".$cat_id);
  $multiupload_button = "<a href=\"".$multiupload_url."\"><img src=\"".get_gallery_image("multiupload.gif")."\" border=\"0\" alt=\"Upload Multiple files\" /></a>";
 

3.
AFTER:
1
"upload_button" => $upload_button,
ADD:
1
"multiupload_button" => $multiupload_button,


categories.html
4.
REPLACE:
1
{upload_button}
BY:
1
{upload_button} {multiupload_button}





II. FUNCTIONALITY

member.php

1.
REPLACE:
1
if ($action == "uploadimage") {
BY:
1
if ($action == "uploadimage" || $action=="multiuploadimage") {


2.1
REPLACE:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
if (!$error) {
    // Start Upload
    include(ROOT_PATH.'includes/upload.php');
    $site_upload = new Upload();

    // Upload Media file
    if (!empty($HTTP_POST_FILES['media_file']['tmp_name']) && $HTTP_POST_FILES['media_file']['tmp_name'] != "none") {
      $new_name = $site_upload->upload_file("media_file", "media", $upload_cat);
      if (!$new_name) {
        $msg .= (($msg != "") ? "<br />" : "")."<b>".$lang['file_upload_error'].": ".$new_name."</b><br />".$site_upload->get_upload_errors();
        $uploaderror = 1;
      }
    }
    else {
      $new_name = $remote_media_file;
    }
BY:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
if (!$error) {
//MULTI FILE UPLOAD
$fileext="";
while(isset($HTTP_POST_FILES['media_file'.$fileext]))
{
include_once(ROOT_PATH.'includes/upload.php');
    $site_upload = new Upload();

    // Upload Media file
    if (!empty($HTTP_POST_FILES['media_file'.$fileext]['tmp_name']) && $HTTP_POST_FILES['media_file'.$fileext]['tmp_name'] != "none") {
      $new_name = $site_upload->upload_file('media_file'.$fileext, "media", $upload_cat);
      if (!$new_name) {
        $msg .= (($msg != "") ? "<br />" : "")."<b>".$lang['file_upload_error'].": ".$new_name."</b><br />".$site_upload->get_upload_errors();
        $uploaderror = 1;
      }
    }
    elseif($action=="uploadimage") {
      $new_name = $remote_media_file;
    }
    else
    {
    $new_name = "";
    break;
    }


2.2  * new *
REPLACE:
1
elseif ($config['auto_thumbnail'] == 1 && !empty($HTTP_POST_FILES['media_file']['tmp_name']) && $HTTP_POST_FILES['media_file']['tmp_name'] != "none" && !$uploaderror) {
BY:
1
elseif ($config['auto_thumbnail'] == 1 && !empty($HTTP_POST_FILES['media_file'.$fileext]['tmp_name']) && $HTTP_POST_FILES['media_file'.$fileext]['tmp_name'] != "none" && !$uploaderror) {


3.1 (NOW START REPLACING ALL THE includes and requires INSIDE THIS ACTION by include_once and require_once)
REPLACE:
1
require(ROOT_PATH.'includes/image_utils.php');
BY:
1
require_once(ROOT_PATH.'includes/image_utils.php');


3.2 do this to change the image names to have index
REPLACE:
1
2
3
4
5
if ($direct_upload) {
        $sql = "INSERT INTO ".IMAGES_TABLE."
                (cat_id, user_id, image_name, image_description, image_keywords, image_date, image_active, image_media_file, image_thumb_file, image_download_url, image_allow_comments".$additional_field_sql.")
                VALUES
                ($cat_id, ".$user_info['user_id'].", '$image_name', '$image_description', '$image_keywords', $current_time, $image_active, '$new_name', '$new_thumb_name', '$image_download_url', $image_allow_comments".$additional_value_sql.")";

BY:
1
2
3
4
5
6
$imgname = ($fileext!="")?"$image_name $fileext":$image_name;
  if ($direct_upload) {
$sql = "INSERT INTO ".IMAGES_TABLE."
(cat_id, user_id, image_name, image_description, image_keywords, image_date, image_active, image_media_file, image_thumb_file, image_download_url, image_allow_comments".$additional_field_sql.")
VALUES
($cat_id, ".$user_info['user_id'].", '$imgname', '$image_description', '$image_keywords', $current_time, $image_active, '$new_name', '$new_thumb_name', '$image_download_url', $image_allow_comments".$additional_value_sql.")";


4.
REPLACE:
1
include(ROOT_PATH.'includes/search_utils.php');
BY:
1
include_once(ROOT_PATH.'includes/search_utils.php');


5.
REPLACE:
1
include(ROOT_PATH.'includes/email.php');
BY:
1
include_once(ROOT_PATH.'includes/email.php');


6.
REPLACE:
1
$msg .= $lang['image_add_success'].": <b>".stripslashes($image_name)."</b> (".$new_name.")";
BY:
1
      $msg .= $lang['image_add_success'].": <b>".stripslashes($image_name)."</b> (".$new_name.")<br>";

7. (almost over... )
REPLACE:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
      $content .= "<table border=\"0\" align=\"center\">\n<tr>\n<td>\n".$media."\n</td>\n</tr>\n</table>\n";
    }
    else {
      $action = "uploadform";
      $sendprocess = 1;
    }
  }
  else {
    $action = "uploadform";
    $sendprocess = 1;
  }
}

if ($action == "uploadform") {
BY:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
$content .= "<table border=\"0\" align=\"center\">\n<tr>\n<td>\n".$media."\n</td>\n</tr>\n</table>\n";
    $good=1;
  }
  else {
  //Atleast 1 multifile succeeded.
  if(count($HTTP_POST_FILES) && $good==1)
  {
  $action = "multiuploadform";
  break;
  }
  else
  {
  $action=($action=="multiuploadimage")?"multiuploadform":"uploadform";
  $sendprocess = 1;
  break; //break the while if any image upload fails
  }
  }
  $fileext=($fileext=="")?2:$fileext+1;
  }//end while
  }//end if
    else
    {
      $action = "uploadform";
      $sendprocess = 1;
    }
  }//end upload action
 
  //Show the form
if ($action == "uploadform" || $action == "multiuploadform") {

8. to parse the correct html...
REPLACE:
1
$content = $site_template->parse_template("member_uploadform");
BY:
1
2
3
4
5
6
7
8
  if($action == "multiuploadform" || $action=="multiuploadimage")
    {
    $content = $site_template->parse_template("member_multiuploadform");
    }
    else
    {
    $content = $site_template->parse_template("member_uploadform");
  }


FINALLY...

III. CREATE A PAGE FOR MULTIUPLOAD FORM 'member_multiuploadform.html'
- download the file from below and copy it to your template folder (of course rename to member_multiuploadform.html)
- you may un-comment more file items, if you expect the users to download smaller files. For me 5 is quite enough when uploading jpgs directly from 5MP digital camera... (I  use the auto thumbnailer and auto resizer), but for photos from my 2MP camera I can use even 10...
- 4 images will just give (a bit misleading though), timeout error, if one tries to add too many images at once... complaining that you have invalid password(or something I can't recall...).
- Please edit this HTML to use your current locals (actually, you should add some variables to your language main.php -file...), I was too busy to do that.


...READY. Now starts the testing. :) (at first it is good to check that the 'normal' upload works as it used to... )


22 June 2005 CORRECTED the steps II.2 and II.7 were changed
23 June 2005 CORRECTED I fixed step II.2, incorrectly, leaving out the ".$fileext"-extension when checking the input files. And added a new II.2.2, to enable the auto thumbnailing...
26 July 2005 ADDED attachments of 'clean' multiupload files.
27 July 2005 UPDATED the instructions to match the provided files.


Title: Re: [MOD] multiupload
Post by: MustardGT on June 22, 2005, 04:31:08 AM
I'm getting:

"Template Error: Couldn't open Template ./templates/4dark/media/.html"

Any ideas how to fix that?


Title: Re: [MOD] multiupload
Post by: rroc on June 22, 2005, 11:59:50 AM
Thanks for bringing that up... It seemed I had some error in the above. I have commented out the possibility to use remote files in my own installation, and while converting to the original form I had some parenthesis errors...  :oops:

Now the MOD above is corrected...

[27 July 2005] removed the correction details, as they refer to older version


Title: Re: [MOD] multiupload
Post by: JensF on June 23, 2005, 07:14:47 AM
Is there a demo???


Title: Re: [MOD] multiupload
Post by: rroc on June 23, 2005, 08:03:24 AM
Sorry no demo as the gallery is meant for my friends private use, but I'll give you 4 screenshots.

1: before... here the multiupload is clicked
2: multiupload form
3: after the upload, file names are shown, and also all the images. (here I have another mod to show the gallery name as well, but never mind...)
4: here all the images are added to the category also shown in 1.

(I hope you are able to see something, as the 124kb limit I had to downgrade them a bit)


Title: Re: [MOD] multiupload
Post by: blackbeatclub on June 23, 2005, 03:07:26 PM
Hi

first of all thx for this nice mod i was searching for something like this for a long time.

The Mod seems to work fine but when i want to upload the pictures then he only upload the
1st picture. (see the screenshot 4more details)

(http://mitglied.lycos.de/rootboy/error.jpg)

"Fehler beim Upload der Bild-Datei:" means that an error occured while uploading the file (file2).
But first Picture has been uploaded without problems.

Could you please try to help me?
Do you know what i did wrong?

Thx in advanced




Title: Re: [MOD] multiupload
Post by: maziggy on June 23, 2005, 03:31:07 PM
Nice MOD ;-) Why is it not possible to type in a description for each image to be uploaded ?

Cheers, Martin


Title: Re: [MOD] multiupload
Post by: rroc on June 23, 2005, 04:26:28 PM
blackbeatclub, thanks for testing this out... I still had some copy-paste errers... to fix, take a look at the last line of II.2.1, and also do the new II 2.2. ... Now, it should work.

maziggy, I thought of that, but for my purposes this is better... as I can easily add many photos without having to type the description and the name for each of them separately. I can just say that holiday in China, and if there is some special picture, I can comment it later in more detail.

However, it is fairly easy to do that if you need it...

[27 July 2005] EXPLANATION in my newest post.


Title: Re: [MOD] multiupload
Post by: blackbeatclub on June 23, 2005, 04:49:11 PM
blackbeatclub, thanks for testing this out... I still had some copy-paste errers... to fix, take a look at the last line of II.2.1, and also do the new II 2.2. ... Now, it should work.

hi thx 4 help but it doesnt change anything.
the error is still there - no change.

the error must be in the member.php right? ok here is my member.php perhaps you can find out whats my mistake.
Just Rename the member.zip to member.php.

thank you



Title: Re: [MOD] multiupload
Post by: rroc on June 23, 2005, 05:35:16 PM
Hmmmmm! I did compare the files, and there was one difference that I didnt document... again(!!!)... Unfortunately it does not affect you in any way... It only makes the image names different...  :cry:

REPLACE:
1
2
3
4
5
      if ($direct_upload) {
        $sql = "INSERT INTO ".IMAGES_TABLE."
                (cat_id, user_id, image_name, image_description, image_keywords, image_date, image_active, image_media_file, image_thumb_file, image_download_url, image_allow_comments".$additional_field_sql.")
                VALUES
                ($cat_id, ".$user_info['user_id'].", '$image_name', '$image_description', '$image_keywords', $current_time, $image_active, '$new_name', '$new_thumb_name', '$image_download_url', $image_allow_comments".$additional_value_sql.")";

BY:
1
2
3
4
5
6
  $imgname = ($fileext!="")?"$image_name $fileext":$image_name;
  if ($direct_upload) {
$sql = "INSERT INTO ".IMAGES_TABLE."
(cat_id, user_id, image_name, image_description, image_keywords, image_date, image_active, image_media_file, image_thumb_file, image_download_url, image_allow_comments".$additional_field_sql.")
VALUES
($cat_id, ".$user_info['user_id'].", '$imgname', '$image_description', '$image_keywords', $current_time, $image_active, '$new_name', '$new_thumb_name', '$image_download_url', $image_allow_comments".$additional_value_sql.")";

I'm not sure about the possibility of conflict with the "Image Annotation MOD", you are using? I don't have that... Another thing is what I have done, is that I don't use those remote upload files at all. (I have commented thos away as well)

When I'll have the time, I'll have to install a clean 4images just for the mod development purposes... It's a bit difficult to see things when there are many overlapping MODs.

I will include my member.html, though it has some code for my MOD for EXIF and automatic rotation... But it could be of help to see the differences in that whole critical uploading section beginning from:

"if ($action == "uploadimage" || $action=="multiuploadimage") {"


So you still have the same problem, that the first image is uploaded correctly, but the second one, etc ain't?  I had this when I was developing this as well... And atleast one time I had to log off the current section, and to try again... MAybe it stores some of the data into cache... But some problem there seems to be anyhow.  :?

I'll get back to it, now I have a vacation... and I'll be away for a while...

[Modified] 26.7. removed the attachment, as it had way too much in there. The correct version is attached in the main mail.


Title: Re: [MOD] multiupload
Post by: MustardGT on June 25, 2005, 01:30:13 AM
Yep, that fixed it and it works perfectly now man. Very excellent mod. I'm glad to see that someone finally tackled the tast and got it right. Congrats!

Thanks for the great work.


Title: Re: [MOD] multiupload
Post by: benzo on June 26, 2005, 02:02:55 PM
Great Mod  8)
It would be possible to upload to different categories and with different names ?

Regards.


Title: Re: [MOD] multiupload
Post by: abifotos on June 28, 2005, 09:22:39 PM
hey blackbeatclub!

did you find a solution for the multiupload problem?
I got the same with 4images 1.7.1...

thanks!
Benny


Title: Re: [MOD] multiupload
Post by: ctforums on June 28, 2005, 11:46:08 PM
Nice MOD ;-) Why is it not possible to type in a description for each image to be uploaded ?

Cheers, Martin


Hi maziggy!
Did you manage to get the descriptions working for each image?  I'm struggling on this one. Cheers.


Title: Re: [MOD] multiupload
Post by: abifotos on June 29, 2005, 12:59:20 AM
Which version of 4images do you use to use this extension?
I tried it with 1.7.1 and had no luck ... do I habe any chances to get this problem solved with version 1.7.0 ?


Title: Re: [MOD] multiupload
Post by: ctforums on June 29, 2005, 09:44:32 AM
Hey Backbeatclub and abifotos,

I had the upload problem (only uploading 1st and returning an error on subsiquent images).
I managed to cure it by doing this:

1. Download member.txt from rroc's last post
2. Makes sure you follow II 2.1 and 2.2
3. Save as member.php

This worked fine for me in 4images 1.7.1.


Title: Re: [MOD] multiupload
Post by: abifotos on June 29, 2005, 12:02:11 PM
hi!

i get this error with rrocs member.php:

DB Error: Bad SQL Query: INSERT INTO 4images_images (cat_id, user_id, image_name, image_description, image_exif, image_keywords, image_date, image_active, image_media_file, image_thumb_file, image_download_url, image_allow_comments) VALUES (1, 1, 'Test', '','', '', 1120039157, 1, 'lukas_2.jpg', 'lukas_2.jpg', '', 1)
Unknown column 'image_exif' in 'field list'

Can you post your working member.php, please?

thanks!


Title: Re: [MOD] multiupload
Post by: ctforums on June 29, 2005, 02:01:20 PM
Did you use member.txt or member.zip?  member.txt contains rroc's exif statements for thumbnails etc.
Download member.zip and change the extension to .php.

I will upload my member.php later today. Good luck!

Anyone managed to get the option for description and names for each individual image?


Title: Re: [MOD] multiupload
Post by: blackbeatclub on June 29, 2005, 06:03:12 PM
Hey Backbeatclub and abifotos,

I had the upload problem (only uploading 1st and returning an error on subsiquent images).
I managed to cure it by doing this:

1. Download member.txt from rroc's last post
2. Makes sure you follow II 2.1 and 2.2
3. Save as member.php

This worked fine for me in 4images 1.7.1.

hi first off all thx 4 you help
now it first seems to be uploaded sucessfull
(it shows the picturs i just uploaded) but when i go back and then again in this categorie they arent there
anymore.
And i get the same error as abifotos.
i used the member.txt

Take a look at the screenshot i made

edit: and the normal upload didnt work now :-(


Title: Re: [MOD] multiupload
Post by: ctforums on June 29, 2005, 06:47:18 PM
I've attached my member.php for you guys to try.
Just change the extension to .php

Have fun  :)


Title: Re: [MOD] multiupload
Post by: abifotos on June 29, 2005, 07:34:07 PM
thank you!
with your file everything works fine!


Title: Re: [MOD] multiupload
Post by: abifotos on June 30, 2005, 05:47:47 PM
Because of my (unlimited) webspace with a uploadlimit of 1MB/file I get a error when I want to upload e.g. 2 files with 600KB each (->1,2MB).4images redirects me to a "forgot password? - enter your emailadress here"-page and doesn't upload the pictures... Is there a possibility to solve this problem?


Title: Re: [MOD] multiupload
Post by: ctforums on June 30, 2005, 07:54:56 PM
you could try increasing the 'Max. image size in KB' in admin?


Title: Re: [MOD] multiupload
Post by: ctforums on July 09, 2005, 08:42:11 PM
Anyone managed to get the option for description and names for each individual image?

Can anyone help me on this - I'm really struggling.
Thanks.


Title: Re: [MOD] multiupload
Post by: karimun on July 10, 2005, 02:12:50 PM
I use v1.7.1
Following (strange) errors occur:

1st problem:
-----------------
When I try to upload only one picture entered in the FIRST upload field:

Quote  [Expand]
Template Error: Couldn't open Template ./templates/default/media/.html

Nevertheless, the picture is successfully uploaded but additionally the ´404-filenotfound.gif´ appears in the ´new pictures´ listing as a placeholder for a second picture the script obiviously wanted to upload. We cannot force users to mandatory upload more than one picture when using this MOD, right?  :wink:  )

2nd problem:
------------------
When I try to upload only one picture entered in the SECOND upload field i get redirected to the single upload form.

3rd problem:
-----------------
When I try to upload two pictures, entered in the FIRST AND SECOND upload fields:

Quote  [Expand]
Image added: newname (originalname.jpg)
Error uploading image file:
originalname_2.jpg: Copy error. Please check the directory permissions.

Here it seems that the MOD manages to upload the first picture and then looks for a file called originalname_2.jpg and NOT for originalname.jpg (the filename I entered in 2nd upload field).

-------------------------------------------------------------------------------------------------------------
my member.php is already stuffed with lines of other mods so I cannot simply replace it with the file posted by rroc.
I love the multiupload idea - if it only would work properly. So - has somebody experienced similar things?




Title: Re: [MOD] multiupload
Post by: rroc on July 26, 2005, 10:14:58 AM
Ok... thanks for pointing out. It seemed to me that some people were had this already running. But I think they had it running in the 'wrong' way, as they had some unnecessary stuff on the memper.php file. I created a new test gallery for myself, where I was able to isolate this upload mod only.

So here is the member.php file with ONLY the multiupload changes. It should be easy to integrate from here to your systems. I'll modify the installation instructions as well...


Title: Re: [MOD] multiupload
Post by: zellenblog on July 27, 2005, 02:13:25 PM
First thanks of all for this great mod. My users are crying out loud for a chance to upload several images at once.

It works, but I am getting errors. When I am using the MultiUpload - Feature I get this:

(http://img43.imageshack.us/img43/2011/fehler2mf.th.jpg) (http://img43.imageshack.us/my.php?image=fehler2mf.jpg)

1. I really dont know it the error in the top bar of the browser has been there before (take a look at the picture)
2. I dont get any "preview pics" of the uploaded pictures when the upload has finished.
3. The first picture always show up as uploaded successfully, but second, third aso are stated with "Illegal file format (, )" and "File has not been uploaded etc."

The files are there. When I am logging in as admin the pictures are there. I only have to approve them, thats it.

But it is annoying for the users, getting error messages (changed them in the lang file temporary)

I tried one of the attached member.php files and it also works. But with these files my template gots lost, but I have no errors and I have the so called preview of my uploaded pics.

Please help. Oh, demo at www.zellenblog.de/galerie/
WARNING: The content of the site could offend you. Its about Celebs and Stockings, ICRA rated.

Thanks in advance


Title: Re: [MOD] multiupload
Post by: HUNTER on July 27, 2005, 02:20:26 PM
how about to adapt this mod for uploading multiple pictures in a one? i mean that details page will display 2 or 3 images uploded by one user...


Title: Re: [MOD] multiupload
Post by: zellenblog on July 27, 2005, 02:25:56 PM
HUNTER

I am sorry, but I really dont know what you are trying to say ;)


Title: Re: [MOD] multiupload
Post by: rroc on July 27, 2005, 02:47:01 PM
zellenblog:
Hmm. looks weird. (Especially when I'm not so great in german : ) ) And you have integrated from the member.txt I had added in my previous post?(I didn't have the time to change the installation instructions yet... I'll do it later today) I'll look into this... It would be nice to have a look at your member.php, maybe you could PM it to me?

HUNTER:
yes, that would be nice addition to be able to post several images to one item... But I think that would break many other mods, such as slideshow... But I think it could be done in a way that would be almost the same: by giving the users the possibility to create Categories, and for each category having it's own comment board.


Title: Re: [MOD] multiupload
Post by: zellenblog on July 27, 2005, 03:03:20 PM
Hi rroc,

PM is in your inbox.

Thanks for your help


Title: Re: [MOD] multiupload
Post by: zellenblog on July 27, 2005, 03:38:09 PM
Found it ! Or them ;)

Used BeyondCompare with your attached .txt file and my member.php, corrected the differences and VOILA! It works now.

Thanks mate.


Title: Re: [MOD] multiupload
Post by: rroc on July 27, 2005, 08:56:32 PM
maziggy, ctforums:
Here you go... I created the extension to the original mod. (be sure to use the latest version...).
(The modified member.php is included below, if you use beyondcompare...)

[MOD] multiupload + descriptions

1. Apply the original mod...

2. Do the two changes in members.php:

2.1.1 difficult to explain... but
FIND
1
if ($action == "uploadimage" || $action=="multiuploadimage") {

2.1.2 ...leave it be, and find the next text below and replace it as described
(make sure it is this, because it exist in other place in the file as well)

REPLACE:
1
$image_description = un_htmlspecialchars(trim($HTTP_POST_VARS['image_description']));

BY:
1
2
  $image_description = "";
//  $image_description = un_htmlspecialchars(trim($HTTP_POST_VARS['image_description'])); --> MOVED TO MULTIDESCRIPTION

2.2 Final part for member.php:
This implements functionality that if only the first description is given it will be used for the all items.
FIND:
1
2
while(isset($HTTP_POST_FILES['media_file'.$fileext]))
{

ADD BELOW THAT:
1
2
3
    // MULTIDESCRIPTION
    //If only one description has been provided use it, otherwise read the POSTed value
$image_description = ($image_description!="" && empty($HTTP_POST_VARS['image_description'.$fileext]))?$image_description:un_htmlspecialchars(trim($HTTP_POST_VARS['image_description'.$fileext]));

3. html update
Replace the old member_multiuploadform.html with the new one, which is provided below. There were added the description fields.


All should be working now. I provided also the member.php, to ease up by using beyondcompare or similar tool. (it contains both the original mod and the description addon)


Title: Re: [MOD] multiupload
Post by: ctforums on July 27, 2005, 11:09:31 PM
thanks rroc. Great work and very much appreciated.


Title: Re: [MOD] multiupload
Post by: ctforums on July 28, 2005, 07:58:45 PM
Would it be simple to allow multiple file names also? or am I pushing my luck  :wink:


Title: Re: [MOD] multiupload
Post by: rroc on July 29, 2005, 01:00:41 AM
ctforums:
LOL! ... and finally after this issue, you would probably ask if it is possible to add multiple items for keywords as well... Hehee. The idea was to ease the upload process by not having to enter all the information one by one...

Well, if you truly desire, that should be possible in almost the exact same way than the description mod above...

1. ADD the needed fields to a place you desire in the MEMBER_MULTIUPLOADFORM.HTML i.e.
1
2
3
4
5
<input type="text" name="image_name"  size="30" value="{image_name}" class="input" />
<input type="text" name="image_name2"  size="30" value="{image_name}" class="input" />
<input type="text" name="image_name3"  size="30" value="{image_name}" class="input" />
<input type="text" name="image_name4"  size="30" value="{image_name}" class="input" />
<input type="text" name="image_name5"  size="30" value="{image_name}" class="input" />


2. In MEMBER.PHP, Add this line after the lines that were added before

FIND the following section:
1
2
3
// MULTIDESCRIPTION
//If only one description has been provided use it, otherwise read the POSTed value
$image_description = ($image_description!="" && empty($HTTP_POST_VARS['image_description'.$fileext]))?$image_description:un_htmlspecialchars(trim($HTTP_POST_VARS['image_description'.$fileext]));

ADD BELOW that:
1
2
//If only one name has been provided use it, otherwise read the POSTed value
$image_name = ($image_name!="" && empty($HTTP_POST_VARS['image_name'.$fileext]))?$image_name:un_htmlspecialchars(trim($HTTP_POST_VARS['image_name'.$fileext]));


3. If you don't want those numbers after the names you should replace the next line...(it was added in the original mod)

REPLACE this:
1
$imgname = ($fileext!="")?"$image_name $fileext":$image_name;

BY this:
1
$imgname = $image_name;

...I didn't care to test it, as I don't know where to insert all those text fields in my html layout, hehee. But it should work... if you have problems just ask.

BUT I WILL NOT do the multi keyword thing!!!  :wink:


Title: Re: [MOD] multiupload
Post by: ctforums on July 29, 2005, 11:56:08 AM
hehe!
Well, as ever, you've delivered. More karma coming you're way  :wink:

Thanks very much for all your help on this MOD.


Title: Re: [MOD] multiupload
Post by: winterl on July 30, 2005, 01:48:19 PM
hallo, folgendes problem:

ich habe den mulitupload mod (http://www.4homepages.de/forum/index.php?topic=8517.0) gemacht. das multiupload fenster und alles funktioniert auch. nur wenn ich in die normale admin oberfläche gehe, und eine neue kategorie eröffnen oder eine bestehende bearbeiten, bekomme ich nur folgende fehlermeldungen:

Warning: main(./global.php): failed to open stream: No such file or directory in /home/httpd/vhosts/winterlife.com/httpdocs/4images/admin/categories.php on line 30

Warning: main(): Failed opening './global.php' for inclusion (include_path='.:/usr/share/pear') in /home/httpd/vhosts/winterlife.com/httpdocs/4images/admin/categories.php on line 30

Warning: main(./includes/sessions.php): failed to open stream: No such file or directory in /home/httpd/vhosts/winterlife.com/httpdocs/4images/admin/categories.php on line 31

Fatal error: main(): Failed opening required './includes/sessions.php' (include_path='.:/usr/share/pear') in /home/httpd/vhosts/winterlife.com/httpdocs/4images/admin/categories.php on line 31


dabei habe ich an der stelle in der categories absolut nichts geändert. die sessions.php und global.php gar nicht angerührt.


wäre super wenn mir jemand da weiter helfen könnte.

besten dank im voraus!!!


Title: Re: [MOD] multiupload
Post by: dieter on July 30, 2005, 02:27:43 PM
@rroc: i have added the code
1
2
3
4
5
<input type="text" name="image_name"  size="30" value="{image_name}" class="input" />
<input type="text" name="image_name2"  size="30" value="{image_name}" class="input" />
<input type="text" name="image_name3"  size="30" value="{image_name}" class="input" />
<input type="text" name="image_name4"  size="30" value="{image_name}" class="input" />
<input type="text" name="image_name5"  size="30" value="{image_name}" class="input" />

and the other code.

now there is one problem:

when i upload 5 images, all pictures have the same image name. where is the mistake?


Title: Re: [MOD] multiupload
Post by: dieter on July 30, 2005, 02:32:25 PM
i have also this question:

which code is neccessary that the user`s MUST fill the fields "image_name2", image_name3", .... ?

when one of the 5 fields (image_name) is empty, it should appear a error massage.


Title: Re: [MOD] multiupload
Post by: Jan Senf on July 30, 2005, 07:39:35 PM
... is there already a solution for the annotation mod ?

I get an error when uploading more then one picture, so i have to annote new pictures manually in the acp !!!  :(

JanSenf


Title: Re: [MOD] multiupload
Post by: karimun on July 31, 2005, 05:35:32 PM
rroc, it works now. Many thanks for this mod.

One thing:
Have you already tested whether your mod can also be combined with the ´upload limit´ mod of SLL?
http://www.4homepages.de/forum/index.php?topic=3607.0

Great Work!


Title: Re: [MOD] multiupload
Post by: rroc on July 31, 2005, 11:09:02 PM
winterl:
I'm sorry that I cannot write German(I did undestand your problem however)... Your problem doesn't seem to be related to the multiupload MOD, on my test site where there is nothing more running than this addon, the admin panel seems to work correctly. Could it be that you have made somekind of typing error, when copying stuff to categories.php? Did you download the file and used that, or did you make the changes by yourself? If you can send me the files you have modified, I could investigate your problem further.

Jan Senf:
Annotation mod? hmm... If this is the mod you refer to, I think that problem has been fixed in the current version of the MOD(since July 27)... Or when did you get the MOD?

diater:
do you still have the problem with all names being the same?... Your second posting seems to imply that it works correctly? The MOD should work that way, that if you only enter one name it is used for all, and if there are no names it gives the error. If you would like to FORCE the users to enter each name, you have to

1. REPLACE the line you added before:
1
$image_name = ($image_name!="" && empty($HTTP_POST_VARS['image_name'.$fileext]))?$image_name:un_htmlspecialchars(trim($HTTP_POST_VARS['image_name'.$fileext]));

2. BY:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
if (empty($HTTP_POST_VARS['image_name'.$fileext])) 
    {
    $error = 1;
    $field_error = preg_replace("/".$site_template->start."field_name".$site_template->end."/siU",
                        str_replace(":", "", $lang['image_name']), $lang['field_required']);
    $msg .= (($msg != "") ? "<br />" : "").$field_error;
    $action = "uploadform";
    $sendprocess = 1;
    break;
    }
else
    {
    $image_name = un_htmlspecialchars(trim($HTTP_POST_VARS['image_name'.$fileext]));
    }
...I think that should do the trick.


Title: Re: [MOD] multiupload
Post by: Jan Senf on August 01, 2005, 10:41:00 AM
Quote  [Expand]
Jan Senf:
Annotation mod? hmm... If this is the mod you refer to, I think that problem has been fixed in the current version of the MOD(since July 27)... Or when did you get the MOD?

I´ve installed the mod months ago and also the update in the last days (http://www.4homepages.de/forum/index.php?topic=3808.0)

The problem is the automatic annotation when uploading. If this is marked YES in the ACP and then uploading more than whan one picture, there is an error - uploading only one pictures works how expected ...


Title: Re: [MOD] multiupload
Post by: dieter on August 01, 2005, 10:54:52 AM
@rroc: yes, i still have the problem.

i have 5 fields to enter the image name:

field1: image name 1
field2: image name 2
field3: image name 3
field4: image name 4
field5: image name 5

the upload does work, but all images have the same name "image name1"

can you help me?


Title: Re: [MOD] multiupload
Post by: winterl on August 01, 2005, 11:06:52 AM
@rroc
heres the categories, global and sessions file. look if you can find something.


thank you
nicolas



Title: Re: [MOD] multiupload
Post by: rroc on August 01, 2005, 11:53:56 AM
Jan Senf:
I could not see anything why it wouldn't work. I guess I'll try that MOD myself...

I suppose you changed in your member.php
1
require(ROOT_PATH.'includes/annotate.php');
...to:
1
require_once(ROOT_PATH.'includes/annotate.php');
...I'm not sure it makes any difference though.

diater:
would you like to send me your html file, and the member.php ?


Title: Re: [MOD] multiupload
Post by: rroc on August 01, 2005, 01:03:47 PM
winterl:

You have the 4images version 1.7, NOT the 1.7.1... As I don't have the old version installed, it is not possible for me to help you in detail.

The files you refer to are not related to this MOD directly. However, if you did copy the member.php, instead of just adding the changes, I think it could corrupt your system. I believe it is possible that you cannot mix files as you want between 4images 1.7.1 and 1.7...

So what I would suggest you to do is that you would update to 4images 1.7.1, and after that start installing the MODs...


Title: Re: [MOD] multiupload
Post by: Jan Senf on August 01, 2005, 03:48:50 PM
Jan Senf:
I could not see anything why it wouldn't work. I guess I'll try that MOD myself...

I suppose you changed in your member.php
1
require(ROOT_PATH.'includes/annotate.php');
...to:
1
require_once(ROOT_PATH.'includes/annotate.php');
...I'm not sure it makes any difference though.

shame on me  :oops: i´ve forgotten the ..._once when updating the annotation mod !
 :roll:

Now, it works perfectly! Thank you!


Title: Re: [MOD] multiupload
Post by: dieter on August 01, 2005, 07:45:19 PM
@rroc: look at the attachments

thanx for your help


Title: Re: [MOD] multiupload
Post by: BATman40 on August 03, 2005, 03:03:08 AM
Hi,

wen press the button Multiupload the system brings me this Meesage

Quote  [Expand]
Parse error: parse error, unexpected T_ELSE in /usr/export/www/vhosts/funnetwork/hosting/salsapic/member.php on line 700

You write at the end off your Message
Quote  [Expand]
[- Please edit this HTML to use your current locals (actually, you should add some variables to your language main.php -file...), I was too busy to do that.

wath is the doing ??  :cry:



Title: Re: [MOD] multiupload
Post by: rroc on August 03, 2005, 09:31:27 AM
BATman40:
first of all, I think you have forgotten one parenthesis somewhere above the line 700... If you cannot fid the place send me the member file to "porkkanamies @ yahoo com".

Secondly, I meant by using current locals that you should add the texts to language files, instead of writing them directly to the html, as I did. ...and so you'll have to translate the html text to your current forum language. If you use english, and I didn't have too many typos you should do fine.


Title: Re: [MOD] multiupload
Post by: BATman40 on August 03, 2005, 12:48:36 PM
greatly!  :D :D :D

Everything functions perfectly.

I am inspired. Super work

best regards
Bernhard


Title: Re: [MOD] multiupload
Post by: rroc on August 03, 2005, 03:33:01 PM
diater:
you also have the version 1.7 of the 4 images. This mod was meant for the newest 1.7.1 mod... For my 1.7.1 the naming seems to work as well.


Title: Re: [MOD] multiupload
Post by: karlyn on August 07, 2005, 10:50:39 PM
Hi,

I'm real happy to have found this mod for my users. Thank you!

Ok, so I did all the steps and everything is still working, but I just don't see the multiupload option.  I did each steo so carefully too, so I don't know what I'm missing. I ftp'd the two "multiupload" graphics to my gallery directory, but just nothing displays. I read through all the comments here (every one) and no one else said anything about this, so I guess it's just me. :|

http://www.wahmbuds.com/gallery/

Thanks in advance for help.


Title: Re: [MOD] multiupload
Post by: rroc on August 08, 2005, 07:39:43 AM
Karlyn:
For not seeing the multiupload button, there must be something wrong with one of the steps 1-4... The place where you should have FTP'd your 'multiupload' images is something like: <your 4images dir>/templates/<your current template in use>/images/... if that is all correct, go to any of your categories, and in your browser(atleast in Firefox): View/Page source, look throught the html, and you should see something similar to this:
1
<a href="./member.php?action=multiuploadform&amp;cat_id=12&amp;sessionid=8af86c0a4b70e53b8b9b065715761869"><img src="./templates/mytemplate/images/multiupload.gif" border="0" alt="Upload Multiple files" /></a>

if there isn't, there is something wrong with the steps 1-4 for sure. if there is that but you still will not see a thing, you have put the images in to a wrong directory. Oh... and remember to press Ctrl+F5 to really reload the page from server and not from your browser cache.

Did it help?


Title: Re: [MOD] multiupload
Post by: karlyn on August 08, 2005, 09:40:41 PM
 :D Thank you rroc, I found my mistake actually.
I'd forgotten to do the little categories.html step where I replace {upload_button} with {upload_button} {multiupload_button}

Sorry, thank you for your help though!

It's working superbly!!!

Karlyn


Title: Re: [MOD] multiupload
Post by: eshpro on August 09, 2005, 10:47:57 PM
Works Perfect!!! Great Job!

-www.eshpro.com


Title: Re: [MOD] multiupload
Post by: theolbap on August 29, 2005, 10:40:31 PM
Help please!

No work with MOD Annotation (Use auto images annotation on image upload)

Fatal error: Cannot redeclare ann_rename() (previously declared in /home/nr000863/public_html/includes/annotate.php:9) in /home/nr000863/public_html/includes/annotate.php on line 9

thank you very much..


Title: Re: [MOD] multiupload
Post by: wiitanen on August 29, 2005, 11:07:28 PM
[MOD] MultiUpload
- This mod enables the users to add multiple files to a category at once.
- The images will get name and index, ie. "My pet", "My pet 2", "My pet 3",...
- for 4images 1.7.1...

I have had this mod installed for a short while - now for whatever reason I am starting to get errors when I upload multiple files, and I am not quite sure of why. Your mod doesn't even touch the annotate.php, but this is the error message I am receiving when attempting to upload multiple files:

Fatal error: Cannot redeclare ann_rename() (previously declared in /home/www/public_html/imaging/includes/annotate.php:9) in /home/www/public_html/imaging/includes/annotate.php on line 9

Line 9, 10, 11, 12, 13, 14 & 15 are as following:

9    function ann_rename($old, $new){
10  $oldWD = getcwd();
11  chdir(realpath(dirname($old)));
12  $ok = (rename(basename($old), basename($new))) ? 1 : 0;
13  chdir($oldWD);
14  return $ok;
15  }

Any ideas on how to fix the error? It appears to have a problem renaming the file after uploading it.


Title: Re: [MOD] multiupload
Post by: ctforums on September 07, 2005, 07:21:14 PM
Hi Everyone,

I'm having a small problem with this MOD.
I have used rroc's help to show 10 images, 10 file names and 10 descriptions.  Everything is fine if descriptions are added to each image, but if you leave some descriptions blank, the last entered description appears for all the descriptions that were left blank.  I have been getting around this by putting a space in the text box before uploading the images.

Anyone know where I've gone wrong?

Cheers.


Title: Re: [MOD] multiupload
Post by: rroc on September 11, 2005, 10:08:27 PM
ctforums:
Hi, you have done everything ok... That's just the way I created the MOD. So, if you wanted to write the description only once it can be used on all uploaded files... If you don't like the feature change this:

1
2
3
    // MULTIDESCRIPTION
    //If only one description has been provided use it, otherwise read the POSTed value
$image_description = ($image_description!="" && empty($HTTP_POST_VARS['image_description'.$fileext]))?$image_description:un_htmlspecialchars(trim($HTTP_POST_VARS['image_description'.$fileext]));

TO:
1
2
3
    // MULTIDESCRIPTION
    //read the POSTed description
$image_description = un_htmlspecialchars(trim($HTTP_POST_VARS['image_description'.$fileext]));


Title: Re: [MOD] multiupload
Post by: ruudvroon on September 13, 2005, 06:23:33 PM
1. REPLACE the line you added before:
1
$image_name = ($image_name!="" && empty($HTTP_POST_VARS['image_name'.$fileext]))?$image_name:un_htmlspecialchars(trim($HTTP_POST_VARS['image_name'.$fileext]));

2. BY:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
if (empty($HTTP_POST_VARS['image_name'.$fileext]))  
    {
    $error = 1;
    $field_error = preg_replace("/".$site_template->start."field_name".$site_template->end."/siU",
                        str_replace(":", "", $lang['image_name']), $lang['field_required']);
    $msg .= (($msg != "") ? "<br />" : "").$field_error;
    $action = "uploadform";
    $sendprocess = 1;
    break;
    }
else
    {
    $image_name = un_htmlspecialchars(trim($HTTP_POST_VARS['image_name'.$fileext]));
    }
...I think that should do the trick.

After I edited this, I've got the normal upload page (with an upload message) after a successful upload with only 2 images, is it possible to show the images I uploaded.

Maybe you can add a check if the "media_file" input has a value, and than check if all the images titles have a value.


Title: Re: [MOD] multiupload
Post by: ctforums on September 18, 2005, 07:19:02 PM
Thanks rroc


Title: Re: [MOD] multiupload
Post by: rjp123 on September 19, 2005, 01:37:52 PM
Would there be any way to adapt this to allow one to select multiple files at once (rather than having to browse-select each file)?


Title: Re: [MOD] multiupload
Post by: rroc on September 19, 2005, 04:35:25 PM
unfortunately the way the HTML 'browse' -button works allows one to select only a single file at a time.


Title: Re: [MOD] multiupload
Post by: rroc on September 19, 2005, 09:35:31 PM
wiitanen:
I beieve some otherprnha iilarproblemsith the annotation mod... You need to change all the added

require() -commands
to
require_once()

...and
include()
to
include_once()

That should fix your problems... sorry for the late reply. I have now some other projects.... :)

ruudvroon
Could you PM me the member.php file... or as much as you can fit to PM of it?



Title: Re: [MOD] multiupload
Post by: Flatermann on September 23, 2005, 03:27:28 PM
HI  Installed mode and works good till istall mod for miltoi description and multi name

wenn i send to uplaod it take a wile then i get a error message

Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/web7/html/4images/member.php on line 550

can someone help me out on that one


Title: Re: [MOD] multiupload
Post by: Bear on September 23, 2005, 09:47:25 PM
how can i allow or add other file extentions i.e:-  image.bmp

Also how do i increase the 5 uploads to say 10 uploads.

A great mod use it all the time, thank you


Title: Re: [MOD] multiupload
Post by: Bear on September 26, 2005, 03:18:50 PM
sorted the extentions but how do i increase the 5 uploads to say 10 uploads


Title: Re: [MOD] multiupload
Post by: ruudvroon on October 17, 2005, 10:40:31 AM
Is there a way to set the maximum filesize to a smaller amount if a member uses the multiuploadform?
Because users get a timeout if the files are to big.


Title: Re: [MOD] multiupload
Post by: lemccoy on October 20, 2005, 11:17:40 PM
Anyway to do the same function with the URLs?  DO you just add it in the HTML form or do you have to modify the PHP at all? If so, would it be a similar setup to the upload files? 


Title: Re: [MOD] multiupload
Post by: Schublero on October 22, 2005, 12:16:26 PM
Hi,

everything works fine so far, almost everything. After adding {multiupload_button} to the categories.html the category-pages go wild. The layout isn't what it was before adding the button. How can that be?
Before editing: (http://mannheim.funpic.de/before.jpg)
After editing: (http://mannheim.funpic.de/after.jpg)
Thanks in advance for your help.


Title: Re: [MOD] multiupload
Post by: regina on October 22, 2005, 01:47:55 PM
multi name ----  multi description ----- multi image url  :idea:

how is it rroc  :?:

please help  :oops:

thank you


Title: Re: [MOD] multiupload
Post by: Nasser on October 22, 2005, 06:25:29 PM
I did all the steps .. but the MultiUpload Icon didn't show up in the catogary !
I noticed that this :
"upload_button" => $upload_button,
which is in step #3

when I try to check by writing the link itself to see the MultiUploaed forum it show up (working) :
this is the link

XXXXX/member.php?action=multiuploadform&cat_id=XX

can you help please
I'm using 4images 1.7


Title: Re: [MOD] multiupload
Post by: Schublero on October 23, 2005, 12:23:44 AM
In addition to my question above, I figured out, that the whole categories.html seems to broken as soon as I change something. It doesnt matter whether I add for example {multiupload_button} or something else. Any change in the categories.html causes the described problems. How can that happen?


Title: Re: [MOD] multiupload
Post by: Nasser on October 27, 2005, 11:35:31 AM
I use it for V 1.7 and it's working .. thank you


Title: Re: [MOD] multiupload
Post by: Nasser on October 30, 2005, 08:03:31 PM
I need a help please
an error occured while a user used the MOD :

Fatal error: Cannot redeclare ann_rename() (previously declared in /home/emarati2/public_html/gallery/includes/annotate.php:9) in /home/emarati2/public_html/gallery/includes/annotate.php on line 9


and this is the file annotate.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
<?php

# v.1.4a - updated by v@no - im fix * file rename fix

if (!defined('ROOT_PATH')) {
  die(
"Security violation");
}

=====>> function 
ann_rename($old$new){
  
$oldWD getcwd();
  
chdir(realpath(dirname($old)));
  
$ok = (rename(basename($old), basename($new))) ? 0;
  
chdir($oldWD);
  return 
$ok;
}

function 
annotate_image($file) {
  global 
$convert_options$config$ann_user_name$ann_dest;

  
$ann_dest $file;
  
$file_bak $file.".bak";
  if (!
ann_rename($file$file_bak)) {
    return 
false;
  }
  if (
annotate_it($file_bak$file$convert_options['convert_tool'])) {
    @
chmod($fileCHMOD_FILES);
    @
unlink($file_bak);
    return 
true;
  }
  else {
    
ann_rename($file_bak$file);
    return 
false;
  }
 }

function 
ImageColorResolveAlphaHex($image$color$alpha){
 
$color str_replace("#","",$color);
 
$red hexdec(substr($color,0,2)); $green hexdec(substr($color,2,2)); $blue hexdec(substr($color,4,2));
 
$out ImageColorAllocate($image$red$green$blue);
 
$out ImageColorResolveAlpha($image$red$green$blueround($alpha 127));
return(
$out);
}

function 
annotate_it($ann_src$ann_dest$ann_tool) {
  global 
$convert_options$config$ann_user_name$ann_dest$script_url;

$ann_mode $config['annotation_mode'];
$ann_embed_image $config['annotation_embed_image'];
$annotation_embed_image_opacity $config['annotation_embed_image_opacity'];
$annotation_embed_image_bg $config['annotation_embed_image_bg'];
$ann_text $config['annotation_text'];
$ann_font_path $config['annotation_font'];
$ann_font_size $config['annotation_font_size'];
$ann_image_quality $config['annotation_image_quality'];
$use_shadow $config['annotation_use_shadow'];
$shadow_offset $config['annotation_shadow_offset'];
$ann_fill_color $config['annotation_fill_color'];
$ann_shadow_color $config['annotation_shadow_color'];
$ann_fill_alpha $config['annotation_fill_alpha'];
$ann_shadow_alpha $config['annotation_shadow_alpha'];
$ann_top_offset $config['annotation_top_offset'];
$ann_bottom_offset $config['annotation_bottom_offset'];
$ann_left_offset $config['annotation_left_offset'];
$ann_right_offset $config['annotation_right_offset'];
$vertical $config['annotation_v_alignment'];
$horisontal $config['annotation_h_alignment'];

$ann_url str_replace ("http://"""$script_url);
$ann_date date($config['date_format']);
$ann_time date($config['time_format']);
$ann_site_name $config['site_name'];
$ann_user $user_info['user_id'];
$ann_vars = array ("'%D'""'%T'""'%N'""'%H'""'%U'""'%S'""'%B'");
$ann_repl = array ("$ann_date""$ann_time""$ann_site_name""$script_url""$ann_url""$ann_user_name""\n\r");
$ann_text str_replace ($ann_vars$ann_repl$ann_text);

if (
'IN_CP') {
   
$ann_user_name "Administrator";
   
$ann_text str_replace ("/admin/plugins"""$ann_text);
   }

if (
$ann_tool == "im") { $ann_text str_replace ("\n\r""\\n\r"$ann_text); }

switch (
$ann_mode) {
   case 
"text"      $use_text 1$use_image 0; break;
   case 
"image"   $use_text 0$use_image 1; break;
}

$isz 0;  $isz= @getimagesize($ann_src);

if (
$use_text) {

 if (
$ann_tool != "netpbm") {

   
$ann_box ImageTTFBBox($ann_font_size0$ann_font_path$ann_text);
   
$ann_text_width=$ann_box[4]-$ann_box[6]; $ann_text_height=$ann_box[0]-$ann_box[7];

   switch (
$horisontal) {
      case 
"left"         $h_offset $ann_left_offset; break;
      case 
"center"       $h_offset = (($isz[0]/2) - ($ann_text_width/2)); break;
      case 
"right"      $h_offset = ($isz[0] - $ann_text_width $ann_right_offset); break;
   }
   switch (
$vertical) {
      case 
"top"         $v_offset $ann_text_height $ann_top_offset; break;
      case 
"middle"       $v_offset = (($isz[1]/2) - ($ann_text_height/2)); break;
      case 
"bottom"      $v_offset $isz[1] - ($ann_text_height/2) - $ann_bottom_offset; break;
   }
  } else {

   switch (
$horisontal) {
      case 
"left"         $h_offset $ann_left_offset$h_align="-align=left";  break;
      case 
"center"       $h_offset $ann_left_offset$h_align="-align=center";  break;
      case 
"right"      $h_offset 0-$ann_right_offset$h_align="-align=right";  break;
   }
   switch (
$vertical) {
      case 
"top"         $v_offset $ann_top_offset$v_align="-valign=top";  break;
      case 
"middle"       $v_offset $ann_top_offset$v_align="-valign=middle";  break;
      case 
"bottom"      $v_offset 0-$ann_bottom_offset$v_align="-valign=bottom";  break;
   }
  }
}
else {
   
$ann_box = @getimagesize($ann_embed_image);
   
$ann_text_width=$ann_box[0]; $ann_text_height=$ann_box[1];

   switch (
$horisontal) {
      case 
"left"         $h_offset $ann_left_offset; break;
      case 
"center"       $h_offset = (($isz[0]/2) - ($ann_text_width/2)); break;
      case 
"right"      $h_offset = ($isz[0] - $ann_text_width $ann_right_offset); break;
   }

   switch (
$vertical) {
      case 
"top"         $v_offset $ann_top_offset; break;
      case 
"middle"       $v_offset = (($isz[1]/2) - ($ann_text_height/2)); break;
      case 
"bottom"      $v_offset $isz[1] - $ann_text_height $ann_bottom_offset; break;
   }
}

$h_offset round($h_offset);  $v_offset round($v_offset);
if (
$isz[0] > $ann_text_width) {

if (
$ann_tool == "im") {

if (
$use_image) {
   
$command $convert_options['convert_path']." -quality ".$ann_image_quality." -draw \"image CopyOpacity $h_offset,$v_offset 0,0 $ann_embed_image\" \"$ann_src\" \"$ann_dest\"";
   
system($command);
} else {

if (!
$use_shadow) {
   
$command $convert_options['convert_path']." -quality ".$ann_image_quality." -antialias -density 90 -font '$ann_font_path' -fill '$ann_fill_color' -pointsize $ann_font_size -draw \"text $h_offset,$v_offset '$ann_text'\"  \"$ann_src\" \"$ann_dest\"";
   
system($command);
   } else {
   
$command $convert_options['convert_path']." -quality "100 ." -antialias -density 90 -font '$ann_font_path' -fill '$ann_shadow_color' -pointsize $ann_font_size -draw \"text $h_offset,$v_offset '$ann_text'\"  \"$ann_src\" \"$ann_dest\"";
   
system($command);

  
$file_shd $ann_dest.".shd";
  
ann_rename('./'.$ann_dest'./'.$file_shd);

 
$h_offset $h_offset $shadow_offset;  $v_offset $v_offset $shadow_offset;
 
$command $convert_options['convert_path']." -quality ".$ann_image_quality." -antialias -density 90 -font '$ann_font_path' -fill '$ann_fill_color' -pointsize $ann_font_size -draw \"text $h_offset,$v_offset '$ann_text'\"  \"$file_shd\" \"$ann_dest\"";
 
system($command);
 @
chmod($ann_destCHMOD_FILES);
 @
unlink($file_shd);
 }
}

} else if (
$ann_tool == "gd") {

$tmp_image = @ImageCreateFromJpeg ($ann_src);
$ann_fill_color ImageColorResolveAlphaHex ($tmp_image$ann_fill_color$ann_fill_alpha);
$ann_shadow_color ImageColorResolveAlphaHex ($tmp_image$ann_shadow_color$ann_shadow_alpha);

if (
$use_image) {

 
$ann_embed_image = @ImageCreateFromPNG($ann_embed_image);
 
$ann_image_width=imageSX($ann_embed_image);
 
$ann_image_height=imageSY($ann_embed_image);

 
$bg_color str_replace("#","",$annotation_embed_image_bg);
 
$bg_red hexdec(substr($bg_color,0,2));
 
$bg_green hexdec(substr($bg_color,2,2));
 
$bg_blue hexdec(substr($bg_color,4,2));

 
$bg_trans_color ImageColorAllocate ($ann_embed_image$bg_red$bg_green$bg_blue);
 
ImageColorTransparent($ann_embed_image$bg_trans_color);
 
ImageCopyMerge($tmp_image$ann_embed_image$h_offset$v_offset00$ann_image_width$ann_image_height$annotation_embed_image_opacity);
 
ImageJpeg($tmp_image$ann_dest$ann_image_quality);
 
ImageDestroy($tmp_image);

} else {

  if (
$use_shadow) {ImageTTFText ($tmp_image$ann_font_size0, ($h_offset+$shadow_offset), ($v_offset+$shadow_offset), $ann_shadow_color$ann_font_path$ann_text);}
  
ImageTTFText ($tmp_image$ann_font_size0$h_offset$v_offset$ann_fill_color$ann_font_path$ann_text);
  
ImageJpeg($tmp_image$ann_dest$ann_image_quality);
  
ImageDestroy($tmp_image);
}
} else if (
$ann_tool == "netpbm")  {
 if (
$use_text) {
 
$command  $convert_options['convert_path']."/pbmtext -quiet -font ".$ann_font_path." '".$ann_text."' > ".ROOT_PATH.MEDIA_DIR."/ann-mask.pnm";
 
system($command);
 
$command  $convert_options['convert_path']."/ppmchange -quiet #000000 ".$ann_fill_color." ".ROOT_PATH.MEDIA_DIR."/ann-mask.pnm > ".ROOT_PATH.MEDIA_DIR."/ann-text.pnm";
 
system($command);
 if (
$use_shadow) {$command  $convert_options['convert_path']."/ppmchange -quiet #000000 ".$ann_shadow_color." ".ROOT_PATH.MEDIA_DIR."/ann-mask.pnm > ".ROOT_PATH.MEDIA_DIR."/ann-text-shd.pnm";
 
system($command); }

 
$command  $convert_options['convert_path']."/jpegtopnm -quiet ".$ann_src." | ";
 if (
$use_shadow) { $command .= $convert_options['convert_path']."/pnmcomp -quiet -invert -opacity=".(1-$ann_shadow_alpha)." -alpha ".ROOT_PATH.MEDIA_DIR."/ann-mask.pnm ".$h_align." ".$v_align." -xoff=".($h_offset+$shadow_offset)." -yoff=".($v_offset+$shadow_offset)." ".ROOT_PATH.MEDIA_DIR."/ann-text-shd.pnm | "; }
 
$command .= $convert_options['convert_path']."/pnmcomp -quiet -invert -opacity=".(1-$ann_fill_alpha)." -alpha ".ROOT_PATH.MEDIA_DIR."/ann-mask.pnm ".$h_align." ".$v_align." -xoff=".$h_offset." -yoff=".$v_offset." ".ROOT_PATH.MEDIA_DIR."/ann-text.pnm | ";
 
$command .= $convert_options['convert_path']."/pnmtojpeg -quiet -quality=".$ann_image_quality." -optimize > ".$ann_dest;
 
system($command);

 @
unlink(ROOT_PATH.MEDIA_DIR."/ann-mask.pnm");
 @
unlink(ROOT_PATH.MEDIA_DIR."/ann-text.pnm");
 if (
$use_shadow) {@unlink(ROOT_PATH.MEDIA_DIR."/ann-text-shd.pnm"); }
 } if (
$use_image) {

 
$command  $convert_options['convert_path']."/pngtopnm -quiet  ".$ann_embed_image." > ".ROOT_PATH.MEDIA_DIR."/ann-logo.pnm";
 
system($command);
 
$command  $convert_options['convert_path']."/ppmcolormask -quiet ".$annotation_embed_image_bg." ".ROOT_PATH.MEDIA_DIR."/ann-logo.pnm > ".ROOT_PATH.MEDIA_DIR."/ann-mask.pnm";
 
system($command);

 
$command  $convert_options['convert_path']."/jpegtopnm -quiet ".$ann_src." | ";
 
$command .= $convert_options['convert_path']."/pnmcomp -quiet -opacity=".($annotation_embed_image_opacity/100)." -alpha ".ROOT_PATH.MEDIA_DIR."/ann-mask.pnm -xoff=".$h_offset." -yoff=".$v_offset." ".ROOT_PATH.MEDIA_DIR."/ann-logo.pnm | ";
 
$command .= $convert_options['convert_path']."/pnmtojpeg -quiet -quality=".$ann_image_quality." -optimize > ".$ann_dest;
 
system($command);

 @
unlink(ROOT_PATH.MEDIA_DIR."/ann-mask.pnm");
 @
unlink(ROOT_PATH.MEDIA_DIR."/ann-logo.pnm");
 }
}
return (
file_exists($ann_dest)) ? 0;
}
}
?>



Title: Re: [MOD] multiupload
Post by: V@no on October 30, 2005, 08:14:30 PM
I dont know if it will work, but try add above function ann_rename($old, $new){
this:
1
if (function_exists("ann_rename")) return();
If this wont work, then you will need use this instead:
1
if (!function_exists("ann_rename")):
and then above ?> add:


Title: Re: [MOD] multiupload
Post by: Nasser on October 30, 2005, 08:44:26 PM
the first one didn't work .. but the second one worked !
 :o
thank you very much


Title: Re: [MOD] multiupload
Post by: anngi on November 05, 2005, 11:03:02 PM
hello!

I installed this mod it upload the pictures and all...but I get after the uploading this error:
1
Fatal error: Cannot redeclare convert_special() (previously declared in /srv/www/htdocs/web390/html/galleri/4images/includes/search_utils.php:34) in /srv/www/htdocs/web390/html/galleri/4images/includes/search_utils.php on line 34

can somebody help me because it doesn't look good with this error after the upload.


Title: Re: [MOD] multiupload
Post by: Jeevan25 on November 09, 2005, 04:40:18 AM
i am getting this trouble. but two files get uploaded successfully. but i get this trouble when i upload 5 at a time.
Fatal error: Cannot redeclare convert_special() (previously declared in /home/thaaru/public_html/includes/search_utils.php:34) in /home/thaaru/public_html/includes/search_utils.php on line 34


Title: Re: [MOD] multiupload
Post by: Deven316 on November 16, 2005, 10:17:44 PM
Is there anyway that a user can create their own category and upload multiple images to that category and then the admin can validate that category/images?


Title: Re: [MOD] multiupload
Post by: Escalope on November 28, 2005, 11:15:24 AM
where is my problem?
i get this failure by normal upload an by multiupload:
Warning: Invalid argument supplied for foreach() in /usr/export/www/vhosts/funnetwork/hosting/klassenseite24/bildergalerie/4images/member.php on line 642

Fatal error: Call to undefined function: add_searchwords() in /usr/export/www/vhosts/funnetwork/hosting/klassenseite24/bildergalerie/4images/member.php on line 647

thxs...


Title: Re: [MOD] multiupload
Post by: rpd on November 30, 2005, 01:00:56 AM
thanx a lot for this MOD
everything is working.but i have one question.can someone edit it  for Uploding from Server(URL)?


Title: Re: [MOD] multiupload
Post by: holojo on December 03, 2005, 04:00:11 PM
this is hard to do.


Title: Re: [MOD] multiupload
Post by: Digital1 on December 23, 2005, 07:22:14 AM
Hiya Roc, great Mod. Alot of help too along the way... Thanks!

But... I am having the same problem dieter was or is having with the names.

When I upload the files, all of the files come up with the name that image 1 has. I tired fixing that by replacing the code you gave Deiter but that did not work. It came up with an error. So still no luck for me. Did you get that sorted out yet?

Many thanks.


Title: Re: [MOD] multiupload
Post by: Fragezeichen on February 03, 2006, 01:40:34 AM
your mod works best as well,thank you so much.
there is just a problem with the combinationof annotation,uploads more than one picture not possible,errormessage in line 9.
same as people before me.
i try to add your bug fixes,there change nothing.
i want use your multiupload but i need the watermark as verry imortant.
should i change the annation to anoher mod or can you give us any other solution please?


Title: Re: [MOD] multiupload
Post by: gnuga64 on February 06, 2006, 08:34:35 AM
hi there, thanks 4 the mod

got it working, great, even managed to add the upload form up to 20 upload at one

but one question ; is it possible to change the name numbering

the default are : image , image 1 , image 2 , ... , image 10
but when you have it displyed it all will get cluttered, you know, unsorted because 4images knows for 20 picture uploaded with same naming system, after 1 is not 2, but 1 -> 11

is it possible to modify somewhere so the naming would be 2 digits : 01 , 02 , 03

hope not pushing my luck too far :)
thanks!


Title: Re: [MOD] multiupload
Post by: Patti666 on March 01, 2006, 05:25:35 PM
hi,

the mod is great.
I made that what stood in the first contribution
But i got a problem. I can only 1 picture upload.
 If i want more then one, it does not go.
The browser(firefox) change to http.....4images/member.php?sessionid=db0ef163e938a1db5dbd44e0d23931fb
there is no php fault only that

"Fehler: Verbindung unterbrochen
Die Verbindung zum Server wurde zurückgesetzt, während die Seite geladen wurde.
    *   Die Website könnte vorübergehend nicht erreichbar sein, versuchen Sie es bitte später nochmals.

    *   Wenn Sie auch keine andere Website aufrufen können, überprüfen Sie bitte die Netzwerk-/Internetverbindung.

    *   Wenn Ihr Computer oder Netzwerk von einer Firewall oder einem Proxy geschützt wird, stellen Sie bitte sicher,
         dass Firefox auf das Internet zugreifen darf.
"

The pictures size is there equal. Same fault.
1 picture works fine.

My bad English excused will try, I it again in German.

Wie angedroht :D noch mal das ganze in Deutsch.
Ich habe das Problem das ich nur 1 Bild uploaden kann. Sobald ich mehr als 1 Bild nehme wird mir die oben angezeigte Fehlermeldung angezeigt.
Die Größe der Bilder spielt dabei keine Rolle.


Someone has an idea at what I can make? 
I am thankful already once ahead

greetz
Patti


Title: Re: [MOD] multiupload
Post by: fitterashes on April 09, 2006, 11:46:56 PM
I dont know if it will work, but try add above function ann_rename($old, $new){
1
if (!function_exists("ann_rename")):
and then above ?> add:

Hey thank you for that, you saved my day  :mrgreen:


Title: Re: [MOD] multiupload
Post by: viper357 on May 02, 2006, 11:12:52 PM
I have just installed this mod on 1.7.1 and it works perfectly  :mrgreen: :mrgreen: :mrgreen:

Thank You very very much, excellent mod.

Just one question, is there any way to prevent the images from auto resizing, as they are losing some quality ?

Many Thanks


Title: Re: [MOD] multiupload
Post by: sm1rk on May 05, 2006, 12:50:18 PM
Installed it without any problems... Thank you for this mod!


Title: Re: [MOD] multiupload
Post by: Sir Sky-Walker on May 22, 2006, 10:01:19 PM
I have installed this mod on my gallery (1.7.2)

Now i became an error when i klick un my Upload-/ Multiuploadbutton

Parse error: syntax error, unexpected $end in /usr/export/www/vhosts/funnetwork/hosting/olpi2/member.php on line 1364

What did i wrong ? I have no idee.

Thanks for help
-------------------------------

Hallo

hab gerade den Mod installiert und bekomme jetzt eine Fehlermeldung, wenn ich auf den upload oder multiuploadbutton klicke!

Parse error: syntax error, unexpected $end in /usr/export/www/vhosts/funnetwork/hosting/olpi2/member.php on line 1364

Was hab ich falsch gemacht? hab alles so gemacht wie in der Anleitung ...


Schonmal Danke


Title: Re: [MOD] multiupload
Post by: Jockl on May 22, 2006, 10:43:06 PM
Hi!

I have a problem with the Multiupload. When a user makes a mistake he will be forwarded to the normal Upload-Form and not back to the Multiuploadform.

Can somebody help me with this problem?

thx

jockl


Title: Re: [MOD] multiupload
Post by: Sir Sky-Walker on May 23, 2006, 09:17:28 PM
Mein obiges Problem ist behoben. Nun komme ich in die Multiuploadfunktion rein. Wird alles soweit angezeigt etc.
Nur wenn ich  5 Bilder hochladen will, wähle 5 aus und klicke auf Abschicken, zeigt er mir fogenden Fehler an:

Fatal error: Cannot redeclare convert_special() (previously declared in /usr/export/www/vhosts/funnetwork/hosting/olpi2/includes/search_utils.php:34) in /usr/export/www/vhosts/funnetwork/hosting/olpi2/includes/search_utils.php on line 34

Das komische, die ersten beiden werden nach der Fehlermeldung trotzdem angezeigt, mit richtigen Namen und Thumbnail. Er lädt also immer die ersten beiden hoch und danach ist schluss.
Woran kan ndas liegen ???

Ich benutze 4_Images 1.7.2

Wäre für jeden rat dankbar !!!


Title: Re: [MOD] multiupload
Post by: Sir Sky-Walker on May 24, 2006, 11:54:23 PM
Hat keiner eine Idee, wie cih mein Problem lösen kann ?


Title: Re: [MOD] multiupload
Post by: martin271 on May 30, 2006, 01:31:06 PM
I have two problems:
1. I can't dowload the html files (member_mutliuploadform.html.txt). When i download it, i have only a empty textdocument.
2. I use v1.7.2 so i haven't the categories.html (or i'm wrong). When i only upload the new categories.php (from the attachment form rroc), i have no mutliuploadbutton.

I handled the second problem by add echo "$multiupload_button";
But without the member_multiuploadfrom.html i can't test it.

thanks for responses


Title: Re: [MOD] multiupload
Post by: Adrienne on June 06, 2006, 09:44:36 PM
Yes, you still have categories.. If you deleted categories.html I can understand you're having difficulties.
I followed the instructions and edited categories.php/html and members.php. I'm using v. 1.7.2 and it works like a charm. Can't believe I didn't know about this before. THANX!  :P


Title: Re: [MOD] multiupload
Post by: puremuzikarmy on June 09, 2006, 09:23:26 PM
Hello everyone, Having a major prob.  I cant upload, or multiupload.  When you try to upload or go to the control panel i get this:



Parse error: syntax error, unexpected '>' in /home/orange/public_html/gallery/member.php on line 679


this is what is at line 679
1
$msg .= (!$direct_upload) ? "<br />".$lang['new_upload_validate_desc'] : "";

Can anyone help, i really need a multiupload mod and i just can't  seem to figure this out.  :cry:


Title: Re: [MOD] multiupload
Post by: V@no on June 10, 2006, 12:51:44 AM
restore member.php from backups and try again.


Title: Re: [MOD] multiupload
Post by: puremuzikarmy on June 10, 2006, 01:13:24 AM
I did just that and its works great!!!!!!!!!!!  thank you, this mod was the answer to my dreams :D


Title: Re: [MOD] multiupload
Post by: sharangan on June 20, 2006, 05:43:16 PM
hey guys im getting an error i think because i have teh Annotation Mod too
well this is the error i would like to know how i can fix this
Quote  [Expand]
Fatal error: Cannot redeclare ann_rename() (previously declared in /home/host/public_html/gallery/includes/annotate.php:9) in /home/home/public_html/gallery/includes/annotate.php on line 9

pls any help will be gratefull
i like both mods

thank you


Title: Re: [MOD] multiupload
Post by: sharangan on June 24, 2006, 03:48:03 AM
anybody knows how i can fix this pls


Title: Re: [MOD] multiupload
Post by: Jockl on June 25, 2006, 11:25:41 PM
Can't somebody help me with my problem?


Title: Re: [MOD] multiupload
Post by: MaF on June 27, 2006, 09:28:27 AM
Installed it without any problems... Great job!! Thank you!!


Title: Re: [MOD] multiupload
Post by: SNKMAN on July 01, 2006, 10:25:49 PM
Hi rroc

Please i need all Buttons in the colore like the Multiupload.

Can you pease post all your Buttons?

I mean: Upload, Download, Lightbox, ZIP and so on.

Please  :D


Title: Re: [MOD] multiupload
Post by: spezi on August 10, 2006, 09:08:16 AM
does it work with 1.7.3 ?


Title: Re: [MOD] multiupload
Post by: troopers on August 14, 2006, 01:11:34 PM
i've tested it with 1.7.3, works fine..

thanks for this fine script. :)


Title: Re: [MOD] multiupload
Post by: lover2 on August 17, 2006, 12:37:47 AM
hello
tnx for your mod  (http://qsmile.com/qsimages/20.gif)
i want upload more images ,because i can upload only 5 pictures
please tell me how can i more upload ,for example 10 pictures upload ,once
sorry for my english
thank you


Title: Re: [MOD] multiupload
Post by: Phil87 on September 10, 2006, 03:26:49 PM
Could somebody send me his modifyed member.php for the version 1.7.3 of 4 images, because I have a bug in it, and I can't find it. Thx in advance.

Kann ich die fertige member.php die hier angeboten wird auch für die Version 1.7.3 benutzen, bzw. wäre jemand so nett und würde mir seine member.php aus der Version 1.7.3 mit installiertem multiupload zukommen lassen? Ich habe nämlich ein kleines Problem bei dem ich den Fehler nicht fixen kann, da ich ihn nicht finde.

Gruß Philipp


Title: Re: [MOD] multiupload
Post by: Sickk on September 14, 2006, 10:39:23 PM
First Gratz for this great FREE Software

But can anybody please send me a ready to go modded version ? No problem with installing the prog on the server. But then I tried for 4 hours and i didn´t had any success. I even can´t see anything in the Version I modded.
I tried and tried and tried at last I failed badly. Could anybody help me please ? I think I need to cry...:)


Title: Re: [MOD] multiupload
Post by: satori on September 16, 2006, 06:14:49 AM
Ran into a problem after installing this mod...

1
Fatal error: Cannot redeclare convert_special() (previously declared in /home/user/public_html/photos/includes/search_utils.php:34) in /home/user/public_html/photos/includes/search_utils.php on line 34

Any idea how I can resolve this problem?

Thanks in advance, great mod!  :D


Title: Re: [MOD] multiupload
Post by: beasty on September 27, 2006, 12:20:14 AM
Having installed quite a few MODs without trouble - this one isn't completely working for me. Let's assume for sake of argument that I am a complete dunce.

While executing the MOD, I found that I did not have a line in member.php that read
1
$msg .= $lang['image_add_success'].": <b>".stripslashes($image_name)."</b> (".$new_name.")";

the closest I had was
1
$msg .= $lang['image_add_success'].": <b>".format_text(stripslashes($image_name))."</b> (".$new_name.")";

So I replaced that with
1
$msg .= $lang['image_add_success'].": <b>".stripslashes($image_name)."</b> (".$new_name.")<br>";
as instructed.

However, when testing, the top of the confirmation page (/member.php) read
[qcode]
DB Error: Bad SQL Query: INSERT INTO 4images_images (cat_id, user_id, image_name, image_description, image_keywords, image_date, image_active, image_media_file, image_thumb_file, image_download_url, image_allow_comments) VALUES (7, 1, 'Swim', '', 'swim river', , 1, 'IMG_9373.jpg', 'IMG_9373.jpg', '', 1)
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' 1, 'IMG_9373.jpg', 'IMG_9373.jpg', '', 1)' at line 4

DB Error: Bad SQL Query: INSERT INTO 4images_images (cat_id, user_id, image_name, image_description, image_keywords, image_date, image_active, image_media_file, image_thumb_file, image_download_url, image_allow_comments) VALUES (7, 1, 'Swim 2', '', 'swim river', , 1, 'IMG_9446.jpg', 'IMG_9446.jpg', '', 1)
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' 1, 'IMG_9446.jpg', 'IMG_9446.jpg', '', 1)' at line 4[/qcode]

Suspecting the different original code was important (I do not know php, I just follow instructions), I compared the expected original line with mine (which I may have changed when installing another MOD) and applied the differences to the replacement, thus:
1
$msg .= $lang['image_add_success'].": <b>".format_text(stripslashes($image_name))."</b> (".$new_name.")<br>";

I tested this with 2 images and again the top of the confirmation page (/member.php) read
[qcode]DB Error: Bad SQL Query: INSERT INTO 4images_images (cat_id, user_id, image_name, image_description, image_keywords, image_date, image_active, image_media_file, image_thumb_file, image_download_url, image_allow_comments) VALUES (5, 1, 'scenes', '', '', , 1, '_MG_8981.jpg', '_MG_8981.jpg', '', 1)
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' 1, '_MG_8981.jpg', '_MG_8981.jpg', '', 1)' at line 4

DB Error: Bad SQL Query: INSERT INTO 4images_images (cat_id, user_id, image_name, image_description, image_keywords, image_date, image_active, image_media_file, image_thumb_file, image_download_url, image_allow_comments) VALUES (5, 1, 'scenes 2', '', '', , 1, '_MG_9057.jpg', '_MG_9057.jpg', '', 1)
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' 1, '_MG_9057.jpg', '_MG_9057.jpg', '', 1)' at line 4[/qcode]

Can anyone help? Thanks in advance


Title: Re: [MOD] multiupload
Post by: cappuccino on September 29, 2006, 09:36:23 AM
Thx... this mod works fine with 1.7.3, but i have still one problem.
When a member does not fill in the forms correctly and thereby the upload fails
then the side changes to member.php?action=uploadform and not to member.php?action=multiuploadform.

What modification do I have to do?
Has anybody a solution for this problem?

Thx and best regards


Title: Re: [MOD] multiupload
Post by: ivan on September 29, 2006, 09:44:15 AM
hello cappucino,
i have the same problem with 1.7.1
perhaps someone has an idea for solution!

greets ivan


Title: Re: [MOD] multiupload
Post by: webejpn on October 03, 2006, 05:20:27 PM
Hello,
I coped and pasted all the files from the original post into the corresponding folders on my site.
However, nothing has changed and therer are no buttons showing up or anything.

What am i doing wrong?

I put all the files in the root folder except the member_multiupload.html file i put in the templates root folder.

Matt


Title: Re: [MOD] multiupload
Post by: beasty on October 03, 2006, 05:27:50 PM
I'm not sure if we'll get help.

------

edit: Sorry if that read a bit 'off', I didn't mean it to. Thanks from me too for this great FREE software.


Title: Re: [MOD] multiupload
Post by: webejpn on October 03, 2006, 05:31:11 PM
i think i figured mine out.  looks like i had the wrong folder.

for some reason my 4images area always freezes up, any ideas why?


Title: Re: [MOD] multiupload
Post by: winterl on October 07, 2006, 11:39:55 PM
hy i have version 1.7.3 running now. but i wanted to install, but for the first step on members.php i didnt found
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
if (!$error) {
    // Start Upload
    include(ROOT_PATH.'includes/upload.php');
    $site_upload = new Upload();

    // Upload Media file
    if (!empty($HTTP_POST_FILES['media_file']['tmp_name']) && $HTTP_POST_FILES['media_file']['tmp_name'] != "none") {
      $new_name = $site_upload->upload_file("media_file", "media", $upload_cat);
      if (!$new_name) {
        $msg .= (($msg != "") ? "<br />" : "")."<b>".$lang['file_upload_error'].": ".$new_name."</b><br />".$site_upload->get_upload_errors();
        $uploaderror = 1;
      }
    }
    else {
      $new_name = $remote_media_file;
    }

someone can help me to solve the problem? thank you in advance.


Title: Re: [MOD] multiupload
Post by: ccsakuweb on November 29, 2006, 02:21:25 AM
hi! when i installed this mod with 1.7.3 version it worked ok but i have installed all the security fix to 1.7.3 and now i don't see the image with the code antispam then the users can't upload pics

please, could you helpme?


Title: Re: [MOD] multiupload
Post by: lemccoy on November 30, 2006, 03:14:47 PM
Open member_multiuploadform.html

after:
1
2
3
4
           <td class="row2">
              <textarea cols="30" class="textarea" rows="1" wrap="VIRTUAL" name="image_keywords">{image_keywords}</textarea>
            </td>
          </tr>

add:
1
2
3
4
5
6
7
8
9
10
11
         {if captcha_upload}
          <tr>
            <td class="row1" valign="top"><b>{lang_captcha}</b></td>
            <td class="row1">
 <a href="javascript:new_captcha_image();"><img src="{url_captcha_image}" border="0" id="captcha_image" /></a> <br />
              <input type="text" name="captcha" size="30" value="" class="commentinput" id="captcha_input" />
              <br />
              {lang_captcha_desc}
</td>
          </tr>
          {endif captcha_upload}


Title: Re: [MOD] multiupload
Post by: ccsakuweb on November 30, 2006, 07:03:44 PM
Hi, thanks a lot, now i see the code verification althout my users write the true code the page is redirectly to simple upload and there is a error message: "Please write the verification code"

Could yohelp me please?


Title: Re: [MOD] multiupload
Post by: lemccoy on November 30, 2006, 07:07:50 PM
that i don't know.  mine works  :?:


Title: Re: [MOD] multiupload
Post by: CeJay on December 19, 2006, 09:53:55 PM
I just added this mod to 1.7.4 and seems to work good for what is needed. However I did have to modify one line that was being edited in reference to the quote below as I was unable to find the coding mentioned when I searched member.php.
Not sure if the changes were needed or not, but still did it and it works.

[MOD] MultiUpload

II. FUNCTIONALITY

member.php

6.
REPLACE:
1
$msg .= $lang['image_add_success'].": <b>".stripslashes($image_name)."</b> (".$new_name.")";
BY:
1
      $msg .= $lang['image_add_success'].": <b>".stripslashes($image_name)."</b> (".$new_name.")<br>";

6.
Find:
1
      $msg .= $lang['image_add_success'].": <b>".format_text(stripslashes($image_name))."</b> (".$new_name.")";
Replace with:
1
      $msg .= $lang['image_add_success'].": <b>".format_text(stripslashes($image_name))."</b> (".$new_name.")<br>";

The only other mod that was done on this was "Auto image resize on upload" (http://www.4homepages.de/forum/index.php?topic=7700.0).
So I assume the reason for the different code was from the version being 1.7.4 which is different then when this mod was released.


Title: Re: [MOD] multiupload
Post by: ccsakuweb on December 21, 2006, 12:55:33 AM
thanks, it works fine ^^


Title: Re: [MOD] multiupload
Post by: LoganSix on December 29, 2006, 05:19:08 PM
Hi, thanks a lot, now i see the code verification althout my users write the true code the page is redirectly to simple upload and there is a error message: "Please write the verification code"

Could yohelp me please?

Do a search for the Captcha upgrade. 
You have to add something to the config file to turn it off in the upload files.


Title: Re: [MOD] multiupload
Post by: ivan on December 29, 2006, 05:35:22 PM
hi logansix
update this

http://www.4homepages.de/forum/index.php?topic=8517.msg84157#msg84157


Title: Re: [MOD] multiupload
Post by: heldmarkus on January 14, 2007, 04:46:04 PM
Hi,I  installed the same MOD, but also with version 1.7.4
All the pages work correctly. The only problem is, that it isn't possible to upload multiple pics. (that's bad, huh?)
After uploading in multiple-mode the error "You have to type your confirmation code" or in German "Das Feld mit dem Bestätigungs-Code muss ausgefüllt werden" appears and no pics are uploaded
But in this version of the MOD there is no confirmation code.
I think the member_multipleuploadform.html must be corrected, am I right?

My questions:
1. Is there a possibility to give me a html-file with the confirmationcode on the multiple-upload-page?
2. Do you know a solution to shut off the confirmation code all over the site (my users really hate it)

Thanks for your help!


Title: Re: [MOD] multiupload
Post by: mawenzi on January 14, 2007, 06:05:38 PM
@ heldmarkus
A.2. -> FAQ : http://www.4homepages.de/forum/index.php?topic=14690.0


Title: Re: [MOD] multiupload
Post by: Anke123 on January 16, 2007, 01:21:23 AM
Hallo @all

Eine kleine Frage zu diesem Mod. Können eventuell alle infos mal zusammen gefasst werden damit man diesen Mod für die neueste Version einbauen kann ??? So wie es aussieht scheint es in jdem Mod Posting das problem zu sein das man x Seiten lesen muss und die anfangs eingebaute Version mehrfach umschreiben muss damit sie mit der aktuellen lauffähig ist. Wenn man jetzt mehrere Mods einbauen will ist das jedesmal immer eine Wahnsinns Arbeit. Jeden Beitrag an zu schauen ob es eine Änderung für die neueste Version der Gallerie gibt.


Title: Re: [MOD] multiupload
Post by: CeJay on January 22, 2007, 08:04:38 AM
Didn't catch this when I first installed the mod, but now that I added it to a second site I caught it.

The mod works fine and everything, but when I go to site.com/gallery/member.php?action=multiuploadform
I see a list of the categories at the top of the page. Like so:
Quote  [Expand]
Select Category-------------------------------------- NAME OF CATEGORIES HERE">

Anyone else have this or have a solution to remove this?
The only other thing is the title in the browser is screwy as well and shows code in it.

Here is the URL: http://myhummers.com/gallery/member.php?action=multiuploadform
Any ideas are greatly appreciated  :!:


Title: Re: [MOD] multiupload
Post by: manurom on January 22, 2007, 11:41:27 PM
Hi, CeJay;

In member_multiuploadform.html, delete this first line:
1
<title>Multi Upload Form</title>
as the tag <title></title> is already sent in header.html


Title: Re: [MOD] multiupload
Post by: CeJay on January 22, 2007, 11:54:56 PM
That didn't do it, but thanks for the idea.

This is only on the muliupload page, not any other pages.


Title: Re: [MOD] multiupload
Post by: manurom on January 23, 2007, 01:01:30 AM
Well, I see in your page that the line is still here, and the category_dropdown_form is still embedded in your title.
Maybe you saw the first release of my post, wich was wrong. I figured I made an error by looking in header.html instead of member_multiuploadform.html, and made a correction just a few minutes later.
Sorry for the mistake.


Title: Re: [MOD] multiupload
Post by: CeJay on January 23, 2007, 09:44:50 AM
Well, I see in your page that the line is still here, and the category_dropdown_form is still embedded in your title.
Maybe you saw the first release of my post, wich was wrong. I figured I made an error by looking in header.html instead of member_multiuploadform.html, and made a correction just a few minutes later.
Sorry for the mistake.

I did see the post before the correction, no big deal easy enough to modify that little of code.

Either way both things did not work or work trying them together  :wink:


I am at a loss trying to figure this one out. Like I said its not that big of a deal except that it doesn't look that great to other users. The upload works ok besides the time out error every once in a while.


Title: Re: [MOD] multiupload
Post by: son_gokou on April 16, 2007, 12:48:40 AM
What about multi thumbnails?


Title: Re: [MOD] multiupload
Post by: manyaq on April 19, 2007, 11:18:44 PM
is this working with 1.7.4 build up some mods on it
annotion phpbb integration auto image resizer
i did everythimng that explaind exactli but i couldnt let it work


Title: Re: [MOD] multiupload
Post by: tomerl on May 06, 2007, 01:39:39 PM
Ran into a problem after installing this mod

1
Fatal error: Cannot redeclare convert_special() (previously declared in /home/user/public_html/Bildergalerie/includes/search_utils.php:34) in /home/user/public_html/Bildergalerie/includes/search_utils.php on line 34

Help me pleace.


Title: Re: [MOD] multiupload
Post by: tomerl on May 09, 2007, 08:51:59 AM
Kann mir keiner sagen welch Fehler das ist? Habe dazu nichts gefunden ausser ebnso einer Frage, und das englische verstehe ich leider nicht falls bereits was war. Danke.


Title: Re: [MOD] multiupload
Post by: son_gokou on May 09, 2007, 02:21:21 PM
If you don´t write in English many people won´t understand you.


Title: Re: [MOD] multiupload
Post by: tomerl on May 10, 2007, 07:01:33 AM
Ran into a problem after installing this mod

1
Fatal error: Cannot redeclare convert_special() (previously declared in /home/user/public_html/Bildergalerie/includes/search_utils.php:34) in /home/user/public_html/Bildergalerie/includes/search_utils.php on line 34

Help me pleace.




Title: Re: [MOD] multiupload
Post by: son_gokou on May 10, 2007, 02:26:38 PM
Kann mir keiner sagen welch Fehler das ist? Habe dazu nichts gefunden ausser ebnso einer Frage, und das englische verstehe ich leider nicht falls bereits was war. Danke.


Title: Re: [MOD] multiupload
Post by: CeJay on May 10, 2007, 07:50:20 PM
Ran into a problem after installing this mod

1
Fatal error: Cannot redeclare convert_special() (previously declared in /home/user/public_html/Bildergalerie/includes/search_utils.php:34) in /home/user/public_html/Bildergalerie/includes/search_utils.php on line 34

Help me pleace.

Did you try re-installing the mod? Seems like something missing to give you that error.


Title: Re: [MOD] multiupload
Post by: abramelin on June 09, 2007, 08:38:19 PM
can i display the two pics in the same page when viewing them ? how can i do it?
i mean i want user to upload 2 images and the system then will show them in one page not seperate?


Title: Re: [MOD] multiupload
Post by: Fragezeichen on June 10, 2007, 01:51:26 PM
this mod is working well,but chice the upload it seems a error:

DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, c.cat_name, u.user_name FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND i.cat_id = 1 AND c.cat_id = i.cat_id ORDER BY image_name ASC LIMIT 0, 9
Unknown column 'i.user_id' in 'on clause'

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /var/www/html/web609/html/includes/db_mysql.php on line 116

multiupload is working good,but how can i remove that message?


der multiupload arbeitet sehr gut und ohne fehler,doch wenn ich in einer kategorie etwas hochladen möchte bekomm ich diese meldung,obwohl alles einwandfrei funktioniert:

DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, c.cat_name, u.user_name FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND i.cat_id = 1 AND c.cat_id = i.cat_id ORDER BY image_name ASC LIMIT 0, 9
Unknown column 'i.user_id' in 'on clause'

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /var/www/html/web609/html/includes/db_mysql.php on line 116

woran liegts?


Title: Re: [MOD] multiupload
Post by: justinkuan85 on June 23, 2007, 04:56:09 AM
Hi,
I tried this to my 4images version 1.7.4 but i got this error message:

An unexpected error occured. Please try again later.

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/justi37/public_html/blog/poe/includes/db_mysql.php on line 116

Is there any multiupload guide for version 1.7.4?



Title: Re: [MOD] multiupload
Post by: CeJay on June 25, 2007, 04:29:28 PM
@ justinkuan85

This works in 1.7.4.
Follow the same instructions in the first post to add to 1.7.4.

Reinstall the mod and should work if directions are followed.


Title: Re: [MOD] multiupload
Post by: hassan on June 30, 2007, 02:30:48 PM
Hi Guys

i want this function that when i upload the files from multiple upload it automatically index with a similar name i want that when i will upload some files then the system names them as their file names.

please help



Title: Re: [MOD] multiupload
Post by: FotoRalle on July 24, 2007, 08:46:48 PM
Thank you for this MOD. I have a few Problems with the Image Resizer, but I think I can solve the Problem by checking what I did make wrong...


Title: Re: [MOD] multiupload
Post by: siemach on July 25, 2007, 01:28:27 PM
This is my first post but i hope that willby useful in multiupload

I used a part of script which add form function type=file every time when you choose file to upload
With this script You can select 1,2,5,10 or even 100 files to upload

My member_multiuploadform.html

Quote  [Expand]

<form method="post" action="{url_member}" enctype="multipart/form-data" onsubmit="uploadbutton.disabled=true;">
  <input type="hidden" name="action" value="multiuploadimage" />
  {if cat_id}<input type="hidden" name="cat_id" value="{cat_id}" />{endif cat_id}
  <table width="100%" border="0" cellspacing="0" cellpadding="1">
    <tr>
      <td valign="top" >
        <table width="100%" border="0" cellpadding="4" cellspacing="0">
          <tr>
            <td colspan="2" valign="top">{lang_user_upload}</td>
          </tr>
                   <tr>
            <td><span><b>{lang_media_file}</b><br />
                <span class="smalltext"> {lang_max_filesize}<b>{max_media_filsize}</b></span></span></td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td ><b>{lang_category}</b></td>
            <td >{cat_name}</td>
          </tr>
          <tr>
            <td ><p><b>{lang_image_name}<br></b></p></td>
            <td ><input type="text" name="image_name"  size="30" value="{image_name}" class="input" />
                <font color="#FF0000"><strong>*</strong></font></td>
          </tr>
          <tr>
            <td colspan="2" valign="top" >
  <p>
<script language="javascript">
f = 0
function file_uploader(which){
if (which < f) return
   f ++
   d = document.getElementById('images_'+f)
   d.innerHTML = '<input type="file" name="media_file'+(f+1)+'" onchange="file_uploader('+f+');" /><br /><span id="images_'+(f+1)+'">'
}
document.writeln('<input type="file" name="media_file" value="" onchange="file_uploader(0);" /><br />')
document.writeln('<span id="images_1"></span>')
</script>


<span clas[/font][/color]s="smalltext"><b>{lang_allowed_file_types}</b> {allowed_media_types}</span>
</p>
</td>
</tr>
</table>
      </td>
    </tr>
  </table>
  <p align="center">
    <input type="submit" name="uploadbutton" value="{lang_submit}" />
    <input type="reset" value="{lang_reset}" />
  </p>
</form>


Title: Re: [MOD] multiupload
Post by: arthur on August 11, 2007, 03:14:22 AM
Hallo Alle

Nach der Installation bekomme ich folgende fehlermeldung
Template Error: Couldn't open Template ./templates/default/member_multiuploadform.html
Wo liegt das problem??

Vielen Dank im Voraus!


Title: Re: [MOD] multiupload
Post by: firblazer on August 11, 2007, 06:21:57 AM
[MOD] MultiUpload
- This mod enables the users to add multiple files to a category at once.
- The images will get name and index, ie. "My pet", "My pet 2", "My pet 3",...
- for 4images 1.7.1

The best way to install this is to use the provided files, which give the changes compared to original installation of 4 images.

FILES
Files to be modified: (please take a backup copy of all of these!)
-categories.php  //settings
-categories.html  //To access the new action
-member.php //functionality (ie. looping the default upload method as long as required)

New files:
-member_multiuploadform.html //this is a simplified template for the multiupload
-two buttons... multiupload.gif, and multiupload_off.gif, I attached some as samples.

*NEW* I have included the clean versions of all these files to this post. They contain nothing more than the multiupload mod, it should be easy to integrate from there.


Recommended/required MODS
-auto thumbnailer and auto resizer MODs are highly recommended
-I also use my own EXIF reader and autorotate(according to the EXIF) MODs... these are yet to be released...


Hi! I'm trying to install the mod but I found two categories.php files: one in the root directory and another in the 'includes' directory. Which one should I change?
I am also unable to find categories.html. Which directory is it in? Is the mod applicable to version 1.7.4?

Thanks for your help.


Title: Re: [MOD] multiupload
Post by: thunderstrike on August 11, 2007, 06:42:38 AM
Quote  [Expand]
Template Error: Couldn't open Template ./templates/default/member_multiuploadform.html

Upload member_multiuploadform.html in templates/your_template folder. File missing.

Quote  [Expand]
I am also unable to find categories.html. Which directory is it in?

templates/your_template folder.


Title: Re: [MOD] multiupload
Post by: sowtrig on August 18, 2007, 09:37:51 AM
very very thx ,

very usefull MOD

thx a lot


Title: Re: [MOD] multiupload
Post by: bensen on October 05, 2007, 12:22:06 AM
DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, c.cat_name, u.user_name FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND i.cat_id = 3 AND c.cat_id = i.cat_id ORDER BY image_date DESC LIMIT 0, 9
Unknown column 'i.user_id' in 'on clause'

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /var/www/web14/web/gallery/includes/db_mysql.php on line 116

warum is das so? hab die dateien aus dem ersten post runtergeladen und durch die originalfiles ersetzt? hab 1.4.7!


Title: Re: [MOD] multiupload
Post by: thunderstrike on October 05, 2007, 12:36:49 AM
@bensen:

Welcome to 4homepages forum

Here:

http://www.4homepages.de/forum/index.php?topic=18780.0


Title: Re: [MOD] multiupload
Post by: bensen on October 05, 2007, 01:22:21 AM
already doenst work

where do i have to upload the hole files?

the categories.php also in den admin folder? the html files in the template one?


Title: Re: [MOD] multiupload
Post by: thunderstrike on October 05, 2007, 01:23:26 AM
Quote  [Expand]
already doenst work

Please read step 6 of my signature,


Title: Re: [MOD] multiupload
Post by: bensen on October 05, 2007, 01:29:28 AM
PHP Version 5.2.0-8+etch7

mysql Client API version    5.0.32

4images Version: 1.7.4

1
2
3
4
DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, c.cat_name, u.user_name FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND i.cat_id = 3 AND c.cat_id = i.cat_id ORDER BY image_date DESC LIMIT 0, 9
Unknown column 'i.user_id' in 'on clause'

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /var/www/web14/web/gallery/includes/db_mysql.php on line 116

so umständlich zig files editieren je nach mysql version etc... einige files haben bereits die richtig mysql 5er query methode andere net

es steht nirgends ob nur die eine categories.php ersetzt werden soll. gäbs eine EINDEUTIGE, VERSTÄNDLICHE Anleitung gäbs net soviele support anfragen.

eine zip mit integriertem ordnerbaum wär schon mal ein anfang.


Title: Re: [MOD] multiupload
Post by: thunderstrike on October 05, 2007, 01:43:56 AM
Quote  [Expand]
SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active,

1 - You check in index.php and details.php file ?
2 - You use a MOD for use this line ?


Title: Re: [MOD] multiupload
Post by: bensen on October 05, 2007, 01:46:29 AM
the only mod is/was multiupload and the required auto thumbnailer


Title: Re: [MOD] multiupload
Post by: thunderstrike on October 05, 2007, 01:51:30 AM
Please post attach file of index.php and details.php file. I check . . .


Title: Re: [MOD] multiupload
Post by: bensen on October 05, 2007, 06:20:38 PM
why the index?! i dont have to edit the index!

1
2
3
4
DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, c.cat_name, u.user_name FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND i.cat_id = 1 AND c.cat_id = i.cat_id ORDER BY image_date DESC LIMIT 0, 9
Unknown column 'i.user_id' in 'on clause'

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /var/www/web14/web/gallery/includes/db_mysql.php on line 116


Title: Re: [MOD] multiupload
Post by: bensen on October 05, 2007, 06:23:27 PM
and while uploading i got this error msg

1
Warning: move_uploaded_file() [function.move-uploaded-file]: SAFE MODE Restriction in effect. The script whose uid is 10080 is not allowed to access /var/www/web14/web/gallery/data/media/1 owned by uid 33 in /var/www/web14/web/gallery/includes/upload.php on line 113

every folder has 777

safe mode off required?


Title: Re: [MOD] multiupload
Post by: KurtW on October 05, 2007, 06:23:32 PM
Hi bensen,

you have problem with MySQL 5.0.x

Look here:
http://www.4homepages.de/forum/index.php?topic=10184.15 (http://www.4homepages.de/forum/index.php?topic=10184.15)


#################### EDIT ##########################
And also with SAFE MODE
safe mode off is required
Search about SAFE MODE in this forum



Kurt


Title: Re: [MOD] multiupload
Post by: anicol on October 05, 2007, 06:54:20 PM
Mine is off
I just did this mod 3 days ago


Title: Re: [MOD] multiupload
Post by: bensen on October 05, 2007, 07:38:18 PM
so ive installed multiupload and the mulitupload files (3th time). ive edited the mysql5-error-related files. ive checkt the chsmod 777 folders. ive

http://www.4homepages.de/forum/index.php?topic=10184.15 done!
http://www.4homepages.de/forum/index.php?topic=3958.0 done!

1
2
3
4
DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, c.cat_name, u.user_name FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND i.cat_id = 1 AND c.cat_id = i.cat_id ORDER BY image_date DESC LIMIT 0, 9
Unknown column 'i.user_id' in 'on clause'

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /var/www/web14/web/gallery/includes/db_mysql.php on line 116

doesnt work! my webspace is OK. i was running wordpress, joomla and phpkit on it!


Title: Re: [MOD] multiupload
Post by: thunderstrike on October 05, 2007, 08:53:36 PM
Ok, here is special debug for you -

In includes/db_mysql.php file,

find:

Quote  [Expand]
function query($query = "") {

add after:

1
global $self_url, $action;

find:

Quote  [Expand]
$this->error("<b>Bad SQL Query</b>: ".htmlentities($query)."<br /><b>".mysql_error()."</b>");

add after:

1
$this->error(stripslashes($self_url . ((!empty($action)) ? "?action=" . $action : "")));

Save file - refresh page and you see source PHP file for error. Please post the file you see.


Title: Re: [MOD] multiupload
Post by: bensen on October 05, 2007, 09:10:04 PM
1
2
3
4
5
6
DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, c.cat_name, u.user_name FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND i.cat_id = 1 AND c.cat_id = i.cat_id ORDER BY image_date DESC LIMIT 0, 9
Unknown column 'i.user_id' in 'on clause'

DB Error: categories.php?cat_id=1

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /var/www/web14/web/gallery/includes/db_mysql.php on line 118


Title: Re: [MOD] multiupload
Post by: thunderstrike on October 05, 2007, 09:13:35 PM
Quote  [Expand]
DB Error: categories.php?cat_id=1

Here. ;)

Now post attach of this file - I check.


Title: Re: [MOD] multiupload
Post by: bensen on October 05, 2007, 09:16:43 PM
thank you


Title: Re: [MOD] multiupload
Post by: thunderstrike on October 05, 2007, 09:17:38 PM
Problem is here -

Quote  [Expand]
FROM ".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c

replace with:

1
FROM (".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)


Title: Re: [MOD] multiupload
Post by: bensen on October 05, 2007, 09:20:42 PM
great thank you 1000 times.

but its curious that there is an error :/

i automatically replaced all files with text editor strg + h


Title: Re: [MOD] multiupload
Post by: thunderstrike on October 05, 2007, 09:21:38 PM
Download original ZIP file from this site. You see ( ... ) in it. Error is yours.  8)


Title: Re: [MOD] multiupload
Post by: bensen on October 05, 2007, 09:27:28 PM
i also did! i installed the whole package 3 times. 2 times with original server files.


Title: Re: [MOD] multiupload
Post by: thunderstrike on October 05, 2007, 09:30:57 PM
When the download of ZIP ?


Title: Re: [MOD] multiupload
Post by: bensen on October 05, 2007, 09:39:52 PM
when creating a category in the acp!


Warning: ftp_mkdir() [function.ftp-mkdir]: ./../data/media/2: No such file or directory in /var/www/web14/web/gallery/admin/categories.php on line 96

Warning: ftp_mkdir() [function.ftp-mkdir]: ./../data/thumbnails/2: No such file or directory in /var/www/web14/web/gallery/admin/categories.php on line 96

Warning: Cannot modify header information - headers already sent by (output started at /var/www/web14/web/gallery/admin/categories.php:96) in /var/www/web14/web/gallery/includes/functions.php on line 114


Title: Re: [MOD] multiupload
Post by: thunderstrike on October 05, 2007, 09:43:04 PM
I no see function name: ftp_mkdir in admin/categories.php file and nothing to do with this MOD. Please create new topic in request & discussions if see new problems with 4images.


Title: Re: [MOD] multiupload
Post by: bensen on October 05, 2007, 09:44:51 PM
nothing to do with this mod? the error is caused of the install of this mod  :roll:


Title: Re: [MOD] multiupload
Post by: thunderstrike on October 05, 2007, 09:46:06 PM
Ah ! so now you say the source of error (step 6 - my signature).  :roll:

Ok, so again I no see ftp_mkdir in admin/categories.php file ... if you see ... please rename to: mkdir.


Title: Re: [MOD] multiupload
Post by: bensen on October 05, 2007, 09:48:49 PM
i dont know what u mean

/e

PHP Version 5.2.0-8+etch7

mysql Client API version    5.0.32

4images Version: 1.7.4


Title: Re: [MOD] multiupload
Post by: thunderstrike on October 05, 2007, 09:52:04 PM
No step 7 - I say step 6 - is say ? Is do for no work ? PHP Version is step 7.

Anyway, again, see ftp_mkdir in admin/categories.php file ?


Title: Re: [MOD] multiupload
Post by: bensen on October 05, 2007, 09:54:08 PM
is do for no work <-- sry but this isnt english for me so i didnt unterstand it

//ici, la connection est bien effectuée, alors on appelle la fonction qui crée le répertoire
$result = ftp_mkdir($conn_id,$path);
}


Title: Re: [MOD] multiupload
Post by: thunderstrike on October 05, 2007, 09:55:49 PM
Quote  [Expand]
sry but this isnt english for me

It is to me  :!:

Quote  [Expand]
$result = ftp_mkdir($conn_id,$path);

Sigh - again rename ftp_mkdir to: mkdir .



Title: Re: [MOD] multiupload
Post by: bensen on October 05, 2007, 10:01:37 PM
1
2
3
4
5
Warning: mkdir() expects parameter 1 to be string, resource given in /var/www/web14/web/gallery/admin/categories.php on line 96

Warning: mkdir() expects parameter 1 to be string, resource given in /var/www/web14/web/gallery/admin/categories.php on line 96

Warning: Cannot modify header information - headers already sent by (output started at /var/www/web14/web/gallery/admin/categories.php:96) in /var/www/web14/web/gallery/includes/functions.php on line 114


Title: Re: [MOD] multiupload
Post by: thunderstrike on October 05, 2007, 10:02:29 PM
Ok so ask author of MOD for this ...


Title: Re: [MOD] multiupload
Post by: bensen on October 05, 2007, 10:14:15 PM
pls for the next version

massupload and secure mode on funktion in the acp...

terrible this whole modding... i just want a working version on my space -.-

/e is there anywhere a zip WITH safe mode editings? a WHOLE package?


Title: Re: [MOD] multiupload
Post by: thunderstrike on October 05, 2007, 10:40:45 PM
Quote  [Expand]
/e is there anywhere a zip WITH safe mode editings? a WHOLE package?

AhHA  ! so if you ask - is because you still have Safe mode on ?
4images must be safe mode off for work.


Title: Re: [MOD] multiupload
Post by: Nicky on October 06, 2007, 03:43:09 AM
pls for the next version

massupload and secure mode on funktion in the acp...

terrible this whole modding... i just want a working version on my space -.-

/e is there anywhere a zip WITH safe mode editings? a WHOLE package?

heile bensen,

modding: übung macht den meister  ;)
4images kann nix dafür das dein provider SAFE MODE an hat..

grüsse nach tirol


Title: Re: [MOD] multiupload
Post by: skidpics on October 14, 2007, 10:25:13 PM
@ justinkuan85

This works in 1.7.4.
Follow the same instructions in the first post to add to 1.7.4.

Reinstall the mod and should work if directions are followed.

I was wondering about the version, since the original post (http://www.4homepages.de/forum/index.php?topic=8517.0 (http://www.4homepages.de/forum/index.php?topic=8517.0)) states 1.7.1.

I am running 1.7.4, so the  instructions for the mod for this version is the first post of the forum? I am assuming the coding gets updated then as error were found?



Title: Re: [MOD] multiupload
Post by: skidpics on October 14, 2007, 10:26:18 PM
How about zip integration?


Title: Re: [MOD] multiupload
Post by: WeZ on November 07, 2007, 12:39:07 AM
Hello Thunderstrike,

This one is quite strange.

my multiupload is crashing on the line:
1
$remote_thumb_file = format_url(un_htmlspecialchars(trim($HTTP_POST_VARS['remote_thumb_file'])));

i do not use remote images at all.

I can upload one image in multiupload successfully. as soon as i add a second image at the same time, the page just hangs while trying to process.

My site is working OK if i do this:
1
2
  //$remote_media_file = format_url(un_htmlspecialchars(trim($HTTP_POST_VARS['remote_media_file'])));
  //$remote_thumb_file = format_url(un_htmlspecialchars(trim($HTTP_POST_VARS['remote_thumb_file'])));

This was not a problem while i was running on WAMPP with PHP4 and MySQL 4.
I am now on XAMPP with php5 and MySQL5 and i don't know if this might be the problem. I am running on 4Images 1.7.2

Any suggestions?

Kind Regards,
Wesley.


Title: Re: [MOD] multiupload
Post by: thunderstrike on November 07, 2007, 12:45:44 AM
Quote  [Expand]
Any suggestions?

Yes ... this line incorrect structure:

1
2
$remote_media_file = format_url(un_htmlspecialchars(trim($HTTP_POST_VARS['remote_media_file'])));
$remote_thumb_file = format_url(un_htmlspecialchars(trim($HTTP_POST_VARS['remote_thumb_file'])));

change for:

1
2
$remote_media_file = un_htmlspecialchars(trim(format_url((string)$HTTP_POST_VARS['remote_media_file'])));
$remote_thumb_file = un_htmlspecialchars(trim(format_url((string)$HTTP_POST_VARS['remote_thumb_file'])));


Title: Re: [MOD] multiupload
Post by: WeZ on November 07, 2007, 08:07:08 PM
Hi Thunderstrike,

I Changed my code to your suggestion and it still crashes with more than one file selected.

I have attached my zipped up member.php file for you to test with, maybe that will help?

Line 492 and 493 are the problems with multiupload.

Kind Regards,
Wesley.


Title: Re: [MOD] multiupload
Post by: thunderstrike on November 07, 2007, 09:15:14 PM
This MOD no use array with for loop ... I no like ... is problem why is freeze start to 2nd file and no for 1 file upload ...
I check in member multiupload form html template ... is say media_file, media_file1, media_file2 and after ...

media_file in template need for say: media_file[] and in member.php is need for check for array with for loop.
I no support other author MOD so you need ask author.


Title: Re: [MOD] multiupload
Post by: WeZ on November 07, 2007, 10:08:58 PM
i will have to ask the author then, thanks.

In my testing i can see that i am using the template WALLPAPER. when i change back to the normal template, then it works fine!! i will check the differences on the template now and see if i can fix it...


Title: Re: [MOD] multiupload
Post by: thunderstrike on November 07, 2007, 10:10:04 PM
Quote  [Expand]
I dont understand why it does not work for me but it works for everyone else.

If so - please read step 1-2-3 of my signature.


Title: Re: [MOD] multiupload
Post by: WeZ on November 07, 2007, 10:13:26 PM
If so - please read step 1-2-3 of my signature.

Good thing i already gave all that information in my post yesterday.


Title: Re: [MOD] multiupload
Post by: thunderstrike on November 07, 2007, 10:27:40 PM
Quote  [Expand]
I am now on XAMPP with php5 and MySQL5 and i don't know if this might be the problem. I am running on 4Images 1.7.2

Oh ... right ... PHP v5.0 or PHP v5.2 ... ?


Title: Re: [MOD] multiupload
Post by: WeZ on November 07, 2007, 10:42:45 PM

I Am running 5.0.45-community-nt, however i do not beleive it is a MySQL Issue because if i change my template to the standard template, this mod works fine. it only dies on my WALLPAPER template...

i am struggling to find the problem with my template, but i am still looking :-) ....


Title: Re: [MOD] multiupload
Post by: WeZ on November 07, 2007, 11:05:48 PM
Hi Thunderstrike,

I Found the error, :-) ...  it is a Typo in the member_multiuploadform.html

The file has this code by default:
1
2
3
4
5
6
7
8
9
10
11
12
<nobr>01.<b><font color="#FF0000">*</font></b><input type="file" name="media_file" class="input" /></nobr><br>
<nobr>02.&nbsp;&nbsp;<input type="file" name="media_file2"  class="input" /></nobr><br>
<nobr>03.&nbsp;&nbsp;<input type="file" name="media_file3"  class="input" /></nobr><br>
<nobr>04.&nbsp;&nbsp;<input type="file" name="media_file4"  class="input" /></nobr><br>
<nobr>05.&nbsp;&nbsp;<input type="file" name="media_file5"  class="input" /></nobr><br>
<!--
<nobr>06.&nbsp;&nbsp;<input type="file" name="media_file6"  class="input" /></nobr><br>
<nobr>07.&nbsp;&nbsp;<input type="file" name="media_file7"  class="input" /></nobr><br>
<nobr>08.&nbsp;&nbsp;<input type="file" name="media_file8"  class="input" /></nobr><br>
<nobr>09.&nbsp;&nbsp;<input type="file" name="media_file9"  class="input" /></nobr><br>
<nobr>10.&nbsp;&nbsp;<input type="file" name="media_file10" class="input" /></nobr><br />
-->

This code only displays the default 5 fields. if you want the last 5 fields to give you 10, then you need to obviously remove the:

 and

lines, However, the 10th Line looks like this:
1
<nobr>10.&nbsp;&nbsp;<input type="file" name="media_file10" class="input" /></nobr><br />

The "<br />" needs to be <br> like the rest of the lines.

This is what was killing my page :-)

Perhaps someone should fix the template one page one of this thread??

Thanks for your help

Cheers
WeZ


Title: Re: [MOD] multiupload
Post by: WeZ on November 07, 2007, 11:29:26 PM

You and V@no and Nicky and IceCream have helped me plenty in the past, I'm only glad to be able to add value to the forum. Knowledge Exchange between Users is very, very important for a free product like this to succeed.

Cheers
WeZ


Title: Re: [MOD] multiupload
Post by: Knut63 on November 14, 2007, 11:10:05 AM
Is this mod working in 1.7.4 if I use the code in the first post?


Title: Re: [MOD] multiupload
Post by: WeZ on November 14, 2007, 12:24:13 PM
Is this mod working in 1.7.4 if I use the code in the first post?

I think this was already answered in the thread.


Title: Re: [MOD] multiupload
Post by: billbob on December 28, 2007, 02:24:49 AM
Hi there. I am running version 1.7.4. I was able to edit all the code, but when i got to the last part that said to download the *member_multiuploadform.html* file, i was not able to find it attached anywhere in the post. Does anyone know where i can get this file? Any help would be much appreciated.

Thank you.


Title: Re: [MOD] multiupload
Post by: hc2hunter on February 03, 2008, 10:59:55 PM
Hi !

I have a problem with the Multiupload.
When a user makes a mistake he will be forwarded to the normal Upload-Form and not back to the Multiuploadform...  :(

Can somebody help me with this problem?

Help me please...  :oops:
My 4images version is v1.7.4


Title: Re: [MOD] multiupload
Post by: hc2hunter on February 04, 2008, 07:19:14 AM
FIXED !  :D

in member.php :

Quote  [Expand]
$action = ($action=="multiuploadimage") ? "multiuploadform":"uploadform";
     $sendprocess = 1;
     break; //break the while if any image upload fails
     }
     }
     $fileext=($fileext=="")?2:$fileext+1;
     }//end while
     }//end if
       else
       {
         //$action = "uploadform";
         $action = ($action=="multiuploadimage") ? "multiuploadform":"uploadform";
         $sendprocess = 1;
       }
     }//end upload action


Title: Re: [MOD] multiupload
Post by: infors2 on February 13, 2008, 11:40:54 AM
Hi there. I am running version 1.7.4. I was able to edit all the code, but when i got to the last part that said to download the *member_multiuploadform.html* file, i was not able to find it attached anywhere in the post. Does anyone know where i can get this file? Any help would be much appreciated.


I'm sorry, but I also cannot find the download link to the member_multiuploadform.html and the gifs.


Title: Re: [MOD] multiupload
Post by: axtro on February 26, 2008, 09:04:07 PM
Please can someone put the necessary files on al link??
thanks :lol:


Title: Re: [MOD] multiupload
Post by: ivan on February 26, 2008, 09:43:31 PM
see here

http://www.4homepages.de/forum/index.php?topic=20072.0

or here

http://www.4homepages.de/forum/index.php?topic=20657.0

give us a feedback ;)


Title: Re: [MOD] multiupload
Post by: axtro on March 05, 2008, 04:05:10 PM
Thanks IVAN!!!  :D :D :D
see here

http://www.4homepages.de/forum/index.php?topic=20072.0

or here

http://www.4homepages.de/forum/index.php?topic=20657.0

give us a feedback ;)


Title: Re: [MOD] multiupload
Post by: nanzi on March 16, 2008, 08:52:31 AM
thinks every one!


Title: Re: [MOD] multiupload
Post by: kaya on June 18, 2008, 05:45:14 AM

HOw do i increase the 5 uploads to say 10 uploads?
Thanks


Title: Re: [MOD] multiupload
Post by: eXtremer on June 24, 2008, 10:06:19 AM
Hi all.
I use [BETA] for 1.7.6 Multiupload Vers. 2.0, by ivan.
It works fine except a thing:

I'm using the blue template, when I enter the site I see the blue template but when I enter a Categorie, the template switches to the default template, why ?!

Index page (good):

(http://www.torrentsmd.com/imagestorage/870091_2e8.jpg)

A categorie page (not good) should use the blue template as index page:

(http://www.torrentsmd.com/imagestorage/870090_09f.jpg)

Ivan doesn't know english so he cannot help me, could smb else ?!
I think I have to change the code in categories.php but I don't know what.


Title: Re: [MOD] multiupload
Post by: LunaPark on July 12, 2008, 12:50:18 PM
Hi I just followed the text to install this mod...

But I need the file :  "member_multiuploadform.html"
and the image to the button.

Can anyone help me ?


Title: Re: [MOD] multiupload
Post by: † manurom on July 12, 2008, 08:50:23 PM
Hi I just followed the text to install this mod...

But I need the file :  "member_multiuploadform.html"
and the image to the button.

Can anyone help me ?

Hi;
look at here: [BETA] for 1.7.6 Multiupload Vers. 2.0 (http://www.4homepages.de/forum/index.php?topic=20072.0).
You can find there all filles in attachment, if using 4images 1.7.6.


Title: Re: [MOD] multiupload
Post by: artmedia on November 19, 2008, 06:13:58 PM

- download the file from below and copy it to your template folder (of course rename to member_multiuploadform.html)


Sorry, from where? where is the link with the attachments?


Title: Re: [MOD] multiupload
Post by: piczilla on July 07, 2010, 05:43:01 PM
Nothing like bring up an old topic  :D

I just followed this to get the multiple uploads to work. I also installed the thing to get different names, descriptions, and keywords.

The only problem is when I click "submit" it makes me to the members.php page and it says I have lost my password.

Can anyone help?

Thanks,
Coultonß


Title: Re: [MOD] multiupload
Post by: V@no on July 07, 2010, 08:32:03 PM
Welcome to 4images forum.

Please post contents of your member_multiuploadform.html template

And check steps for members.php


Title: Re: [MOD] multiupload
Post by: piczilla on July 07, 2010, 09:00:14 PM
Welcome to 4images forum.

Please post contents of your member_multiuploadform.html template

And check steps for members.php

Thanks for the help.

member_multiuploadform.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
<style type="text/css">
<!--
.style12 {color: #666666}
.style14 {color: #666666; font-size: 14px; }
.style15 {font-size: 14px}

-->
</style>
<table width="960" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td height="47"><img src="http://www.insanestream.com/piczilla/templates/default_960px/images/divide_12_title.png" width="200" height="47" /> </td>
          </tr>
</table></td>
      </tr>
    </table></td>
  </tr>
</table>



<table width="960" border="0" align="center" cellpadding="1" cellspacing="0">
  <tr>
    <td valign="top" class="head1">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" class="head1">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" class="head1"><form method="post" action="{url_member}" enctype="multipart/form-data" onSubmit="uploadbutton.disabled=true;">
      <span class="row1 style12"><b>You are uploading these pictures to {cat_name}</b>.</span>
      <table width="100%" border="0" cellspacing="0" cellpadding="1">
    <tr>
      <td valign="top" class="head1"><table width="100%" border="0" cellpadding="4" cellspacing="0">
         
         
          <tr>
            <td width="38%" valign="top" class="row2"><span class="smalltext"><br />
              </span> </td>
            <td width="34%" class="row2">&nbsp;</td>
            <td width="28%" class="row2">&nbsp;</td>
          </tr>
          <tr>
            <td valign="top" class="row1"><table border="0" cellpadding="15" cellspacing="0" style="background-image: url(http://www.insanestream.com/piczilla/templates/default_960px/images/1.png); border:1px solid #dcdbdb;">
              <tr>
                <td><b><nobr><span class="style14"><b>Upload</b><b></b></span><br>
                      <b>
                      <input name="media_file" type="file" class="input" />
                      </b></nobr><br>
                      <br>
                      <span class="style14"><b>{lang_image_name}</b></span><span class="row2"><b><br>
                                            </b>
                      <input type="text" name="image_name"  size="30" value="{image_name}" class="input" />
                      <br>
                      <br>
                      <b class="style14">{lang_description}</b> <br>
                      <textarea name="image_description" cols="30" class="textarea" rows="5" wrap="VIRTUAL">{image_description}</textarea>
                                            </span><br>
                      <br>
                      <span class="style14"><b>{lang_keywords}</b></span><span class="row2"><b><br>
                      </b>
                      <textarea cols="30" class="textarea" rows="5" wrap="VIRTUAL" name="image_keywords">{image_keywords}</textarea>
                                            </span><br>
                </b></td>
              </tr>
            </table>             
              <br></td>
            <td valign="top" class="row1"><table border="0" cellspacing="0" cellpadding="15" style="background-image: url(http://www.insanestream.com/piczilla/templates/default_960px/images/2.png);  border: 1px solid #d5d3d3;">
              <tr>
                <td><b><nobr><span class="style14"><b>Upload</b><b></b></span><br>
                        <b>
                        <input name="media_file2" type="file" class="input" id="media_file2" />
                        </b></nobr><br>
                        <br>
                        <span class="style14"><b>{lang_image_name}</b></span><span class="row2"><b><br>
                                                </b>
                        <input type="text" name="image_name2"  size="30" value="{image_name}" class="input" />
                        <br>
                        <br>
                        <b class="style14">{lang_description}</b> <br>
                        <textarea name="image_description2" cols="30" class="textarea" rows="5" wrap="VIRTUAL">{image_description}</textarea>
                                                </span><br>
                        <br>
                        <span class="style14"><b>{lang_keywords}</b></span><span class="row2"><b><br>
                                                </b>
                        <textarea cols="30" class="textarea" rows="5" wrap="VIRTUAL" name="image_keywords2">{image_keywords}</textarea>
                                                </span><br>
                </b></td>
              </tr>
            </table>
              <br></td>
            <td valign="top" class="row1"><table border="0" cellspacing="0" cellpadding="15"  style="background-image: url(http://www.insanestream.com/piczilla/templates/default_960px/images/1.png); border:1px solid #dcdbdb;">
              <tr>
                <td><b><nobr><span class="style14"><b>Upload</b><b></b></span><br>
                        <b>
                        <input name="media_file3" type="file" class="input" id="media_file3" />
                        </b></nobr><br>
                        <br>
                        <span class="style14"><b>{lang_image_name}</b></span><span class="row2"><b><br>
                                                </b>
                        <input type="text" name="image_name3"  size="30" value="{image_name}" class="input" />
                        <br>
                        <br>
                        <b class="style14">{lang_description}</b> <br>
                        <textarea name="image_description3" cols="30" class="textarea" rows="5" wrap="VIRTUAL">{image_description}</textarea>
                                                </span><br>
                        <br>
                        <span class="style14"><b>{lang_keywords}</b></span><span class="row2"><b><br>
                                                </b>
                        <textarea cols="30" class="textarea" rows="5" wrap="VIRTUAL" name="image_keywords3">{image_keywords}</textarea>
                                                </span><br>
                </b></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td height="35" valign="top" class="row2">&nbsp;</td>
            <td class="row2">&nbsp;</td>
            <td class="row2">&nbsp;</td>
          </tr>
          <tr>
            <td valign="top" class="row2"><table border="0" cellspacing="0" cellpadding="15" style="background-image: url(http://www.insanestream.com/piczilla/templates/default_960px/images/2.png);  border: 1px solid #d5d3d3;">
              <tr>
                <td><b><nobr><span class="style14"><b>Upload</b><b></b></span><br>
                        <b>
                        <input name="media_file4" type="file" class="input" />
                        </b></nobr><br>
                        <br>
                        <span class="style14"><b>{lang_image_name}</b></span><b><br>
                        </b>
                        <input type="text" name="image_name4"  size="30" value="{image_name}" class="input" />
                        <br>
                        <br>
                        <b class="style14">{lang_description}</b> <br>
                        <textarea name="image_description4" cols="30" class="textarea" rows="5" wrap="VIRTUAL">{image_description}</textarea>
                        <br>
                        <br>
                        <span class="style14"><b>{lang_keywords}</b></span><b><br>
                        </b>
                        <textarea cols="30" class="textarea" rows="5" wrap="VIRTUAL" name="image_keywords4">{image_keywords}</textarea>
                        <br>
                </b></td>
              </tr>
            </table></td>
            <td class="row2"><table border="0" cellspacing="0" cellpadding="15" style="background-image: url(http://www.insanestream.com/piczilla/templates/default_960px/images/1.png); border:1px solid #dcdbdb;">
              <tr>
                <td><b><nobr><span class="style14"><b>Upload</b><b></b></span><br>
                        <b>
                        <input name="media_file15" type="file" class="input" />
                        </b></nobr><br>
                        <br>
                        <span class="style14"><b>{lang_image_name}</b></span><b><br>
                        </b>
                        <input type="text" name="image_name5"  size="30" value="{image_name}" class="input" />
                        <br>
                        <br>
                        <b class="style14">{lang_description}</b> <br>
                        <textarea name="image_description5" cols="30" class="textarea" rows="5" wrap="VIRTUAL">{image_description}</textarea>
                        <br>
                        <br>
                        <span class="style14"><b>{lang_keywords}</b></span><b><br>
                        </b>
                        <textarea cols="30" class="textarea" rows="5" wrap="VIRTUAL" name="image_keywords5">{image_keywords}</textarea>
                        <br>
                </b></td>
              </tr>
            </table></td>
            <td class="row2"><table border="0" cellspacing="0" cellpadding="15" style="background-image: url(http://www.insanestream.com/piczilla/templates/default_960px/images/2.png);  border: 1px solid #d5d3d3;">
              <tr>
                <td><b><nobr><span class="style14"><b>Upload</b><b></b></span><br>
                        <b>
                        <input name="media_file16" type="file" class="input" />
                        </b></nobr><br>
                        <br>
                        <span class="style14"><b>{lang_image_name}</b></span><b><br>
                        </b>
                        <input type="text" name="image_name6"  size="30" value="{image_name}" class="input" />
                        <br>
                        <br>
                        <b class="style14">{lang_description}</b> <br>
                        <textarea name="image_description6" cols="30" class="textarea" rows="5" wrap="VIRTUAL">{image_description}</textarea>
                        <br>
                        <br>
                        <span class="style14"><b>{lang_keywords}</b></span><b><br>
                        </b>
                        <textarea cols="30" class="textarea" rows="5" wrap="VIRTUAL" name="image_keywords6">{image_keywords}</textarea>
                        <br>
                </b></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td height="35" valign="top" class="row2">&nbsp;</td>
            <td class="row2">&nbsp;</td>
            <td class="row2">&nbsp;</td>
          </tr>
          <tr>
            <td valign="top" class="row2"><table border="0" cellspacing="0" cellpadding="15" style="background-image: url(http://www.insanestream.com/piczilla/templates/default_960px/images/1.png); border:1px solid #dcdbdb;">
              <tr>
                <td><b><nobr><span class="style14"><b>Upload</b><b></b></span><br>
                        <b>
                        <input name="media_file7" type="file" class="input" />
                        </b></nobr><br>
                        <br>
                        <span class="style14"><b>{lang_image_name}</b></span><b><br>
                        </b>
                        <input type="text" name="image_name7"  size="30" value="{image_name}" class="input" />
                        <br>
                        <br>
                        <b class="style14">{lang_description}</b> <br>
                        <textarea name="image_description7" cols="30" class="textarea" rows="5" wrap="VIRTUAL">{image_description}</textarea>
                        <br>
                        <br>
                        <span class="style14"><b>{lang_keywords}</b></span><b><br>
                        </b>
                        <textarea cols="30" class="textarea" rows="5" wrap="VIRTUAL" name="image_keywords7">{image_keywords}</textarea>
                        <br>
                </b></td>
              </tr>
            </table></td>
            <td class="row2"><table border="0" cellspacing="0" cellpadding="15" style="background-image: url(http://www.insanestream.com/piczilla/templates/default_960px/images/2.png);  border: 1px solid #d5d3d3;">
              <tr>
                <td><b><nobr><span class="style14"><b>Upload</b><b></b></span><br>
                        <b>
                        <input name="media_file8" type="file" class="input" />
                        </b></nobr><br>
                        <br>
                        <span class="style14"><b>{lang_image_name}</b></span><b><br>
                        </b>
                        <input type="text" name="image_name8"  size="30" value="{image_name}" class="input" />
                        <br>
                        <br>
                        <b class="style14">{lang_description}</b> <br>
                        <textarea name="image_description8" cols="30" class="textarea" rows="5" wrap="VIRTUAL">{image_description}</textarea>
                        <br>
                        <br>
                        <span class="style14"><b>{lang_keywords}</b></span><b><br>
                        </b>
                        <textarea cols="30" class="textarea" rows="5" wrap="VIRTUAL" name="image_keywords8">{image_keywords}</textarea>
                        <br>
                </b></td>
              </tr>
            </table></td>
            <td class="row2"><table border="0" cellspacing="0" cellpadding="15" style="background-image: url(http://www.insanestream.com/piczilla/templates/default_960px/images/1.png); border:1px solid #dcdbdb;">
              <tr>
                <td><b><nobr><span class="style14"><b>Upload</b><b></b></span><br>
                        <b>
                        <input name="media_file9" type="file" class="input" />
                        </b></nobr><br>
                        <br>
                        <span class="style14"><b>{lang_image_name}</b></span><b><br>
                        </b>
                        <input type="text" name="image_name9"  size="30" value="{image_name}" class="input" />
                        <br>
                        <br>
                        <b class="style14">{lang_description}</b> <br>
                        <textarea name="image_description9" cols="30" class="textarea" rows="5" wrap="VIRTUAL">{image_description}</textarea>
                        <br>
                        <br>
                        <span class="style14"><b>{lang_keywords}</b></span><b><br>
                        </b>
                        <textarea cols="30" class="textarea" rows="5" wrap="VIRTUAL" name="image_keywords9">{image_keywords}</textarea>
                        <br>
                </b></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td height="35" valign="top" class="row2">&nbsp;</td>
            <td class="row2">&nbsp;</td>
            <td class="row2">&nbsp;</td>
          </tr>
          <tr>
            <td valign="top" class="row2"><table border="0" cellspacing="0" cellpadding="15" style="background-image: url(http://www.insanestream.com/piczilla/templates/default_960px/images/2.png);  border: 1px solid #d5d3d3;">
              <tr>
                <td><b><nobr><span class="style14"><b>Upload</b><b></b></span><br>
                        <b>
                        <input name="media_file10" type="file" class="input" />
                        </b></nobr><br>
                        <br>
                        <span class="style14"><b>{lang_image_name}</b></span><b><br>
                        </b>
                        <input type="text" name="image_name10"  size="30" value="{image_name}" class="input" />
                        <br>
                        <br>
                        <b class="style14">{lang_description}</b> <br>
                        <textarea name="image_description10" cols="30" class="textarea" rows="5" wrap="VIRTUAL">{image_description}</textarea>
                        <br>
                        <br>
                        <span class="style14"><b>{lang_keywords}</b></span><b><br>
                        </b>
                        <textarea cols="30" class="textarea" rows="5" wrap="VIRTUAL" name="image_keywords10">{image_keywords}</textarea>
                        <br>
                </b></td>
              </tr>
            </table></td>
            <td class="row2">&nbsp;</td>
            <td class="row2">&nbsp;</td>
          </tr>
          <tr>
            <td valign="top" class="row2">&nbsp;</td>
            <td class="row2">&nbsp;</td>
            <td class="row2">&nbsp;</td>
          </tr>
         
         
         
          {if captcha_multiupload}
          <tr>
            <td class="row1" valign="top"><b><span class="style14">{lang_captcha}</span><br>
              <br>
              <a href="javascript:new_captcha_image();"><img src="{url_captcha_image}" border="0" id="captcha_image" /></a> <br />
                  <input type="text" name="captcha" size="30" value="" class="commentinput" id="captcha_input" />
                  <br />
                  </b><span class="style15 style12">{lang_captcha_desc} </span></td>
            <td class="row1">&nbsp;</td>
            <td class="row1">&nbsp;</td>
          </tr>
          {endif captcha_multiupload}
        </table></td>
    </tr>
  </table>
  <p align="left">
    <br>
    <br>
    <input type="submit" name="multiuploadbutton" value="{lang_submit}" />
    <input type="reset" value="{lang_reset}" />
  </p>
</form></td>
  </tr>
</table>
<br>
<br>
<br>
<br>

I downloaded a fresh version of 4images to get the members.php file. I did everything that it said in the tutorial and now it's blank. Why?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
<?php
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: member.php                                           *
 *        Copyright: (C) 2002-2009 Jan Sorgalla                           *
 *            Email: jan@4homepages.de                                    *
 *              Web: http://www.4homepages.de                             *
 *    Scriptversion: 1.7.7                                                *
 *                                                                        *
 *    Never released without support from: Nicky (http://www.nicky.net)   *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
 *    bedingungen (Lizenz.txt) f&#252;r weitere Informationen.                 *
 *    ---------------------------------------------------------------     *
 *    This script is NOT freeware! Please read the Copyright Notice       *
 *    (Licence.txt) for further information.                              *
 *                                                                        *
 *************************************************************************/

$main_template "member";

define('GET_CACHES'1);
define('ROOT_PATH''./');
include(
ROOT_PATH.'global.php');
require(
ROOT_PATH.'includes/sessions.php');
$user_access get_permission();
include(
ROOT_PATH.'includes/page_header.php');

if (
$action == "") {
  
$action "lostpassword";
}
$content "";
$txt_clickstream "";

$sendprocess 0;

if (isset(
$HTTP_GET_VARS[URL_COMMENT_ID]) || isset($HTTP_POST_VARS[URL_COMMENT_ID])) {
  
$comment_id = (isset($HTTP_GET_VARS[URL_COMMENT_ID])) ? intval($HTTP_GET_VARS[URL_COMMENT_ID]) : intval($HTTP_POST_VARS[URL_COMMENT_ID]);
}
else {
  
$comment_id 0;
}

if (
$action == "deletecomment") {
  if (!
$comment_id || ($config['user_delete_comments'] != && $user_info['user_level'] != ADMIN)) {
    
show_error_page($lang['no_permission']);
    exit;
  }

  
$sql "SELECT c.comment_id, c.user_id AS comment_user_id, i.image_id, i.cat_id, i.user_id, i.image_name
          FROM ("
.COMMENTS_TABLE." c, ".IMAGES_TABLE." i)
          WHERE c.comment_id = 
$comment_id AND i.image_id = c.image_id";
  
$comment_row $site_db->query_firstrow($sql);
  if (!
$comment_row || $comment_row['user_id'] <= USER_AWAITING || ($user_info['user_id'] != $comment_row['user_id'] && $user_info['user_level'] != ADMIN)) {
    
show_error_page($lang['no_permission']);
    exit;
  }

  
$txt_clickstream get_category_path($comment_row['cat_id'], 1).$config['category_separator']."<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$comment_row['image_id'])."\" class=\"clickstream\">".format_text($comment_row['image_name'], 2)."</a>".$config['category_separator'];
  
$txt_clickstream .= $lang['comment_delete'];

  
$sql "UPDATE ".IMAGES_TABLE."
          SET image_comments = image_comments - 1
          WHERE image_id = "
.$comment_row['image_id'];
  
$site_db->query($sql);

  if (
$comment_row['comment_user_id'] != GUEST) {
    
$sql "UPDATE ".USERS_TABLE."
            SET "
.get_user_table_field("""user_comments")." = ".get_user_table_field("""user_comments")." - 1
            WHERE "
.get_user_table_field("""user_id")." = ".$comment_row['comment_user_id'];
    
$site_db->query($sql);
  }

  
$sql "DELETE FROM ".COMMENTS_TABLE."
          WHERE comment_id = 
$comment_id";
  
$result $site_db->query($sql);
  
$msg = ($result) ? $lang['comment_delete_success'] : $lang['comment_delete_error'];
}

if (
$action == "removecomment") {
  if (!
$comment_id || ($config['user_delete_comments'] != && $user_info['user_level'] != ADMIN)) {
    
redirect($url);
  }

  
$sql "SELECT c.comment_id, c.image_id, c.user_id AS comment_user_id, c.user_name AS comment_user_name, c.comment_headline, c.comment_text, i.image_name, i.cat_id, i.user_id".get_user_table_field(", u.""user_name")."
          FROM ("
.COMMENTS_TABLE." c, ".IMAGES_TABLE." i)
          LEFT JOIN "
.USERS_TABLE." u ON (".get_user_table_field("u.""user_id")." = c.user_id)
          WHERE c.comment_id = 
$comment_id AND i.image_id = c.image_id";
  
$comment_row $site_db->query_firstrow($sql);
  if (!
$comment_row || $comment_row['user_id'] <= USER_AWAITING || ($user_info['user_id'] != $comment_row['user_id'] && $user_info['user_level'] != ADMIN)) {
    
redirect($url);
  }

  
$txt_clickstream get_category_path($comment_row['cat_id'], 1).$config['category_separator']."<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$comment_row['image_id'])."\" class=\"clickstream\">".format_text($comment_row['image_name'], 2)."</a>".$config['category_separator'];
  
$txt_clickstream .= $lang['comment_delete'];

  if (isset(
$comment_row[$user_table_fields['user_name']]) && $comment_row['comment_user_id'] != GUEST) {
    
$user_name $comment_row[$user_table_fields['user_name']];
  }
  else {
    
$user_name $comment_row['comment_user_name'];
  }

  
$site_template->register_vars(array(
    
"comment_id" => $comment_id,
    
"image_name" => format_text($comment_row['image_name']),
    
"user_name" => format_text($user_name),
    
"comment_headline" => format_text($comment_row['comment_headline'], 0$config['wordwrap_comments'], 00),
    
"comment_text" => format_text($comment_row['comment_text'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments']),
    
"lang_delete_comment" => $lang['comment_delete'],
    
"lang_delete_comment_confirm" => $lang['comment_delete_confirm'],
    
"lang_image_name" => $lang['image_name'],
    
"lang_name" => $lang['name'],
    
"lang_headline" => $lang['headline'],
    
"lang_comment" => $lang['comment'],
    
"lang_submit" => $lang['submit'],
    
"lang_reset" => $lang['reset'],
    
"lang_yes" => $lang['yes'],
    
"lang_no" => $lang['no']
  ));
  
$content $site_template->parse_template("member_deletecomment");
}

if (
$action == "updatecomment") {
  if (!
$comment_id || ($config['user_edit_comments'] != && $user_info['user_level'] != ADMIN)) {
    
show_error_page($lang['no_permission']);
    exit;
  }
  
$sql "SELECT c.comment_id, c.image_id, i.image_name, i.cat_id, i.user_id".get_user_table_field(", u.""user_name")."
          FROM ("
.COMMENTS_TABLE." c, ".IMAGES_TABLE." i)
          LEFT JOIN "
.USERS_TABLE." u ON (".get_user_table_field("u.""user_id")." = c.user_id)
          WHERE c.comment_id = 
$comment_id AND i.image_id = c.image_id";
  
$comment_row $site_db->query_firstrow($sql);
  if (!
$comment_row || $comment_row['user_id'] <= USER_AWAITING || ($user_info['user_id'] != $comment_row['user_id'] && $user_info['user_level'] != ADMIN)) {
    
show_error_page($lang['no_permission']);
    exit;
  }

  
$txt_clickstream get_category_path($comment_row['cat_id'], 1).$config['category_separator']."<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$comment_row['image_id'])."\" class=\"clickstream\">".format_text($comment_row['image_name'], 2)."</a>".$config['category_separator'];
  
$txt_clickstream .= $lang['comment_edit'];

  
$error 0;

  
$comment_headline un_htmlspecialchars(trim($HTTP_POST_VARS['comment_headline']));
  
$comment_text un_htmlspecialchars(trim($HTTP_POST_VARS['comment_text']));

  if (
$comment_headline == "")  {
    
$error 1;
    
$field_error preg_replace("/".$site_template->start."field_name".$site_template->end."/siU"str_replace(":"""$lang['headline']), $lang['field_required']);
    
$msg .= (($msg != "") ? "<br />" "").$field_error;
  }
  if (
$comment_text == "")  {
    
$error 1;
    
$field_error preg_replace("/".$site_template->start."field_name".$site_template->end."/siU"str_replace(":"""$lang['comment']), $lang['field_required']);
    
$msg .= (($msg != "") ? "<br />" "").$field_error;
  }

  if (!
$error) {
    
$sql "UPDATE ".COMMENTS_TABLE."
            SET comment_headline = '
$comment_headline', comment_text = '$comment_text'
            WHERE comment_id = 
$comment_id";
    
$result $site_db->query($sql);
    
$msg = ($result) ? $lang['comment_edit_success'] : $lang['comment_edit_error'];
  }
  else {
    
$action "editcomment";
    
$sendprocess 1;
  }
}

if (
$action == "editcomment") {
  if (!
$comment_id || ($config['user_edit_comments'] != && $user_info['user_level'] != ADMIN)) {
    
redirect($url);
  }

  
$sql "SELECT c.comment_id, c.image_id, c.user_id AS comment_user_id, c.user_name AS comment_user_name, c.comment_headline, c.comment_text, i.image_name, i.cat_id, i.user_id".get_user_table_field(", u.""user_name")."
          FROM ("
.COMMENTS_TABLE." c, ".IMAGES_TABLE." i)
          LEFT JOIN "
.USERS_TABLE." u ON (".get_user_table_field("u.""user_id")." = c.user_id)
          WHERE c.comment_id = 
$comment_id AND i.image_id = c.image_id";
  
$comment_row $site_db->query_firstrow($sql);
  if (!
$comment_row || $comment_row['user_id'] <= USER_AWAITING || ($user_info['user_id'] != $comment_row['user_id'] && $user_info['user_level'] != ADMIN)) {
    
header("Location: ".$site_sess->url($url"&"));
    exit;
  }

  
$txt_clickstream get_category_path($comment_row['cat_id'], 1).$config['category_separator']."<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$comment_row['image_id'])."\" class=\"clickstream\">".format_text($comment_row['image_name'], 2)."</a>".$config['category_separator'];
  
$txt_clickstream .= $lang['comment_edit'];

  
$comment_headline = (isset($HTTP_POST_VARS['comment_headline'])) ? un_htmlspecialchars(stripslashes(trim($HTTP_POST_VARS['comment_headline']))) : $comment_row['comment_headline'];
  
$comment_text = (isset($HTTP_POST_VARS['comment_text'])) ? un_htmlspecialchars(stripslashes(trim($HTTP_POST_VARS['comment_text']))) : $comment_row['comment_text'];

  if (isset(
$comment_row[$user_table_fields['user_name']]) && $comment_row['comment_user_id'] != GUEST) {
    
$user_name $comment_row[$user_table_fields['user_name']];
  }
  else {
    
$user_name $comment_row['comment_user_name'];
  }

  
$bbcode "";
  if (
$config['bb_comments'] == 1) {
    
$site_template->register_vars(array(
      
"lang_bbcode" => $lang['bbcode'],
      
"lang_tag_prompt" => $lang['tag_prompt'],
      
"lang_link_text_prompt" => $lang['link_text_prompt'],
      
"lang_link_url_prompt" => $lang['link_url_prompt'],
      
"lang_link_email_prompt" => $lang['link_email_prompt'],
      
"lang_list_type_prompt" => $lang['list_type_prompt'],
      
"lang_list_item_prompt" => $lang['list_item_prompt']
    ));
    
$bbcode $site_template->parse_template("bbcode");
  }

  
$site_template->register_vars(array(
    
"bbcode" => $bbcode,
    
"comment_id" => $comment_id,
    
"image_name" => format_text($comment_row['image_name'], 2),
    
"user_name" => format_text($user_name2),
    
"comment_headline" => format_text($comment_headline2),
    
"comment_text" => format_text($comment_text2),
    
"lang_edit_comment" => $lang['comment_edit'],
    
"lang_image_name" => $lang['image_name'],
    
"lang_name" => $lang['name'],
    
"lang_headline" => $lang['headline'],
    
"lang_comment" => $lang['comment'],
    
"lang_submit" => $lang['submit'],
    
"lang_reset" => $lang['reset'],
    
"lang_yes" => $lang['yes'],
    
"lang_no" => $lang['no']
  ));
  
$content $site_template->parse_template("member_editcomment");
}

if (
$action == "deleteimage") {
  if (!
$image_id || ($config['user_delete_image'] != && $user_info['user_level'] != ADMIN)) {
    
show_error_page($lang['no_permission']);
    exit;
  }
  
$sql "SELECT image_id, cat_id, user_id, image_name, image_media_file, image_thumb_file
          FROM "
.IMAGES_TABLE."
          WHERE image_id = 
$image_id";
  
$image_row $site_db->query_firstrow($sql);
  if (!
$image_row || $image_row['user_id'] <= USER_AWAITING || ($user_info['user_id'] != $image_row['user_id'] && $user_info['user_level'] != ADMIN)) {
    
show_error_page($lang['no_permission']);
    exit;
  }

  
$txt_clickstream $lang['image_delete'];

  
$sql "DELETE FROM ".IMAGES_TABLE."
          WHERE image_id = 
$image_id";
  
$del_img $site_db->query($sql);

  if (!
is_remote($image_row['image_media_file']) && !is_local_file($image_row['image_media_file'])) {
    @
unlink(MEDIA_PATH."/".$image_row['cat_id']."/".$image_row['image_media_file']);
  }
  if (!empty(
$image_row['image_thumb_file']) && !is_remote($image_row['image_thumb_file']) && !is_local_file($image_row['image_thumb_file'])) {
    @
unlink(THUMB_PATH."/".$image_row['cat_id']."/".$image_row['image_thumb_file']);
  }

  include_once(
ROOT_PATH.'includes/search_utils.php');
  
remove_searchwords($image_id);

  if (!empty(
$user_table_fields['user_comments'])) {
    
$sql "SELECT user_id
            FROM "
.COMMENTS_TABLE."
            WHERE image_id = 
$image_id";
    
$result $site_db->query($sql);
    
$user_id_sql "";
    while (
$row $site_db->fetch_array($result)) {
      if (
$row['user_id'] != GUEST) {
        
$sql "UPDATE ".USERS_TABLE."
                SET "
.get_user_table_field("""user_comments")." = ".get_user_table_field("""user_comments")." - 1
                WHERE "
.get_user_table_field("""user_id")." = ".$row['user_id'];
        
$site_db->query($sql);
      }
    }
  }

  
$sql "DELETE FROM ".COMMENTS_TABLE."
          WHERE image_id = 
$image_id";
  
$del_com $site_db->query($sql);

  if (
$del_img) {
    
$msg $lang['image_delete_success'];
  }
  else {
    
$msg $lang['image_delete_error'];


Title: Re: [MOD] multiupload
Post by: V@nо on July 07, 2010, 09:16:31 PM
The template missing several <input> tags
Refer to the original template and add missing tags.
specifically
1
  <input type="hidden" name="action" value="multiuploadimage" />


Title: Re: [MOD] multiupload
Post by: zakaria666 on August 20, 2010, 11:52:28 PM
@VANO

Hello vano, i recently installed the multi_userupload.php functionality from installing budukkes great MOd regarding user categories, OK so the problem is that when i upload media sites url and upload then the page does not show me the video imediately of which i uploaded, when i go back and upload another video the 1st video i posted is played back to me but the 2nd video i posted that should have been the video playing gets posted anyway, so thats 1 problem,

another problem is just the fact that using multi user upload when i upload video media sites urls from youtube lets say i get the youtube default picture but not a thumbnail of what the vidoe looks like, the original upload functionality althought just let me upload 1, it also shows me the thumbnails from numerous video sites. CAn these two bugs be fixed or is it not possible at the moment..

thank u vano and please get back to me please


Title: Re: [MOD] multiupload
Post by: SolidSnake0308 on September 26, 2010, 06:04:22 PM
Hi,

ich habe den http://www.4homepages.de/forum/index.php?topic=8517.msg39355#msg39355 (http://www.4homepages.de/forum/index.php?topic=8517.msg39355#msg39355) Hack installiert (Multiupload).

Dieser ging ohne Probleme auf 4images. Jedoch seitdem ich auf 1.7.8 aktualisiert hatte, kommt leider ein Fehler (siehe Bilder)


(http://s2.imgimg.de/thumbs/einsf1ada420JPG.2.jpg) (http://www.imgimg.de/bild_einsf1ada420JPG.jpg.html)
(http://s2.imgimg.de/thumbs/zwei41903488JPG.2.jpg) (http://www.imgimg.de/bild_zwei41903488JPG.jpg.html)
(http://s2.imgimg.de/thumbs/drei0fa1d0b4JPG.2.jpg) (http://www.imgimg.de/bild_drei0fa1d0b4JPG.jpg.html)


Egal wieviele Bilder ich einfüge: Das erste ladet er erfolgreich hoch, beim zweiten schreibt er mir etwas vom "ungültiges Format"!?


Vlt. habt ihr eine Lösung für dieses Problem,
DANKE im Vorraus



Title: Re: [MOD] multiupload
Post by: Sumale.my on September 26, 2010, 07:25:04 PM
http://www.4homepages.de/forum/index.php?topic=27852.0


Title: Re: [MOD] multiupload
Post by: SolidSnake0308 on September 26, 2010, 09:44:24 PM
Danke erstmal für die rasche Antwort.

Jedoch bleibt der Fehler - auch nach mehreren Versuchen - bestehen...


Title: Re: [MOD] multiupload
Post by: Sumale.my on September 26, 2010, 10:58:07 PM
Häng mal deine includes/upload.php dran
Eventuell gab es bei dir auch dieses Problem!?: http://www.4homepages.de/forum/index.php?topic=27829.msg150616#msg150616
Das weis ich nicht oder die Modifikation ist einfach nicht 1.7.8 tauglich, aber einer aus dem Team wird dir ganz sicher helfen.


Title: Re: [MOD] multiupload
Post by: SolidSnake0308 on September 27, 2010, 04:31:09 PM
Hier meine Upload.php


Title: Re: [MOD] multiupload
Post by: fitterashes on September 29, 2010, 10:31:19 PM
This mod doesn't work for me anymore since 1.7.8 even after trying this fix : http://www.4homepages.de/forum/index.php?topic=27852.0
(single upload works fine)

1
2
Error uploading image file:
5a52dab3-5e85-4ef9-91b9-eb2a93bcd7d6.jpg: Invalid file type (jpg, image/jpeg)


Title: Re: [MOD] multiupload
Post by: SolidSnake0308 on October 05, 2010, 04:32:04 PM
?


Title: Re: [MOD] multiupload
Post by: SolidSnake0308 on October 23, 2010, 02:09:23 PM
? - Das Problem besteht leider immernoch. Erbitte immernoch um den Support, da schon seit Wochen keiner mehr uppen kann...........


Title: Re: [MOD] multiupload
Post by: SolidSnake0308 on November 03, 2010, 04:29:07 PM
Okay...Anfrage am 26. Sep und heute ist der 03 November. Ich glaube da wäre echt jeder angepisst, wenn ihr in dieser Situation wärt...
-> Werd ich wohl anders klarkommen, da schon seit September bei mir keiner was hochladen kann.


Title: Re: [MOD] multiupload
Post by: Rembrandt on November 03, 2010, 07:59:50 PM
versuch die upload.php einmal..


Title: Re: [MOD] multiupload
Post by: lewisw on November 05, 2010, 04:47:08 PM
Where do you find the file you mention in this mod lol :)
- download the file from below and copy it to your template folder (of course rename to member_multiuploadform.html)


Title: Re: [MOD] multiupload
Post by: V@no on November 05, 2010, 05:35:06 PM
Welcome to 4images forum.

It's a good question...apparently there is a new version of this mod:
[BETA] for 1.7.6 Multiupload Vers. 2.0 (http://www.4homepages.de/forum/index.php?topic=20072.msg108763#msg108763)


Title: Re: [MOD] multiupload
Post by: lewisw on November 05, 2010, 06:28:48 PM
Welcome to 4images forum.

It's a good question...apparently there is a new version of this mod:
[BETA] for 1.7.6 Multiupload Vers. 2.0 (http://www.4homepages.de/forum/index.php?topic=20072.msg108763#msg108763)

oops wish there was an english version of the instructions lol :)
Thank you foir the welcome.
Lewis


Title: Re: [MOD] multiupload
Post by: FotoRalle on November 30, 2010, 10:27:31 AM
Also der Multiupload funktioniert nach der 1.7.6 definitiv nicht mehr? Das ist wirklich schade! Auch ich bekomme die Fehlermeldung, dass das Passwort nicht mehr stimmt. Aber es muss doch eine Lösung geben, weil man doch wissen müsste, was bei den Updates verändert wurde...

Sehr schade!


Title: Re: [MOD] multiupload
Post by: mawenzi on November 30, 2010, 02:48:32 PM
@ FotoRalle ...

... und drei Posts höher ist zu lesen ...
Quote  [Expand]
It's a good question...apparently there is a new version of this mod:
[BETA] for 1.7.6 Multiupload Vers. 2.0 (http://www.4homepages.de/forum/index.php?topic=20072.msg108763#msg108763)


Title: Re: [MOD] multiupload
Post by: FotoRalle on November 30, 2010, 03:41:26 PM
@ FotoRalle ...

... und drei Posts höher ist zu lesen ...
Quote  [Expand]
It's a good question...apparently there is a new version of this mod:
[BETA] for 1.7.6 Multiupload Vers. 2.0 (http://www.4homepages.de/forum/index.php?topic=20072.msg108763#msg108763)


In diesem Thread ist aber am Ende zu lesen, dass er nicht weiterentwickelt wird. Deswegen hatte ich auch diese (blöde) Frage gestellt... Sorry dafür :D
Dann werde ich das trotzdem mal ausprobieren!

Aber dann müsste es ja eher dieser sein oder? http://www.4homepages.de/forum/index.php?topic=20657.0


Gruß Ralf


Title: Re: [MOD] multiupload
Post by: Jockl on January 01, 2011, 05:04:32 PM
Sehe ich das richtig, dass damit mit 1.7.9 kein Multi-Upload mehr möglich ist?


Title: Re: [MOD] multiupload
Post by: Rembrandt on January 04, 2011, 09:47:49 PM
Sehe ich das richtig, dass damit mit 1.7.9 kein Multi-Upload mehr möglich ist?

versuche diesen mod einmal  http://www.4homepages.de/forum/index.php?topic=28843.0

mfg Andi