Autostart slideshow in slider layout

mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2004-11-29 18:52

I was asked:

Quote:
hey i was wondering if you know how to call the main.php page with the slider layout set to default, so that the slideshow starts right away.

say like: gallery2/main.php?slideshow=on

At the very bottom of layouts/slider/templates/slider.tpl you can add slide_onoff(); right after app_init(); to make it always start the slideshow. If you only want to autostart the slideshow based on a request parameter you could do this:

<script type="text/javascript">app_init();
{php}if (isset($_GET['slideshow'])) print "slide_onoff();"; {/php}
</script>
 
theme

Joined: 2004-11-29
Posts: 1
Posted: Tue, 2004-11-30 00:57

worked great. tnx dude

++++CODE++++

<script type="text/javascript">app_init();
slides_onoff();
</script>

 
jfindley
jfindley's picture

Joined: 2005-09-16
Posts: 2
Posted: Fri, 2005-09-16 12:48
mindless wrote:
At the very bottom of layouts/slider/templates/slider.tpl you can add slide_onoff(); right after app_init(); to make it always start the slideshow.

Can I do the same thing with options_onoff();? I'd like the sidebar to show by default and can't for the life of me figure out how. FYI, I did try adding options_onoff(); after app_init(); with no change.

Thanks for all your hard work!

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sat, 2005-09-17 19:28

options_onoff(); sounds right.. maybe add alert('hi'); to make sure your modified file is being used..

 
jfindley
jfindley's picture

Joined: 2005-09-16
Posts: 2
Posted: Sat, 2005-09-17 21:25

I know my edited slider.tpl is being used as I added slide_onoff(); as a test and it works as expected. Weird. I flushed the template and db cache and also tried a couple different browsers on different platforms just to be sure. Same result on all.

Am I insane?

JF
I brew for you...