I use and rely on the category module and I have ported the image gallery to be use with the views module.
This is a seperate module to sit alongside the existing image gallery module in the contrib folder.

CommentFileSizeAuthor
#2 views_gallery_0.module1.99 KBNGRhodes
views_gallery.module1.99 KBNGRhodes

Comments

Tobias Maier’s picture

Status: Needs review » Needs work

is it possible to rebuild the whole image gallery with views?

could you please provide a default view
a readme is needed

some code errors
* the css file does not exist
--> the default one of image_gallery.module is enough: replace the line with:
drupal_set_html_head(theme('stylesheet_import', base_path() . drupal_get_path('module', 'image_gallery') .'/image_gallery.css'));

* line 43: the <h3> is missing:
$output .= '<h3>'.l($node->title, 'node/'.$node->nid)."</h3>";

NGRhodes’s picture

Status: Needs work » Needs review
StatusFileSize
new1.99 KB

Hi

Yes, it is possible to recreate the galleries with views (with or without category module), the only issue is that you do not get the pretty category display (with a single thumbnail next to each category), as the views module really only works on displaying nodes and nothing else, you need another module to display the categories (eg taxonomy_context or category modules).

Could you please explain what you mean by please provide a default view, do you mean instructions of how to create a view formatted as a gallery (in the readme) ?

What else would be needed in the readme, install instructions ?

Code changes are done.

Bèr Kessels’s picture

-1 for this.

1st: shazamgallery already contains all the views definitions for image galleries.
2nd: image module should not get involved in gallery-management. Not in views, not in taxonomy-based-galleries, not in other stuff. Just not at all.

NGRhodes’s picture

In reply to 1: this was design to be a simple gallery port, Shazam gallery aims to be a fully featured gallery IMHO different aims.

In reply to 2: do you think the image gallery that comes with the image module should be moved out as well ? I am providing an alternative way to use this gallery (as I dont use taxonomy any more).

Should this be a stand alone module then (I dont mind if it is part of the image project or not), just that maintenance would be easier if part of image - changes in the gallery that comes with image could be easily reflected in what I have created.

Cheers, Nick

Bèr Kessels’s picture

«Should this be a stand alone module then (I dont mind if it is part of
the image project or not), just that maintenance would be easier if
part of image - changes in the gallery that comes with image could be
easily reflected in what I have created.»

IMO: yes.

A lot of people have made code and added their +1s to that for removing the gallery from image module. AFAIK walkah agreed on this route, but just needs others to actually Do It. ;)

gordon’s picture

I don't think this is needed anymore, as the image module now has native views integration.

see http://drupal.org/node/67265

Someone may want to close this.

walkah’s picture

Status: Needs review » Closed (duplicate)

closing as a duplicate of : http://drupal.org/node/67265