Download & Extend

Create Node Type for uploading images on install

Project:ImageField Assist
Version:6.x-1.x-dev
Component:Code
Category:task
Priority:normal
Assigned:lourenzo
Status:needs work

Issue Summary

Importing the node type using Content Copy as documented in README.txt can be much confusing.

It would be great to implement this CCK-based nodetype programatically by default.

Comments

#1

Status:needs work» reviewed & tested by the community

Here's a patch to do this.

AttachmentSize
imagefield_assist.patch 5.71 KB

#2

Status:reviewed & tested by the community» needs review

Oops, meant to mark it 'Needs Review', but it should work fine.

#3

Add one more line to the bottom of the install to be sure that the content and node type information is all flushed out so it will pick up this new type immediately:

<?php
// Clear out Content and Node caches and static values.
 
drupal_flush_all_caches();
?>

#4

Awesome!

Thank you

I have one question: fivestar node settings are there by accident?

#5

They are there because it was in the code I exported from. They will be ignored if the five star module is not enabled. You can also remove them if you want.

I also added a max_resolution to the image field to shrink huge files down to some maximum size. Administrators can alter that value in the field settings but I think it is better to have some sort of default than to accept the huge image files many end users will inadvertently add from their photo galleries.

#6

Status:needs review» fixed

Commited on dev. =)

#7

Sweet.

That's good news!

#8

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

#9

I just installed 6.x-1.x-dev but it seems that I still need to do this manually.

#10

I really don't like it when modules create their own nodetypes, especially for a module like this which isn't an image module, but an image inserter. It should be an additional sub-module which can be enabled by the user if the user wants this functionality.

#11

Status:closed (fixed)» needs work

Hi pkej,

We're aiming to offer a works-out-of-the-box module, and for now we'd need to create a node type that would be the images' container. Although, we could detect if any node types have imagefields, and offer options on install so the user could set an existing node type as default repository for uploads.

#12

Exactly my thoughts as well In case I was unclear.

A simple method of creating such a node type would be to have a sub module imagefield_assist_node_type inside the imagefield_assist module. The imagefield_assist_node_type module would depend on imagefield_assist module being installed and enabled.

Both modules would be in the same download, so it would work out of the box for both use-cases.

#13

Of course what we really should have is version 6.3.x of the Image module (http://drupal.org/project/image), updated to use imagecache, then we wouldn't have this dilemma; all other modules such as this one, could just depend on the new image module.

Much like img_assist, the current maintainers of Image don't seem interested before Drupal 7, so either we ask Image module about maintaining a new version, or as pkej suggests, start a new image node module. I wouldn't make it dependant on imagefield_assist though, so that it can be used as a new image standard upon which to update gallery module etc.

ps.
I just found another module with the same issue at #232373: Content type import doesn't work and other installation issues.

#14

Drupal 7 is months and months away, I believe, some of the problems with several modules, like img_assist and image, has been there since the dawn of the 6.x series.

In 5.x I used Image and img_assist modules, but this module is the coolest since sliced bread. I'm just going to ask for some features :P

Who is responsible for marking as duplicate?

#15

I spawned #976952: Allow choice of upload content type from lourenzo's comment in #11, as it's a separate issue that deserves its own attention.

#16

In case anyone is still looking at this, there is now a Debut Image module that just creates a new content type with an imagefield already set up ready to go.

nobody click here