Posted by Black_MDK on June 17, 2005 at 10:42am
6 followers
Jump to:
| Project: | Gallery |
| Version: | master |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
I believe there where some major changes in a way how gallery2 works in recent couple of weeks. As result of this changes Drupal integration is broken. Drupal integration is using [“layoutData”] [“itemLinks”] [“Url”] to build actions menu but by the looks of it this does not exist any more. Can somebody correct me if I’m wrong or confirm this.
Comments
#1
I can confirm this. See http://drupal.org/node/24531
Basically if you use Gallery2 Beta3 instead of a CVS build, the Gallery Navigation Block will work.
#2
I've hacked something back into submission for this. Instead of the "proper" approach of parsing all the items into a real menu, I just grab the actual sidebar content. It doesn't look pretty (there's some extra stuff in there), and it's not properly integrated, but at least it displays.
In function gallery_block, near the end of the '0' case:
[.....]
$block['subject'] = t('gallery');
$block['content'] = theme('item_list', $list);
}
}
// DJS - hack sidebar back into the sidebar
$SBdata = GalleryEmbed::handleRequest();
if (isset($SBdata['sidebarBlocksHtml']) && !empty($SBdata['sidebarBlocksHtml']))
{
$block['subject'] = t('gallery');
$block['content'] = '<div id="gsSidebar" class="gcBorder1">' .
join('', $SBdata['sidebarBlocksHtml']) . '
</div>';
}
// end DJS
break;
This came, essentially, from a July 15 posting in this thread: http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&t=2395...
Also note in there the change of "ShowSidebar" to "ShowSidebarBlocks," to hide the integrated sidebar within the content window (so you only have albums/items embedded, not an entire gallery window). Still haven't figured out how to drop the gallery title / path blocks, though.
This is with Drupal 4.6.2, current (April?) gallery.module, and current (this morning) G2 CVS.
#3
Further evidence that I'm just a hack: You have to add "_gallery_init();" just before the above-mentioned hack, otherwise it won't know where to find the GalleryEmbed class. Works just fine w/out it when you're viewing a gallery page, 'cause it's already got GalleryEmbed, but when the block code gets called outside of gallery, you're hosed and you don't get any drupal output. :(
I'll try and bring this up on the G2 integration forums at menalto sometime...there must be an "official" way to do this....
#4
For issues concerning Gallery Block causing this error:
Input Array does not match ?: SELECT DISTINCT g2_AccessMap.g_accessListId
Go here:
http://drupal.org/node/21290
#5
Hello,
having the same problem, I spent a while searching until I found your posts...
I think dschuetz has it cornered, thanx alot man...
about this code, you could improve it a little, by replacing
$SBdata = GalleryEmbed::handleRequest();with
_gallery_handle_request();since the interface with gallery is handled in this function.
you then eliminate the need for _gallery_init();
#6
hmm. can't even post correctly :)
you should of course read:
$SBdata = _gallery_handle_request();#7
Astroboy: I tried that, and it seemed to work, but I later noticed that it tried to put a messed-up gallery block on EVERY single page on the site. Not sure what was up with that, so I went back to my earlier hack. :)
#8
Please update the version of this module, drupal, and try again.
The gallery block is working fine with the latest cvs and this patch http://drupal.org/node/31398