• [Plugin] Batch Import 5 0 5 1
Currently:  

Author Topic: [Plugin] Batch Import  (Read 335832 times)

0 Members and 1 Guest are viewing this topic.

Offline TechnoRocker

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: [Plugin] Batch Import
« Reply #195 on: July 05, 2009, 07:16:27 PM »
Hallo allerseids,
Ich habe folgenes Problem:

Quote
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, '', 'lol', , 10, 0, 0, 2, 9, 9, 0, 0, 0, 2)
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, 9, 9, 0, 0, 0, 2)' at line 4
FAILED

Import finished!

Das ist der Pfad


Die Config:
Code: [Select]
//-----------------------------------------------------
//--- Configuration -----------------------------------
//-----------------------------------------------------

// Path to the directory the image data are stored.
// No trailing slash!
$data_src_path = "/srv/www/vhosts/clay-class.net/httpdocs/2/data/Dancefloor";

// Thumbnail options
// suffix:     Optional, can be left blank
// prefix:     Optional, can be left blank
// subfolder:  If you images are stored in a subfolder,
//             set the folder name here. Example: "thumbnails/"
//             Optional, can be left blank
// extensions: Valid thumbnail extensions
$thumbnail_options = array(
  "prefix"     => "",
  "suffix"     => "",
  "subfolder"  => "",
  "extensions" => array("jpg", "JPG", "jpeg", "JPEG", "gif", "GIF", "png", "PNG")
);

// As default, the script will only copy the image files
// from your source folders to the 4images folders.
// After import you will have your image data twice on
// your server.
// If you have not enough server space set this to 1.
// Then the script will move the image files.
// Be carefully with this, your data could be lost!!!
$move_image_files = 0;

// Set this to 1 to use file modification time as date?
// Otherwise the current date will be used.
$use_image_filemtime = 1;

// Default description for each image, can be left blank
$default_image_description = "Dancefloor 2009";

// Default keywords for each image, can be left blank
// Separated by spaces. Example: "keyword1 keyword2 keyword3"
$default_image_keywords = "Dancefloor 2009 schule clay";

// Set this to the id of the user who should be the owner of each image.
// If 0, the user id of the current logged in user will be used. That's you ;)
$default_user_id = 0;

// Default description for each category, can be left blank
$default_cat_description = "lol";

// Default category permissions
// AUTH_ALL   = All
// AUTH_USER  = Registered Users
// AUTH_ACL   = Private
// AUTH_ADMIN = Administrators
$auth_viewcat      = AUTH_ALL;
$auth_viewimage    = AUTH_ALL;
$auth_download     = AUTH_USER;
$auth_upload       = AUTH_ADMIN;
$auth_directupload = AUTH_ADMIN;
$auth_vote         = AUTH_ALL;
$auth_sendpostcard = AUTH_ALL;
$auth_readcomment  = AUTH_ALL;
$auth_postcomment  = AUTH_USER;

//-----------------------------------------------------
//--- End Configuration -------------------------------
//-----------------------------------------------------

Wie bekomme ich das Problem weg ?

Mfg

[EDIT by V@no]please don't use [center][/center] in your posts[/EDIT]
« Last Edit: July 05, 2009, 09:52:26 PM by V@no »

Offline Sebas Bonito

  • Sr. Member
  • ****
  • Posts: 271
  • Sebas Bonito
    • View Profile
Re: [Plugin] Batch Import
« Reply #196 on: July 23, 2009, 04:07:12 PM »
:flag-en: I get the same message like TechnoRocker (post above), additional to that, here is my server-error log to his.
:flag-de: Ich kriege die selbe Fehlermeldung wie TechnoRocker (Post drüber). Ergänzend dazu mein server-error log zu diesem Problem.

Quote
[Thu Jul 23 16:01:31 2009] [error] [client x] PHP Warning: opendir() [<a href='function.opendir'>function.opendir</a>]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/srv/www/vhosts/de/httpdocs:/tmp) in /srv/www/vhosts/de/httpdocs/daeof/admin/plugins/batch_import.php on line 314, referer: /admin/plugins/batch_import.php

[Thu Jul 23 16:01:31 2009] [error] [client x] PHP Warning: opendir(/) [<a href='function.opendir'>function.opendir</a>]: failed to open dir: Operation not permitted in /srv/www/vhosts/de/httpdocs/daeof/admin/plugins/batch_import.php on line 314, referer: /admin/plugins/batch_import.php

