vForums Support > Programming & Coding :: Database of Codes/Hacks/Mods :: > Sticky Splitter

Sticky Splitter - Posted By Michael (wrighty) on 16th Mar 08 at 1:21pm
This will separate the stickies from the announcements in any board, by a simple bar.

<script>
/*Sticky Splitter
Coded By Wrighty
No Ripping, Reposting or Claiming*/

var sticky = {
    splitter: function(){
        for(a=0;a<get('table','tag').length;a++){
            if(get('table','tag')[a].cellSpacing=='1' && get('table','tag')[a].cellPadding=='3'){
                var t=get('table','tag')[a].getElementsByTagName('tr');
                for(i=0;i<t.length;i++){
                    if(t[i].innerHTML.match(/Announcement:/i) && t[i+1] && t[i+1].cells[0].getElementsByTagName('img')[0].alt.match(/(\[s\]|\[sl\])/i)){
                        var lin=get('table','tag')[a].insertRow(i-1);
                        var box=lin.insertCell(0);
                        with(box){
                            colSpan="5";
                            height="10px";
                            className = 'title2'
                        }
                    }
                }
            }
        }
    }
}
if(location.href.match(/\/board\/(\w)/)){
    sticky.splitter();
}
</script>


Global Footer

Re: Sticky Splitter - Posted By [.tR] ookie1 (ookie1) on 23rd Apr 08 at 6:52am
Doesn't vForums have this built in?

Re: Sticky Splitter - Posted By dog199200 (dog199200) on 23rd Apr 08 at 1:42pm
no vforums seperates the Stickies and Announcements from normals thread, and what this code does is seperates the Stickies from the Announcements.

Re: Sticky Splitter - Posted By ajay (ajay) on 23rd Apr 08 at 1:56pm
Posted By dog199200 on 23rd Apr 08 at 1:42pm
 
no vforums seperates the Stickies and Announcements from normals thread, and what this code does is seperates the Stickies from the Announcements.




It does? That's really cool. Wrighty great job on the code. I am using it on my test board {Wink} .