I have a site with thousands of ‘Photo’ nodes that each contain a single image in a field_image field

I need users to search and insert thumbnails of the images in textareas of forum posts, blogs etc. that link the thumbnail to the image’s Photo node.

IMCE and similar modules can view thumbnails, but the results link to the image file, rather than the node. They also require users to look through hundreds of folders/subfolders, rather than a simple text search.

Linkit's File plugin can view thumbnails, but the search is made on filenames that are usually something like img39284.jpg, and we need users to be able to search for all images about ‘sharks’, ‘eagles’, ‘birds’ etc.

Linkit's Node plugin appears to be a very close fit, as users can text search the node titles. They can then view the title and field_image filepath (using imagecache token and replacement patterns), and insert the node link in the textarea.

So essentially I think I need some sort of

  • Node_Image search plugin to Format search results that show node title and thumbnails of each node’s field_image field, and
  • An insert plugin that includes the thumbnail in the textarea as a link to the usual Node Target path

If any developer can help to put together the above, please contact me with info on how long and how much it would cost to develop.

Thanks

Stu

Comments

StuartDH’s picture

Issue summary: View changes

.

StuartDH’s picture

Issue summary: View changes

.

StuartDH’s picture

Issue summary: View changes

.

StuartDH’s picture

Just adding this from btmash from the recent closed thread - http://drupal.org/node/1072318

I'm attempting to get something like this up and running and while I have made some strides (I am not sure about how to make it more customizable (the best option I can think of is by using tokens and building that way) but as far as my search results go, this is actually working really well. 2 assumptions are made (aside from knowing how to package the plugin together):

There is a field called field_image
There is an image preset called linkit_thumb
You need change the field names/presets as needed but its working very well (

class LinkitPluginForImage extends LinkitPluginNode {
  function buildLabel($entity) {
    $label = parent::buildLabel($entity);
    $node = node_load($entity->nid);
    $images = field_get_items('node', $node, 'field_image', $node->language);
    if (!empty($images)) {
      $variables = $images[0];
      $variables['path'] = $variables['uri'];
      $variables['style_name'] = 'linkit_thumb';
      $label = theme('image_style', $variables) . $label;
    }
    return $label;
  }
}

So within suggestion 1, I have part 1 working. However, part 2 is quite confusing. I'm trying to figure out where/when which linkit_insert plugin is being called (as an FYI, this is for nodes). So any guidance on implementing a linkit_insert plugin and calling that implementation of the plugin would be appreciated.

StuartDH’s picture

Issue summary: View changes

Anyone else looking for a solution to this can now find it in the node embed module - https://drupal.org/project/node_embed - just change the included view to show image thumbnails and link to the image content node

anon’s picture

Issue summary: View changes
Status: Active » Closed (fixed)

No replays in over a year now.

I'm closing this.