Post by Wild1145 on Dec 26, 2012 20:50:41 GMT
Tidying Locked Threads:
Global Footer:
Sticky Thread Sorter
Global Footer
Average Posts Per Day
Global Footer
They are just some ones i found, hope they can be of use for someone
Global Footer:
<script type="text/javascript">
<!--
/*Strike through Locked Topics - By iAlex - Open Source*/
var iTheLock="locked.gif"; //Locked Topic Icon
if(location.href.match(/board=/) && !location.href.match(/action/)){
var iTd=document.getElementsByTagName('td');
for(i=0;i<iTd.length;i++){
if((iTd.item(i).width=="43%"|iTd.item(i).width=="48%") && iTd.item(i).className.match(/windowbg$/) && iTd.item(i-1).width=="5%" && iTd.item(i-1).align=="center" && iTd.item(i-2).firstChild.firstChild.src.match(iTheLock+'$')){
iTd.item(i).getElementsByTagName('font').item(0).style.textDecoration='line-through';
}
}
}
//-->
</script>
Sticky Thread Sorter
Global Footer
<script type="text/javascript">
<!--
/* sort sticky threads alphabetically - ross
please do not repost without permission */
var stickyImgs = /\/(sticky|stickylock)\.(gif|jpe?g|png|bmp)$/;
if(location.href.match(/board=\w+(&page=\d+)?(&moderationmode=\d)?(#\w+)?$/)) {
var stickies = [];
var tr = document.getElementsByTagName('tr');
var amm = (document.ammForm)? 1 : 0;
for( r=0; r<tr.length; r++ ) {
var img = tr.item(r).getElementsByTagName('img');
if( tr.item(r).cells.length == (amm + 7) && !tr.item(r).innerHTML.match(/announcement.gif/) && img.item(0) && img.item(0).src.match(stickyImgs)) {
var re = [tr.item(r).getElementsByTagName('a').item(0).innerHTML, tr.item(r)];
stickies.push(re);
tr.item(r).id = 'lastSticky';
tr.item(r).style.display = 'none';
}
}
stickies.sort();
if(stickies.length > 0) {
for( i=stickies.length-1; i>-1; i-- ) {
stickies[1].style.display = '';
document.getElementById('lastSticky').parentNode.insertBefore(stickies[1], document.getElementById('lastSticky'));
}
}
}
//-->
</script>
Average Posts Per Day
Global Footer
<script type="text/javascript">
<!--
/* Addon to Average Posts Per Day - Adds to MP */
var months = new Array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec');
var date = new Date();
var year = date.getYear();
if(year <= 1900)
year += 1900
var month = date.getMonth();
var td = document.getElementsByTagName('td');
for(i=0; i<td.length; i++) {
if(td.item(i).width == '20%' && td.item(i).innerHTML.match(/Joined: (\w{3})\s(\d{4})/)) {
var total_days = date.getDate() - 15;
for(m=0; m<months.length; m++) {
if(months[m] == RegExp.$1) {
reg_month = m;
break;
}
}
var total_months = month - reg_month;
total_days += (total_months * 30);
var total_years = year - parseInt(RegExp.$2);
total_days += 365 * total_years;
td.item(i).innerHTML.match(/Posts: (.+?)(<|$)/);
posts = parseInt(RegExp.$1.replace(/,/g, ''));
average = Math.ceil((posts / total_days) * 100) / 100
td.item(i).innerHTML = td.item(i).innerHTML.replace(/(Posts: .+?)(<|$)/, '$1/'+ average +' per day$2');
}
}
//-->
</script>
They are just some ones i found, hope they can be of use for someone