:flag-en: As "$data_src_path"  I've chosen the sub-folder "tmp" in admin/plugins (CHMOD 777)
:flag-de: Als "$data_src_path" habe ich den Unterordner "tmp" in Plugins ausgewählt (CHMOD 777).

:flag-en: Anyone an idea what this means, and how to fix it?
:flag-de: Hat jemand ne Idee, was das zu bedeuten hat, und wie man das Problem lösen kann?
« Last Edit: July 25, 2009, 12:15:26 AM by Schnick und Schnack »

Rembrandt

  • Guest
Re: [Plugin] Batch Import
« Reply #197 on: July 23, 2009, 06:04:09 PM »
Hi!
...
Quote
[...open_basedir restriction in effect. File(/) is not within the allowed path(s):...
....

ob das nicht eine PHP restriction ist.

mfg Andi

Offline Sebas Bonito

  • Sr. Member
  • ****
  • Posts: 271
  • Sebas Bonito
    • View Profile
Re: [Plugin] Batch Import
« Reply #198 on: July 23, 2009, 06:49:47 PM »
Hi!
...
Quote
[...open_basedir restriction in effect. File(/) is not within the allowed path(s):...
....

ob das nicht eine PHP restriction ist.
mfg Andi

Hi Andi, irgendwie läuft das... hab ein bissl rumgespielt.. hängt es vielleicht damit zusammen, dass die Fotos noch mal in einem Extra-Ordner sein müssen? *grübel*

Ne andere Geschichte: Die Fotos werden nicht verkleinert; besser gesagt, die MOD Auto image resizer wird nicht verwendet. Kann man das irgendwie integrieren? Denn so werden die Fotos in voller Auflösung angezeigt, und das sprengt nicht nur den Rahmen, sondern auch den Bildschirm.

Rembrandt

  • Guest
Re: [Plugin] Batch Import
« Reply #199 on: July 23, 2009, 07:48:15 PM »
Hi!
...
Ne andere Geschichte: Die Fotos werden nicht verkleinert; besser gesagt, die MOD Auto image resizer wird nicht verwendet. Kann man das irgendwie integrieren? Denn so werden die Fotos in voller Auflösung angezeigt, und das sprengt nicht nur den Rahmen, sondern auch den Bildschirm.
ich verwende den big mod, ist aber etwas kompliziert weil die einbauanleitung und das debugging über mehrere seite geht.

du ladest ein großes bild hoch, das automatisch in einen extra ordner kommt, das verkleinerte z.b. 800x600 wird auf der detail angezeigt,
und zum download steht wieder das originale zur verfügung.
http://www.4homepages.de/forum/index.php?topic=7499.msg148451#msg148451

mfg Andi
« Last Edit: November 19, 2010, 04:55:00 AM by Rembrandt »

Offline Sebas Bonito

  • Sr. Member
  • ****
  • Posts: 271
  • Sebas Bonito
    • View Profile
Re: [Plugin] Batch Import
« Reply #200 on: July 23, 2009, 08:32:14 PM »
Hi!
...
Ne andere Geschichte: Die Fotos werden nicht verkleinert; besser gesagt, die MOD Auto image resizer wird nicht verwendet. Kann man das irgendwie integrieren? Denn so werden die Fotos in voller Auflösung angezeigt, und das sprengt nicht nur den Rahmen, sondern auch den Bildschirm.
ich verwende den big mod, ist aber etwas kompliziert weil die einbauanleitung und das debugging über mehrere seite geht.

du ladest ein großes bild hoch, das automatisch in einen extra ordner kommt, das verkleinerte z.b. 800x600 wird auf der detail angezeigt,
und zum download steht wieder das originale zur verfügung.
http://www.4homepages.de/forum/index.php?topic=7499.msg33712#msg33712

mfg Andi

Hi Andi,

also es läuft doch (MOD Auto image resizer UND [Plugin] Batch Import)... aber danke für den Tipp!

Bei der ersten MOD gibt es im ACP unter "Bilder verwalten" den Punkt "Auto-Image-Resizer". Wenn man nun das (zu große) Foto (nach dem Batch Import) verkleinert, wird automatisch die Original-Datei in den Unterordner "big" kopiert. GENAU SO wollte ich das.



Vielleicht noch ein Tipp für alle, die dieses Plugin nutzen: Meist ist es ja so, dass man nach dem Upload/Batchen die Kategorie noch bearbeiten will. Wenn man nun den Users auf der Seite zunächst nicht den Zugang gewähren will, muss man die "auth_viewcat" dementsprechend anpassen. Ich habe das gleich in die batch_import.php gepackt, damit ich die Kategorie erstmal in Ruhe bearbeiten kann (ohne das nochmal manuell einzustellen). Suche

Code: [Select]
($cat, '".addslashes($cat_name)."', '".addslashes($default_cat_description)."', $cat_parent_id, ".($cat_order['cat_order'] + 10).", $auth_viewcat, $auth_viewimage, $auth_download, $auth_upload, $auth_directupload, $auth_vote, $auth_sendpostcard, $auth_readcomment, $auth_postcomment)";
und ersetze es mit

Code: [Select]
($cat, '".addslashes($cat_name)."', '".addslashes($default_cat_description)."', $cat_parent_id, ".($cat_order['cat_order'] + 10).", 9, $auth_viewimage, $auth_download, $auth_upload, $auth_directupload, $auth_vote, $auth_sendpostcard, $auth_readcomment, $auth_postcomment)";
...die 9 ist in meinem Fall der Admin (ggf. anpassen!).

Offline thilina

  • Pre-Newbie
  • Posts: 1
    • View Profile
Re: [Plugin] Batch Import
« Reply #201 on: January 14, 2010, 03:45:12 AM »
hey,
it say`s

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

DB Error: Bad SQL Query: INSERT INTO ishare_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 (3, '', '', , 10, 0, 0, 2, 2, 9, 0, 0, 0, 2)
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, 2)' at line 4
FAILED

1. Importing image .autofsck

Warning: copy(./../../data/media/3/.autofsck) [function.copy]: failed to open stream: No such file or directory in /home/download/public_html/imageshare/admin/plugins/batch_import.php on line 122
Copy Image: Error while copying image /.autofsck
Skipping.....

2. Importing image .autorelabel

Warning: copy(./../../data/media/3/.autorelabel) [function.copy]: failed to open stream: No such file or directory in /home/download/public_html/imageshare/admin/plugins/batch_import.php on line 122
Copy Image: Error while copying image /.autorelabel
Skipping.....

3. Importing image .pearrc

Warning: copy(./../../data/media/3/.pearrc) [function.copy]: failed to open stream: No such file or directory in /home/download/public_html/imageshare/admin/plugins/batch_import.php on line 122
Copy Image: Error while copying image /.pearrc
Skipping.....

4. Importing image .rnd

Warning: copy(/.rnd) [function.copy]: failed to open stream: Permission denied in /home/download/public_html/imageshare/admin/plugins/batch_import.php on line 122
Copy Image: Error while copying image /.rnd
Skipping.....

5. Importing image cpmode.conf

Warning: copy(./../../data/media/3/cpmode.conf) [function.copy]: failed to open stream: No such file or directory in /home/download/public_html/imageshare/admin/plugins/batch_import.php on line 122
Copy Image: Error while copying image /cpmode.conf
Skipping.....

6. Importing image latest

Warning: copy(./../../data/media/3/latest) [function.copy]: failed to open stream: No such file or directory in /home/download/public_html/imageshare/admin/plugins/batch_import.php on line 122
Copy Image: Error while copying image /latest
Skipping.....

7. Importing image oldcrontab

Warning: copy(./../../data/media/3/oldcrontab) [function.copy]: failed to open stream: No such file or directory in /home/download/public_html/imageshare/admin/plugins/batch_import.php on line 122
Copy Image: Error while copying image /oldcrontab
Skipping.....

8. Importing image testdir

Warning: copy(./../../data/media/3/testdir) [function.copy]: failed to open stream: No such file or directory in /home/download/public_html/imageshare/admin/plugins/batch_import.php on line 122
Copy Image: Error while copying image /testdir
Skipping.....

thank you...

Offline Hoang

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: [Plugin] Batch Import
« Reply #202 on: September 16, 2010, 05:14:20 PM »
Is it possible to support batch import to special cat (subcat not to root) ?

Offline x23piracy

  • Sr. Member
  • ****
  • Posts: 420
    • View Profile
    • FHG
Re: [Plugin] Batch Import
« Reply #203 on: October 14, 2010, 03:53:35 AM »
Hi,

this script is very nice but there is something i don't understand.

Why are successfully imported images and categories (folders) are not deleted?
So it is necessary to delete the contents of the import folder, if you forgot that
the categories are created again (same name) and the images re-imported.

I see no point in why files and folders are retaining, can someone explain this?

Someone has already adapted the script?

EDIT:

Ok i found that here ;)

Code: [Select]
// As default, the script will only copy the image files
// from your source folders to the 4images folders.
// After import you will have your image data twice on
// your server.
// If you have not enough server space set this to 1.
// Then the script will move the image files.
// Be carefully with this, your data could be lost!!!
$move_image_files = 0;

This is not clear for me:

Code: [Select]
// Then the script will move the image files.
Move to where? Do you mean deleted?

Code: [Select]
// Be carefully with this, your data could be lost!!!
Lost? You mean if the importt was unsuccessfully? but the script
should not delete anything if an error accours. Hmm

Why are categories that already exist duplicated?
Who uses two identical categories denominated?

The idea is to give users an ftp access for a
convenient upload of images.

If the categories are duplicated it's useless

Please clear this up.


Greeting X23
« Last Edit: October 14, 2010, 04:12:51 AM by x23piracy »

Don't trust in md5 it's unsafe change your 4i galerys password hash algorythm! second pw db field, create new hashes over some time, deny old hash. Help members that cry, send informationen mail to the rest. Camouflage new pw hash in cookie. Done!

--(◔̯◔)--

Offline Hoang

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: [Plugin] Batch Import
« Reply #204 on: October 22, 2010, 10:46:32 AM »
No support from author!

Is it possible to support batch import to special cat (subcat not to root) ?


Offline nameless

  • Full Member
  • ***
  • Posts: 147
    • View Profile
Re: [Plugin] Batch Import
« Reply #205 on: November 18, 2010, 11:38:44 PM »
thanks for this mod and it works good with 4image 1.78

but if i have an exit category for example XXXX

and i want to Batch Import some category under XXXX category Not to the root

thanks

Offline nameless

  • Full Member
  • ***
  • Posts: 147
    • View Profile
Re: [Plugin] Batch Import
« Reply #206 on: December 10, 2010, 01:18:33 PM »
hi evry one
if i use this plug in and when it work it stoped for any reson how can i make it Continue batch

Offline ca_20gti

  • Pre-Newbie
  • Posts: 1
    • View Profile
Re: [Plugin] Batch Import
« Reply #207 on: December 18, 2010, 07:37:18 AM »
Nevermind... I got it to work.. oi
« Last Edit: December 19, 2010, 06:15:26 AM by ca_20gti »

Offline chrissim

  • Pre-Newbie
  • Posts: 4
    • View Profile
Re: [Plugin] Batch Import
« Reply #208 on: February 02, 2012, 11:28:17 AM »
hi,

The batch import mod worked great on my side but i have some hiccups here when i imported my images.
The import process were fine and working well but the only thing the date were wrongly recorded for all images that i imported.

For eg: Today i imported images to my category it should showed today date but it was shown last year July 2011 instead.

Another issue here all the keywords were in hyperlinked in straight line. Can we have those keywords in comma instead

Could someone advise me how to fix these problems here?

Thanks

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [Plugin] Batch Import
« Reply #209 on: February 03, 2012, 03:13:48 AM »
the date were wrongly recorded for all images that i imported.

For eg: Today i imported images to my category it should showed today date but it was shown last year July 2011 instead.

Replace:
$use_image_filemtime 1;

with:
$use_image_filemtime 0;


Another issue here all the keywords were in hyperlinked in straight line. Can we have those keywords in comma instead

The plugin was made for v1.7...quite outdated.
Replace:
$default_image_keywords str_replace(","" "$default_image_keywords);
$default_image_keywords ereg_replace("( ){2,}"" "$default_image_keywords);


With:
if (version_compare(SCRIPT_VERSION"1.7.8" "<"))
{
	
$default_image_keywords str_replace(","" "$default_image_keywords);
	
$default_image_keywords ereg_replace("( ){2,}"" "$default_image_keywords);
}
else
{
  
$default_image_keywords preg_replace("/[\n\r]/is"","$default_image_keywords);
  
$image_keywords_arr explode(','$default_image_keywords);
  
array_walk($image_keywords_arr'trim_value');
  
$default_image_keywords implode(','array_unique(array_filter($image_keywords_arr)));
}

Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)