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

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

0 Members and 4 Guests are viewing this topic.

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Re: [Plugin] Batch Import
« Reply #120 on: August 29, 2005, 04:02:57 PM »
Das ist falsch. Da müsste stehen:

Code: [Select]
require(ROOT_PATH.'admin/admin_global.php');
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline JoergM

  • Pre-Newbie
  • Posts: 7
    • View Profile
Re: [Plugin] Batch Import
« Reply #121 on: August 29, 2005, 11:39:12 PM »
Das ist falsch. Da müsste stehen:

Code: [Select]
require(ROOT_PATH.'admin/admin_global.php');

Habe ich gemacht, gleiche Fehlermeldung

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Re: [Plugin] Batch Import
« Reply #122 on: August 31, 2005, 01:26:32 PM »
Glaube ich nicht, dass Du die gleiche Fehlermeldung bekommst. :roll:

Ändere mal
Code: [Select]
$root_path = (eregi("\/plugins\/", $PHP_SELF)) ? "./../../" : "./../";zu
Code: [Select]
$root_path = (!eregi("\/plugins\/", $_SERVER['PHP_SELF'])) ? "./../" : "./../../";
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline iban

  • Pre-Newbie
  • Posts: 9
    • View Profile
Re: [Plugin] Batch Import
« Reply #123 on: September 06, 2005, 11:57:15 PM »
I have made a MOD to this plugin (I did not know if I had to post that here... sorry...)

In order to import the "DateTime" of the image (not the datetime of the file)....
May be you have to apply first this [Mod] EXIF 0.3(click on me)

Open the ./admin/plugings/batch_import.php file and find:
Quote
$image_date = ($use_image_filemtime) ? filemtime($dir_array[$cat]['cat_path']."/".$file) : time();

And replace by:
Quote
      if ((exif_imagetype($dir_array[$cat]['cat_path']."/".$file))!=FALSE) {

        $exif = read_exif_data ($dir_array[$cat]['cat_path']."/".$file);

        $date="";

        if (isset($exif['DateTimeOriginal']))
           $date=$exif['DateTimeOriginal'];
        if (empty($date) && isset($exif['DateTime']))
           $date=$exif['DateTime'];

        if (!empty($date)) {
           $date=split(':',str_replace(' ',':',$date));
           $date="{$date[0]}-{$date[1]}-{$date[2]} {$date[3]}:{$date[4]}:{$date[5]}";
           $image_date=strtotime($date);
        } else {
           $image_date = ($use_image_filemtime) ? filemtime($dir_array[$cat]['cat_path']."/".$file) : time();
        }
      } else {
        $image_date = ($use_image_filemtime) ? filemtime($dir_array[$cat]['cat_path']."/".$file) : time();
      }

Offline batman1056

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: [Plugin] Batch Import
« Reply #124 on: September 09, 2005, 06:14:58 PM »
can anyone help.. just used this script on my gallery and its takeing ages to do it, i.e. 5000 images and hes been addign tehm slowly for over 9 hours, I contact my hosting provider who said:

Is this script your running in php? Last August 31st, 2005, our PHP
configuration has been changed to have register_globals off by default. we
are
changing the default register_globals setting for security reasons. Since
the
4.2.0 release of php the default value for register_globals has been "Off"

So my question is when running this script do I need register_globals ON?

HELP.. this batch add is taking ages... or is it just my host?

Offline memet

  • Pre-Newbie
  • Posts: 8
    • View Profile
Re: [Plugin] Batch Import
« Reply #125 on: November 14, 2005, 01:31:40 AM »
ich habe auch eine problem mid diesem addon,

Warning: opendir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/srv/www/htdocs/web1/:/srv/www/htdocs/phpMyAdmin/:/srv/www/htdocs/confixx/html/gesperrt/) in /srv/www/htdocs/web1/html/e-kart/admin/plugins/batch_import.php on line 314

Warning: opendir(/): failed to open dir: Operation not permitted in /srv/www/htdocs/web1/html/e-kart/admin/plugins/batch_import.php on line 314

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 (869, '', '', , 10, 2, 2, 2, 2, 9, 2, 2, 2, 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, 2, 2, 2, 2, 9, 2, 2, 2, 2)' at line 4
Fehler!


