There was some code preparation to offer the gallery navigator as a block (without views).
We can either fix this in hook_block or create a block display in views for that.

I tried the first option out, reusing the preprocess function for an alternative template. Works well, but I'm not sure this is the desired way. I think this could also be implemented with Views, perhaps as a display plugin. Didn't seriously think about that, yet, just opening the discussion.

CommentFileSizeAuthor
#1 ng3-image-navigator-block.patch5.68 KBscroogie

Comments

scroogie’s picture

StatusFileSize
new5.68 KB

Here would be the code for the 1st alternative.

justintime’s picture

I applied your patch, but was unable to get the block to display. It did show up in the list of blocks, but I couldn't see the block at any point. I did clear all caches, and was looking for it from an image page.

However, I just thought of a killer feature. If we could make relationships of Previous Image, Next Image, First Image and Last Image for views, then people could completely build their own navigator blocks from scratch, even displaying thumbnails and whatnot.

Thoughts?

scroogie’s picture

That's a core bug. I never found out exactly what you need to do. Probably need to reinstall the module. It makes testing blocks very hard, I know.

justintime’s picture

Found the problem. It was configured to show on all pages *except* node/*, which is the only place it works.

That said, it's okay, but it has two things not going for it:
1) It's duplicating functionality of the current navigator "bar", but my perception is that the navigator "bar" is less intrusive and takes up less real estate than the block
2) It's not very user configurable.

Let's scratch this approach unless you think you can make it work. I'm more a fan of views-based blocks. What do you think about the relationships idea?

scroogie’s picture

Yeah that is exactly the bug. As you can see in the code, it's *not* configured to show on these pages. Drupal just saves these settings somewhere in the system table.

1) Yes true. It would be only for people that want to put the navigator somewhere else, e.g. if they organise their pages with panels. The alternative solution would also duplicate functionality, or not?

2) It's not configurable at the UI level, only at the template.

About the relationship idea. Wouldn't it be enough to have a view that takes both a gallery id and a node id? In that case you could fetch all images of the gallery and still know which image you are at. You just need to play in the array then to get all other information.

How would it exactly work with having relationships? Would you pass the node id only, and then put the relationships in? What would be the view there for? I mean, if you display only one node anyway. Perhaps I'm missing something here.

justintime’s picture

You would pass the current node id in, and then, using the relationship, you could get *any* field off of the related node. So, you could display the title, imagecache thumbs, or anything on the related nodes of the next and previous nodes in a block. Just like how the parent gallery relationship allows you to get at anything on the parent gallery within the scope of the current image.

Does that make sense?

scroogie’s picture

No, not yet.

The parent gallery relationship is used on the image views, to which we pass the gallery id. The view retrieves all images inside that gallery, and retrieves the parent gallery fields over the relationship with the argument passed. Then you can decorate *every* image with fields selected through that relationship, but you cannot print that globally, or not?

What would you now do with the relationships for the navigator? You would have to create a view that just displays the one image, right? Or a view that display nothing except for the navigator?
If you use a view that display the whole gallery in single images, you can directly use the Views pager! Why would you need seperate relationships then?

justintime’s picture

I'll put together some POC code. An example view is worth a billion words :)

justintime’s picture

Well, it doesn't seem like what I want to do is quite possible: http://drupal.org/node/976774.

I think at this point we should just yank the current block stub code and not plan on creating a Navigator block until we get a few feature requests for it. I can't think of what a nav block would be useful for frankly. I'm afraid we'll spend a lot of time developing something that no one uses, or everyone thinks should have been done differently.

I could see maybe a block with a vertical jcarousel in it, but that belongs in it's own module, not in NG core.

Thoughts on marking this as postponed?

scroogie’s picture

Yeah. It's only 20 lines of easy code anyway. If we get a request, we can still pull up this patch. So I agree.

justintime’s picture

Status: Active » Postponed

Removed the code and committed to dev.

fastforward’s picture

Hallo, justintime! Hallo, scroogie! Just applied the patch. It's really Amazing! You are Genius! But the right implementation of the idea is - moving Node Gallery jCarousel in block. Like it done at Flickr. With this powerful feature the Node Gallery become #1 Gallery solution in Drupal. Now everyone can launch his/her own full featured Flickr (or even beat it)! Just do it, guys. Please! Probably remain a couple of lines! But it will be a huge step forward for the Node Gallery. Believe.

fastforward’s picture

Regarding use of navigator in block. In my gallery I set such presets which enables visitors to view images in high resolution. But at the same time image (viewing with anchors) occupies all the space in the browser window from top to bottom. Accordingly, there is no way to place a standard navigator within sight of the user. In such case the block-navigator is simply irreplaceable. In pair with default navigator (I make default nav small and invisible) it provides an excellent opportunity to move through the gallery using the arrow keys with great possibility contemporaneously use classic links: first, previous, next, last, which appears in sidebar. In terms of usability it's just cool.

scroogie’s picture

Status: Postponed » Active

Well, justin and I didn't discuss this further, but as I said in #10 we can easily implement a block. Only the template would need some love.

Reopening to get some feedback.

justintime’s picture

While I understand the request for the navigator in a block, it seems more natural to me to offer node_gallery_jcarousel in a block -- it lends itself to vertical orientation much better IMO.

But if the users truly want text-based navigation in a block, it should be pretty doable.

fastforward’s picture

Right now I trying to manage this (carousel-in-sidebar) challenge with styles like:

.jcarousel-skin-tango {
  position:absolute;
  left:640px;
  top:150px;
}

It's possible, but block will be much more better, sure.

Vertical carousel is good as an option. But horizontal - much more convenient. The best solution - give user everything he needs, not forcing him to engage in excessive search (or resort to scroll the screen, there is one and the same). The best solution - give the user everything he needs at first screen. Vertical carousel will take place, which could accommodate perhaps 3 blocks. In this case user will receive much less on the first screen, than he would receive with horizontal carousel. He will have to scroll the screen more often. And it's definitely not good user experience. Of course, it's possible to solve this problem by extending the center (content) column. But it will be ugly template.

If we take 640 x 640px as a basic preset (as on Flickr) with a total fixed width 960px (as in Zen), we have two columns: 640 and 320px. Applying 60 x 60px preset to our carousel, we can easily place a horizontal 5-items carousel in sidebar. At the same time, text-based navigation in separate block surely will be additional significant advantage.

P.S. Speaking of navigation, NG definitely beat Flickr with amazing "Named Anchors" feature. It's really cool. This is the most convenient way to move among images that you can think of.

scroogie’s picture

fastforward: A horizontal carousel could easily be implemented with the use of jcarousel!

I have to admit I didn't think of it. Indeed its suited very well for that task, and it's nicely integrated with NG already. Should I create a patch for it?

fastforward’s picture

Thank you so much, Scroogie! But the JCarousel (as_is) is absolutely useless when it comes to the galleries, which bringing together more than a dozen images, not to mention the hundreds. The JCarousel does not provide by default the MOST important function, without which any carousel, in my opinion, did not have the slightest sense. In short, the JCarousel does not show the current image. Therefore it's useless, as a car without a dashboard.

I think the NGJC - the only module for Drupal, which provides a carousel with an indication of the current image. And this is a HUGE plus for the Node Gallery.

And, of course, it would be Great (!!!) if you could implement NGJC in block (or change the JC so that it displays the current image). This would add tremendous value to Node Gallery, in particular from the perspective of developers who have no programming skills. Thank you in advance ))

dddave’s picture

Yummie! That sounds like a awesome feature.

justintime’s picture

Status: Active » Postponed

Very well then - let's move the jcarousel discussion over to the Node Gallery jCarousel issue queue.

zengenuity’s picture

Status: Postponed » Closed (won't fix)

At this point, I won't be adding new features to the D6 version. If features are wanted for D7, please post a new issue.