Post by Mithras on Jan 21, 2007 10:12:02 GMT -8
This is basically a splash page that has multiple images, in rows of three.
The Code:
<script type="text/javascript">
// Splash Page With Multiple Images and Text by Mithras
// Global Footer - Edit only the first section
var images = [
['http://s2.images.proboards.com/menu/help.gif','http://help.proboards.com','Help']
];
var enterImg = 'http://s2.images.proboards.com/menu/home.gif';
var text = 'Welcome to Our Forum!';
var once = 'y';
// Do not edit below this line.
function setCookie(_name,_value){
document.cookie = _name;
}
function getCookie(_name){
if(document.cookie.match(new RegExp(_name+"=(.+?)($|","gi")))
return unescape(RegExp.$1);
return 'null';
}
function runCode() {
var tds = document.getElementsByTagName('td');
for(i=0; i<tds.length; i++) {
tds.style.display = 'none';
}
document.write('<div align="center">' + text + '</div><br /><br />');
document.write('<table cellspacing="4" cellpadding="4" border="0" align="center" width="600">');
for(i=0; i<images.length/3; i++) {
document.write('<tr>');
for(a=0; a<3; a++) {
if(images[i+a])
document.write('<td width="200" align="center"><a href="' + images[i+a][1] + '"><img src="' + images[i+a][0] + '" alt="' + images[i+a][2] + '" border="0" /></a></td>');
}
document.write('</tr>');
}
document.write('</table>');
document.write('<br /><br /><div align="center" style="margin-bottom:100px"><a href="/index.cgi?action=home"><img src="' + enterImg + '" alt="Enter" border="0"/></a></div>');
setCookie('showSplash','no');
}
if(!location.href.match(/(action|board)=/i) && once == 'y') {
if(getCookie('showSplash') == 'null')
runCode();
} else if(!location.href.match(/(action|board)=/i))
runCode();
</script>
Editing:
First, the images. Take a look at this line:
['http://s2.images.proboards.com/menu/help.gif','http://help.proboards.com','Help'],
The blue is the URL to the image, the red is the URL to where you want the image to link to, and green is the alternate text (the text that is shown if the image can not load).
Just repeat this line once for every image. Don't forget to put a comma after every line, except for the last line.
Second, this part:
var enterImg = 'http://s2.images.proboards.com/menu/home.gif';
var text = 'Welcome to Our Forum!';
var once = 'y';
The blue is the URL to the image that you want to be the link to get into your forum, the red is the text that is displayed above the images (this is optional), and the green is whether or not you want the splash page to be displayed only the first time that the user comes to your home page ('y' means yes, 'n' is no).
This goes in the Main Footer
The Code:
<script type="text/javascript">
// Splash Page With Multiple Images and Text by Mithras
// Global Footer - Edit only the first section
var images = [
['http://s2.images.proboards.com/menu/help.gif','http://help.proboards.com','Help']
];
var enterImg = 'http://s2.images.proboards.com/menu/home.gif';
var text = 'Welcome to Our Forum!';
var once = 'y';
// Do not edit below this line.
function setCookie(_name,_value){
document.cookie = _name;
}
function getCookie(_name){
if(document.cookie.match(new RegExp(_name+"=(.+?)($|","gi")))
return unescape(RegExp.$1);
return 'null';
}
function runCode() {
var tds = document.getElementsByTagName('td');
for(i=0; i<tds.length; i++) {
tds.style.display = 'none';
}
document.write('<div align="center">' + text + '</div><br /><br />');
document.write('<table cellspacing="4" cellpadding="4" border="0" align="center" width="600">');
for(i=0; i<images.length/3; i++) {
document.write('<tr>');
for(a=0; a<3; a++) {
if(images[i+a])
document.write('<td width="200" align="center"><a href="' + images[i+a][1] + '"><img src="' + images[i+a][0] + '" alt="' + images[i+a][2] + '" border="0" /></a></td>');
}
document.write('</tr>');
}
document.write('</table>');
document.write('<br /><br /><div align="center" style="margin-bottom:100px"><a href="/index.cgi?action=home"><img src="' + enterImg + '" alt="Enter" border="0"/></a></div>');
setCookie('showSplash','no');
}
if(!location.href.match(/(action|board)=/i) && once == 'y') {
if(getCookie('showSplash') == 'null')
runCode();
} else if(!location.href.match(/(action|board)=/i))
runCode();
</script>
Editing:
First, the images. Take a look at this line:
['http://s2.images.proboards.com/menu/help.gif','http://help.proboards.com','Help'],
The blue is the URL to the image, the red is the URL to where you want the image to link to, and green is the alternate text (the text that is shown if the image can not load).
Just repeat this line once for every image. Don't forget to put a comma after every line, except for the last line.
Second, this part:
var enterImg = 'http://s2.images.proboards.com/menu/home.gif';
var text = 'Welcome to Our Forum!';
var once = 'y';
The blue is the URL to the image that you want to be the link to get into your forum, the red is the text that is displayed above the images (this is optional), and the green is whether or not you want the splash page to be displayed only the first time that the user comes to your home page ('y' means yes, 'n' is no).
This goes in the Main Footer