These scripts, if you are following the installation from the archive, go in a folder named scripts off of the folder in which the page with the gallery is.
That's actually a pretty good question. And, as far as I can tell, Frog Gallery only requires:
prototype.js
scriptaculous.js
effects.js
frog.js
I deleted the rest from my local installation, and the script still worked. The only one of those that isn't linked directly to the page is effects, and it is linked to by:
Code:
<script type="text/javascript" src="scripts/scriptaculous.js?load=effects"></script>
Which tells scriptaculous to load that one. It does so using this code:
Code:
var Scriptaculous = {
Version: '1.7.0',
require: function(libraryName) {
// inserting via DOM fails in Safari 2.0, so brute force approach
document.write('<script type="text/javascript" src="'+libraryName+'"></script>');
},
load: function() {
if((typeof Prototype=='undefined') ||
(typeof Element == 'undefined') ||
(typeof Element.Methods=='undefined') ||
parseFloat(Prototype.Version.split(".")[0] + "." +
Prototype.Version.split(".")[1]) < 1.5)
throw("script.aculo.us requires the Prototype JavaScript framework >= 1.5.0");
$A(document.getElementsByTagName("script")).findAll( function(s) {
return (s.src && s.src.match(/scriptaculous\.js(\?.*)?$/))
}).each( function(s) {
var path = s.src.replace(/scriptaculous\.js(\?.*)?$/,'');
var includes = s.src.match(/\?.*load=([a-z,]*)/);
(includes ? includes[1] : 'builder,effects,dragdrop,controls,slider').split(',').each(
function(include) { Scriptaculous.require(path+include+'.js') });
});
}
}
Scriptaculous.load();
Which basically just writes out the tag:
Code:
<script type="text/javascript" src="path/effects.js"></script>
where path/ is the same path as to scriptaculous.
I believe that the others are included in the distribution because, if you skip:
?load=effects
it will look for all of them and possibly throw an error if one or more are not found.
Bookmarks