vForums Support > Programming & Coding :: Database of Codes/Hacks/Mods :: > Merge On/Off Cell With Board Name

Merge On/Off Cell With Board Name - Posted By Michael (wrighty) on 13th Apr 08 at 8:25pm
This will merge the first 2 cells of the 'board' listing pages. {Smile}

Global Header:
<div id='w_b' style="display: none">
    <table border='0' cellspacing='1' cellpadding='0' width="100%">
        <tr>
            <td id='status' width="6%" align="center"></td>
            <td width="94%" valign='top' align='left' id="hold"></td>
        </tr>
    </table>
</div>


Global Footer:
<script>
/*Merge On/Off Cell With Board Name
Created By Wrighty
No Ripping, Reposting or Claiming!*/

var d = get('td','tag');
function add(x,y){
    get(x,'id').innerHTML = y;
}

for(i=0; i<d.length; i++){
    if(d[i].innerHTML.match(/(No )?New Posts/) && d[i].className.match(/boardstatus/)){
        add('status', d[i].innerHTML);
        add('hold', d[i+1].innerHTML);
        d[i+1].style.display = 'none';
        with(d[i]){
            colSpan = '2';
            width = '75%';
            innerHTML = get('w_b','id').innerHTML;
        }
    }
}
</script>


Global Footer