Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: request for a user defined slideshow duration control function  (Read 5399 times)

0 Members and 1 Guest are viewing this topic.

rrwwxx

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Posts: 51

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:

Code: [Select]
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:

Code: [Select]
<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
°¿°
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: request for a user defined slideshow duration control function
« Reply #1 on: July 23, 2007, 08:18:35 am »

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.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: request for a user defined slideshow duration control function
« Reply #2 on: July 23, 2007, 05:59:18 pm »

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.
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 19 queries.