slideshow options

jason_till
jason_till's picture

Joined: 2005-01-10
Posts: 11
Posted: Mon, 2005-01-10 11:55

i am trying to make a offline slideshow with user updateable images onlocal network
i have installed gallery and all is good
i wish to set the slideshow options to permanent setting and remove the slideshow options toolbar
i.e.
slideshow start on
show more info on
image size 640
fade random

any assistance would be appreciated :)

----

Gallery URL (optional):
Gallery version:2 alpha 4
Webserver (with version):php dev 423
Datatabase (with version):sql
PHP version (eg 4.2.1):423
phpinfo URL (optional):
Graphics Toolkit(s):gd + imagemagik
Operating system:xp
Web browser/version:ie 6

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Tue, 2005-01-11 09:53

Make a new directory called modules/slideshow/templates/local and copy modules/slideshow/templates/Slideshow.tpl into it. Then edit that file. It generates the HTML that powers the slideshow page. There's XHTML, Javascript and Smarty tags on that page. Experiment with it.

Hints:
* Remove the "toolbar" div
* Don't mess with the Smarty tags (they're the ones in {curly braces}) until you figure out what they're doing
* You can probably (and I say probably because I'm not fully versed in how the Slideshow works) hardcode the various settings by tweaking the Javascript.

 
jason_till
jason_till's picture

Joined: 2005-01-10
Posts: 11
Posted: Thu, 2005-01-13 09:33

thankyou all is good except for the blend javascript a can hide all the other options except for this one so far

 
jason_till
jason_till's picture

Joined: 2005-01-10
Posts: 11
Posted: Thu, 2005-01-13 10:38

i have found the script wtat displays the transition options but am unable to hide it anybody have any ideas ?

<script type="text/JavaScript">{literal}
// <![CDATA[
if (bCanBlend) {
document.write('&amp; {/literal}{literal}<select id="filter">');
for (i = 0; i < filterNames.length; i++) {
document.write('<option>'+filterNames[i]);
}
document.write('<'+'/select>'); // in 2 pieces for valid HTML4.01
}
{/literal}
// ]]>
</script>

i just want to remove the selection box from the slideshow screen
the filternames script is in the header.tpl

<script type="text/JavaScript">
//<![CDATA[
var agent = navigator.userAgent.toLowerCase();
var appver = parseInt(navigator.appVersion);
var bCanBlend = (agent.indexOf('msie') != -1) && (agent.indexOf('opera') == -1) &&
(appver >= 4) && (agent.indexOf('msie 4') == -1) &&
(agent.indexOf('msie 5.0') == -1);
var filterNames = new Array(16), filters = new Array(16);
filterNames[0] = '{g->text text="Blend" forJavascript="1"}';
filters[0] = 'progid:DXImageTransform.Microsoft.Fade(duration=1)';
filterNames[1] = '{g->text text="Blinds" forJavascript="1"}';
filters[1] = 'progid:DXImageTransform.Microsoft.Blinds(duration=1,bands=20)';
filterNames[2] = '{g->text text="Checkerboard" forJavascript="1"}';
filters[2] = 'progid:DXImageTransform.Microsoft.Checkerboard(duration=1,squaresX=20,squaresY=20)';
filterNames[3] = '{g->text text="Diagonal" forJavascript="1"}';
filters[3] = 'progid:DXImageTransform.Microsoft.Strips(duration=1,motion=rightdown)';
filterNames[4] = '{g->text text="Doors" forJavascript="1"}';
filters[4] = 'progid:DXImageTransform.Microsoft.Barn(duration=1,orientation=vertical)';
filterNames[5] = '{g->text text="Gradient" forJavascript="1"}';
filters[5] = 'progid:DXImageTransform.Microsoft.GradientWipe(duration=1)';
filterNames[6] = '{g->text text="Iris" forJavascript="1"}';
filters[6] = 'progid:DXImageTransform.Microsoft.Iris(duration=1,motion=out)';
filterNames[7] = '{g->text text="Pinwheel" forJavascript="1"}';
filters[7] = 'progid:DXImageTransform.Microsoft.Wheel(duration=1,spokes=12)';
filterNames[8] = '{g->text text="Pixelate" forJavascript="1"}';
filters[8] = 'progid:DXImageTransform.Microsoft.Pixelate(duration=1,maxSquare=10)';
filterNames[9] = '{g->text text="Radial" forJavascript="1"}';
filters[9] = 'progid:DXImageTransform.Microsoft.RadialWipe(duration=1,wipeStyle=clock)';
filterNames[10] = '{g->text text="Rain" forJavascript="1"}';
filters[10] = 'progid:DXImageTransform.Microsoft.RandomBars(duration=1,orientation=vertical)';
filterNames[11] = '{g->text text="Slide" forJavascript="1"}';
filters[11] = 'progid:DXImageTransform.Microsoft.Slide(duration=1,slideStyle=push)';
filterNames[12] = '{g->text text="Snow" forJavascript="1"}';
filters[12] = 'progid:DXImageTransform.Microsoft.RandomDissolve(duration=1,orientation=vertical)';
filterNames[13] = '{g->text text="Spiral" forJavascript="1"}';
filters[13] = 'progid:DXImageTransform.Microsoft.Spiral(duration=1,gridSizeX=40,gridSizeY=40)';
filterNames[14] = '{g->text text="Stretch" forJavascript="1"}';
filters[14] = 'progid:DXImageTransform.Microsoft.Stretch(duration=1,stretchStyle=push)';
filterNames[15] = '{g->text text="RANDOM" forJavascript="1"}';
filters[15] = 'RANDOM';
// ]]>
</script>

i must be looking in the right direction but when i edit any of the above scripts
i get errors but will keep trying any suggestions please ?

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Thu, 2005-01-13 18:47

does it work if you put // in front of each line with document.write ?

 
jason_till
jason_till's picture

Joined: 2005-01-10
Posts: 11
Posted: Fri, 2005-01-14 13:23

no it fails with missing odject error !
have found if i remove the navigator reference on line 4 the slideshow still works in it will change the pictures but without a transition effect!

<script type="text/JavaScript">
//<![CDATA[
var agent = navigator.userAgent.toLowerCase();
var appver = parseInt( :( navigator. :( appVersion);
var bCanBlend = (agent.indexOf('msie') != -1) && (agent.indexOf('opera') == -1) &&
(appver >= 4) && (agent.indexOf('msie 4') == -1) &&
(agent.indexOf('msie 5.0') == -1);
var filterNames = new Array(16), filters = new Array(16);
filterNames[0] = '{g->text text="Blend" forJavascript="1"}';
filters[0] = 'progid:DXImageTransform.Microsoft.Fade(duration=1)';
filterNames[1] = '{g->text text="Blinds" forJavascript="1"}';
filters[1] = 'progid:DXImageTransform.Microsoft.Blinds(duration=1,bands=20)';
filterNames[2] = '{g->text text="Checkerboard" forJavascript="1"}';
filters[2] = 'progid:DXImageTransform.Microsoft.Checkerboard(duration=1,squaresX=20,squaresY=20)';
filterNames[3] = '{g->text text="Diagonal" forJavascript="1"}';
filters[3] = 'progid:DXImageTransform.Microsoft.Strips(duration=1,motion=rightdown)';
filterNames[4] = '{g->text text="Doors" forJavascript="1"}';
filters[4] = 'progid:DXImageTransform.Microsoft.Barn(duration=1,orientation=vertical)';
filterNames[5] = '{g->text text="Gradient" forJavascript="1"}';
filters[5] = 'progid:DXImageTransform.Microsoft.GradientWipe(duration=1)';
filterNames[6] = '{g->text text="Iris" forJavascript="1"}';
filters[6] = 'progid:DXImageTransform.Microsoft.Iris(duration=1,motion=out)';
filterNames[7] = '{g->text text="Pinwheel" forJavascript="1"}';
filters[7] = 'progid:DXImageTransform.Microsoft.Wheel(duration=1,spokes=12)';
filterNames[8] = '{g->text text="Pixelate" forJavascript="1"}';
filters[8] = 'progid:DXImageTransform.Microsoft.Pixelate(duration=1,maxSquare=10)';
filterNames[9] = '{g->text text="Radial" forJavascript="1"}';
filters[9] = 'progid:DXImageTransform.Microsoft.RadialWipe(duration=1,wipeStyle=clock)';
filterNames[10] = '{g->text text="Rain" forJavascript="1"}';
filters[10] = 'progid:DXImageTransform.Microsoft.RandomBars(duration=1,orientation=vertical)';
filterNames[11] = '{g->text text="Slide" forJavascript="1"}';
filters[11] = 'progid:DXImageTransform.Microsoft.Slide(duration=1,slideStyle=push)';
filterNames[12] = '{g->text text="Snow" forJavascript="1"}';
filters[12] = 'progid:DXImageTransform.Microsoft.RandomDissolve(duration=1,orientation=vertical)';
filterNames[13] = '{g->text text="Spiral" forJavascript="1"}';
filters[13] = 'progid:DXImageTransform.Microsoft.Spiral(duration=1,gridSizeX=40,gridSizeY=40)';
filterNames[14] = '{g->text text="Stretch" forJavascript="1"}';
filters[14] = 'progid:DXImageTransform.Microsoft.Stretch(duration=1,stretchStyle=push)';
filterNames[15] = '{g->text text="RANDOM" forJavascript="1"}';
filters[15] = 'RANDOM';
// ]]>
</script>

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Fri, 2005-01-14 13:41

how about putting style="display:none" in the <select, ie
<select style="display:none" id="filter"

 
visualize2004

Joined: 2004-12-12
Posts: 2
Posted: Mon, 2005-01-24 01:50

Thanks Mindless

Problem Solved i now have a clean gallery with the options removed

anyone else working to clear the screen of options code as follows
remaining options can be removed simply by editing ( and removing the options :roll: "g->text text="whatever text you need to remove" . etc.
Once again thaks to mindless for you quick reply and help !

<script type="text/JavaScript">{literal}
// <![CDATA[
if (bCanBlend) {
document.write('& {/literal}{literal}<select style="display:none" id="filter">');
for (i = 0; i < filterNames.length; i++) {
document.write('<option>'+filterNames[i]);
}
document.write('<'+'/select>'); // in 2 pieces for valid HTML4.01
}
{/literal}
// ]]>
</script>

 
TvE
TvE's picture

Joined: 2004-07-03
Posts: 76
Posted: Sun, 2005-07-24 11:15

Would'nt it be great to have a "configure slideshow" option, so that one could set all the default parameters one would like the users to see when the watch a slideshow via the admin interface?

(Personally I would like to set the size to something a little larger and turn on the "more info").

I dont't mind hardcoding, but the other is more elegant…