request for a user defined slideshow duration control function request for a user defined slideshow duration control function
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

request for a user defined slideshow duration control function

Started by rrwwxx, July 22, 2007, 03:50:52 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

rrwwxx

Inspired by jalbum, I would like to ask for a possibility for viewers to change the duration time in a slideshow by just doubleclicking the slideshow button.

Jalbum has some javascript function implemented that looks like this:

function change_delay() {
delay = prompt('delay', (show_param < 0)? 3 : show_param);
show_param = show_delay = delay;
document.show.src = show1.src;
}


The actual button is being presented with this html code:

<a href="javascript:void(0)" onmouseover="show_over();" onmouseout="show_out();" onmousedown="show_down();" ondblclick="change_delay();"><img src="../res/show.gif" width="31" height="31" border="0" title="Start/Stop slideshow - Double-Click to change speed" name="show" alt=""></a>

It works in a way that you doubleclick the button and an input field pops up asking you for the desired delay time.

I know this is not transferable in the same manner into the coppermine code, but I just would like to encourage you guys to think about a solution that would work in a similar manner. I guess there is quite a bit of coding experience needed to make that applyable for cpg.
I will introduce another idea taken from that free web album software in another thread.

cu,
rrwwxx
°¿°

Joachim Müller

This is already scheduled for the next version. I'm looking into a slider function similar to the one shown here: http://webfx.eae.net/dhtml/slider/slider.html
I already have a working copy on my testbed and will add it to the core code as soon as it is stable.

Joachim Müller

Seems like I'm not going to be able to finish this anytime soon, so you might want to take a look at what I have so far. I have created a small (non-coppermine driven) demo to illustrate the concept behind it: http://osterburken.net/slider/
I attached the code to this posting.
The underlying code taken from webfx.eae.net comes under three possible licenses, one of them is GNU GPL, so there should be no issue to integrate it into the core.
The stuff that needs looking into is the DOM part - forms[0] definitely is not a bright idea to refer to the field, as there may be several forms on the page already, so you'd have to address it by a unique form name.
The function that would need editing is theme_slideshow(). Additionally, the JavaScript bits should go into include/slideshow.inc.php
It would be great if you (or anybody else interessted) could come up with a working hack. In fact, you don't have to know PHP - all that is needed are HTML/JavaScript skills.