Content last modified Monday 6 March 2017
hop to #bottom
Categories:
Author:
Current version:
0.2
About It:
Get it:
Rate it:
  • Helpful?
  • 0 Yes
  • 0 No
Flag it:

If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!

nhn_image_import

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.

Update: Version 0.2

  • support of unicode categories (tested on localhost)
  • support of thumbs: simply upload your thumb image to the same folder. If the image is called holiday.jpg, the thumb has to be called thumb-holiday.jpg to be recognized.

Disclaimer: It works without trouble on my site, but I don’t take any warranty for it on other sites.

Article Request Count:

Archived [?]: orphaned: broken links

Initially released:
2005-06-30
Posted here:
04 Jul 2005
Article modified:
12 Jun 2008

You may want to leave your comments/questions at the Forum thread for quicker feedback. Otherwise, comment away:

Your comment will NOT be submitted until you click the 'Submit' button on the next pageload.

Commented (7)

Nils, this is a great plugin!! I have tried it on on my windows/apache/php install. It works great! But it would be nice to have a check on the path separator for windows an *nix platforms. It should be easy to adjust by checking for the platform with PHP_OS vars.
And then set a var pathsep with ”\” or ”/”

Keep up the good work!
Something to note is that this plugin does not work with RC1. But it works like a charm for RC3!

Great plug in!

NOTE: Don’t forget to chmod(777) your uploaded folders!
alex:
The plugin was taken over and improved by Andreas B.(aba). It is now called aba_image_import. See for further informations the forum thread.
How does it play with TXP 4.0.2 ? How it handle categories name vs categories title ? Can it use the the TXP thumbnail making automatically ?
Hi,
great plugin! very usefull.
The problem is that now I have hundreds of images in my library and it’s almost impossible to browse them with the standard textpattern admin interface.
I was wandering if it is possible to write a plugin for selecting (showing) only a given category in the admin panel.
Any idea on how to do this ? I’d like to try to write something myself, but I’ve no idea on how to do this. Do you think I should write a plugin or is it a matter of modifying the original code ?
Hi gcaca!

I’m playing with the idea of creating a sort of “nhn_image_organizer” as plugin that does what you want. But at the moment there is not enough time to really start coding it. It’s not that complicated, but it will take a lot of time because it’s a huge task to rewrite the image section.

If you have any ideas, post it on the forum. Perhaps we find a group working on that.

Regards,
Nils

Garbage. Another dead link. Should be removed from all listings.

Subscribe to this article's comments RSS feed. [ ? ]   View Recent Comments across the site.

Would you care to write a comment or visit the forum discussion?

You know you want to visit the Archives.

Browse

Categories


Articles

There are also tag clouds, 'cause those are fun.
Published with Textpattern