General Community > Scripting Help

adding an extra banner

(1/1)

knowlsey:
Hi

Trying to add an extra banner to the forum, aswell as the smf one, which i have changed anyway, but would like a banner underneath the forum title

Could someone point me in the right direction as to what code to add, and what file to add it to

am using CLS-pro-buttonbar theme

it would normally say My Community, but I have obviously changed it, cant add a link to website here as url not allowed



any help appreciated

knowlsey:
managed to use a Global Headers and Footers mod for easy editing,so installed that,then used this script to add to head or headers or footer or all thre if need be, just need to play with this script, it works fine, doesnt put the banner exactly where I want it, but close enough

As in previous attempts I tried different codes  to the index template file after body tags but errors all the way


--- Code: ---<HTML>
<HEAD>
<!-- Begin
var interval = 2.5; // delay between rotating images (in seconds)
var random_display = 1; // 0 = no, 1 = yes
interval *= 1000;

var image_index = 0;
image_list = new Array();
image_list[image_index++] = new imageItem("http://www.whatunearth.co.uk/adk_logo.png");
image_list[image_index++] = new imageItem("http://www.whatunearth.co.uk/adk_logo.png");
image_list[image_index++] = new imageItem("http://www.whatunearth.co.uk/adk_logo.png");
image_list[image_index++] = new imageItem("http://www.whatunearth.co.uk/adk_logo.png");
var number_of_image = image_list.length;
function imageItem(image_location) {
    this.image_item = new Image();
    this.image_item.src = image_location;
}
function get_ImageItemLocation(imageObj) {
    return(imageObj.image_item.src)
}
function generate(x, y) {
    var range = y - x + 1;
    return Math.floor(Math.random() * range) + x;
}
function getNextImage() {
    if (random_display) {
        image_index = generate(0, number_of_image-1);
    } else {
        image_index = (image_index+1) % number_of_image;
    }
    var new_image = get_ImageItemLocation(image_list[image_index]);
    return(new_image);
}
function rotateImage(place) {
    var new_image = getNextImage();
    document[place].src = new_image;
    var recur_call = "rotateImage('"+place+"')";
    setTimeout(recur_call, interval);
}
//  End -->
</script>
</HEAD>


<BODY OnLoad="rotateImage('rImage')">


<center>
<img name="rImage" src="http://www.whatunearth.co.uk/adk_logo.png" width=488 height=160>
</center>

</BODY>
</HTML>
--- End code ---

Navigation

[0] Message Index

Go to full version