4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Plugins => Topic started by: V@no on March 16, 2003, 12:51:09 AM

Title: [PLUGIN] Batch Import From ZIP Files
Post by: V@no on March 16, 2003, 12:51:09 AM
Since only one person has problem with this PLUGIN, and it works for many others, I moved this PLUGIN as FINAL version in MODs forum :D (no changes has been made though)

[OVERVIEW]
-----------------------------------------------
This is an addon for Admin Control Panel (Plugin) that works 98% as "Batch Import" Plugin: http://4homepages.de/forum/viewtopic.php?t=2164
The difference is that this plugin looking for .zip file in sertain folder, then unzip it and import files into 4images. Also, this plugin has all necesery settings that can be changed through web interface, no need modify ANY files.

This plugin uses PclZip (http://www.phpconcept.net/pclzip/index.en.php) library.
----------------------

-----------------------------------------------
I dont know how it will behave on *nix servers or on Windows + IIS
Also, with this plugin u can not import images into already existing category :(
----------------------

[INSTALATION]
-----------------------------------------------
Download attached file.

Create following folder:
/admin/plugins/batch_zip_import/zip/
extract files from downloaded batch_zip_import.zip
upload them into /admin/plugins/
after that u should have this tree of files on your server:

/admin/plugins/batch_zip_import.php
/admin/plugins/batch_zip_import/pclzip.lib.php
/admin/plugins/batch_zip_import/zip/


IMPORTANT:
CHMOD 777 /admin/plugins/batch_zip_import/zip/
----------------------

[HOW TO USE]
-----------------------------------------------
1. Create a folder, with name as u want your new category named (e.i. nature).
2. Copy your pictures in that folder.
If u want import thumbnails at ones, create subfolder with name thumbnails (i.e. /nature/thumbnails/ ). Copy your thumbnails in it.
3. Create a zip archive from main folder (in my example "nature").
4. Upload it into /admin/plugins/batch_zip_import/zip/ folder.
5. Go to Admin Control Panel, on left-bottom u should see new link "Batch ZIP Import"
----------------------

[KNOWN BUGS]
-----------------------------------------------
U can not have ANY files in the root of your .zip archive
All importing files MUST be located inside a folder in the .zip file.
e.i.
This archive tree is wrong:

/summer.jpg
/winter.jpg
/thumbnails/summer.jpg
/thumbnails/winter.jpg


This archive tree is correct:

/seasons/summer.jpg
/seasons/winter.jpg
/seasons/thumbnails/summer.jpg
/seasons/thumbnails/winter.jpg


Please let me know if it works or not, so I can move this thread in MODs forum.
Title: [PLUGIN] Batch Import From ZIP Files
Post by: Maweryk on March 17, 2003, 12:58:05 AM
Hi V@no!
Another great mod! Thanks!
It is possible to modify the mod, so that a user can upload a zip-file and the mod extract the files in the category.

http://www.4homepages.de/forum/viewtopic.php?t=3979&highlight=

Thanks a lot for your great Mods!

Cheers

Markus
Title: [PLUGIN] Batch Import From ZIP Files
Post by: V@no on March 17, 2003, 02:15:52 AM
Quote from: Maweryk
It is possible to modify the mod, so that a user can upload a zip-file and the mod extract the files in the category.

Modify this plugin -> no
but create separate mod -> will try. ;)
Title: [PLUGIN] Batch Import From ZIP Files
Post by: neothealien on March 20, 2003, 03:28:20 AM
i tried it on my first server .. worked perfectly ... but when i tried it on the second server (different hos) it gives me the following error... can u help me with it?? whats wrong? how to fix it?

Code: [Select]

Import category ...
DB Error: Bad SQL Query: SELECT cat_order FROM gallery_categories WHERE cat_parent_id = ORDER BY cat_order DESC LIMIT 1
You have an error in your SQL syntax near 'ORDER BY cat_order DESC LIMIT 1' at line 4

DB Error: Bad SQL Query: INSERT INTO gallery_categories (cat_id, cat_name, cat_description, cat_parent_id, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment) VALUES (21, '', '', , 10, 0, 0, 2, 2, 9, 0, 0, 0, 0)
You have an error in your SQL syntax near ' 10, 0, 0, 2, 2, 9, 0, 0, 0, 0)' at line 4
FAILED

1. Importing image aquota.group

Warning: Unable to access /aquota.group in /home/virtual/site385/fst/var/www/html/gallery/admin/plugins/batch_zip_import.php on line 206
Copy Image: Error while copying image /aquota.group
Skipping.....

2. Importing image aquota.user

Warning: Unable to access /aquota.user in /home/virtual/site385/fst/var/www/html/gallery/admin/plugins/batch_zip_import.php on line 206
Copy Image: Error while copying image /aquota.user
Skipping.....

3. Importing image cmd.txt

Warning: Unable to access /cmd.txt in /home/virtual/site385/fst/var/www/html/gallery/admin/plugins/batch_zip_import.php on line 206
Copy Image: Error while copying image /cmd.txt
Skipping.....

4. Importing image core

Warning: Unable to access /core in /home/virtual/site385/fst/var/www/html/gallery/admin/plugins/batch_zip_import.php on line 206
Copy Image: Error while copying image /core
Skipping.....

5. Importing image lwp.pl

Warning: Unable to access /lwp.pl in /home/virtual/site385/fst/var/www/html/gallery/admin/plugins/batch_zip_import.php on line 206
Copy Image: Error while copying image /lwp.pl
Skipping.....


Import finished
Title: Re: [PLUGIN] [ALPHA] Batch Import From ZIP Files
Post by: V@no on March 20, 2003, 03:45:34 AM
First, what kind of files are u actualy trying to import? :?
Quote
Importing image aquota.group

that's not an image...
Second, make sure your .ZIP files are created with this tree format:
Quote from: V@no
[KNOWN BUGS]
-----------------------------------------------
U can not have ANY files in the root of your .zip archive
All importing files MUST be located inside a folder in the .zip file.
e.i.
This archive tree is wrong:

/summer.jpg
/winter.jpg
/thumbnails/summer.jpg
/thumbnails/winter.jpg


This archive tree is correct:

/seasons/summer.jpg
/seasons/winter.jpg
/seasons/thumbnails/summer.jpg
/seasons/thumbnails/winter.jpg


Please let me know if it works or not, so I can move this thread in MODs forum.
Title: [PLUGIN] Batch Import From ZIP Files
Post by: neothealien on March 20, 2003, 03:47:43 AM
thats the problem... the zip file contains 5 jpgs... the zip workls perffectly on a different server ... but this server its grabbing these unkown files... (i tried 2 zips with images.. all gave me these unknown files..) ... kinda confused...
Title: [PLUGIN] Batch Import From ZIP Files
Post by: neothealien on March 20, 2003, 03:55:32 AM
and yes i changed:

Quote
$show_extracted = 1;

and it shows all the files perfectly! just not copying .. and yeah i did check my CHMOD ...
Title: [PLUGIN] Batch Import From ZIP Files
Post by: neothealien on March 20, 2003, 03:59:49 AM
for some reason grabbing the wrong files... and no they files dont even exist on my ftp.. to my knowledge at least.
Title: [PLUGIN] Batch Import From ZIP Files
Post by: V@no on March 20, 2003, 04:47:12 AM
Quote from: neothealien
and yes i changed:

Quote
$show_extracted = 1;

and it shows all the files perfectly! just not copying .. and yeah i did check my CHMOD ...

While I modifyed the plugin, to have extra option for debug, u posted it ^...:D

redownload the plugin, u'll see new option "Only show extracted files".
it will show u files that found inside .zip file and files phisicaly extracted in ./temp/ folder
if they are the same, then I really have no clue what could be wrong.
also, change
Code: [Select]
$data_src_path = "./batch_zip_import/zip";
to exact path to those folder i.e.
Code: [Select]
$data_src_path = "/home/users/blah_blah/batch_zip_import/zip";
Title: [PLUGIN] Batch Import From ZIP Files
Post by: neothealien on March 20, 2003, 05:48:23 AM
:(  not working... nothing for the extracted files :( ... btw still wondering where is the thing getting those unknown files from.. ill try to do some debugign my self.. but doubt it.. i need this BAD :( :( ... btw i forgot to tell u ..

if u type in www.mydomainname.com/admin
it goes to my hosting control panel

and next
if u type in www.mydomainname.com/gallery --> it wont work
if u type in www.mydomainname.com/gallery/ --> will work

its strange first time seen that u gotto add a trailing / in the url to load the page ..
Title: [PLUGIN] Batch Import From ZIP Files
Post by: neothealien on March 20, 2003, 05:56:56 AM
and also whats with this database error?

Code: [Select]
DB Error: Bad SQL Query: SELECT cat_order FROM gallery_categories WHERE cat_parent_id = ORDER BY cat_order DESC LIMIT 1
You have an error in your SQL syntax near 'ORDER BY cat_order DESC LIMIT 1' at line 4

DB Error: Bad SQL Query: INSERT INTO gallery_categories (cat_id, cat_name, cat_description, cat_parent_id, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment) VALUES (21, '', '', , 10, 0, 0, 2, 2, 9, 0, 0, 0, 0)
You have an error in your SQL syntax near ' 10, 0, 0, 2, 2, 9, 0, 0, 0, 0)' at line 4
FAILED
Title: [PLUGIN] Batch Import From ZIP Files
Post by: V@no on March 20, 2003, 06:09:32 AM
Quote from: neothealien
:(  not working... nothing for the extracted files :(

already doesnt sounds too good...:?

Quote from: neothealien
... btw still wondering where is the thing getting those unknown files from.. ill try to do some debugign my self.. but doubt it.. i need this BAD :( :(

since there is nothing actualy extracted, then it probably trying take files from server's root dir.

Quote from: neothealien
... btw i forgot to tell u ..

if u type in www.mydomainname.com/admin
it goes to my hosting control panel

then, try change data_src_path to another folder that doesnt point to /admn/ folder and upload your .zip files there (in this case, u'll have to put full path "/home/user/blah_blah/path"

Quote from: neothealien
and next
if u type in www.mydomainname.com/gallery --> it wont work
if u type in www.mydomainname.com/gallery/ --> will work

its strange first time seen that u gotto add a trailing / in the url to load the page ..

usualy that how it goes, when in Apache config Alias set as "alias_name/"
ask your host about it.
Title: [PLUGIN] Batch Import From ZIP Files
Post by: neothealien on March 20, 2003, 06:24:29 AM
any reason why its not extracting the zip? i mean it can read?
Title: [PLUGIN] Batch Import From ZIP Files
Post by: V@no on March 20, 2003, 06:26:57 AM
Quote from: neothealien
any reason why its not extracting the zip? i mean it can read?

not sure, maybe because /admin/ dir point to somewhere else?
by the way, how do u actualy go to 4images admin control panel?
Title: [PLUGIN] Batch Import From ZIP Files
Post by: neothealien on March 20, 2003, 06:28:57 AM
well actually here is the structure:


http://66.36.167.14/ --> Root but redirects to folder "gallery"

http://66.36.167.14/gallery/ -->  Main site

http://66.36.167.14/gallery/index.php --> Gallery Index

http://66.36.167.14/gallery/admin/ --> Gallery Admin

http://66.36.167.14/admin/ --> Host CP
Title: [PLUGIN] Batch Import From ZIP Files
Post by: V@no on March 20, 2003, 06:35:08 AM
oh I see.

well, ok, two questions:
1. did u try use FULL path to /admin/plugins/batch_zip_import/zip ?
2. is /zip/ folder set CHMOD 777 ?
Title: [PLUGIN] Batch Import From ZIP Files
Post by: neothealien on March 20, 2003, 06:38:12 AM
yes its CHMOD ...

by using this path i copied and pasted from the ftp
/var/www/html/gallery/admin/plugins/batch_zip_import/zip

i get this error:

Error : PCLZIP_ERR_MISSING_FILE (-4) : Missing archive file '/var/www/html/gallery/admin/plugins/batch_zip_import/zip/masala.zip'

even though that file is located there
Title: [PLUGIN] Batch Import From ZIP Files
Post by: V@no on March 20, 2003, 06:47:20 AM
Quote from: neothealien
yes its CHMOD ...

by using this path i copied and pasted from the ftp
/var/www/html/gallery/admin/plugins/batch_zip_import/zip

i get this error:

Error : PCLZIP_ERR_MISSING_FILE (-4) : Missing archive file '/var/www/html/gallery/admin/plugins/batch_zip_import/zip/masala.zip'

even though that file is located there

FTP path not alway the actual path.
ok, create phpinfo.php file in /admin/plugins/batch_zip_import/zip/ dir, with this code:
Code: [Select]
<?php
phpinfo
&#40;&#41;;
?>

look for:
Quote
SCRIPT_FILENAME
or something simular.
Title: [PLUGIN] Batch Import From ZIP Files
Post by: neothealien on March 20, 2003, 06:53:09 AM
OH MAN ... :( :( :(

same old error...


thats the actual path:
/home/virtual/site385/fst/var/www/html/gallery/admin/plugins/batch_zip_import/zip

Info:
http://66.36.167.14/info.php

any other suggestions?
Title: [PLUGIN] Batch Import From ZIP Files
Post by: neothealien on March 20, 2003, 07:09:59 AM
also one this is there any way i can add like 9 more fields to the form.. members.php and upload multiple pics? i mean like make the fields an array and loop it in the upload.php code.. to post multiple pics .. info can be duplicated for all.. just like ur zip.. is it possible? u know of such mod?
Title: [PLUGIN] Batch Import From ZIP Files
Post by: neothealien on March 20, 2003, 07:37:34 AM
u seem to be enjoying my gallery? so can i some how have multiple image uploads? as u can c urself its a hassel uploading one by one.. i got 3000 images to uplaod :(
Title: [PLUGIN] Batch Import From ZIP Files
Post by: V@no on March 20, 2003, 07:59:40 AM
Quote from: neothealien
u seem to be enjoying my gallery?

yes :lol:
Quote from: neothealien
so can i some how have multiple image uploads? as u can c urself its a hassel uploading one by one.. i got 3000 images to uplaod :(

there is no such a mod ( yet ). and I was gonna try make "upload .zip file" based on this mod, but gotta postpone untill we figure out what is wrong with your site.
Title: [PLUGIN] Batch Import From ZIP Files
Post by: neothealien on March 20, 2003, 08:01:55 AM
yeah true so what could be wrong? OMG 2 am gtg to skool .. gotto wake up at 6:00 am .. ill be off for now but please do look into it.. me gonna try to play around aswell .. and oh .. keep visitin ma site.. u got some nice pics  :lol:
Title: [PLUGIN] Batch Import From ZIP Files
Post by: bosco on April 03, 2003, 05:27:20 AM
hi all
Can someone help me please....i get a error ----Abort pclzip.lib.php : Missing zlib extensions


thank you


bosco
Title: [PLUGIN] Batch Import From ZIP Files
Post by: V@no on April 03, 2003, 05:41:34 AM
Quote from: bosco
hi all
Can someone help me please....i get a error ----Abort pclzip.lib.php : Missing zlib extensions


thank you


bosco

I guess your host doesnt support zlib?
try to run this script:
Code: [Select]
<?php
phpinfo
&#40;&#41;;
?>

look for zlib extension.
Title: [PLUGIN] Batch Import From ZIP Files
Post by: bosco on April 03, 2003, 06:03:42 AM
thank v@no
i have useing (The AppServ Open Project - 1.8.0 for Windows )
what can i do.....
i am a new user in php
thank you


bosco
(you are so fast)
Title: [PLUGIN] Batch Import From ZIP Files
Post by: V@no on April 03, 2003, 06:11:43 AM
well, I dont know what to suggest then...maybe u should ask for support at The AppServ site?
ah...wait..if u are running webserver with PHP on your comp or atleast have shell access to the server, try to see if zlib.output_compression is set to on, or/and extension=php_zlib.dll is uncomented (extension=php_zip.dll on PHP v4.3) in php.ini file (on windows in: c:\windows or c:\winnt )
Title: [PLUGIN] Batch Import From ZIP Files
Post by: bosco on April 03, 2003, 06:28:36 AM
O.......
i have save the setting and restart the PHP server
than is told me that (warning unable to load dynamic library'./php_zlib.dll'
thank you


(what is your local time is that in night ....i am in HONG KONG now is 12:30 pm)
Title: [PLUGIN] Batch Import From ZIP Files
Post by: V@no on April 03, 2003, 06:46:55 AM
Quote from: bosco
warning unable to load dynamic library'./php_zlib.dll'

in same php.ini file, find: extension_dir and set correct part to your php extensions. (i.e. c:\php\extensions\)

also, what PHP version do u have?
if u downloaded and install version with "installer" then, u might missing lots of extra features. Try to find .zip version with all the "stuff" ;)
Title: [PLUGIN] Batch Import From ZIP Files
Post by: bosco on April 03, 2003, 07:14:51 AM
thank you very much
i thank i have fix it(i find the php_zlib.all in my php dir amd copy to c:\winnt,then restart the php server it haven't error)
...but my 4images is down i will install again
thank you again
^.^
Title: [PLUGIN] Batch Import From ZIP Files
Post by: V@no on April 03, 2003, 07:21:16 AM
Quote from: bosco
i find the php_zlib.all in my php dir amd copy to c:\winnt,then restart the php server it haven't error)

no no no!
no-error - doesnt mean it works :roll:
u dont need copy anything to winnt folder, but u need properly setup your php.ini file.
Title: [PLUGIN] Batch Import From ZIP Files
Post by: bosco on April 03, 2003, 04:42:37 PM
cry........................>.<
Yes,you are right........
if i copy the file in c:\winnt.......than the 4images is can't open ......
....>.<
sorry............
i useing PHP Version 4.2.3
thank you
Title: [PLUGIN] Batch Import From ZIP Files
Post by: bosco on April 03, 2003, 07:02:18 PM
in the php.ini i make zlib.output_compression = Off
i can use this PLUGINS...
you are right i do not need copy file just edit the php.ini
thank you very much
thank you again
happy ~~~~~
Title: [PLUGIN] Batch Import From ZIP Files
Post by: HelpMeNow on April 13, 2003, 08:08:24 AM
V@no,

Thanks for the great mod. I've been using it successfully.

1.  What do I need to do to make images that are added be under the user "Guest" and not the admin?

2.  How can I use this Mod to batch-upload to an "existing" category?

Thanks.
Title: [PLUGIN] Batch Import From ZIP Files
Post by: V@no on April 13, 2003, 08:29:34 AM
Quote from: HelpMeNow
1.  What do I need to do to make images that are added be under the user "Guest" and not the admin?

what do u mean by that?
like do u want the imported picture were "registered" to guest, not to "yourname - admin" ?

Quote from: HelpMeNow
2.  How can I use this Mod to batch-upload to an "existing" category?

I tryed figure out how it works, but failed...:cry:
sry.
Title: [PLUGIN] Batch Import From ZIP Files
Post by: HelpMeNow on April 13, 2003, 08:37:46 AM
Quote from: V@no

like do u want the imported picture were "registered" to guest, not to "yourname - admin" ?


Right. I want the uploaded pictures to be as if a "guest" uploaded them. This is because I'm converting files from an image gallery script which is done in cgi and paid so much for it too!!!!! But, after my purchase I saw this script and fell in love with it. On the old gallery, guest could upload pictures. So I need to transfer them to 4images and have them show that they where uploaded by "guest."

Is there a way to do that???

Thanks.
Title: [PLUGIN] Batch Import From ZIP Files
Post by: V@no on April 13, 2003, 09:56:51 AM
Please redownload the plugin.
I added "select user by name" not by ID.
and also fixed one minor little bug
Title: [PLUGIN] Batch Import From ZIP Files
Post by: HelpMeNow on April 13, 2003, 04:02:47 PM
V@no,

I just downloaded the latest and tried it. It's PERFECT. Thank you.
Title: [PLUGIN] Batch Import From ZIP Files
Post by: stuartam on May 26, 2003, 11:41:55 PM
im having a few problems getting this mod to work, i tryed it and got the following error:

Quote
Import category ...
DB Error: Bad SQL Query: SELECT cat_order FROM 4images_categories WHERE cat_parent_id = ORDER BY cat_order DESC LIMIT 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 'ORDER BY cat_order DESC LIMIT 1' at line 4

DB Error: Bad SQL Query: INSERT INTO 4images_categories (cat_id, cat_name, cat_description, cat_parent_id, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment) VALUES (7, '', '', , 10, 9, 0, 2, 2, 9, 0, 0, 0, 0)
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 ' 10, 9, 0, 2, 2, 9, 0, 0, 0, 0)' at line 4
FAILED

1. Importing image .autofsck

Warning: copy(./../../data/media/7/.autofsck) [function.copy]: failed to create stream: No such file or directory in /home/stuartam/public_html/lm_pics/admin/plugins/batch_zip_import.php on line 213
Copy Image: Error while copying image /.autofsck
Skipping.....

2. Importing image .bash_history

Warning: copy(/.bash_history) [function.copy]: failed to create stream: Permission denied in /home/stuartam/public_html/lm_pics/admin/plugins/batch_zip_import.php on line 213
Copy Image: Error while copying image /.bash_history
Skipping.....


Import finished!


i also tryed putting in the exact path and i got the same error, then i checked the 'Only show extracted files (debug, not actual import)' bax and there was no error.

can somone help me get it working.

regards
Title: [PLUGIN] Batch Import From ZIP Files
Post by: V@no on May 27, 2003, 12:03:24 AM
it seems u have the same problem as the guy from first page of this thread. There is no sollution for this, because its probably the specific server configurations or something like that....
Title: [PLUGIN] Batch Import From ZIP Files
Post by: stuartam on May 27, 2003, 12:43:51 AM
Quote from: V@no
it seems u have the same problem as the guy from first page of this thread. There is no sollution for this, because its probably the specific server configurations or something like that....


problem solved, i was making the zip file wrong!!!!

all i did was add the pics to the zip, but i should of made a a folder with the pics in and added the folder to the zip  :oops:

regards
Title: [PLUGIN] Batch Import From ZIP Files
Post by: V@no on May 27, 2003, 12:51:31 AM
phew :lol:
Title: Problem.........i am newbie
Post by: bruceho on June 08, 2003, 05:12:23 AM
I am facing a problem,after i unzip the file and i can see the PLUGINS part in the control panel,but it shows the following error messages

Warning: main(./../admin/admin_global.php) [function.main]: failed to create stream: No such file or directory in /home/photobruce/4images/admin/plugins/batch_zip_import.php on line 29

Fatal error: main() [function.main]: Failed opening required './../admin/admin_global.php' (include_path='.:/usr/local/lib/php') in /home/photobruce/4images/admin/plugins/batch_zip_import.php on line 29

what can i do and what i need to config???
Title: [PLUGIN] Batch Import From ZIP Files
Post by: V@no on June 08, 2003, 06:13:22 AM
did u create .zip file in correct format?
u can not just zip images and do import, read the part where I explain how .zip files must be prepared.

also, maybe u'll need do this change:
http://4homepages.de/forum/viewtopic.php?p=26035#26035
Title: [PLUGIN] Batch Import From ZIP Files
Post by: bruceho on June 09, 2003, 10:22:13 AM
thankz
the last problem has been fixed
but now it shows "Abort pclzip.lib.php : Missing zlib extensions"
what can i do???
thankz again
Title: [PLUGIN] Batch Import From ZIP Files
Post by: V@no on June 09, 2003, 12:32:01 PM
Quote from: bruceho
but now it shows "Abort pclzip.lib.php : Missing zlib extensions"
what can i do???

read installation guide again.
did u download pclzip class? did u place it into the right dir?
Title: [PLUGIN] Batch Import From ZIP Files
Post by: bruceho on June 12, 2003, 06:33:51 AM
yap,i did downlaod it.
but how can i install it?
or just need to place to a specify path?
Title: [PLUGIN] Batch Import From ZIP Files
Post by: V@no on June 12, 2003, 06:35:59 AM
Quote from: bruceho
or just need to place to a specify path?

yes, all u need is place it into dir that installation sais ;)
Title: [PLUGIN] Batch Import From ZIP Files
Post by: bruceho on June 12, 2003, 11:04:27 AM
o..i just placed the pclzip.lib.php to /home/photobruce/4images/admin/plugins/batch_zip_import
but that error message still appear
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: ruudvroon on May 04, 2005, 01:10:18 PM
I'm using the phpbb intergration and I get a DB Error and he can't find any users
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: dipunm on August 16, 2005, 02:08:47 PM
My mod can upload into existing categories by extracting into the category folder and using the checknewimages script (i made a copy of it edited it to allow normal users to use it). everything is automatic so then user cant mess anything up but I'm not at all a good at php so i used the checkandgo (all in one) mod to check the images and thumbnail them etc. also, i used the multiupload mod to make an upload form so that it looks like part of the website but the rest of it (the parts i wrote myself rather than editing) just has a white background... if you could look at my mod and make it better, and add your own features, I would be happy to use it. :mrgreen:

link: http://www.4homepages.de/forum/index.php?topic=8994.0
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: @rtur on August 20, 2005, 11:04:58 AM
Quote
Warning: opendir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home/other) in /usr/home/other/artur/public_html/d/galeria/admin/plugins/batch_zip_import.php on line 453

Warning: opendir(/): failed to open dir: Operation not permitted in /usr/home/other/artur/public_html/d/galeria/admin/plugins/batch_zip_import.php on line 453

0 images in .

Import category ...
DB Error: Bad SQL Query: SELECT cat_order FROM 4images171_categories WHERE cat_parent_id = ORDER BY cat_order DESC LIMIT 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 'ORDER BY cat_order DESC LIMIT 1' at line 4

DB Error: Bad SQL Query: INSERT INTO 4images171_categories (cat_id, cat_name, cat_description, cat_parent_id, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment) VALUES (32, '', '', , 10, 0, 0, 2, 2, 9, 0, 0, 0, 0)
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 ' 10, 0, 0, 2, 2, 9, 0, 0, 0, 0)' at line 4
FAILED


Import finished!
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: mafa1999 on October 28, 2005, 12:00:12 PM
Hallo!

Respekt! Der MOD funktioniert bei mir hervoragend.
So etwas habe ich schon lange gesucht.

Ich nehme ein zip, lasse anschließend den Image-Resizer und den Thumbnail-gernerator drüber laufen - fertig.

Jetzt noch ein Wunsch:

Wäre es nicht möglich, beim Entpacken der Dateien die "Original-Dateien" für den späteren Download in z.B. media/Fotos/{cat_id}... (einem extra Vereichnis) zu speichern und automatisch in den "Bild-Download-pfad" zu speichern.

So könnte ich die Fotos zum download anbieten - alles automatisch.

Danke und macht weiter so.
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: Acidgod on October 28, 2005, 01:14:23 PM
http://www.4homepages.de/forum/index.php?topic=4754.0

Quote
backup original images somewhere else on the server (usefull if watermark used for both original (in "big" folder) and resized image)

Wäre das nicht was für dich?
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: kaze on November 01, 2005, 06:46:31 PM
I get the same error message as Arthur! -_____-

Warning: opendir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home/www/doc/8398:/usr/local/lib/php:/usr/phpbin) in /home/www/doc/8398/systemnetworkz.net/www/inuyasha/4images/admin/plugins/batch_zip_import.php on line 453

Warning: opendir(/): failed to open dir: Operation not permitted in /home/www/doc/8398/systemnetworkz.net/www/inuyasha/4images/admin/plugins/batch_zip_import.php on line 453

0 images in .

Import category ...
DB Error: Bad SQL Query: SELECT cat_order FROM 4images_categories WHERE cat_parent_id = ORDER BY cat_order DESC LIMIT 1
You have an error in your SQL syntax near 'ORDER BY cat_order DESC LIMIT 1' at line 4

DB Error: Bad SQL Query: INSERT INTO 4images_categories (cat_id, cat_name, cat_description, cat_parent_id, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment) VALUES (72, '', '', , 10, 0, 0, 2, 2, 9, 0, 0, 0, 0)
You have an error in your SQL syntax near ' 10, 0, 0, 2, 2, 9, 0, 0, 0, 0)' at line 4
FAILED


Import finished!


Does anybody know why I'm getting those messages? I really have to know, plkease. I got over 4000 pictures to upload >_<

Cheers
Kaze
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: V@no on November 02, 2005, 01:07:39 AM
Quote from: V@no
[KNOWN BUGS]
-----------------------------------------------
U can not have ANY files in the root of your .zip archive
All importing files MUST be located inside a folder in the .zip file.
e.i.
This archive tree is wrong:

/summer.jpg
/winter.jpg
/thumbnails/summer.jpg
/thumbnails/winter.jpg


This archive tree is correct:

/seasons/summer.jpg
/seasons/winter.jpg
/seasons/thumbnails/summer.jpg
/seasons/thumbnails/winter.jpg
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: thatisme on December 09, 2005, 05:17:09 AM
i just want to say Hands down the greatest mod i have put on my 4images gallery. Saves insane ammounts of time when uploading images to your own gallery
Title: Can't get into "Batch Zip Import"!
Post by: vulcano2060 on January 03, 2006, 08:42:41 PM
Hi, I've been using BZI for almost a year now, with no problems at all, but lately I can't access BZI from the admin section. The following errors are shown:

Code: [Select]
Warning: main(./../admin/admin_global.php): failed to open stream: No such file or directory in /home/elxekcom/public_html/fotos/admin/plugins/batch_zip_import.php on line 29

Fatal error: main(): Failed opening required './../admin/admin_global.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/elxekcom/public_html/fotos/admin/plugins/batch_zip_import.php on line 29

I don't know why, I haven't changed the files or anything for this errors to happen.
I tried downloading BZI and Pclzip again and reuploading them with no success, same errors.

How can I fix this?
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: V@no on January 04, 2006, 12:59:25 AM
Replace
Code: [Select]
$root_path = (eregi("\/plugins\/", $PHP_SELF)) ? "./../../" : "./../";
define('ROOT_PATH', $root_path);
with:
Code: [Select]
define('ROOT_PATH', "./../../");
P.S. I've updated the file as well.
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: darkwarlord on April 12, 2006, 08:57:17 AM
bump.

this is a sweet plugin.

now if only there was a "mass-move" from the check boxes, when in the edit pics
Title: batch_zip_import - Fehlermeldung...
Post by: sax-1 on May 22, 2006, 11:01:19 AM
Hallo zusammen,

ich habe die 4images Galerie installiert und den o.g. Patch.
Wenn ich jetzt die zip Datei entpacken möchte bekomme ich folgenge Meldung.
Was mache ich falsch???
Schon mal danke für Deine Hilfe

Viele Grüße
Roman

Warning: opendir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/var/www/web793/html/:/var/www/web793/phptmp/:/var/www/web793/files/:/var/www/web793/atd/) in /var/www/web793/html/4images/4images/admin/plugins/.php on line 452

Warning: opendir(/): failed to open dir: Operation not permitted in /var/www/web793/html/4images/4images/admin/plugins/batch_zip_import.php on line 452

0 images in .

Import category ...
DB Error: Bad SQL Query: SELECT cat_order FROM 4images_categories WHERE cat_parent_id = ORDER BY cat_order DESC LIMIT 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 'ORDER BY cat_order DESC LIMIT 1' at line 4

DB Error: Bad SQL Query: INSERT INTO 4images_categories (cat_id, cat_name, cat_description, cat_parent_id, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment) VALUES (2, '', '', , 10, 0, 0, 2, 2, 9, 0, 0, 0, 0)
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 ' 10, 0, 0, 2, 2, 9, 0, 0, 0, 0)' at line 4
FAILED


Import finished!


Title: Re: batch_zip_import - Fehlermeldung...
Post by: honda2000 on May 22, 2006, 09:05:41 PM
du willst  ne zipt-Datei auf dem server entpacken??

wie das denn??

hast du einen Root-Server??
Title: Re: batch_zip_import - Fehlermeldung...
Post by: sax-1 on May 23, 2006, 08:12:12 AM
k.A. wohl eher nicht...
Mir wurde gesagt damit geht das damit!?
Title: Re: batch_zip_import - Fehlermeldung...
Post by: honda2000 on May 23, 2006, 09:19:57 PM
nein, du musst den zip-File (4images) auf deinem Rechner enpacken, so wie die ordner sind, auf dienen Server laden, im Ordner docks die Inatallation_deutsch.txt lesen und die install.php auf dem Server öffnen, bzw. beim ersten aufruf der domain kommt die eingabemaske der Installtion von ganz allein!
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: dezina on August 11, 2006, 08:07:24 AM
Used this excellent mod on previous versions.
Will it work with latest 4Images 1.73 release or
are further modifications to script required please?
 :?
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: dezina on August 11, 2006, 10:57:06 AM
Checked and tested myself,
this mod for Batch Import from Zip Files
works fine on 4Images Gallery release 1.73
 :flag-en:  :mrgreen:
Title: Batch ZIP Import nicht mehr möglich (Error)
Post by: kaze on August 16, 2006, 01:39:21 PM
Hi Leute,

ich habe seither immer den Batch ZIP Import Mod eingesetzt um viele Bilder auf einmal hochzuladen.

Doch seit einiger Zeit funktioniert der Mod nicht mehr.
Dabei habe ich nichts verändert (auch nicht an der Datenbank usw)

Der Upload funktioniert nicht mehr und ich kriege stattdessen immer folgende Fehlermeldung:

Quote
Warning: opendir() [function.opendir]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/tmp:/bin:/usr:/is/htdocs/wp1036795_0P59S4DAEY) in /is/htdocs/wp1036795_0P59S4DAEY/www/gallery/admin/plugins/batch_zip_import.php on line 452

Warning: opendir(/) [function.opendir]: failed to open dir: Operation not permitted in /is/htdocs/wp1036795_0P59S4DAEY/www/knk/gallery/admin/plugins/batch_zip_import.php on line 452

0 images in .

Import category ...
DB Error: Bad SQL Query: SELECT cat_order FROM gallery_categories WHERE cat_parent_id = ORDER BY cat_order DESC LIMIT 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 'ORDER BY cat_order DESC LIMIT 1' at line 4

DB Error: Bad SQL Query: INSERT INTO gallery_categories (cat_id, cat_name, cat_description, cat_parent_id, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment) VALUES (103, '', '', , 10, 0, 0, 2, 2, 9, 0, 0, 0, 0)
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 ' 10, 0, 0, 2, 2, 9, 0, 0, 0, 0)' at line 4
FAILED


Import finished!

Ich habe definitiv nichts an meinen DB geändert, zumal ich mich da eh viel zu wenig auskenne....

Wäre über die Lösung meines Problems sehr dankbar.

Bis dann
Kaze
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: MauiJim on September 23, 2006, 07:30:28 PM
I need the files please!
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: V@no on September 23, 2006, 07:52:27 PM
file attached to the post now.
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: JuBu.org on September 27, 2006, 11:04:30 AM
hey, i'm new in this forum but i use the gallery 1,5 years.
i'm from germany and my english is very bad.

ok, zum thema...
ich habe das selbe problem wie die beiden anderen.

weiß einer mittlerweile bescheid woran es liegen könnte?
im anhang ist die genannte datei.

please help me!

Quote
Warning: opendir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/tmp:/bin:/usr:/is/htdocs/49945) in /is/htdocs/49945/www.jugend-buchholz.de/4images/admin/plugins/batch_zip_import.php on line 453

Warning: opendir(/): failed to open dir: Operation not permitted in /is/htdocs/49945/www.jugend-buchholz.de/4images/admin/plugins/batch_zip_import.php on line 453

0 images in .
Import category ...
DB Error: Bad SQL Query: SELECT cat_order FROM 4images_categories WHERE cat_parent_id = ORDER BY cat_order DESC LIMIT 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 'ORDER BY cat_order DESC LIMIT 1' at line 4

DB Error: Bad SQL Query: INSERT INTO 4images_categories (cat_id, cat_name, cat_description, cat_parent_id, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment) VALUES (63, '', '', , 10, 0, 0, 2, 2, 9, 0, 0, 0, 0)
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 ' 10, 0, 0, 2, 2, 9, 0, 0, 0, 0)' at line 4
FAILED

Import finished!

Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: V@no on September 28, 2006, 02:52:15 AM
[KNOWN BUGS]
-----------------------------------------------
U can not have ANY files in the root of your .zip archive
All importing files MUST be located inside a folder in the .zip file.
e.i.
This archive tree is wrong:

/summer.jpg
/winter.jpg
/thumbnails/summer.jpg
/thumbnails/winter.jpg


This archive tree is correct:

/seasons/summer.jpg
/seasons/winter.jpg
/seasons/thumbnails/summer.jpg
/seasons/thumbnails/winter.jpg

Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: JuBu.org on September 28, 2006, 12:15:54 PM
Hey, Thank You!!!
This was it!

Danke nochmal, ihr seid die Besten!!!
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: emanon on January 12, 2007, 10:08:33 PM
Hi there,

I installed the mod. It works ALMOST 100%, it unzips, imports etc. But it puts the subcategorys in the Root/Main folder no matter what i choose in the Batch ZIP Import menu for "Subcategory under".

I use 1.7.4.

Anyone please??
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: m.a on February 06, 2007, 02:01:50 AM
Hi,
Thank You V@no!!!
I installed the mod. And it works without Problem!
perfect and prime.

I use 1.7.4. too

Best Regards
m.a
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: toby86 on February 12, 2007, 10:03:31 PM
I wrote a little modification for the Batch-script:

If the exif-date of the image can be extracted, it will be stored as the picture's date in the database..
Please save your original file, I won't guarantee for anything! For me it works fine and stable.


Open "batch_zip_import.php"

Find:
Code: [Select]
    for ($i = $batchstart; $i <= $batchend; $i++) {
      $file = $files[$i];

Before add:
Code: [Select]
  function tf_get_exif_info($exif) {
  $exif_match = array();
  $exif_match['DateTimeOriginal'] = "datetime";

  $exif_array = array();
  if (is_array($exif)) {
foreach ($exif as $key => $val) {
  if (isset($exif_match[$key])) {
$exif_info = $val;
if ($key == "DateTimeOriginal") {
  $tf_exif_date_raw = preg_replace("/([0-9]{4}):([0-9]{2}):([0-9]{2})/", "\\3.\\2.\\1", $exif_info);
  $tf_exif_date_raw = explode(' ', $tf_exif_date_raw);
  $tf_exif_date_raw[0] = explode('.', $tf_exif_date_raw[0]);
  $tf_exif_date_raw[1] = explode(':', $tf_exif_date_raw[1]);
 
  $tf_exif_date = mktime( $tf_exif_date_raw[1][0], $tf_exif_date_raw[1][1], $tf_exif_date_raw[1][2], $tf_exif_date_raw[0][1], $tf_exif_date_raw[0][0], $tf_exif_date_raw[0][2] );
}
  }
}
  }
  return $tf_exif_date;
}



Find:
Code: [Select]
      $image_date = ($use_image_filemtime) ? filemtime($dir_array[$cat]['cat_path']."/".$file) : time();


Replace with:
Code: [Select]
  $src = $dir_array[$cat]['cat_path']."/".$file;
  if(function_exists('exif_read_data') && $exif_data = @exif_read_data($src, 'EXIF')) {
  $image_date = tf_get_exif_info($exif_data);
  } else {
  //fallback
  $image_date = ($use_image_filemtime) ? filemtime($dir_array[$cat]['cat_path']."/".$file) : time();
  }


Find:
Code: [Select]
show_radio_row("Use file modification time as date", "useimagefiletime", $use_image_filemtime);

Replace with:
Code: [Select]
show_radio_row("Use file modification time as date if exif-information can't be extracted", "useimagefiletime", $use_image_filemtime);


Find:
Code: [Select]
  }else{
$use_image_filemtime = 0;
}

Replace with:
Code: [Select]
  }else{
$use_image_filemtime = 1;
}

Save "batch_zip_import.php" & upload
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: kazimir on April 09, 2007, 12:56:07 AM
Hi there,

I installed the mod. It works ALMOST 100%, it unzips, imports etc. But it puts the subcategorys in the Root/Main folder no matter what i choose in the Batch ZIP Import menu for "Subcategory under".

I use 1.7.4.

Anyone please??

Got the same problem... it's alwasy anzipped into the root directory... Is there a solution out there?

Greetz, kaz
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: skidpics on August 07, 2007, 06:27:39 AM
Been using the plug in successfully all day today, but as of now, when I try top use it, it just refreshed the admin panel to the main menu, the gallery menu, with no listing of files that it batch uploaded..  Any help would be appreciated..

-- Skidpics

http://skidpics.com
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: thunderstrike on August 07, 2007, 02:27:47 PM
Can use GZip with host ? What do if refresh ? Error message ? Just return ACP - > home page ?
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: skidpics on August 07, 2007, 03:39:24 PM
Can use GZip with host ? What do if refresh ? Error message ? Just return ACP - > home page ?

I am not understanding the message, if it was intended for me?..  No error message, refresh just bring me back to the same main gallery screen..

Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: skidpics on August 07, 2007, 04:02:25 PM
Can use GZip with host ? What do if refresh ? Error message ? Just return ACP - > home page ?

I am not understanding the message, if it was intended for me?..  No error message, refresh just bring me back to the same main gallery screen..



When using it, the left frame remain in the ACP home page, but the right frame side refreshes to the gallery home page..  Hope that answers that question...
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: thunderstrike on August 07, 2007, 04:04:50 PM
Enable GZip compression in ACP - > Setting ? Host let you use ?
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: skidpics on August 07, 2007, 04:54:39 PM
Enable GZip compression in ACP - > Setting ? Host let you use ?

All there.  Okay, I set up a generic way of what is going on, by using a e404.html file with a counter only for that page.  When a file is not found on my servier, it access the e404.html for  a redirect to another page.  I just ran it, and I am assuming that itis not finding the batch_zip file...  it is located in the /4images/admin/plugins  folder.

I am not sure what changed since yesterday, but for some reason, it is not finding the file..

Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: skidpics on August 07, 2007, 04:59:28 PM
Enable GZip compression in ACP - > Setting ? Host let you use ?

figured it out.  I have a subdomain for 4images.skidpics.com, and it was access the file wrong - not sure why it does allow forwarding like that, but it works now.


if I use http://skidpics.com, etc..  it works, but if I use 4images.skidpics.com/etc...  it doesn't..  my apologies for taking up your time!
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: dbranko on August 07, 2007, 07:45:08 PM
Is it posible to import existing images to zip!
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: thunderstrike on August 07, 2007, 07:47:06 PM
Close thing:

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

(support ZIP in download) ;)
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: lanps9.99 on August 29, 2007, 03:41:32 PM
is there any problem if i delete the zip file after i put category and sub have been made
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: skidpics on September 25, 2007, 06:20:36 AM
Is there a way to allow the plugin to browse the vitual directory in order to find the .zip file instead of having a default directory to have to upload to.   I am at a cross between photopost and coppermine software, and trying to find a bit more manageable software for my users, and pictures..

http://skidpics.com
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: thunderstrike on September 25, 2007, 12:30:14 PM
Quote
is there any problem if i delete the zip file after i put category and sub have been made

No problem for delete. ;)

Quote
Is there a way to allow the plugin to browse the vitual directory in order to find the .zip file instead of having a default directory to have to upload to.   I am at a cross between photopost and coppermine software, and trying to find a bit more manageable software for my users, and pictures..

Yes, is possible. ;)
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: skidpics on September 25, 2007, 04:09:07 PM
Quote
Is there a way to allow the plugin to browse the vitual directory in order to find the .zip file instead of having a default directory to have to upload to.   I am at a cross between photopost and coppermine software, and trying to find a bit more manageable software for my users, and pictures..

Yes, is possible. ;)
[/quote]

What would I need to change?
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: thunderstrike on September 28, 2007, 07:37:37 PM
Quote
What would I need to change?

Only plugin file is need for change. ;)
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: bisselbock on October 01, 2007, 03:24:07 PM
Where can I download Batch Import From ZIP Files? The download link is dead...?! :|
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: thunderstrike on October 01, 2007, 03:26:11 PM
http://www.4homepages.de/forum/index.php?action=dlattach;topic=14170.0;attach=980
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: skidpics on October 14, 2007, 10:44:34 PM
This is an awesome mod!  How can it be adapted to allow zip uploads by admin and users and extraction to a picked category?



Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: thunderstrike on October 15, 2007, 12:38:44 AM
Ressource server is hi if do it for users foreach extract ZIP on cats after ZIP upload.
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: KPeBiz on October 22, 2007, 01:26:59 PM


This plugin uses PclZip (http://www.phpconcept.net/pclzip/index.en.php) library.

Download "Batch Import From ZIP Files (http://gallery.vano.org/file16dl)" file.


I cannot download the file from the server, is there another alternative download location.

Do I need to install the PclZip to use the plugin?

Thank you.

Sincerely,
KP


Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: thunderstrike on October 22, 2007, 01:36:50 PM
Quote
I cannot download the file from the server, is there another alternative download location.

First post in footer.

http://www.4homepages.de/forum/index.php?action=dlattach;topic=14170.0;attach=980

 :roll:

Quote
Do I need to install the PclZip to use the plugin?

gzcompress and crc32 function is need for this (is from server). ;)
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: travel124 on November 12, 2007, 12:22:05 AM

What do these mean?

Thumbnails Suffix
   

Thumbnails Prefix

Thanks!
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: thunderstrike on November 12, 2007, 12:42:37 AM
For thumbnail suffix:

http://www.jefflewis.net/programming-vb-photopagegenerator22_readme.html#thumbSuffix

For thumbnail prefix:

http://www.xlinesoft.com/phprunner/docs/formatting_options.htm
(use browser search and see in page for: thumbnail prefix). ;)
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: travel124 on November 12, 2007, 01:00:10 AM
Thanks for your reply.  For some reason I cannot get my zips to upload nor can I get the images to upload with them.

This is my tree.  Does it look correct?

 public_html / photogallery / admin / plugins / (Current Folder)       
   Create New Folder      
   Upload file(s)      
   Up one level      
   batch_zip_import      777             (This is a folder I created and it has a folder named zip inside)
   Create New File      
   batch_zip_import.php   27 k   0644
   clear_cache.php   2 k   0755
   error_log

Thanks for the help!
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: thunderstrike on November 12, 2007, 01:11:18 AM
Quote
error_log

Please PM inside of file (error_log) (in BBCode) and I check. This is server report and is say problem. ;)
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: thunderstrike on November 12, 2007, 02:49:48 AM
Ok, your server is report: restriction in effect . Is mean, server use restriction for write folder. Send ticket to host for remove safe mode. ;)
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: travel124 on November 12, 2007, 03:21:29 AM
Ok I was messing around with it.

I uploaded the zips into my batch zip folder.

I then uploaded the image size is 3600 x 3600 pixels into the thumbnails folder. They both uploaded at the same time. Now my problem is the image is way too large. I tried to resize as a thumbnail but it will not recognize it to reduce the image.

You can see it here > scroll towards the bottom. The image is huge!

http://digitalscrapn.com/photogallery/categories.php?cat_id=5 (http://digitalscrapn.com/photogallery/categories.php?cat_id=5)

Thanks again for all your help!

Lori
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: thunderstrike on November 12, 2007, 03:39:33 AM
Quote
They both uploaded at the same time. Now my problem is the image is way too large. I tried to resize as a thumbnail but it will not recognize it to reduce the image.

Is no problem - use this MOD:

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

;)
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: travel124 on November 12, 2007, 05:02:39 AM
Ok all went smooth.  Thanks so much.  Just one more question.

