Line 970 nodequeue module:


  $output = '<tr id="nodequeue-row-'. $node->position .'" class="nodequeue-row '. ($node->position % 2 ? 'odd' : 'even') .'">';
  if (node_load($node->nid)->type == "image") {
  $output .= '<td><img src="'. base_path() .'/image/view/' .$node->nid. '/thumbnail" /> ' . l($node->title, "node/$node->nid") . '</td>';  //this is where to put a preview of image nodes.
  } else {
  $output .= '<td>' . l($node->title, "node/$node->nid") . '</td>';  
  }
  $output .= '<td>'. theme('username', $node) .'</td>';
  $output .= '<td>'. format_date($node->created) .'</td>';
  $output .= '<td>'. $buttons .'</td>';
  $output .= '</tr>';
  return $output;

Could probably use some cleaning, for example checking that thumbnails exist (because they type may have been deleted). Probably better to grab the path from node object than assume it's location.

Comments/Reviews

Comments

neoliminal’s picture

Sorry, wrong line number. The function is:

function nodequeue_admin_view()

Line number 938

neoliminal’s picture

Version: 6.x-2.0-rc3 » 6.x-2.0
merlinofchaos’s picture

Why should we hardcode to a particular module? I would much rather expose a hook that lets this stuff be changed than hardcode to a module.

neoliminal’s picture

That makes sense. This is a very common use for nodequeue (images), but CCK image field, teasers or other content could just as easily be displayed in this way. Hard coded because it was the most expedient given my exposure to this module and my perceived desire of others for this feature.

merlinofchaos’s picture

Status: Needs review » Needs work

I definitely understand the use-case. A hook would be the most powerful, and let multiple use cases be addressed. I think ezra would commit a good patch that implemented a hook (and ideally also provided some documentation in the advanced help as well).

ezra-g’s picture

Status: Needs work » Closed (duplicate)

@neoliminal: Thanks for the thought here!

I agree with merlinofchaos that this should be more generalized than hardcoded in place. I'm marking this as a duplicate of #299111: Display CCK fields while manipulating a queue since these are basically the same idea. Please continue the discussion there :)!