Post by Ross on Apr 17, 2006 23:59:21 GMT
Global Footer
This is a remodel of the mini-profile, rearranging some pieces and putting tables around others. You can edit the CSS at the start of the script to change the style of these tables. Please be aware it may not work with some other mini-profile codes. For maximum compatibility, I'd recommend the bottom of the Global Footer
Preview: Here
<style type="text/css">
<!--
.mp_stats { width: 75%; margin-top: 10px; }
.mp_stats td { border-color: #000000; border-style: solid; border-width: 1px; }
-->
</style>
<script type="text/javascript">
<!--
/* mini-profile tables
coded by ross - support.proboards.com
do not redistribute without permission */
function br() {
td.item(i).appendChild(document.createElement('br'));
}
function txt(t) {
td.item(i).appendChild(document.createTextNode(t));
}
function ap(c) {
td.item(i).appendChild(c);
}
var td = document.getElementsByTagName('td');
if(location.href.match(/ion=(display|goto|(pm)?(calendar)?view|(user)?recent|search2)/)) {
for( i=0; i<td.length; i++ ) {
if(td.item(i).width == '20%' && td.item(i).vAlign == 'top' && td.item(i).innerHTML.match(/(Posts|Guest)/)) {
var temp = td.item(i).cloneNode(true);
var a = temp.getElementsByTagName('a');
td.item(i).innerHTML = '';
td.item(i).align = 'center';
if(a.item(0).name)
ap(a.item(0));
if(temp.innerHTML.match(/Posts:\s\d+/)) {
var center = temp.getElementsByTagName('center').item(0);
var settings = [
a.item(0).parentNode,
((temp.innerHTML.match(/\/a><\/b>(<br>.+?)<br>member is/i))? RegExp.$1 : ''),
(center.innerHTML.match(/<br><br>(.+?)<br><br>/i)? RegExp.$1 : ''),
center.firstChild
];
var infoSections = temp.innerHTML.split(/<\/center>/i)[1].split(/<br>/i);
infoSections.reverse();
infoSections.push('Status: '+ ((temp.innerHTML.match(/>(member is )offline/))? 'Offline' : 'Online'));
infoSections.reverse();
infoSections.push(center.innerHTML.split(/<br><br>/i)[center.innerHTML.split(/<br><br>/i).length-1].replace(/<br>/i,''));
settings[0].firstChild.style.textDecoration = 'underline';
settings[0].style.fontSize = '13px';
ap(document.createElement('div'));
td.item(i).lastChild.align = 'left';
td.item(i).lastChild.appendChild(settings[0]);
td.item(i).lastChild.innerHTML += settings[1];
br();
br();
ap(settings[3]);
br();
br();
txt(settings[2]);
br();
}
else if(temp.innerHTML.match(/Guest/)) {
infoSections = [];
infoSections[0] = '<center>'+temp.innerHTML.split(/<br>/i)[0]+'</center>';
infoSections[1] = '<center>('+temp.innerHTML.split(/<br>/i)[1]+')</center>';
}
var infoTable = document.createElement('table');
infoTable.className = 'mp_stats';
infoTable.cellSpacing = '3';
for(j=infoSections.length-1; j>-1; j--) {
if(infoSections[j].length > 1) {
var newCell = infoTable.insertRow(0).insertCell(0);
newCell.innerHTML = infoSections[j];
newCell.className = (td.item(i).className.match(/bg2/))? 'windowbg' : 'windowbg2';
}
}
td.item(i).appendChild(infoTable);
}
}
}
//-->
</script>
This is a remodel of the mini-profile, rearranging some pieces and putting tables around others. You can edit the CSS at the start of the script to change the style of these tables. Please be aware it may not work with some other mini-profile codes. For maximum compatibility, I'd recommend the bottom of the Global Footer
Preview: Here
<style type="text/css">
<!--
.mp_stats { width: 75%; margin-top: 10px; }
.mp_stats td { border-color: #000000; border-style: solid; border-width: 1px; }
-->
</style>
<script type="text/javascript">
<!--
/* mini-profile tables
coded by ross - support.proboards.com
do not redistribute without permission */
function br() {
td.item(i).appendChild(document.createElement('br'));
}
function txt(t) {
td.item(i).appendChild(document.createTextNode(t));
}
function ap(c) {
td.item(i).appendChild(c);
}
var td = document.getElementsByTagName('td');
if(location.href.match(/ion=(display|goto|(pm)?(calendar)?view|(user)?recent|search2)/)) {
for( i=0; i<td.length; i++ ) {
if(td.item(i).width == '20%' && td.item(i).vAlign == 'top' && td.item(i).innerHTML.match(/(Posts|Guest)/)) {
var temp = td.item(i).cloneNode(true);
var a = temp.getElementsByTagName('a');
td.item(i).innerHTML = '';
td.item(i).align = 'center';
if(a.item(0).name)
ap(a.item(0));
if(temp.innerHTML.match(/Posts:\s\d+/)) {
var center = temp.getElementsByTagName('center').item(0);
var settings = [
a.item(0).parentNode,
((temp.innerHTML.match(/\/a><\/b>(<br>.+?)<br>member is/i))? RegExp.$1 : ''),
(center.innerHTML.match(/<br><br>(.+?)<br><br>/i)? RegExp.$1 : ''),
center.firstChild
];
var infoSections = temp.innerHTML.split(/<\/center>/i)[1].split(/<br>/i);
infoSections.reverse();
infoSections.push('Status: '+ ((temp.innerHTML.match(/>(member is )offline/))? 'Offline' : 'Online'));
infoSections.reverse();
infoSections.push(center.innerHTML.split(/<br><br>/i)[center.innerHTML.split(/<br><br>/i).length-1].replace(/<br>/i,''));
settings[0].firstChild.style.textDecoration = 'underline';
settings[0].style.fontSize = '13px';
ap(document.createElement('div'));
td.item(i).lastChild.align = 'left';
td.item(i).lastChild.appendChild(settings[0]);
td.item(i).lastChild.innerHTML += settings[1];
br();
br();
ap(settings[3]);
br();
br();
txt(settings[2]);
br();
}
else if(temp.innerHTML.match(/Guest/)) {
infoSections = [];
infoSections[0] = '<center>'+temp.innerHTML.split(/<br>/i)[0]+'</center>';
infoSections[1] = '<center>('+temp.innerHTML.split(/<br>/i)[1]+')</center>';
}
var infoTable = document.createElement('table');
infoTable.className = 'mp_stats';
infoTable.cellSpacing = '3';
for(j=infoSections.length-1; j>-1; j--) {
if(infoSections[j].length > 1) {
var newCell = infoTable.insertRow(0).insertCell(0);
newCell.innerHTML = infoSections[j];
newCell.className = (td.item(i).className.match(/bg2/))? 'windowbg' : 'windowbg2';
}
}
td.item(i).appendChild(infoTable);
}
}
}
//-->
</script>