Do I need to have 2 zips uploaded?  I tried it with one zip in my media folder under the catagory name. It would not work. I tried with a zip in my zip folder and still would not work. So I uploaded both a zip into the zip folder then the media folder and the image into the thumbnail folder and it worked. Is that correct. I don't want extra files if I don't need them.

Thank You again.

Lori

Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: thunderstrike on November 12, 2007, 01:25:13 PM
You no need upload two ZIP file for MOD work ...
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: travel124 on November 12, 2007, 03:46:44 PM
So which folder do I place all of my zips?

The Batch zip folder? or my media/scrapbookingpapers/folder?

It will not recognize the zip in my Batch zip Import unless I have a zip in each of these folders.

Thanks!
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: thunderstrike on November 12, 2007, 09:17:49 PM
Quote
It will not recognize the zip in my Batch zip Import unless I have a zip in each of these folders.

Set CHMOD 777 for the ZIP upload folder after admin/plugins/batch_zip_import/zip folder.
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: xor83 on December 24, 2007, 09:39:33 PM
works ALMOST 100%. But it puts the subcategorys in the Root/Main folder no matter what i choose in the Batch ZIP Import menu for "Subcategory under".

I use 1.7.4
.
help please
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: thunderstrike on December 25, 2007, 09:43:48 PM
Before upload, select category name so sub-categories is go inside. If no select, is go in root. ;)
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: xor83 on December 26, 2007, 05:57:23 AM
thanx for rpl thunderstrike

