Download & Extend

support image.module thumbnail previews for bulk caption updates

Project:Editview
Version:6.x-1.0-beta1
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs work

Issue Summary

Thanks for the initial startup recipe! It got me going really fast considering how complex it all is.

I quickly found that it wasn't doing what I needed - I've got galleries of hundreds of images that all need captions... which is why I fecthed this. Trying to display the thumbnail just wasn't coming through. I see there's support for image-attach and imagefield, but I'm using good old image nodes!

So after an hour tracing through where it was, and where it was supposed to be (image.module adds the thumbnail in form #after_build) I figured it out.
I see you've already got a few special cases for known, non-CCK field types, so I did mine there.
Patch attached.
There's probably a slightly better way to do it - it's NOT editable, but it is at least previewable now.
Looks OK?

AttachmentSize
editview-imagenode-patch.gif27.06 KB
editview-image-node-thumbnails.patch1.23 KB

Comments

#1

Status:active» needs review

patchy!

#2

Is there any chance of a D6 version of this patch?

#3

Hi stopbox,

This is definately possible.

I will add the functionality to the dev version as soon as I get a chance.

I'll post back here when it is in the dev version.

#4

Thanks Agileware,

#5

I have found the relevant code in the editview/theme folder (I'm just not skilled enough to know what to change!)

<?php
/**
* Implementation of hook_field_form_render().
*/
function editview_field_form_render(&$form, $field) {
 
$element = array('class' => 'editview-field', 'valign' => 'top');
  switch (
$field->field_alias) {
    default:
     
$vocab_id = str_replace('term_node_', '', $field->table_alias);
      if (
is_numeric($vocab_id)) {
       
$element['data'] = drupal_render($form['taxonomy'][$vocab_id]);
      }
      else {
       
// If the field is a cck field, send throught the right identifier.
       
if ($field->content_field['field_name']) {
         
$element['data'] = _editview_form_field($form, $field->content_field['field_name']);
        }
        else {
         
$element['data'] = _editview_form_field($form, $field->field);
        }
      }
      break;
  }
  return
$element;
}
?>

#6

Version:5.x-0.3» 6.x-1.0-beta1
Status:needs review» needs work

Is I don't think this made it into Beta 1, is there any chance you could take a look?

#7

Oops sorry about that. Will get it in really soon.

#8

Created a patch against 6.x-1.0-beta1, also applies on dev version at the moment.

AttachmentSize
editview_theme_inc.patch 649 bytes
nobody click here