Previous/ Next links
Amitaibu - July 22, 2007 - 19:32
| Project: | Views Slideshow |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
Hi,
Would be nice to add to the settings, show Previous/ Next buttons. Then show also the number of views. e.g.:
<<Previous | 1 of 10 | next>>
#1
btw,
http://drupal.org/node/130420#comment-278401
#2
I guess this will do the job:
http://drupal.org/project/custom_pagers
#3
#4
i dont think custom pagers will do this.
With Custom Pagers you just can switch through whole nodes no matter what you configure in views.
I am also in need to let the views slideshow control by the user not by timeOut, but i dont get along with the javascript in it.
A method how to change to the next picture in the slideshow just by clicking on the picture would be fine...
I am in urgent need for it.
I had this function in the cck_slideshow, but had problems with IE...
Can anyone help ?
#5
+1 Also looking for this
txcrew
#6
subscribe
#7
subscribe
#8
Subscribe. Thanks
#9
Is this not available with the latest version? It's there on the demo page...
http://drupalhub.org/videos
#10
Subscribe too!
#11
I hacked something together very quickly. It involves changes to the views_slideshow.js file and a custom theme function.
Here is the custom theme function
/**
* this displays the main element, where the current slide is shown
*/
function MYTHEME_views_slideshow_main_section($view, $nodes, $type, $items, $item, $div, $hidden_elements) {
$output .= "\n\n" . '<div id="views_slideshow_main_' . $div . '" class="views_slideshow_main">' . "\n ";
// $output .= $item . "\n";
$output .= $hidden_elements;
//Prev button
$buttons[]="<a id='boton-$div-$i' class='boton-$div' href=javascript:views_slideshow_switch('$div',views_slideshow_prev_div('$div')); >".t('Previous')."</a>";
foreach($items as $i=>$item) {
$buttons[]="<a id='boton-$div-$i' class='boton-$div' href=javascript:views_slideshow_switch('$div',$i); >".($i + 1)."</a>";
}
//Next button
$buttons[]="<a id='boton-$div-$i' class='boton-$div' href=javascript:views_slideshow_switch('$div',views_slideshow_next_div('$div')); >".t('Next')."</a>";
$output .= theme('item_list',$buttons,NULL,'ul',array('class'=>'lista-slideshow-elements')) . '</div><!--close views_slideshow_main_' . $div . "-->\n\n";
return $output;
}
The changes to the javascript file are in the attached patch.
Hope someone finds this useful.
#12
Hey heronog,
This is very useful but can you provide this hack in .js file not in patch, many people are having problem with deploying patches and me too...
Thanks : )
#13
this is the file i am using. it is OLD now, from the time of my past comment. so use it with care, it may not be up to date (most certainly it isn't)
OLD FILE that USED TO WORK attached
#14
Is there any way to get around the pager initiating a page refresh? I created a view slideshow and turned on the pager. But when I click the next page, it refreshes the page.
#15
Whoops, never mind. Just saw the "use AJAX" setting.
#16
Subscribing.
Excellent module in its simple state but the prev/next buttons would solve 99% of my slideshow needs.
I have had no success using heronog's fix with current releases.
#17
#18
Yes this would just be awesome! Subscribing!
#19
subscribe.
#20
subscribe.
#21
subscribe.
#22
subscribe.
#23
subscribe
#24
I just found this on another issue. It adds either Previous/Next buttons, or else a row of numbers as links:
http://drupal.org/node/488682
Just download the zip file, replace the old Views Slideshow, and you'll see a new drop-down in the "style options" called 'Create a Pager'.
It works as I imagined. Though if anybody can find a way to put the pager on the TOP of the slideshow instead of the bottom, that would be cool.
#25
Please see: #463254: Lots of progress migrating to contrib/plugin architecture, transition to cycle plugin. prev/next pagination included as part of that effort, currently stalled while aaron refactors some.
#26
subscribe
#27
This pager works great, but the "pause on hover" function seems to not be working after installing these files. Also, is there any provisions for a "pause/play" button as well? Thanks.
#28
subscribing,
I couldnt get the alternative views slideshow zip working, so hoping the pagination functionality will be released soon!
thanx!
#29
if you theme the slideshow and add custom controls, you can use the functions for next, pause and play.
But there isn't a function for back.
#13 above has a file and if you copy and past the prev function (last one) you will get this result.
Just add is some custom jquery and some custom html for controls and you are in business.
thx heronog for #13
add something like this to a slideshow theme template (views-slideshow.tpl.php)
$(document).ready(function() {
// These are the divs containing the elements to be displayed in the main div in rotation or mouseover.
//slideshow_data["1"] = new views_slideshow_data(4, 1000, 1, false, "normal", 0.25);
// This turns on the timer.
//views_slideshow_timer("1", true);
// This sets up the mouseover & mouseout to pause on the main element.
$("#back").click(
function() {
//views_slideshow_timer("1", true);
$("#pause").show();
$("#play").hide();
views_slideshow_switch("1",views_slideshow_prev_div("1"));
});
$("#forward").click(
function() {
//views_slideshow_timer("1", true);
$("#pause").show();
$("#play").hide();
views_slideshow_switch("1",views_slideshow_next_div("1"));
});
$("#play").click(
function() {
$("#pause").show();
$("#play").hide();
views_slideshow_resume("1");
});
$("#pause").click(
function() {
$("#pause").hide();
$("#play").show();
views_slideshow_pause("1");
});
});//
#30
It seems that there has been s considerable demand for this feature and there is still no response from the developer?
#31
@kirilius: "the developer" is busy and will get to it when he can -- no one, to my knowledge, is getting paid to work on this module; sorry if we're not responsive enough for you. patches are welcome.
but meanwhile, i see lots of other volunteers are busy on the queue, and i'm highly appreciative of their efforts. does anyone have an updated patch they can submit yet? if not, i'll try to look at the issue next week during my copious amounts of free time.
#32
Not positive but this patch might have it. #463254: Lots of progress migrating to contrib/plugin architecture, transition to cycle plugin If not I know at least two of us are holding off on new features until that patch is completed.
#33
#558640: More flexible layout This patch brings us closer to the original issue.
#558662: Create ability to add 1 of 4 type pager Will bring us the rest of the way.
I'm going to mark as fixed and we can take care of this issue in the other issues. I think the eventual outcome will be the usage of the tpl.php file in your theme to specify the exact output that you want.
#34
Automatically closed -- issue fixed for 2 weeks with no activity.