I do select "Subcategory under" option to create category under specific existing category but it create new separate category rather than using the selected category. Even tried using different category names.
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: thunderstrike on December 26, 2007, 05:08:08 PM
thanx for rpl thunderstrike

I do select "Subcategory under" option to create category under specific existing category but it create new separate category rather than using the selected category. Even tried using different category names.

Oh ... if so ... this is bug ... is no my MOD so I just add this to my list for check later.
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: Radical3 on May 09, 2008, 01:14:56 PM
nice mod but theres a slight problem  :?; it wont work on .zip larger than 1 gigabyte  :o since i have about 28 gigs :twisted: of images to upload i need to do a lot of cutting up :cry: and then i need to move all the categories around to get it normal.

still a great mod.
thanks :D
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: tamil2006 on May 18, 2008, 08:32:39 PM
im getting the following error

2 images in . Importing image 1 to 2
Import category ...
DB Error: Bad SQL Query: SELECT cat_order FROM 4images_categories WHERE cat_parent_id = ORDER BY cat_order DESC LIMIT 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 'ORDER BY cat_order DESC LIMIT 1' at line 4

DB Error: Bad SQL Query: INSERT INTO 4images_categories (cat_id, cat_name, cat_description, cat_parent_id, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment) VALUES (151, '', '', , 10, 0, 0, 2, 2, 9, 0, 0, 0, 0)
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 ' 10, 0, 0, 2, 2, 9, 0, 0, 0, 0)' at line 4
FAILED

