Think it would be meaningful to use the thumbnail as a link to the ipaper node...
Can it be done in the 5.x-1.0 release?
I will take a look at the .module file..but i'm not a coder...
Thanks
Da.

Comments

planctus’s picture

Ok, i made by myself....
i write down what i've done just in case someone will look for this feature:
i simply overwrited the function theme_ipaper_thumbnail in the template.php file of my theme.
I've changed this line:

$output = '<img class="ipaper-thumbnail" src="'. $href .'" title="'. $hover .'">';

to add a link to the node id, like this:

$output = '<a href="/node/'. $node->nid .'" title="view the full article"> <img class="ipaper-thumbnail" src="'. $href .'" title="'. $hover .'"></a>';

I'm keeping this feature request open just because i'd like to show that link only for those who have the ipapers view permission and this need a little bit of coding....i'll try to do this, but i have a very little php knowledge.
Thanks
Da.

planctus’s picture

This is the way i got it working.
If the user has the view ipapers permission the thumb will act as al link to the ipaper full node view,
if not it will show a message when hovered.

function garland_ipaper_thumbnail($node) {

  $path = _ipaper_get_thumb_path($node->doc_id);
  if (file_exists($path)){
    $hover = "Thumbnail of $node->title";
    $href = file_create_url($path);
  }
  else{
    $href = url(drupal_get_path('module', 'ipaper') .'/empty.jpg');
    $hover = t("Thumbnail not yet available");
  }
if (user_access('view ipapers')) {

 $output = '<a href="/node/'. $node->nid .'" title="view the full article"> <img class="ipaper-thumbnail" src="'. $href .'" title="'. $hover .'"></a>';

  return $output ."\n";
}
else {
 $hover = t("Abboanti alla rivista per vedere l'articolo completo");
 $output = '<img class="ipaper-thumbnail" src="'. $href .'" title="'. $hover .'">'; }
 return $output ."\n"; }

Da.

rares’s picture

Status: Active » Fixed

thanks for the patch. this feature will be included in release candidate 1, which is coming out today.

Status: Fixed » Closed (fixed)

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

rares’s picture

Version: 5.x-1.0-beta » 6.x-1.0-rc2
Status: Closed (fixed) » Active

I've made them links but in my browsers you can't really click on them unless there is no body text. Can someone with knowledge of CSS advise?