I really like this module !
Really great work

Are there any plans to update node_image to version 6.0?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

andypost’s picture

There are some thoughts about 6.x version
- images should stored as files
- additional permissions (for upload)

andypost’s picture

This is my port to 6.x - need testing...
applied patches from 5x (http://drupal.org/node/118702 http://drupal.org/node/147538) and removed dependency of Upload module

andypost’s picture

+code styling and cleanups
+dragable sorting

I think image listing and upload form should be merged in one form - prototype in upload module

Upload new images not works without JavaScript enabled... if someone can help - please fix it!

andypost’s picture

Title: Update for 6.0 ? » Update for 6.0 - porting in progress
Status: Active » Needs work
FileSize
15.32 KB

-now it works with postres
-fix for filenames with ' - replace spaces, ' and " with _ (underscore)

btsukuda’s picture

FileSize
86.72 KB

I started porting the node_images module for a project back in December while D6 was in beta, and hadn't gotten around to getting a patch on this site until today (sorry). Attached is a patch for 6.x (against 5.x-1.x-dev), and it's mostly working, except I've added a bunch of features that I wished the 5.x version had, and so a couple of dependencies have been added to the port I was working on: thickbox (link to D6 patch) and jQuery Plugin.

The most notable features I've been toying with are zip uploads (tar.gz as well) for uploading multiple files at once, and using node_images as an uploader for inline images, sort of akin to how Wordpress handles image uploads. The inline uploader does require thickbox to function correctly as it opens in a thickbox window and can upload new images (including zip archives) and update existing images while editing text (once the node has been saved initially.) Currently a very simple "Insert Images" link is added below the body form to open the node_images thickbox window.

Another feature I've been toying with is using the jQuery plugin "cycle" for handling slideshows. These technically can be placed anywhere inline using a format like: [slides:[1,2](fx:fade,speed:1000)]. The numbers in the square brackets are the images attached to the node in weighted order, so "[1,5,2,10]" would bring up the first, fifth, second, and tenth images attached to the node in that order for a slideshow. Additionally ranges can used so "[1-4,7,10]" would show the first four images, then the seventh and tenth after that. Additional slideshow attributes are in the parenthesis. Currently transitions, speed, and timeout are the only working attributes, and these only show up on node pages when the format is set to "Full HTML" as I haven't had much experience writing filters...

Some other major changes that I've made are: Adding a third derivative size (medium) and a few database columns ("mediumpath", "mediumsize", and "caption"), and drag and drop reordering...

Anyway, all of this is pretty untested though it seems to work alright on my test installs, and are not necessarily what the 5.x node_images module was about, but I thought I'd offer up the patch just in case these things might be of interest to anyone. The code has taken a pretty far departure from the 5.x version so I'm not sure if the changes I made in my port can be rolled into the current porting progress (or even if there is interest in doing so.)

DevElCuy’s picture

@btsukuda awesome work!

It is good to see your effort on bringing this module to D6, so I just want to suggest don't do it with node_images, because as I previously discussed with stefano73, node_media is the successor. That module is 90% equal and just add support for videos and sound. My goal is to join forces with others avoiding duplication and forking.

Now, I've been so busy latest 3 months but want to re-schedule and start moving node_media to D6 so I encourage you to work with me in favor of community.

Blessings!

btsukuda’s picture

@develCuy

Ah... I haven't been checking out what's been going in 5.x modules and was unaware of node_media. I will check it out soon.

Thanks!

andypost’s picture

Hey! What are you talking about? A lot of people planing to upgrade from 5 to 6 so in new projects you can try node_media but we need COMPATIBILITY with existing installations!

btsukuda, I will test your patch later so busy now.

btsukuda’s picture

@andypost

If you're looking for backwards compatibility, that is, doing exactly what the 5.x version does, I'm not sure if my patch is what you're looking for. The code has some pretty substantial deviation from the 5.x version since I was looking to make something useful for my own particular needs rather than a straight port of 5.x (which are generally modifications for a site where node_images wouldn't be used by the majority of the community. For example, zip uploads do not do a count of images that it's processed since the only users who would be using the module have fairly high privileges, and convenience for them is mort important than checking file limits.). From the looks of things, your port seems pretty on the dot to getting things to work on 6.x, and my code would probably just be a hassle to integrate, though if you see anything worthwhile, feel free to grab what you need. (Though, if node_images won't be actively maintained past 5.x, I will probably not continue to patch for 6.x).

@develCuy

I've taken a quick look at node_media and the code seems pretty similar to node_images with some additional code to allow for other file types. If you have a chance, could you test out the my patch for node_images and see if anything in there is worth moving into your module? If node_media is indeed the successor to node_images, and if node_images won't be maintained past the 5.x version, and if you see something worthwhile in my patches to node_images, I will try to make an effort to getting my changes into a maintained 6.x project.

