Hi,

first of all: thx for a great module. IMHO the best gallery approach thus far.

What I am trying to do is to create several views for the existing images (top rated, most viewed, latest etc.)
I learned that views support is now integrated and I can even access the gallery image field.

However I am missing the option to set a different image size (imagecache preset) for the gallery images in views. Right now - as I understand it - you are basically stuck with using one of the presets (mainly thumbnail). For the views display (such as tables or latest images in profiles, blocks etc.) those presets are not usable because for most scenarios they are way too big.

So my questions is: Am I missing something or is the size of the image currently not available in views. If not - would this be an option for the future? Would enhance the flexibility in views tremendously.

Cheers in advance!

Comments

Golem07’s picture

2 additions to my views problems:

- Is there some way you can show both: an image and the gallery it belongs to in a view?
- View count for the node doesn't seem to work. At least it stays at "0" all the time here.

Rik’s picture

Hi Golem07,
1) I agree it would be nice to have a different imagecache preset but can't you not just scale the images down with css?
2) have a look at my Views example here http://drupal.org/node/639216 it displays the coverimage and title of all galleries.
3) Did you mean view image count? It works for me, you can add the field in the view example.

Rik’s picture

Golem07,
I created an issue http://drupal.org/node/643834 which might also be of interest to you.

Golem07’s picture

Thank you for the suggestion to use css for scaling the images. Works great! I haven't even thought about this possibility before. Still: In the long run a "proper" views integration would benefit node gallery. As it seems this is being covered though in the forseeable future as can be seen in the topic you have created :)

drupalido’s picture

How can I select the full size of an image on VIEWS ????

designwork’s picture

Assigned: Unassigned » designwork

I will have a look.

lonehorseend’s picture

Any update on selecting the full size image in views? I am using Views Slideshow, but I need the full size image to be displayed, not the thumbnail.

colemanw’s picture

Add my vote to this one: support for imagecache presets in views is pretty darn important. Thanks for a great module!

designwork’s picture

StatusFileSize
new4.05 KB

Hi All,

try this vwies handler please.

Dirk

fugazi’s picture

StatusFileSize
new51.58 KB
new120.13 KB

Node gallery images can be changed in views per image cache. What can I make the image 1 in image 2 goes. Sorry for my bad english, so the images.

Image 1 is
Image 2 is not

would appreciate a tip.

many greetings

fugazi’s picture

StatusFileSize
new60.1 KB

even a picture where the description is visible.

fugazi’s picture

I'm not as powerful of the English language and try to explain again the better.
Is it possible to use image cache by Views on individual images, just as it is for galleries? I wanted to create a block with the latest images, but all of this control by image cache. Node Gallery will remain all the settings for the galleries and images, but these are for the block is too big or small. I can shrink them is via CSS and not the nice way, because the images are distorted.

I would appreciate a tip because I think the super modules and would like to use for me. Thanks in advance and best regards

colemanw’s picture

@Dirk
Thanks for working on this. Could you please explain what's new in this views handler? I tried it, but the difference was not immediately apparent to me. I don't see any additional options in the views "Configure field Node Gallery Image" field. Thanks!

whatsnewsisyphus’s picture

For some reason, his code breaks my view but here's is what it does. I also used his methods in the new handler file, and it seems to work; I attached it below.

He has a function that grabs the relevant imagecache presets

if (empty($imagecaches)) {
    	foreach (imagecache_presets() as $id => $imagecache) {
      		$imagecaches[$imagecache['presetname']] = $imagecache['presetname'];
    	}
  	}
  	if (empty($imagecaches)) {
    	form_set_error('Node gallery config', t('There are no imagecache presets. <a href="@imagecache">You must create at least one preset</a>.', array('@imagecache' => url('admin/build/imagecache/add'))));
  	}

which are then loaded into an array

    $options[$gallery_type] = $imagecaches;

once you choose your imagecache setting, it is assigned to the $image variable

    $image = theme('imagecache', $config , $value->filepath, $value->title, $value->title);
whatsnewsisyphus’s picture

StatusFileSize
new3.83 KB

this is for alpha 12

fugazi’s picture

wonderful it works excellent thank you. is the node for gallery: image: image possible? fugazi

whatsnewsisyphus’s picture

Do you mean to display individual images unbound from their galleries?

fugazi’s picture

yes exactly like that, I would like to have pictures in one block views showing then on the picture.
my problem is I can change the size of the pictures only via css, although it would be fine by image cache. this is not only in image gallery. my english is very bad, I hope you understand me. Thank you very much. fugazi

http://drupal.org/node/613988#comment-2809030
http://drupal.org/node/613988#comment-2809044

whatsnewsisyphus’s picture

I understand, I will look into it when I have the time.

fugazi’s picture

It's very nice of them. Thank you very much

dddave’s picture

Handler in #9 works fine for me.

Handler in #15 throws an error:
array_merge() [<a href='function.array-merge'>function.array-merge</a>]: Argument #2 is not an array in C:\Users\David\Sites\acquia-drupal-site\acquia-drupal\sites\all\modules\node_gallery\includes\node_gallery_handler_field_gid.inc on line 71.

whatsnewsisyphus’s picture

which version are you using?

dddave’s picture

Sorry, I am using the latest dev. Overlooked that it was for alpha12.

dddave’s picture

Category: support » bug

For reference: #625528: Views completely broken: Using views field "Cover Image" etc. breaks your view, GID returns wrong data etc.

The views integration is pretty messed-up. At least we have a working handler to change the display of SOME pics (Cover images) but I don't see a solution for images in general. Or am I missing something here?

So if anybody is capable of fixing this (at least bring this into a decent state - the real magic is due for NG3).....(flowers and good karma at least).

