Jump to:
| Project: | Node Gallery |
| Version: | 6.x-3.x-dev |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | postponed |
Issue Summary
The project homepage has a bit on the D7 version status - search for #D7CX.
New thread to escape the spamming.
If you don't have anything helpful to add to this thread, you're free to subscribe, but please don't post any harsh requests or your opinion on how late to the game we are. This is a spare time open source effort, not a paid business project.
Some (perhaps) useful information from the old thread:
#10: scroogie
The porting doesn't come for free, especially because modules that build the fundament of node gallery have changed heavily. The Database API, File API, CCK inclusion and change to Field API, imagecache inclusion, render array changes, etc. imply a *lot* of work.
#11: justintime
Don't forget that all the batch API stuff will need refactored as well.
#12: scroogie
True true. The update page is really insane this time: http://drupal.org/update/modules/6/7
On the other hand, there is a lot to look forward to as well. :)
#13: scroogie
Yesterday I read up on D7 a bit. I read through that update page for example. Some of the changes I didn't expect (permission specificiation, nodeapi, etc.). Will be even more work than I thought. Just to keep it on the radar, it would be great if we could make the Gallery <-> Image relationship a proper Drupal object in the D7 version. It bugs me that it's not a real field in D6. Perhaps something reusable comes out of http://drupal.org/project/relation
Otherwise we can check how taxonomy is implemented in D7.
#14: dddave
Just as a heads-up in case you haven't seen it already: http://boombatower.com/blog/new-online-tools-porting-your-module-d7
#20: scroogie
I'd like to keep this postponed, so we can drop some notes and thoughts here now and then. There are many articles about D7 right now, which might lead to ideas we can build upon later.
To reinforce the point in #13, I really think we should employ the entity/bundle concept that Drupal 7 introduces. There is many related talk. I hope it's okay if I store some links here:
Drupal Entities - Part 2 - The what, where and when of Entities
Drupal has some (entity) relationship issues
How Drupal 7 Fields are changing the way you write modules
The message module might be a good example for a module ported to entity API https://github.com/fago/message
#23: scroogie
A 6-3.0 version of Node Gallery is not far out at all. We only have a clear picture of how our versioning should go. We have some things to straighten out before we release a beta version, which is really close. This is only because we don't want beta versions to break because of new functionality or showstopper bugs. This doesn't mean that 3.x-dev is currently unstable. Versioning isn't linear. In my opinion, we're just two issues away from beta. You can follow our development here: #687848: Status of Node Gallery 3.x.
After that, we only have documentation and testing that seperate us from a final release. The community can really help us with that. It's easy to write a small paragraph of how you can create a certain configuration or type of gallery, but it's exactly what we need right now. Once that is done, we can concern ourselves with the 7.x version. So the more people help, the faster it will go.
On a more general note, the work on a 6.x version is not lost in terms of Drupal 7. We learn a lot while developing 3.x, which will directly improve the version for D7. As already mentioned, the D7 version will also require some architectural rethinking, which might depend on other modules. E.g. http://drupal.org/project/relation doesn't have a release at all yet.
#24: justintime
Just some notes to store for later when we actually have time to look into D7:
I tried using Jimmy's sweet update tool at http://upgrade.boombatower.com/ but it produced an empty tar.gz. I emailed him, and got this back:
The error occurred because you have a reference to imagecache_presets() in
your hook_theme(). Coder Upgrade does a PHP eval() on this hook to get back
the theme items. This is an admittedly opportunistic approach which usually
succeeds but fails in this case.I commented out the foreach loop with imagecache_presets() and reran the
module. The output is attached. You can do the same and rerun it on the
upgrade site (if you want).
So, we just need to comment out that foreach to get the tool to do it's thing.
Comments
#1
So the reason I'm updating this is that I had some (recently quite rare) spare time today to invest into Node Gallery. Out of curiosity, I invested this into D7 after updating the issues of NG3.
I thought about the issues we have had in NG3, and how we could further improve on our way to NG for d7. Here are some unordered comments:
- Field API should facilitate a lot of stuff for us: creation, modification, display, etc. Particularly, I hope that the manage images page will be easier to implement.
- The big point: I'm not sure that Galleries should be nodes in D7. I'd expect more advantages if we implement them as entities. The Entity API module makes implementing entities nearly as easy as defining node types. We would also escape some problems, e.g. how to handle revisions, promote to frontpage, sticky, date changed, translation, embedding the view, hierarchies, the cover image and so on. With a custom entity, we would have the freedom to create this in a clear way (with Entity API helping us to avoid code duplication). The model also gives us some nice flexibility, e.g. with the View modes and entity metadata, to let the Cover act nearly as a field, and to allow embedding a slideshow of the gallery through view modes.
Of course we would need to brainstorm this before we actually invest in that direction, as I don't have enough experience in D7 yet either. But I can imagine the following: NG defines galleries as a custom entity, and the relationship is replaced by a bundle called 'Gallery Type'. The Gallery Type holds all information that the relationship held until now, and is of course fieldable. In particular, it holds the settings for display, view, and the allowed node types that can act as "items" of this gallery. On installation, it creates a default gallery type for images, same as now in D6, but users are free to create gallery types for arbitrary node types, e.g. exploiting the media or video module. I'd in fact think that we would build in some additional functionality for media module galleries, but this could go in at a later point.
#2
Subscribing. Thanks for opening a new thread. The old one was < useful.
#3
yay Drupal developers!
#4
Subscribing.
#5
Subscribing.
#6
Subscribing.
#7
+1 :)
#8
subscribing
#9
Subscribing...
#10
Subscribing - Can't wait, thanks for all your efforts guys.
#11
btw what happened to this: #684706: Collaboration with CCK Gallery for Drupal 7?
#12
Subscribe.
#13
Subscribing
#14
Subscribe
#15
subscribing
#16
Subscribing
#17
subscribe
#18
subscribing
#19
+++
#20
Yay ! +1000 for a NodeGallery for D7 module ! That would be just the perfect module for the art community website I have to build.
If you need any support, even financial, let us know.
#21
If I'm following your train of thought in http://drupal.org/comment/reply/1087730/4191352#comment-4191352 correctly, wouldn't this module become a copy of Media gallery module?
#22
@Scott J - IIRC, Media gallery module implements the structure of "Gallery as a node, media as fields on the gallery node". Node Gallery, as indicated by the name of the module, implements "Gallery as a node, Image as a node". There's a lot of things you can do with a node that you can't do with a field.
All that being said, we need to wrap up version 3 for D6 before we even start to think architecture for a possible D7 module.
#23
subscribing
#24
subscribing...thanks+++
#25
Sub
#26
sub.
#27
Subscribe (and might I add, thanks for closing the old thread!) :-)
#28
sub
#29
subscribing
#30
+1
#31
Subscribing, having a D7 version would really be amazing!
I'm not the best at programming for Drupal, I'm better at just normal programming in php, but if I can help just let me know
#32
subscribing. When each image has exif data field-galleries don't help. The only solution is to have a node-gallery, where each image can retain all exif data which can be accessed as needed. If I could code I'd help. Good luck.
#33
@mooselimb
Sure you posted in the correct issue??
edit: I do have my own D7 install now so I am becoming more and more interested in a D7 version.
#34
@dddave just expressing my use-case. A node-gallery for D7 where I can still use my Content-Type-fields (such as EXIFs) would help a lot.
#35
+1
#36
+ 1, I would definitely like to see a D7 version of this great module!
#37
Perhaps some D7 text on the module's main page would be in order, just a sentence about the state of D7 and the maintainer's restated thoughts on the matter. Here paste this:
D7 Version
Node Gallery is currently D6 only, with no D7 module in the works just yet. When NG 3.x is fully stable and developed, we will consider working on a D7 version. Until then, please see #1087730: Node Gallery: Drupal 7.x version for any updates or progress.
#38
Hope to see the D7 branch soon. As D7 has gone to the 4th release, many users old or new would use it.
And lots of modules would focuse on the development of D7, while less on D6 version.
#39
sub
#40
+1
#41
I would like to check out media_gallery but this currently doesn't work media 7.2x. So I cannot say if there is already a killer gallery solution for D7. Meh.
#42
There is some interesting development in D7 with http://drupal.org/project/file_entity and http://drupal.org/project/relation
#43
Subscribing
#44
subscribing
#45
sub
#46
subscribing
#47
+1
#48
sub
#49
+1
#50
subscribing
#51
Is this abandoned? I don't see anything being done. I thought there were donations on this and I don't see that anymore. Need to know. Have several sites that use node gallery.
#52
NG isn't abandoned. justintime is taking some time off to recharge his batteries. ATM it wouldn't be a good time to start with NG for D7 as we have to see how media module becomes stable (huge sprint ongoing atm). Media module is the most important and advanced media handling module for D7 and we have to see how NG can fit in.
Btw: There were never any donations for a D7 version.
#53
Hi,
Since it looked like there wasn't going to be a drupal 7 release of this module any time soon and I did need something like this I wrote a very simple module myself. It is definitely not fully finished, a lot of polishing needs to be done, but it works nonetheless.
It works fairly simple:
1) You create a content type (needs to be done programmatically, but isn't yet right now) for the album containing the media. There needs to be a field in the album content type to which the images would go (and hopefully videos in the future as well).
2) You create a content type (also needs to be done programmatically, but isn't yet right now) for the media itself. This would need the reference module to reference the album which it is part of.
3) You create an album and upload all the images that are part of it
4) The module removes all the images from the album, creates new nodes containing the images and links them to the album.
5) Using views you can create your own nice album with images as nodes.
The code I used for this:
<?php
/**
* @file
* Aids in creating a media album with the media as nodes
* Created by Yorian
*/
/*
* Implementation of hook_node_presave()
*/
function yorian_media_album_node_presave($node){
if($node->form_id == 'media_album_node_form'){
$field = $node->field_album_media;
$images = $field['und'];
$fids = array();
foreach($images as $image){
$fids[] = $image['fid'];
}
$images = implode(', ', $fids);
$node->field_album_media = array('und' => array());
$image_data_sql = 'SELECT
fid,
uid,
filename,
uri,
filemime,
filesize,
status,
timestamp,
type
FROM
file_managed
WHERE
fid IN (' . $images . ')';
$image_data = db_query($image_data_sql);
$images = array();
foreach ($image_data as $row){
$images[] = array( 'fid' => $row->fid,
'uid' => $row->uid,
'filename' => $row->filename,
'uri' => $row->uri,
'filemime' => $row->filemime,
'filesize' => $row->filesize,
'status' => $row->status,
'timestamp' => $row->timestamp,
'type' => $row->type);
}
variable_set('media_album_image_data', $images);
}
}
/*
* Implementation of hook_node_insert
*/
function yorian_media_album_node_insert($node){
if($node->type == 'media_album'){
$images = variable_get('media_album_image_data', $images);
create_image_nodes($images, $node->nid);
}
}
/*
* creates the nodes containing the images
*/
function create_image_nodes($images, $node_ref_id){
$base_path = '/sites/default/files/';
foreach($images as $image){
$path = $base_path . $image['uri'];
$filetitle = 'test';
$filename = $image['filename'];
$node = new StdClass();
// A lot of work needs to be done to make it work a lot nicer, it works for now
$node->title = $image['filename'];
$node->uid = $image['uid'];
$node->status = $image['status'];
$node->type = 'media_item';
$node->language = 'und';
$node->field_media_item = array(
'und' => array(
0 => array(
'fid' => $image['fid'],
'filename' => $image['filename'],
'filemime' => $image['filemime'],
'uid' => $image['uid'],
'uri' => $image['uri'],
'status' => $image['status']
)
)
);
$node->field_media_album = array(
'und' => array(
0 => array(
'nid' => $node_ref_id
)
)
);
node_save($node);
}
}
?>
As I said it is very crude code which needs quite a bit of work to make it work nicer, for the meanwhile I hope this helps the ones in need of a gallery with the images as nodes.
#54
Do I understand sth completely wrong on D7 ? I didn't read any word about entities?
Sorry 4 asking ...
#55
+1 for concentrating on media module
#56
+1.000.000 (for a drupal7 version of this module)
#57
For anyone that didn't see my blog post to Drupal Planet: http://sysadminsjourney.com/content/2011/10/19/its-not-you-its-me-call-n...
#58
re: media_gallery, got it to work - see http://drupal.org/node/1244204#comment-5240950
#59
Subscribing
#60
Looking for D7 version of node gallery.
#61
Subscribing. Looking for D7 version of node gallery too.
#62
I am a big fan of node gallery for D6. I look forward to seeing its D7 release, and want to thank those working to make this happen.
#63
Just hope to see 7.x release...
#64
I'll be releasing a feature in early march that attempts to fill this GAP for 7. Its build on features, ctools, references, views, plupload and rules.
I'm still working out the bugs and fine tuning css etc. but here are the features I've had a moment to get in there so far.
---- Image galleries and images are entities
---- sort the order of your galleries (AHAH)
---- add images to galleries. single image for or drop and drag many files using plupload.
---- different gallery view modes selected on gallery creation/edit. This will require jqfx, imageflow, galleria, and nivo slider
---- select cover for galleries
---- Order images within a gallery (AHAH)
Unfortunately you won't be able to set multiple gallery image relationships from the start. I'm not very Savvy with build out drupal administration screens. I'll get it out asap but I'm only able to chug away at it a few minutes a day and in coulpe hour blocks on the weekends.
#65
Hoping for a D7 version of the great module!
Thanks to all who will input time and efforts to make this happen.
#66
+9
#67
Subscribing
#68
Every time I go looking for an answer to an upgrade of my site in D5 (http://www.nicaliving.com) to D7 I get stuck on the gallery issue. I see D6 as a dead end and converting what I have to something in D6 seems like just creating a future mess to deal with.
There seems to be a lot of interest in this module. What would it take to get someone "inspired" to do the work? While I could do it, it would be a lot of D7 internals learning that I really don't need to know for anything else. If someone came forward where this work would fit into their "life", I expect we could raise some $ to help "inspire" them.
#69
I agree with #68, the Node Gallery module is extremely useful and sorely missed in Drupal 7, there is really nothing out there still to replace it, which is a major shame.
I too think there should be enough people willing to pay to see this module competently ported to D7, how to go by in finding somebody competent and willing to do it I am not sure though.
Maybe the porting of Node Gallery to D7 could become a Google Summer of Code project for some talented individual? I don't know if it would be too late for 2012 or how to find somebody that can do it, maybe there is somebody following this issue with good connections to push this through?
#70
Okay, I see that the GSoC 2012 projects were just now announced, so that's out of the question.
#71
Good news! There is a man who willing to port module to D7, and even done some work for it: http://drupal.org/node/1530764
#72
fyi, another great alternative to node gallery is field_slideshow. im using that in replacement of node gallery and provides pretty much the same features.
http://drupal.org/project/field_slideshow
let me know if you found it useful or not.