Import beendet!

Hier steht :/srv/www/htdocs/confixx/html/gesperrt/)  ich habe einen root server,dises ordner hatte ich selber erstelt für meine gesperrte kunden.

Ich dache das hat mit dem ordner zu tuhn,Deshalb habe ich das ordnergelöscht,leider immer noch dieses problem

ich danke im vorraus.

mfg


Offline memet

  • Pre-Newbie
  • Posts: 8
    • View Profile
Re: [Plugin] Batch Import
« Reply #126 on: November 22, 2005, 10:18:10 AM »
geiler support  8O wauwww

Offline himu

  • Jr. Member
  • **
  • Posts: 69
    • View Profile
    • Point Of View
Re: [Plugin] Batch Import
« Reply #127 on: February 06, 2006, 01:12:07 PM »
Thanks! Jan,
Excellent Mod and the most easyest to implement.  :D

couple of things.
I can't import new images on to existing category or import a new sub-category under an existing category.
it would have been nice if we could integrate the auto-thumbnailer and batch annotate with this mod.

thanks again.  :D

Offline short_up

  • Pre-Newbie
  • Posts: 5
    • View Profile
    • http://www.short-up.com
Re: [Plugin] Batch Import
« Reply #128 on: February 08, 2006, 02:14:22 AM »
Thanks Jan for an awesome plugin!
And thanks to Seatboy for the revised plugin.

However, I was wondering if someone could help me out and look at Seatboy's revised version.  I get the field for the Image Name, but when I actually go through the plugin and everything is uploaded, the Image Name is blank instead of what I wrote.

Thanks for your time!

Offline ddejonghe

  • Pre-Newbie
  • Posts: 1
    • View Profile
Re: [Plugin] Batch Import
« Reply #129 on: February 12, 2006, 08:32:10 PM »
How did you solve your problem?  I get the same error:

Warning: opendir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home/iutum/:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/iutum/public_html/4images/admin/plugins/batch_import.php on line 314

Dominique

Offline cpuswe

  • Newbie
  • *
  • Posts: 47
    • View Profile
Re: [Plugin] Batch Import
« Reply #130 on: February 28, 2006, 09:24:30 PM »
Just want to say THANK YOU for this great MOD.  ~1350 pictures in over 500 categories to create. I had the directory structure created on disk and with this mod it took about 20 minutes to import the whole lot. Just some minor sorting to do.

Thanks!

/Thomas

http://www.cpuphotolibrary.com

Offline wallpapers

  • Full Member
  • ***
  • Posts: 107
    • View Profile
    • Tuned-Cars.Net
Re: [Plugin] Batch Import
« Reply #131 on: March 02, 2006, 08:25:11 PM »
It's works perfect for me

Thx V@NO



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 #132 on: March 03, 2006, 06:46:27 AM »
*cough* Jan *cough*
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)

Offline blue22deep

  • Newbie
  • *
  • Posts: 29
    • View Profile
Re: [Plugin] Batch Import
« Reply #133 on: April 05, 2006, 09:52:14 PM »
Batch Import-Script (Beta)

---------------------------------------------------------------------------------
This script will import image data from an existing folder structure. The script goes recursively through the folders, creates categories for each folder (subcategories for subfolders) and imports the images.

Download: batch_import.zip

Great script

But having problems with large dir's, it stoppet at the 55th pic, and just telling me it's scanning, but nothing happens :(

Anyone have a qlue...??
Best Regards
Carsten, Denmark

Offline IcEcReaM

  • Hero Member
  • *****
  • Posts: 714
    • View Profile
    • My little Testboard
Re: [Plugin] Batch Import
« Reply #134 on: April 05, 2006, 10:32:21 PM »
maybe an timeout?

scripts can run only for a certain time, which depends of the server settings,
how long a script can be executed.
Coding is a everlasting competition between programmers who tries to write larger, better and idiot-safe programs and the universe producing larger and stupider idiots...
...so far the universe won
bump