Slide show display time configurable


01-06-2004 11:31:15


Would it be an option to user configure the time to display a page in slideshow (autoscroll) mode ? I have 10 graphs on one page and the current timeout (scrollInterval = 1000 ) does not allow the page to scroll all the way to the bottom of the page.

I guess adding a user_pref 'slideInterval' (int)
And then change view.php line 368 to someting like
var scrollInterval = <?PHP echo $slideInterval;?>;


01-06-2004 11:49:33


That was the incorrect place to make changes.

It seems the problem lies in the javascript code for the window scrolling... I'll dig a bit further before posting again ;)


01-06-2004 11:56:24

I guess I found the issue

The autoscroll gets the window height on page load, which is -remember, I'm guessing - [be627fc7315]before[/be627fc7315] the images are loaded. This should not be an issue, if the [be627fc7315]img[/be627fc7315] tags contains a height value (which is not the case), so the height calculation is based upon the the body containing [be627fc7315]img[/be627fc7315] placeholders + [be627fc7315]tr[/be627fc7315] space.

So either setting [be627fc7315]img height[/be627fc7315] or recalculating the height after the 1st scroll attempt will probably solve the problem... I'll experiment a bit further with this.


01-06-2004 18:01:51

That might not be a viable solution as the true image heights are not known until the graphs are rendered. The dimensions we hand off to rrdtool are for the graph area, and do not include the dimensions of the legends, titles, etc. We could possibly have netmrg remember the dimensions of the image when it was last rendered, though.


01-06-2004 21:13:23

This also could be quite browser-dependant. We've done all our testing on Mozilla (Firefox, Galeon) and it's worked very well in our experience. It's would seem very possible that other browsers could implement this javascript differently.



02-06-2004 03:15:16

I made some modifications to the code to get this working in Crazy Browser (a Tabbed Internet Explorer clone).

I just added [b8b4e458501]scrollInterval[/b8b4e458501] to [b8b4e458501]document.body.offsetHeight[/b8b4e458501] and now the slideshow scrolls completely to the bottom of the page.

I guess that setting [b8b4e458501]< IMG ... height=..>[/b8b4e458501] would be a better solution, but it works for me ;)


02-06-2004 07:27:39

Would it be possible for you to submit a bug with either a 'diff' of your changes or attach the entire file (we can do the diff then)? Bugs are maintained at http//
Getting features like this to work in more browsers is great! Thanks for your work!



02-06-2004 08:51:43

Bug report posted Bug ID 225.

I did some additional digging into this
* Mozilla works
* IE 6.x does not complete

The javascript function [b41d1bd040d]document.body.offsetHeight[/b41d1bd040d] behaves different between the various browsers (hopefully not between the browser versions). I might check the return value accross different browsers to see the exact differences.

-- Note --
Adding the height value requires some extra work... simply adding a fixed height for all the IMG tags makes the page render pretty ugly ( So I guess the proper way to do it is get the file properties before creating the img tag and insert the height based on that information.


02-06-2004 22:19:42

rrdgraph [ie68fc2dd7b]does[/ie68fc2dd7b] return the X x Y height of the graphs, but this would be too late for us to use it in the image display function, or we'd have to call it twice. An alternative would be for us to call in when a template/custom graph is created/modified to get the height and width for the graph and cache the info. I think I'll submit a bug for that, because it would be very useful ;)