Post by RaZor HeaÐ on Jul 15, 2007 18:21:32 GMT -5
I noticed that you have some of the same problems with your website that I had when I was desiging the Lég¡øñ site.
Here are some of the codes I found to solve these problems.
I have also become some what skilled with adding animation and slide-shows to a site as well.
So if you have a question about this or what other codes you could use, let me know.
Check out the Lég¡øñ site at this addy to see if you want to add any of the things I have.
www.clanblackflag.proboards57.com
Us =XV= eX Vengeance guys have to stick together.
____________________________________________________
Clickable Banner.
This allows you to click on the banner to take you back to the main page. So if you are burried deep in the site you can get out with just one click.
Copy to your Global Header...
<script type='text/javascript'>
/* Clickable banner
created by CrAzY_J
Open Source*/
var Main = document.body.getElementsByTagName('font')[0];
var Source = Main.firstChild.src;
Main.removeChild( Main.firstChild );
var Link = document.createElement('a');
var Image = document.createElement('img');
Link.href = this.location.href.split('.com')[0]+'.com';
Image.src = Source;
Image.border = 0;
Link.appendChild( Image );
Main.appendChild( Link );
</script>
____________________________________________________
Resize Topic Size.
This sets a limit on the width and height of the images and text on your site, so you dont have to move the screen back and forth when you are reading.
So if someone posts a large picture or siggy this will automatically resize it.
If an image is reduced to fit your site, you can click on the image to view it at full size.
Change the 600 number in these two lines to set the size you want. 600 worked for me.
1-var picWidth = '600'; //Maximum image width..
2-var picHeight = '600'; //Maximum image height..
Copy to your Global Footer...
<script type="text/javascript">
<!--
/*
Modify image size to fit forum
By Todge
Please keep this header intact
*/
var picWidth = '600'; //Maximum image width..
var picHeight = '600'; //Maximum image height..
var pics = document.images;
window.onload = imageSize;
function imageSize()
{
var p=pics.length-1;
while(p>-1)
{
if(pics
.alt=='[image] ')
{
if(pics
.width>picWidth || pics
.height>picHeight)
{
var thisPicWidth = picWidth;
if(pics
.height/(pics
.width/picWidth)>picHeight)
{
thisPicWidth = pics
.width/(pics
.height/picHeight)
}
var newWidth = 100-parseInt(thisPicWidth/pics
.width*100);
var picLoaded = document.createElement('A');
picLoaded.setAttribute('href',pics
.src);
picLoaded.setAttribute('target','_blank');
picLoaded.innerHTML = '<font size="0">This image is reduced by '+newWidth+'%, click it to view full size.</font><br><img src="'+pics
.src+'" width="'+thisPicWidth+'" border="0">';
pics
.parentNode.replaceChild(picLoaded,pics
);
}}
p--;
}}
// -->
</script>
____________________________________________________
Sticky Seperator.
This places a seperate category for threads that are Stickied or Stickied/Locked.
To edit the lines...
1-Edit the words "Important Threads" on this line to name the new category.
var sticky="Important Threads";
2-Edit the words "Normal Threads" on this line to name the old category.
var normal="Normal Threads";
3-Edit the number "10" on this line to set height.
var iheight="10";
4-Edit the word "arial" on this line to set the font.
var fontClass="arial";
Copy to your Global Footer...
<script type="text/javascript">
<!--
/* sticky divider v2.2 by elindir
101support.proboards43.com */
var sticklock="http://img444.imageshack.us/img444/7145/stickeylockcy0.gif";
var stick="http://img444.imageshack.us/img444/6178/stickeywt7.gif";
var sticky="Important Threads";
var normal="Normal Threads";
var iheight="10";
var barClass="catbg";
var fontClass="arial";
// Do not edit below
if(document.location.href.match(/board=/))
{
var table=document.getElementsByTagName('table');
for(e=0;e<table.length;e++)
{
if(table[e].cellPadding=='4' && table[e].cellSpacing=='1')
{
var tr=table[e].getElementsByTagName('tr');
for(r=0;r<tr.length;r++)
{
if(tr[r].firstChild.width=='5%' && tr[r].firstChild.className=='windowbg2' && tr[r].innerHTML.match("("+stick+"|"+sticklock+")") && !tr[r+1].innerHTML.match("("+stick+"|"+sticklock+")") && !tr[r].innerHTML.match(/Announcement:/))
{
var row=table[e].insertRow(r);
row.className=barClass;
row.insertCell(0).innerHTML="<font size='2' class="+fontClass+"><B>Last Post</B></font>";
row.insertCell(0).innerHTML="<font size='2' class='cattext'><center><B>Views</B></center></font>";
row.insertCell(0).innerHTML="<font size='2' class="+fontClass+"><center><B>Replies</B></center></font>";
row.insertCell(0).innerHTML="<font size='2' class="+fontClass+"><center><B>Started By</B></center></font>";
row.insertCell(0).innerHTML="<font size='2' class="+fontClass+"><center><B>"+normal+"</B></center></font>";
row.firstChild.height=iheight
if(tr[r].innerHTML.match(/checkbox/))
{
var col="3";
}
else
{
var col="2";
}
row.insertCell(0).colSpan=col;
var td=table[e].getElementsByTagName('td');
for(l=0;l<td.length;l++){
if(td[l].innerHTML.match(/Subject/) && td[l+1].innerHTML.match(/Started by/) && td[l].className=="catbg"){
td[l].align="center";
td[l].innerHTML=sticky;
}
}
}
}
}
}
}
//-->
</script>