1. Importing image .autofsck
Copy Image: Error while copying image /.autofsck
Skipping.....

2. Importing image .autorelabel
Copy Image: Error while copying image /.autorelabel
Skipping.....

Import finished!
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: budduke on September 01, 2008, 10:10:47 PM
Quote
I do select "Subcategory under" option to create category under specific existing category but it create new separate category rather than using the selected category. Even tried using different category names.

I had the same problem but had to fix it myself because I really really needed this mod to save time...

in the batch_zip_import.php file

look for
Code: [Select]
$get_options['autoredirect'] = $autoredirect;
insert after
Code: [Select]
//sub category fix
$get_options['cat_parent_id'] = $parentcat;
//end sub category fix

look for
Code: [Select]
if (isset($HTTP_GET_VARS['cat_id']) || isset($HTTP_POST_VARS['cat_id'])) {
    $parentcat = (isset($HTTP_GET_VARS['parentcat'])) ? intval($HTTP_GET_VARS['cat_id']) : intval($HTTP_POST_VARS['cat_id']);

Replace with
Code: [Select]
// sub-category fix
  if (isset($HTTP_GET_VARS['cat_parent_id']) || isset($HTTP_POST_VARS['cat_parent_id'])) {
    $parentcat = (isset($HTTP_GET_VARS['cat_parent_id'])) ? intval($HTTP_GET_VARS['cat_parent_id']) : intval($HTTP_POST_VARS['cat_parent_id']);
// if (isset($HTTP_GET_VARS['cat_id']) || isset($HTTP_POST_VARS['cat_id'])) {
//     $parentcat = (isset($HTTP_GET_VARS['parentcat'])) ? intval($HTTP_GET_VARS['cat_id']) : intval($HTTP_POST_VARS['cat_id']);
// end sub-category fix

this should put your files in whatever sub-category that you choose on the selection.

the only thing that I saw is that this fix removed the nice little directory list that comes up on the right with the sflashing scanning message but it still works correctly.
I looked over the script but could not find what to do to get that to come back up again. it is still there when you choose the main category so I know it has to be simple to fix.
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: subaru on November 02, 2008, 09:17:26 PM
Ah, sorry but, i can't download the file fore installing it.  :(
could you please upload it somewhere else? ^^

thanks in advance!
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: Nicky on November 02, 2008, 11:17:51 PM
hi subaru & welcome to the 4images forum.

it's attached in the end of the 1st post.
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: subaru on November 03, 2008, 02:17:36 AM
ooh, im sorry. Thankyou very much! ^^
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: 5degrees on November 15, 2008, 09:16:08 PM
plugin is superb

resolved the issue I had as it was taking too long to upload images and they were timing out.

simply ftp a zip file and away you go
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: ripejuice on December 08, 2008, 10:34:53 PM
please help me...
i uploaded a 350mb zip file into my server and its after that only i realised that my zip folder was like this
hollywood>hollywood1>a>angelina>angelina1.jpg
hollywood>hollywood1>b>britney>britney1.jpg


can i unzip this....


please help
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: relu on December 22, 2008, 09:15:16 AM
I had try a few time to get a little option for me to work...I not familiar with php and i wonder if is posible to get description and keywords from filename... like image name actualy do. This mean that image name , description and keywords will be the same. For me is helpful and if i want to change something after is more easy. I don't know if will help this option other users but for me is just fine. When you have a lots of images is good... i just edit them in finder and after i upload all them.

Right now the plugin looks like this at description and keywords in batch_import.php

   if (!empty($default_image_description)) {
           $image_description = $default_image_description;
         }

         if (!empty($default_image_keywords)) {
           $image_keywords = $default_image_keywords;

Hope to be helpful for others and somebody to change the script.

Thanks
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: V@no on December 22, 2008, 10:09:01 AM
Hello and welcome to 4images forum.

Try this:
find:       $image_name = str_replace("_", " ", $file_name);

Insert below:        $default_image_description_backup = $default_image_description;
        $default_image_keywords_backup = $default_image_keywords;
        $default_image_description = empty($default_image_description) ? $image_name : $default_image_description;
        $default_image_keywords = empty($default_image_keywords) ? $image_name : $default_image_keywords;



Then find:
      if ($result) {

Insert above:        $default_image_description = $default_image_description_backup;
        $default_image_keywords = $default_image_keywords_backup;
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: relu on December 22, 2008, 10:33:50 AM
Is working and i thank you so much.  :roll:  All respect!
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: sigma. on January 18, 2009, 07:25:24 PM
Well it works but Its creating multiple categories in the main root even if i select what category to place them in.

Its doing this..

Main Category
- Cranes (empty)
- Cranes (empty)
--Cranes (has image)

I'm try to get it to go here

Main Category
-References
--Cranes

It will not. I have tried it multiple times with different zip archives. Sometimes it creates a blank thumbnail in one of the empty categories it has created.

Any ideas?
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: relu on January 19, 2009, 05:29:36 AM
Is doing this since i use it but for me is verry helpfull this plugin. i don't know if is another one on forum like this anyways. Maybee V@no have the solution...if not i'm happy with it anyway :)
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: relu on January 21, 2009, 04:15:04 PM
I have this error...can i check this size from somewhere?
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 15488 bytes) in /home/pulsar/public_html/includes/image_utils.php on line 196


I found the solution and i added this line at he end of file.

ini_set("memory_limit" , "80M");

is ok :)
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: relu on January 22, 2009, 12:51:30 PM
Hello and welcome to 4images forum.

Try this:
find:       $image_name = str_replace("_", " ", $file_name);

Insert below:       $default_image_description = empty($default_image_description) ? $image_name : $default_image_description;
      $default_image_keywords = empty($default_image_keywords) ? $image_name : $default_image_keywords;


I just notify that when i import the images one name aperar to all images and only a few one has the same name at the description and keywords...in rest one name repete itself to almost all the rest of images and i don't know why...
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: V@no on January 22, 2009, 03:25:58 PM
you are correct, the code is incomplete.
I've update my post above.

as of the error message, your server doesn't allow manipulate such large images, you'll need either ask your host administrator to increase the memory limit, or switch to ImageMagick or NetPBM (or change the host)
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: kandr on February 26, 2009, 11:01:04 AM
Привет, спасибо за хороший и полезный модуль. Только вот проблема снова с кодировкой имен - вместо кириллицы крякозябры, можно это исправить?
Title: Re: [PLUGIN] Batch Import From ZIP Files
Post by: Sebas Bonito on June 21, 2009, 01:18:31 PM
Is there no possibility to upload zip-files (containing images) via the web-upload-formular? For users this way seems too heavy, cause the admin has to work a lot every time.