Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-06-30 20:59:47

Skubidu
Archived Plugin Author
Registered: 2004-10-23
Posts: 611
Website

nhn_image_import: multiple image import

Hello everybody!

I needed to upload dozens of images to my textpattern installation for a gallery on one of my sites. As it is not funny to upload a lot of images manually, I started to write my first admin-side plugin ever – I’m not a programmer, but it works fine for me and maybe it could be usefull for somebody else, too.

That’s what the script does:
1. It creates an new folder called import in the image folder.
2. All images uploaded via ftp to this folder will be imported into textpattern.

How to use it:
1. Upload your images via ftp to the import folder.
2. If you want to add the images to a special category, simply create another folder (chmod 777) with the name of the category in the import folder. If the category already exists, the images will be added to it, otherwise the category will be created.
3. Open the image tab in the content area: abracadabra the images should be imported.

NOTE:

This plugin has been taken over by aba who released a new version.
Please visit this thread for further information about aba_image_import.

Greetings,
Nils / Skubidu

Last edited by Skubidu (2005-09-17 17:01:29)

Offline

#2 2005-06-30 22:40:58

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: nhn_image_import: multiple image import

That was much needed, thanks a lot.

Question: how does it handle unicode categories ? If I have a Ærïn category, a folder with the same name will work fine ?

Offline

#3 2005-07-01 01:21:49

sekhu
Member
Registered: 2005-05-12
Posts: 428
Website

Re: nhn_image_import: multiple image import

thanks you VERY much for this, I am really looking forward to trying this out – I hope it becomes a feature of TXP 1.0 because the current system is just nuts for multiple images. AND it recognizes FTP uploads? Hallelujah! thanks again!

ok i have a question – if I can have folders within the import folder, does that mean I can acutally, finally, organise my iamges by category within at least the uploading side of it? So I can have several fodlers taht would work as image cats right? I think I have that tirhgt. Now we just need TXP to add ad drop down menu to view images based on their image cats.

COuld you fruther explain this:

>If you want to add the images to a special category, simply create another folder with the name of the category in the import folder. If the category >already exists, the images will be added to it, otherwise the category will be created.

So say I have a category called “snaps” that already exists, with images assigned to that image category – i name the folder the same as the image and category which are the same, and then the images should automagically appear not only in the normal image dir but also in imports/snaps?

Last edited by sekhu (2005-07-01 01:33:22)

Offline

#4 2005-07-01 05:56:37

Niconemo
Member
From: Rhône-Alpes, France
Registered: 2005-04-18
Posts: 557

Re: nhn_image_import: multiple image import

I’ve tried it out, sekhu, it’s much more simplest than that.
In fact it takes each image in the import folder and import it exactly as if it was made manually (with a name like 1.jpg, 2.jpg…), deleting he original image from the import folder. If there is a subfolder, the name of the subfolder is just used to aim the image to a category in the database but all images are gathered in the first level of the image folder.

In fact (correct me if i’m wrong Skubidu) it just initiate a the normal import function of textpattern, not changing it.

Thank you Skubidu. It’s cool, I’ll need it for a site conversion soon.

Suggestion for a following update :
It would be fantastic (if possible) if it could detect a prefix as “thumb-” to tell the thumbnail from the image between “thumb-image.jpg” and “image.jpg”… But maybe I’m asking too much. ;)

Last edited by Niconemo (2005-07-01 06:19:48)


Nico

Offline

#5 2005-07-01 06:31:32

Skubidu
Archived Plugin Author
Registered: 2004-10-23
Posts: 611
Website

Re: nhn_image_import: multiple image import

Good Morning!

@Jeremie: I have to think about this.

@sekhu: Niconemo explained it the right way: the plugin uses the normal import function of textpattern. So the images in the import folder are copied, renamed an finally deleted in the import folder.

@Niconemo: Nice idea with the “thumb-“prefix. I have thought about using glx_admin_image to generate the thumbs automaticaly but your idea is a nice way, too.

Offline

#6 2005-07-01 07:04:25

Niconemo
Member
From: Rhône-Alpes, France
Registered: 2005-04-18
Posts: 557

Re: nhn_image_import: multiple image import

> Skubidu wrote:
@Niconemo: Nice idea with the “thumb-“prefix. I have thought about using glx_admin_image to generate the thumbs automaticaly but your idea is a nice way, too.

Oh yes, I personnally often use a different thumbnail, I mean not exactly a reduction of the original image (for a protfolio it can be only a small part of the image or a different version…) there is also the quality question : I prefer to make my thumbnails myself with different compressions and so on. And also that would be useful for site conversions with thumbnail ready made…


Nico

Offline

#7 2005-07-01 08:11:25

Skubidu
Archived Plugin Author
Registered: 2004-10-23
Posts: 611
Website

Re: nhn_image_import: multiple image import

New version 0.2 – more details above.

Offline

#8 2005-07-01 14:09:46

Niconemo
Member
From: Rhône-Alpes, France
Registered: 2005-04-18
Posts: 557

Re: nhn_image_import: multiple image import

Wow ! 2 hours to make an update with a new suggested feature and a unicode issue repaired !

Thank you sir ! You’ll make me spare hours next days ! :)

Last edited by Niconemo (2005-07-01 14:11:34)


Nico

Offline

#9 2005-07-01 16:27:30

sekhu
Member
Registered: 2005-05-12
Posts: 428
Website

Re: nhn_image_import: multiple image import

ok i think i get it, i;m not sure i do 100% – what steps would i need to take to copy teh images from the current images folder to the import folder to split them up in to sub folder? And I think getting this to work glx_admin_image would be very nice – Sencer did something similar using cygwin where uploading the images via ftp, adn then hitting images in the tab would display all the images, but with glx_admin_aimage already installed clicking the image would create the thumbnail so all you do is hit save.

Offline

#10 2005-07-01 18:09:48

Skubidu
Archived Plugin Author
Registered: 2004-10-23
Posts: 611
Website

Re: nhn_image_import: multiple image import

Hi sekhu!

This plugin can’t help you reorganizing your images curently uploaded to your textpattern installation. It just helps you uploading an importing a huge amount of images that are not yet in the database. I’m sorry!

Nils / Skubidu

Offline

#11 2005-07-01 18:17:04

sekhu
Member
Registered: 2005-05-12
Posts: 428
Website

Re: nhn_image_import: multiple image import

thanks anyway skubidu – this will still prove a very useful plugin :)

Offline

#12 2005-07-01 18:54:05

soulship
Member
From: Always Sunny Charleston
Registered: 2004-04-30
Posts: 669
Website

Re: nhn_image_import: multiple image import

Thank You Thank You Thank You!

Offline

Board footer

Powered by FluxBB