vForums Support > Programming & Coding :: Code Requests & Support :: > [F] Main Page Board Customisation

[F] Main Page Board Customisation - Posted By Fel!x (felix) on 12th Apr 08 at 6:56am
Could someone please code a board mod so that boards would appear like this:
Image
[the top one is without suboards, the bottom one is with]

Thank you! =]

Re: Main Page Board Customisation - Posted By Michael (wrighty) on 13th Apr 08 at 6:57pm
Try this! {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="69%" valign='top' align='left'>
                <span id='title'></span><br />
                <span id='stats'></span><br />
                <span id='description'></span>
            </td>
            <td id='last_post' width="25%" align='left'></td>
        </tr>
    </table>
</div>



Global Footer:

<script>
/*Felix Board Mod
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/)){
        var y = (d[i+1].getElementsByTagName('span')[3].innerHTML.match(/Sub-Boards:/))?d[i+1].getElementsByTagName('span')[3].innerHTML.split(/Sub-Boards:/)[0] : d[i+1].getElementsByTagName('span')[3].innerHTML;
        var s = (d[i+1].getElementsByTagName('span')[3].innerHTML.match(/Sub-Boards:/))?d[i+1].getElementsByTagName('span')[3].innerHTML.split(/Sub-Boards:/)[1] : '';

        if(s != ''){
            var a = document.createElement('tr');
            var z = document.createElement('td');
            z.className = 'window1';
            z.colSpan = '3';
            z.innerHTML = '<font size=1>Sub-Board: ' + s + '</font>';
            a.appendChild(z);
            d[i].parentNode.parentNode.insertBefore(a, d[i].parentNode.nextSibling);
        }

        add('status', d[i].innerHTML);
        add('title', d[i+1].getElementsByTagName('span')[1].innerHTML);
        add('stats', d[i+1].getElementsByTagName('span')[2].innerHTML);
        add('description', y);
        add('last_post', d[i+2].firstChild.innerHTML.replace(/by/,'<br />by'));
        d[i+1].style.display = d[i+2].style.display = 'none';
        with(d[i]){
            colSpan = '3';
            width = '100%';
            innerHTML = get('w_b','id').innerHTML;
        }
    }
}
</script>


Re: Main Page Board Customisation - Posted By Fel!x (felix) on 16th Apr 08 at 1:28am
Thanks Wrighty, your brilliant! Smiley