fugazi’s picture

# 22 sorry I missed your question. I'm using 6.x-2.x-dev. or I was not meant. then sorry

joachim’s picture

Status: Active » Needs review
StatusFileSize
new1.67 KB

I've no idea what the file in #15 is meant to do, as it appears to be on the wrong handler!

The "Node Gallery Image: Image" field is node_gallery_handler_field_fid, not _gid.

Here's a patch.

I've added a new option, because I have absolutely no idea what the 'Image List View Mode' option is meant to be -- its description tells me nothing.

fugazi’s picture

ohh that's great, it's beautiful. it works and is in the insert. only now is not more imagecache for galleries. as before in # 15. Thanks

dddave’s picture

Assigned: designwork » Unassigned

Seems to work, although I get warnings like
warning: array_merge() [function.array-merge]: Argument #2 is not an array in C:\Users\David\Sites\acquia-drupal-site\acquia-drupal\sites\all\modules\node_gallery\includes\node_gallery_handler_field_fid.inc on line 86.

Until now I am only testing it with existing views (from the docs: Covers and Random). Might be due the "old" code used by them...?

justintime’s picture

@dddave - try editing the view, and reconfigure the field that is the image size field, then save.

fugazi’s picture

#26 it can still be changed so the imagecache also works for galleries. Then I may, on the Embed the page, because that is exactly what I was looking for. Thanks

fugazi’s picture

Subscribe

dddave’s picture

This patch is working fine with new views. I cannot get it to go with imported views from the docs but I really don't want dive into it. From my perspective this is good to go.

pkcho’s picture

Sorry for the dumb question, but how do I apply patches to a module?

Also, I have attempted to update the file that is supposed to change the views handler and I didn't see anything different. I'm looking for more image cache options so I can display my gallery photos with sizes other than "cover" view and "teaser" view.

Thank you.

dddave’s picture

dbeall’s picture

StatusFileSize
new4.21 KB

I don't apply patches the easy way, but you take out the lines with a -, and add the lines with a +.
attached is the patched file. (remove the .txt)

I have not had any results with this patch yet,, but It takes me a while to get things working, give me a few days or a week to figure out why it's not workin.

pkcho’s picture

Thank you for your response (DDDave as well).

I want to make sure I understand what I need to do.

1) Do I need to follow the instructions provided in the link in comment #34 as well as what you mention about the - +?
2) I'm not quite sure where I would find the file with these "-" lines to replace with "+"?
3) The node_gallery_handler_field_fid.inc file (that isn't quite working yet), do I simply just replace the old one with this one?

Thank you.

joachim’s picture

If the instructions at http://drupal.org/patch/apply are not sufficiently clear, then this is a flaw in the documentation: please file an issue on that. You can also ask on IRC where people are usually happy to help.

mjohnq3’s picture

@Signal

This is a fairly simple patch that you can apply by hand, as dbeall mentions he does. Setting up a patching environment on your computer will take much more time than patching by hand, in this limited case.

1) The patching instructions (patch < file.patch) take the changes in the patch file (.patch) and automatically apply them to the module file that requires patching.

2) The file you would use to patch is the one in #26 above: 613988.node_gallery.views-image-field-imagecache-size-option.patch. If you do it by hand, the lines of code in the patch file preceded by a "-" sign are removed from the original file; the lines of code preceded by a "+" sign are added.

OR:

3) Replace the original node_gallery_handler_field_fid.inc with node_gallery_handler_field_fid.inc_.txt (from #35, above) after removing the .txt. extension.

You need to do one or the other but not both to get the latest changes.

fugazi’s picture

# 35 thanks it works. without Link to this field does not exist.

pkcho’s picture

Thank you, mjohnq3. That's exactly what I needed to know.

colemanw’s picture

I just had time to take the new views handler in #35 for a spin. It's so great! I love the ability to choose imagecache settings in the view.
I recommend rolling this into the next NG2 beta.

However, there still seem to be bugs. Here are some that I've noticed:
- Using field: gallery cover image breaks the view completely
- To show a gallery's cover image, you need to know the secret password: Gallery ID.
- But adding Gallery ID field to your view of galleries causes all the other fields to incorrectly think the gallery's nid is the nid of the cover image, causing screwy behavior of links, etc.

fugazi’s picture

can someone help me, I still can not link the image to his contribution. someone has a tip. Thank you very much

Sorry for my bad english

vijay_dubey’s picture

Version: 6.x-2.x-dev » 6.x-2.0-beta2

thanks dbeall and others for working on this issue...

i am desperately looking forward for NG3 release ....currently i am using ng beta2. Most of the features are as desired but i am stuck with few things.

1. As pointed out by fugazi above, all the above mentioned handlers dont work as they should be (atleast for beta2) ; even if you get to choose
imagecache presets,thumbnails(or whatever is the imagecache preset) dont link back to their respective nodes.In other words imagecache
dont create click-able images.This is a must to have feature. If anyone knows any workaround for making it work.Please do share here with
us.

2. There is no option for creating a shared gallery (i have seen a workaround for this in one of the handbooks,yet to test it).

Thank you

fugazi’s picture

#43 Subscribe

jjoseph’s picture

Thank you so much #26!! It came out well! However the links to the gallery or the lightbox no longer work.

ayalsule’s picture

#26 worked for me

dddave’s picture

@justintime

Are you planning to release a NG2 version with #26 included? If not, please close this issue.

justintime’s picture

Status: Needs review » Closed (won't fix)

Nope, if I commit one more patch to NG2, then that opens to doors to commit more patches that fix bugs created by the original patch. NG2 will only get another commit if there's a security issue now that NG3 is recommended.