4images Modifications / Modifikationen > Plugins

[PLUGIN] Batch Import From ZIP Files

(1/26) > >>

V@no:
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 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.

Maweryk:
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

V@no:

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

--- End quote ---

Modify this plugin -> no
but create separate mod -> will try. ;)

neothealien:
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: ---
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

--- End code ---

V@no:
First, what kind of files are u actualy trying to import? :?

--- Quote ---Importing image aquota.group
--- End quote ---

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.
--- End quote ---

Navigation

[0] Message Index

[#] Next page

Go to full version