I have set for my content types the images to be shown below the node.
I have correct settings on the Node Images config page.
My upload module is enabled.

I get no link to add pictures to my nodes, nowhere.

Comments

Chill35’s picture

Status: Active » Closed (fixed)

Ok never mind. Somehow it finally showed up. Weird stuff.

Chill35’s picture

Title: I can't get it to work. » Pictures are uploaded but they are not showable
Status: Closed (fixed) » Active

In the images properties, the links seem like the images should display, but the images are replaced with the broken icon.

For example :

In properties for a particular image, I get : http://localhost/drupal-5.0-beta2/system/files/nobomb_0.jpg

(I am using Private Download).

That file and its thumbnail do exist in my private folder. The image has been downloaded successfully and a thumbnail has been created successfully in the right folder.

What am I doing wrong ?

I am using Drupal 5 release candidate.

Any help would be much appreciated. This module is exactly what I need...

stefano73’s picture

StatusFileSize
new2.83 KB

I added the hook_file_download() to access image uploaded when download method is set to private. You can download either the cvs version 1.5 of the module or apply the attached patch against version 1.4.

Chill35’s picture

Thank you Stefano, I will try the patch and let you know.

Chill35’s picture

Status: Active » Reviewed & tested by the community

Hi Stefano, it works very well now. What had been uploaded before I can see now, but only when I click on 'Open the image gallery'. Is there a way to show at least 2 pictures at the bottom of the post when viewing the post as it says it will do in the module description ?

The first two images are displayed as thumbnails in the node view, below the node body

In my settings for my content types I have 'Show below node body' selected.

I have another question, which might be more of a feature request : is it possible through some minor code hack to NOT show the 'Open the image gallerly' link when there's no images attached to the node ?

Chill35’s picture

Status: Reviewed & tested by the community » Fixed
Chill35’s picture

Title: Pictures are uploaded but they are not showable » Pictures are uploaded but they are not showed
Status: Fixed » Reviewed & tested by the community

Stefano,

Here are the lines I changed in my own code, in the function node_images_link() for not displaying the Gallery link unecessarily :

if (!empty($node->node_images)) {
    $links['node_images_gallery'] = array(	
      'title' => t('Open the image gallery'),
      'href' => "node/$node->nid/image_gallery",
    );
}

It seems to work.

stefano73’s picture

StatusFileSize
new2.49 KB

The attached patch fixes #6 and #7. Can you try it and let me know if it works like you expect?

Chill35’s picture

I certainly will test away. Thank you for responding so promptly and thank you for all the work on this.

I love this module.

Be back soon.

Chill35’s picture

It is fixed!

No more "Open the image gallery" link when there is no node images.

Also, thumbnails are shown below the body or teaser when they are set to 'below' in Content Types, or they are show above the teaser when they are set to 'above', and they are not shown when they are set to 'Do not show'.
That works too, now.

The only thing left for me to test is this : Manually set in node template by variable $node->node_images

Maybe I can test this way instead : using "php code" as my input, I can try to put the image in the body of the node using that variable...? Is there some documentation on how to use your variable...?

In any case, that's a perfect fix. To be committed.

stefano, I also love that we can click pictures and they are show full size in a new window.

I love that module!

Thank you so much!

I will try it in 4.7.4 as well as soon as I find a way to get it from CVS.

stefano73’s picture

Yuo can take a look at the file node-example.tpl.php in the cvs tarball, it shows an example of node images added to the node template. It can be something like this:

<code>
<?php if ($node->node_images) { ?>
<td class="node-images" rowspan="2">
  <?php print $node->node_images ?><?php ?>
  <div style="text-align:center;"><a href="<?php print url('node/'.$node->nid.'/image_gallery'); ?>">Gallery</a></div>
  <?php }?>
</td>

stefano73’s picture

Status: Reviewed & tested by the community » Closed (fixed)