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>
Posts: 1
worked great. tnx dude
++++CODE++++
<script type="text/javascript">app_init();
slides_onoff();
</script>
Posts: 2
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!
Posts: 8601
options_onoff(); sounds right.. maybe add alert('hi'); to make sure your modified file is being used..
Posts: 2
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...