|
Post by Wormopolis on Jan 18, 2009 7:40:05 GMT -8
Browsers Tested: IE and FF placement: main footer board remodel.. see preview for example.
<script type="text/javascript"> <!-- // board remodel "Tapeworm" // concept by Asagi - Coding by Wormopolis // [url]wormocodes.proboards.com[/url] // Do not repost - Keep header intact // v 1.5
boardheadImg="http://i192.photobucket.com/albums/z295/Natzy24/1aeb9550.png"; boardbgImg="http://i192.photobucket.com/albums/z295/Natzy24/a3aceab2.png"; boardfootImg="http://i192.photobucket.com/albums/z295/Natzy24/bbacd4d8.png"; lowerGrad="http://i197.photobucket.com/albums/aa250/WORMOPOLIS/tapworm_grad.jpg"; upperGrad="http://i197.photobucket.com/albums/aa250/WORMOPOLIS/tapworm_grad-1.jpg"; var newWidth=720; var newBGColor="000000"; var newFontColor="FFFFFF"; // END USER VARIABLES
var colorSave=""; tds=document.getElementsByTagName('td'); for (e=0; e<tds.length; e++) { if (tds[e].className=="titlebg" && tds[e].colSpan==2 && tds[e].innerHTML.match(/forum name/i)) { tds[e].colSpan=5; tds[e].parentNode.removeChild(tds[e].parentNode.lastChild); tds[e].parentNode.removeChild(tds[e].parentNode.lastChild); tds[e].parentNode.removeChild(tds[e].parentNode.lastChild); tds[e].style.backgroundImage="url("+upperGrad+")"; tds[e].align="center"; tds[e].firstChild.firstChild.innerHTML=document.title; }
if (tds[e].className=="titlebg" && tds[e].colSpan==2 && tds[e].innerHTML.match(/info center/i)) { tds[e].style.backgroundColor="transparent"; tds[e].className=""; tds[e].parentNode.parentNode.parentNode.cellSpacing=0; tds[e].parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.style.backgroundColor="transparent"; tds[e].parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.className=""; tds[e].parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.width=newWidth; tds[e].parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.align="center"; tds[e].style.backgroundImage="url("+boardheadImg+")"; tds[e].style.backgroundRepeat="no-repeat"; tds[e].style.backgroundPosition="center bottom";
holdThis=tds[e].parentNode.nextSibling.nextSibling.firstChild; while(holdThis.innerHTML.match(/<img/i)){ holdThis=holdThis.parentNode.previousSibling.firstChild; holdThis.style.backgroundImage="url("+upperGrad+")"; if (document.all) holdThis.firstChild.style.color=colorSave; else holdThis.firstChild.nextSibling.firstChild.style.color=colorSave; holdThis=holdThis.parentNode.nextSibling.firstChild; holdThis.className=""; holdThis.colSpan=2; holdThis.style.backgroundImage="url("+boardbgImg+")"; holdThis.nextSibling.className=""; holdThis.nextSibling.style.backgroundColor=newBGColor; temptbl=document.createElement('table'); temptbl.insertRow(0); temptbl.rows[0].appendChild(holdThis.nextSibling); holdThis.replaceChild(temptbl,holdThis.firstChild); temptbl.width="100%"; holdThis.width="100%"; if (holdThis.parentNode.nextSibling && holdThis.parentNode.nextSibling.nextSibling && holdThis.parentNode.nextSibling.nextSibling.firstChild) holdThis=holdThis.parentNode.nextSibling.nextSibling.firstChild; }
nwrw=holdThis.parentNode.parentNode.insertRow(-1); nwrw.insertCell(0); nwrw.cells[0].height=20; nwrw.cells[0].colSpan=2; nwrw.cells[0].style.backgroundImage="url("+boardfootImg+")"; nwrw.cells[0].style.backgroundRepeat="no-repeat"; nwrw.cells[0].style.backgroundPosition="top center"; }
if (tds[e].className=="catbg" && tds[e].colSpan==5 && tds[e].height==18) { if (!tds[e].innerHTML.match(/mark all boards read/i)) { tds[e].height=20; tds[e].style.backgroundImage="url("+boardheadImg+")"; tds[e].getElementsByTagName('font')[0].color=newFontColor; tds[e].style.backgroundRepeat="no-repeat"; tds[e].style.backgroundPosition="center bottom"; tds[e].style.backgroundColor="transparent"; tds[e].parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.style.backgroundColor="transparent"; tds[e].parentNode.parentNode.parentNode.cellSpacing=0; tds[e].parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.width=newWidth; tds[e].parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.align="center"; } else { tds[e].style.backgroundImage="url("+lowerGrad+")"; } }
if (tds[e].width=="8%" && tds[e].className=="windowbg" && tds[e].vAlign=="middle") { on_off=tds[e].firstChild; board_name=tds[e+1].getElementsByTagName('font')[0]; if (board_name.firstChild.currentStyle) colorSave = board_name.firstChild.currentStyle['color']; else if (window.getComputedStyle) colorSave = document.defaultView.getComputedStyle(board_name.firstChild,null).getPropertyValue('color'); board_desc=(board_name.nextSibling.nextSibling ? board_name.nextSibling.nextSibling : ''); board_mods=(board_desc.getElementsByTagName('i')[0] ? board_desc.getElementsByTagName('i')[0] : document.createTextNode('')); board_topics=tds[e+2].getElementsByTagName('font')[0]; board_posts=tds[e+3].getElementsByTagName('font')[0]; last_post_info=tds[e+4].getElementsByTagName('font')[0]; if (last_post_info.innerHTML.length>3) { last_post_title=last_post_info.getElementsByTagName('a')[last_post_info.getElementsByTagName('a').length-1]; last_post_auth=(last_post_info.getElementsByTagName('br')[1].previousSibling.nodeName=='A' ? last_post_info.getElementsByTagName('a')[0] : document.createTextNode(last_post_info.getElementsByTagName('br')[1].previousSibling.data.split('by ')[1])); last_post_date=last_post_info.firstChild; } jumper=document.getElementById('forumjump').options; subs=""; if (board_name.innerHTML.match(/sub-board(s)?/i)) { for(a=0;a<jumper.length;a++){ if(jumper[a].innerHTML.replace(/-\s/, '')==board_name.firstChild.firstChild.innerHTML){ for(c=a+1;c<jumper.length;c++){ if(!jumper[c].innerHTML.match(/---\s/)){ break; } subs+=jumper[c].innerHTML.replace(/---\s/g, '')+','; } } } temp=board_name.removeChild(board_name.getElementsByTagName('font')[0]); subs=subs.substring(0,subs.length-1); } new_cell=tds[e].parentNode.appendChild(document.createElement('td')); tds[e].style.display="none"; tds[e+1].style.display="none"; tds[e+2].style.display="none"; tds[e+3].style.display="none"; tds[e+4].style.display="none"; new_cell.style.backgroundImage="url("+boardbgImg+")"; new_tbl=new_cell.appendChild(document.createElement('table')); new_tbl.width="100%"; new_tbl.style.backgroundColor=newBGColor; new_tbl.cellSpacing=0; new_cell.style.backgroundColor=newBGColor; new_cell.colSpan=5; new_tbl.insertRow(0); new_tbl.insertRow(0); new_tbl.insertRow(0); new_tbl.rows[0].insertCell(0); new_tbl.rows[0].insertCell(0); new_tbl.rows[0].cells[0].height=30; new_tbl.rows[0].style.backgroundImage="url("+upperGrad+")"; new_tbl.rows[0].cells[0].appendChild(board_name); new_tbl.rows[0].cells[0].appendChild(document.createTextNode(" - [Topics: ")) new_tbl.rows[0].cells[0].appendChild(board_topics) new_tbl.rows[0].cells[0].appendChild(document.createTextNode(" Posts: ")) new_tbl.rows[0].cells[0].appendChild(board_posts) new_tbl.rows[0].cells[0].appendChild(document.createTextNode(" ]")) new_tbl.rows[0].cells[0].width="70%"; new_tbl.rows[0].cells[1].appendChild(on_off); new_tbl.rows[0].cells[1].align="right"; new_tbl.rows[1].insertCell(0); new_tbl.rows[1].insertCell(0); new_tbl.rows[1].cells[0].width="70%"; new_tbl.rows[1].cells[0].appendChild(document.createElement('table')); new_tbl2=new_tbl.rows[1].cells[0].getElementsByTagName('table')[0]; new_tbl2.width="100%"; new_tbl2.insertRow(0); new_tbl2.insertRow(0); new_tbl2.rows[0].insertCell(0); new_tbl2.rows[1].insertCell(0); new_tbl2.rows[0].cells[0].appendChild(board_desc); if (last_post_info.innerHTML.length>3) { new_tbl2.rows[1].cells[0].appendChild(document.createTextNode("Last Post: ")); new_tbl2.rows[1].cells[0].appendChild(last_post_title); new_tbl2.rows[1].cells[0].appendChild(document.createTextNode(" by ")); new_tbl2.rows[1].cells[0].appendChild(last_post_auth); new_tbl2.rows[1].cells[0].appendChild(document.createTextNode(" ")); new_tbl2.rows[1].cells[0].appendChild(last_post_date); } new_tbl2.rows[1].cells[0].align="right"; new_tbl.rows[1].cells[1].appendChild(board_mods); new_tbl.rows[1].cells[1].align="right"; new_tbl.rows[2].insertCell(0); new_tbl.rows[2].cells[0].colSpan=2; new_tbl.rows[2].cells[0].height=30; new_tbl.rows[2].style.backgroundImage="url("+lowerGrad+")"; if (subs) { new_tbl.rows[2].cells[0].appendChild(document.createTextNode("Sub Boards: " + subs)) } if ((tds[e].parentNode.nextSibling && tds[e].parentNode.nextSibling.firstChild.className) =="catbg" || !tds[e].parentNode.nextSibling) { footRow=document.createElement('tr'); // footRow.height=20; footCell=footRow.appendChild(document.createElement('td')); footCell.height=20; tds[e].parentNode.parentNode.insertBefore(footRow.cloneNode(true),tds[e].parentNode.nextSibling); tds[e].parentNode.parentNode.insertBefore(footRow,tds[e].parentNode.nextSibling); footCell.style.backgroundImage="url("+boardfootImg+")"; footCell.style.backgroundRepeat="no-repeat"; footCell.style.backgroundPosition="center top"; } } } //--> </script>
SEE PREVIEWEDIT: fixed bug when last post was by guest.
|
|
|
Post by Wormopolis on Feb 28, 2009 13:02:03 GMT -8
Update:
added in Info Center Remodel to match boards.
|
|