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

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

0 Members and 1 Guest are viewing this topic.

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: Mass upload in tiered folders?
« Reply #180 on: June 30, 2009, 12:03:13 AM »
Hiya!

Thanks Nicky!  Do I have to specify each folder?  Or can I just take it from the folder?

The data source path "/public_html/onlinesmilies/data/img  seems to be incorrect

Lost :(

Peace,
Lee

hi Lee,

example 4images hirarchie

4images folder
- data
- - media
- - - category id

to use the import plugin you should have your pictures as example like this

your root folder of all subfolders
- smilies
- - emoticons-1
- - - misc-1
- - - - pictures inside

- avatars
- - subfolder
- - - subsubfolder
- - - - pictures inside

correct path in batch_import.php will be as example:
$data_src_path = "/home/user/public_html/your root folder of all subfolders";

remember...
category names, subcategory names and picture names will be taken from names of your folders and picture files.
cheers
Nicky
Your first three "must do" before you ask a question ! (© by V@no)
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

nicky.net 4 4images
Signature stolen from mawenzi

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: [Plugin] Batch Import
« Reply #181 on: June 30, 2009, 12:14:30 AM »
Schnick und Schnack,

nehmen wir an deine galerie ist so zum abrufen
http:// deineurl /deinegalerie

versuche einfach folgendes

erstelle verzeichnis
http:// deineurl /upload

hau alle deine folder rein...
in der batch_import.php setze folgendes ein
Code: [Select]
$data_src_path = "/srv/www/vhosts/XYZ.de/httpdocs/upload";
wie sieht es dann aus?
da
cheers
Nicky
Your first three "must do" before you ask a question ! (© by V@no)
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

nicky.net 4 4images
Signature stolen from mawenzi

Offline Sebas Bonito

  • Sr. Member
  • ****
  • Posts: 271
  • Sebas Bonito
    • View Profile
Re: [Plugin] Batch Import
« Reply #182 on: June 30, 2009, 12:26:38 AM »
Schnick und Schnack,

nehmen wir an deine galerie ist so zum abrufen
http:// deineurl /deinegalerie

versuche einfach folgendes

erstelle verzeichnis
http:// deineurl /upload

hau alle deine folder rein...
in der batch_import.php setze folgendes ein
Code: [Select]
$data_src_path = "/srv/www/vhosts/XYZ.de/httpdocs/upload";
wie sieht es dann aus?
da


...dann sieht es exakt genau so aus. ABER ich hab so ne Vermutung, irgendwas haut doch bei der Datenbank bzw. bei der categories-Tabelle nicht hin. Wenn ich mir die Fehlermeldung noch mal anschaue, fehlt eine "Spalte" und zwar die "cat_hits". Liegt es vielleicht daran?


Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: [Plugin] Batch Import
« Reply #183 on: June 30, 2009, 12:40:12 AM »
cat_hits ist, wie auf deinem bild, in der 5-ten ;)

[edit]
wie sieht es so aus
Code: [Select]
$data_src_path = "../../../upload";falls die urls wie oben sind
cheers
Nicky
Your first three "must do" before you ask a question ! (© by V@no)
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

nicky.net 4 4images
Signature stolen from mawenzi

Offline Sebas Bonito

  • Sr. Member
  • ****
  • Posts: 271
  • Sebas Bonito
    • View Profile
Re: [Plugin] Batch Import
« Reply #184 on: June 30, 2009, 12:43:08 AM »
cat_hits ist, wie auf deinem bild, in der 5-ten ;)

Es geht um meinen gestrigen Beitrag (die Grafik von MySQL soll nur den Vergleich und die fehlende Spalte verdeutlichen):

I already changed my tmp-folder, where the new images are stored, to the admin/plugins folder and gave them all rights. But nothing happens (except the error-logs).

SERVER-ERROR-LOG
Code: [Select]
[Sun Jun 28 16:52:46 2009] [error] [client XYZ] 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/XYZ.de/httpdocs:/tmp) in /srv/www/vhosts/XYZ.de/httpdocs/XYZ/admin/plugins/batch_import.php on line 314, referer: http://www.XYZ.de/XYZ/admin/plugins/batch_import.php
[Sun Jun 28 16:52:46 2009] [error] [client XYZ] PHP Warning: opendir(/) [<a href='function.opendir'>function.opendir</a>]: failed to open dir: Operation not permitted in /srv/www/vhosts/XYZ.de/httpdocs/XYZ/admin/plugins/batch_import.php on line 314, referer: http://www.XYZ.de/XYZ/admin/plugins/batch_import.php

