Closed (won't fix)
Project:
Image
Version:
6.x-1.x-dev
Component:
image.module
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
16 Sep 2005 at 14:58 UTC
Updated:
2 Jan 2014 at 18:57 UTC
Jump to comment: Most recent
Comments
Comment #1
dreed47 commentedYou might want to check out http://drupal.etopian.net/image_module. I have not tried it yet but it looks like it provides the next and previous image links as well as showing the next and previous image thumbnails. I have an idea of how to provide this with the stock image module (without thumbnails) but I have not had time to implement it yet.
Comment #2
sami_k commentedThat is exactly what that patched version does, the patches are also available here if the module developer would like to make that standard functionality.
Comment #3
rogue_77 commentedI'm looking for this feature and I tried that link to drupal.etopian.net/image_module and its broken. I would have to say this is a fair request for an almost essential feature for an image gallery.
Comment #4
drewish commentedI marked http://drupal.org/node/120548 as a duplicate of this.
Comment #5
koorneef commentedThis can be done with the phptemplate theme functionality, see: http://drupal.org/node/45050
Comment #6
halftone commentedUnfortunately those additions don't work with images that use multiple taxonomies. You get very unpredicatble results with next & prev images being pulled from unexpected categories. Please, please someone fix this as a normal part of the image module.
Comment #7
drewish commentedyeah i agree this shouldn't be done at the theme level.
Comment #8
brunodboIs someone currently working on this?
Comment #9
halftone commentedYou might want to look at http://drupal.org/node/119052#comment-214489 (and the preceding msgs) - a custom module that provides a pager on image nodes, works with the Nodeorder module http://drupal.org/project/nodeorder- allowing an explicit ordering of images.
The pager also respects multiple taxonomy terms for images, where they exist Every other pager I have tried gets confused by images that inhabit multiple terms, hopping from one term to another and jumbling sequences.
It needs a couple of hacks to image.module to work, but defaults to normal Drupal sticky+upload date ordering if Nodeorder is not present,. In instances where no term is specified, eg coming from a random or latest image block, it simply uses the first.
IWNBI it could perhaps be incorporated into the image.module distribution as a contrib module, as next|prev and ordering of images is such a FAQ, but I'm not competent to say whether it's wholesome code.
Comment #10
designwork commentedHi
I found this pager some where it works for me, maybe it is a stating point.
function custom_pager($current_nid, $class = NULL) {
$tid = reset(array_keys(taxonomy_node_get_terms($current_nid)));
$result = db_query(db_rewrite_sql('SELECT n.nid, n.title FROM {node} n INNER JOIN {term_node} tn ON n.nid = tn.nid WHERE tn.tid = %s AND n.status = 1 ORDER BY n.sticky DESC, n.created DESC, n.nid DESC'), $tid);
while ($node = db_fetch_object($result)) {
$nodes[++$i] = $node;
if ($node->nid == $current_nid) $x = $i;
}
if($x > 1) {
$output .= l('« erstes', 'node/'. $nodes[1]->nid, array('title' => check_plain($nodes[1]->title), 'class' => $class), NULL, NULL, FALSE, TRUE);
$output .= l('‹ voriges', 'node/'. $nodes[$x-1]->nid, array('title' => check_plain($nodes[$x-1]->title), 'class' => $class), NULL, NULL, FALSE, TRUE);
}
$output .= $x .' von '. $i;
if($x < $i) {
$output .= l('naechstes ›', 'node/'. $nodes[$x+1]->nid, array('title' => check_plain($nodes[$x+1]->title), 'class' => $class), NULL, NULL, FALSE, TRUE);
$output .= l('letztes »', 'node/'. $nodes[$i]->nid, array('title' => check_plain($nodes[$i]->title), 'class' => $class), NULL, NULL, FALSE, TRUE);
}
return $output;
}
Dirk
Comment #11
underpressure commentedAny update on the status of this feature?
Comment #12
halftone commentedThis feature has been requested umpteen times since I first began using Drupal @ v4.5. I (and lots of others too) couldn't imagine why such a basic piece of functionality was missing. However, a few years down the line I think there is a reasonable excuse, that what people actually want varies. You'll find a large number of user-contributed solutions in the forums. eg
http://drupal.org/node/119052
http://drupal.org/node/45050
http://drupal.org/node/98883
I'm using http://drupal.org/node/119052#comment-256393 which gives a pager type display and works with the Nodeorder module and multi-taxonomies, but that's with Drupal 4.7. After months of struggling to achieve what I wanted I'm terrified of breaking this, it's a principal reason why I have not upgraded Drupal.
Really, IMO the image pager/next-prev stuff wants implementing in a separate module with a variety of config options, that could then be part of the image module distribution in the same way that image_gallery is. I'm not competent to code it else I would. However osherl's custom module (the root of the above thread) should provide a flying start for a developer motivated enough to do it.
Regards
Tony Sleep http://tonysleep.co.uk
Comment #13
Hetta commentedI quite like my solution: make a blank (or explanatory, or whatever) book page, use "Outline" to add your photos to that book page => you get prev / up / next, all in one neat package.
As an added bonus, that prev/next is ordered alphabetically, not using the pretty random "last upload shows first, first upload shows at the tail end" of image gallery.
Piece of cake.
Comment #14
psiska commentedHi guys
My solution is pretty simple, bet somewhere out there is a similar one, check out http://drupal.org/node/181021
Comment #15
Hetta commentedMarked http://drupal.org/node/214714 as duplicate - although that issue tells you that views + one or the other additional views module will give you paging.
Comment #16
sami_k commentedClosing issue as solutions above are acceptable. If someone wants to code up a module, by all means go ahead.
Comment #17
halftone commentedI take your point that the 'next-prev' solution is better realised as a module, but as mentioned at #9 adding support for multiple taxonomies and the Nodeorder module, if present, would be far better than having to hack image_gallery.module, and is rather necessary groundwork for any useful image pager module. If I was competent to submit a patch I would have done it ages ago but I struggle to apply patches let alone make them.
I have working 4.7 hacked code for image_gallery, and part-amended 5.n (only Nodeorder done so far), also a basic image_page_pager module for 4.7 that I need to try and redo for 5.n. So there is the basis of a module - but it's of limited use given it relies on deplorable hacks to image_gallery. How do I progress this? Open another issue? Sorry to seem so clueless.
Comment #18
Hetta commentedHave you tried #15?
Comment #19
halftone commentedNo, but that is not going to cope with images that inhabit multiple terms of a taxonomy (it'll only use the first term), nor Nodeordered images. The 4.7 solution outlined at http://drupal.org/node/193056 handles both.
Ultimately, whatever means is used to provide a pager - and I am happy to accept that requirements and solutions will vary there - image_gallery_module needs to have breadcrumbs that can cope with multiple taxonomy terms and to support Nodeorder, else module hacking is unavoidable if the user wishes to use either. Neither of the code changes to image_gallery functions change default behaviour, it still works exactly as normal if only a single term is used or Nodeorder is not installed.