andypost’s picture

btsukuda, today I test your patch - it take some time to patch thickbox

Your code looks like node_images 2.x :)
- nice metadata in image listing! what is the purpose of caption field?
- thickbox works but better make it optional

- bug with upload folder (_node_images_mkdir_recursive checks only sites and sites/default but sites/[somehost] broken)
- there's no update on enable module - so images are not saved
- after upload you should check if file save in database (i see image after upload but clicking on Images tab - there's nothing)

Please, check my patch - i've tried to remove upload dependency, and I think upload form need to link with images listing

btsukuda’s picture

@andypost

A few quick questions:

Was this on a clean install? I have not tested whether or not my patch is compatible with a previous installation of node_images.

I've noticed you've been implementing postgres support. Does this mean that you're using it to test my patch?

DevElCuy’s picture

@andypost sure, I care about backwards compatibility (I'm working on migration business years ago), and since you are using postgresql would be nice to have your feedback (very very important).

@btsukuda

  1. I've seen your patch, looks like you had lots of fun :) there are some little details to normalize, since you worked in specific solution but those could be moved to plug-in modules like node_media_thickbox and so on. Another point is to maintain "lightweight philosophy" we don't use core tables like files or nodes but just attach a gallery to nodes.
  2. Having a fork to D6 may conduct to desperate porting and we don't like people with support problems. So is another reason to keep node_images functionality "as is" in D6 and point new features to node_media.
  3. stefano73 and me discussed a bit about node_media 2.0 and the goal is to do it powerful, more lightweight, flexible and multi-language friendly.

Blessings!

DevElCuy’s picture

I've started a discussion about porting it at Contributed module Ideas group (CMIG). Hope to get more feedback there.

Blessings!

tdg’s picture

Status: Needs work » Needs review
FileSize
23.98 KB

I've just created my own port of this module for Drupal 6.
It is attached.

It has some additional features over original one:
1. Drug n drop weight editing
2. Additional field for image - url
3. Additional variable for image path - %type - which is replaced with node type
4. MD5 filename uses full hash value and calculated from original filename plus timestamp - to ensure unique filenames
5. Permissions is updated - this feature should be checked more accurately!

Future plans:
1. Add support for some watermarks. May be you can suggest me some module for that (for drupal 6)
2. Check everything

tdg’s picture

andypost:
I've just looked on your port. It works just great for me. But I have some suggestions about it:

1. Pack. It is better to pack module within its folder. The most of drupal modules are packed this way and it is really useful :)
2. Sometimes it is useful to divide files by node types. So, it will be great to have %type variable for path.
3. I think it is better to have one button to upload and save changes. For example, the user can make same changes for the descriptions of uploaded images, but by mistake push "upload" button. And, opps, he lost all changes... I've just made such mistake :)
4. It is useful to be able to temporary hide images from gallery, or hide some and insert in body manually with img tag.
5. Permissions:
- I need to prevent some users from deletion images - so "delete node images" permission will required. I think it is common task...
- Admis and moderators should be able to see hidden images - so "view all node images" for admins
6. After selecting "delete" checkbox and pressing "save changes", the image is deleted without any confirmation. There should be a way to recover deleted images or at least some kind of confirmation for deletion...
7. I was unable to upload image with Russian file name (аватар.jpg) - it fault to pass filename check: "The selected file jpg. could not be uploaded. Only files with the following extensions are allowed: jpg jpeg gif png."

So, the most of this is usability issues and wishes. I'm going to try to fix some from this list. The results I'll post there.

Great work! Thank you very much!

coupet’s picture

@ btsukuda: Can you submit plug-in modules for

node_media_thickbox (thickbox)
node_media_jquery (jQuery Plugin)
node_media_zip (zip upload)

Excellent work!

btsukuda’s picture

@coupet:

Do you mean rewriting the plugin modules for the node_media project for node_images? If so, I don't think I have the time right now. The modules are similar, but not identical. Add to that, there isn't an official port of node_images to 6.x. Unfortunately I can't recommend using my 6.x port of node_media either as I made a few db changes that might not make it to the actual module. If you're feeling brave and don't mind a lack of support/backwards compatibility for node_images/node_media, you can go ahead and try using the modules found here: http://drupal.org/node/254374 .

The last upload was a bit buggy (with the zip uploads), but I've fixed a couple of things since. If you want to give it a try (on a non-critical site), let me know in the node_media 6.x port issue.

random_’s picture

Hi,

This is a great module!

How is the port to 6 going?

stefano73’s picture

The 6.x release is out for testing: http://drupal.org/node/298760

stefano73’s picture

Status: Needs review » Closed (fixed)