and this appears in admin-panel "Batch Import":
Code: [Select]
0 images in .
Import category ...
DB Error Bad SQL Query: SELECT cat_order FROM XYZ_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 XYZ_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 (13, '', '', , 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

Import finished!

Anybody could see the fault or which mistake I made? Thx guys!

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: [Plugin] Batch Import
« Reply #185 on: June 30, 2009, 12:46:36 AM »
die insert into ist schon in ordnung

Code: [Select]
   $sql = "INSERT INTO ".CATEGORIES_TABLE."
            (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

cat_hits wird nicht benutzt, sondern wird der wert 0 automatisch zugefügt.

cat_parent_id ist das problem. weil die fehlermeldung oberhalb nicht ausgeführt wird..
cheers
Nicky
Your first three "must do" before you ask a question ! (© by V@no)
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

nicky.net 4 4images
Signature stolen from mawenzi

Offline Sebas Bonito

  • Sr. Member
  • ****
  • Posts: 271
  • Sebas Bonito
    • View Profile
Re: [Plugin] Batch Import
« Reply #186 on: June 30, 2009, 12:49:39 AM »
hmm... käcke!

"cat_parent_id ist das problem.."
Wieso?

Vielleicht doch ein safe_mode Problem?

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: [Plugin] Batch Import
« Reply #187 on: June 30, 2009, 12:52:33 AM »
aufjeden fall ist es die obere fehlermeldung schuld daran.

ob du jetzt safe mode on oder off hast, musst du wissen ;)
cheers
Nicky
Your first three "must do" before you ask a question ! (© by V@no)
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

nicky.net 4 4images
Signature stolen from mawenzi

Offline Sebas Bonito

  • Sr. Member
  • ****
  • Posts: 271
  • Sebas Bonito
    • View Profile
Re: [Plugin] Batch Import
« Reply #188 on: June 30, 2009, 01:02:36 AM »
aufjeden fall ist es die obere fehlermeldung schuld daran.
ob du jetzt safe mode on oder off hast, musst du wissen ;)

1. Die Fehlermeldung ist bestimmt nicht schuld daran  :P
2. safe_mode on (Local Value), safe_mode off (Master Value),

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: [Plugin] Batch Import
« Reply #189 on: June 30, 2009, 01:06:59 AM »
na dann, wennst meinst...

viel glück bei der fehlersuche  :P
cheers
Nicky
Your first three "must do" before you ask a question ! (© by V@no)
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

nicky.net 4 4images
Signature stolen from mawenzi

Offline Sebas Bonito

  • Sr. Member
  • ****
  • Posts: 271
  • Sebas Bonito
    • View Profile
Re: [Plugin] Batch Import
« Reply #190 on: June 30, 2009, 01:09:32 AM »
na dann, wennst meinst...

viel glück bei der fehlersuche  :P
Na eine Fehlermeldung gibt ja nur "aus" und informiert über einen Fehler, ist aber logischerweise nicht der Grund des Problems  :wink:

Rembrandt

  • Guest
Re: [Plugin] Batch Import
« Reply #191 on: June 30, 2009, 07:25:05 AM »
Hi!
...Na eine Fehlermeldung gibt ja nur "aus" und informiert über einen Fehler, ist aber logischerweise nicht der Grund des Problems  :wink:
was mich etwas irritiert ist diese fehlermeldung:
Quote
DB Error Bad SQL Query: SELECT cat_order FROM XYZ_categories WHERE cat_parent_id = ORDER BY cat_order DESC LIMIT 1
ich meine eine "XYZ_categories" ,solch eine tabelle gibt es in 4I mit sicherheit nicht.

mfg Andi

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: [Plugin] Batch Import
« Reply #192 on: June 30, 2009, 12:34:54 PM »
@Rembrandt,
wenn ich den prefix XYZ_ so angegeben habe, dann schon :)

Schnick und Schnack, bekommt das schon auf die reihe ;)
cheers
Nicky
Your first three "must do" before you ask a question ! (© by V@no)
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

nicky.net 4 4images
Signature stolen from mawenzi

Offline dreamerscove

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Mass upload in tiered folders?
« Reply #193 on: June 30, 2009, 09:06:05 PM »
Hiya!

I've got the imgs on, but the thumbnails are all 404 img.  I made a folder for thumbnails, name tn/ but it's not finding it I assume :(

Ideas?

Peace,
Lee

Offline Sebas Bonito

  • Sr. Member
  • ****
  • Posts: 271
  • Sebas Bonito
    • View Profile
Re: [Plugin] Batch Import
« Reply #194 on: June 30, 2009, 10:04:26 PM »
@Rembrandt, wenn ich den prefix XYZ_ so angegeben habe, dann schon :)
Japp, ist ja nur der Prefix, die Tabelle existiert standardmäßig bei allen.