vForums Support > Programming & Coding :: Database of Codes/Hacks/Mods :: > Move Locked Threads To Bottom
Move Locked Threads To Bottom - Posted By Michael (wrighty) on 29th Apr 08 at 4:10pm
This code will move the locked threads to the bottom of the thread listings for that page. Something to help to keep them out of the way.
<script>
/*Move Locked Threads To Bottom
Created By Wrighty
Do Not: Rip, Repost or Claim*/
if(location.href.match(/board\/(\w)(\/page\/(\d)|\/action\/move_topic)?(\/|$)?/)){
var d = get('tr','tag');
var y = d.length;
while(y--){
if(d[y].cells[0].colSpan == '5' && d[y].cells[0].className == 'title1'){
var a = d.length;
while(a--){
if(d[a].cells[0].innerHTML.match(/\[L\]/) && d[a].cells[0].className == 'window1' && d[a].cells[1].innerHTML.match(/started by/i)){
d[y].parentNode.insertBefore(d[a], d[y])
}
}
break;
}
}
}
</script>
Global Footer
Re: Move Locked Threads To Bottom - Posted By ajay (ajay) on 18th May 08 at 9:27pm
Don't the locked threads automaticially go to the bottom if you don't post in them?
Re: Move Locked Threads To Bottom - Posted By Michael (wrighty) on 18th May 08 at 9:28pm
That's if you don't post in them. But if you lock a thread that has just been posted in, it will be at the top... so this will move ALL locked threads to the bottom.
Re: Move Locked Threads To Bottom - Posted By ajay (ajay) on 18th May 08 at 9:33pm
Oh Ok. I see how this works. Thanks for explaining it Wrighty.