Closed (fixed)
Project:
Nodereference Image Helper
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
8 Sep 2009 at 01:54 UTC
Updated:
3 Feb 2010 at 17:51 UTC
Hi there, just came accross this module a few hours ago while researching moving from image/image_attach, and this seems to fit the bill.
However one of the reasons I want to move to imagefield is to allow multiple image nodes with different permissions. Would it be possible to have like a checkbox approach to selecting the image node type instead of a drop down?
Also, can the nodereference widget be altered to show a thumbnail of the referenced node, like it is done with image_attach?
Otherwise, great module!
Comments
Comment #1
bibo commentedI haven't even installed this module yet, but I'm going to (looks very promising, hoping this is more stable and light than http://drupal.org/project/nodereference_explorer - which is also promising).
But, to answer your third question:
Yes it can, with a theme override :). This is how I did it:
First copy "/modules/cck/theme/content-field.tpl.php" to your theme folder. Then copy it *again* to the theme folder, but with a different name, which is
"content-field-[NAME_OF_YOUR_FIELD].tpl.php". In my case the filename was "content-field-field_kuvaviittaus.tpl.php";
Then alter the file to look something like this. You need to change at least:
field_kuvaviittaus --> name of the node reference field
field_kuva --> name of the imagefield in the referenced node
hs_default --> name of the highslide settings that determines which imagecache presets to use
Also, I used highslide_field_formatter(), which is a function of the highslide-module (excellent JS imageviewer),
which is similar to lightbox, shadowbox, thickbox etc. If you use another method for viewing the image,
check the theming functions of those modules. Yeah, it can get complicated, but it's very flexible.
Here how my "content-field-field_kuvaviittaus.tpl.php" looks like (starting and ending with ###):
################################
if (!$field_empty) :print $field_name_css">print t($label):endif;endif;?>
################################
This overrides only the normal nodeview. To override it for Views (when you add the nodereference field) you need another theme file with a very different structure.
Comment #2
flk commentedThis module does what you ask, if the image preview is not showing up make sure to select the right field in the settings page.
:/admin/settings/noderef_image_helper
Comment #3
naheemsays commentedthe image preview is showing up for me - the widget problem was slightly bogus.
but the main issue I was asking about still exists - in admin/settings/noderef_image_helper you can only select one node as the image node type.
I would like the option to select multiple node types from there (I have two separate image node types used for different purposes, one of them general, the other one not.)