First of, thanks for such a great plugin. I'm trying to use it for something it wasn't originally designed for, but my guess is it ought to work.
What I would like to do is use the nextGen gallery plugin to display rotating header images on my blog. So here is what I've done thus far.
I created a new Gallery (ID=2), containing several images I want to show in the header. In my header.php file I have the following code:
<div id="header_image"> </div>
By using CSS I apply the correct width and height (800 and 180px) and add a background image. This is the part I would like to replace.
Next step is I looked at the code of the slideshow and grabbed the JS needed for starting it:
<div id="header_image"> </div>
<script type="text/javascript" defer="defer">
var header_image = {
params : {
wmode : "opaque",
allowfullscreen : "true",
bgcolor : "#FFFFFF"},
flashvars : {
file : "http://localhost/wp-content/plugins/nextgen-gallery/xml/imagerotator.php?gid=2",
shuffle : "false",
linkfromdisplay : "true",
overstretch : "true",
rotatetime : "10",
backcolor : "0x000000",
frontcolor : "0xFFFFFF",
lightcolor : "0xCC0000",
screencolor : "0xFFFFFF",
width : "800",
height : "180"},
attr : {
styleclass : "slideshow",
name : "header_image"},
start : function() {
swfobject.embedSWF("http://localhost/wp-content/uploads/imagerotator.swf", "header_image", "800", "180", "7.0.0", false, this.flashvars, this.params , this.attr );
}
}
header_image.start();
</script>
As you can see, to prevent problems I changed the call to the function to header_image and I try to inject the flash into the div header_image. I set the gallery ID == 2 so as far as I can see I'm all set.
However, nothing is displayed. The div just disappears, the contents shift up, but there is no rotating header. So I'm left wondering here: what I'm a doing wrong?
The slideshow does turn up on single pages I create, so the settings of the various files seems to be ok.
Thanks for the replies.