Post by Malagrond on Jun 22, 2009 11:09:24 GMT -8
Description:
Adds icons to thread names in your Code boards. Use the following tags to label threads:
- Approved
[R] - Rejected
- Pending
And all non-tagged threads are given an "unknown" status icon.
Preview: Click
Board Footer
<script type="text/Javascript">
<!--
/* Code Approval Status Icons
Created by Malagrond
Stream-lined by SubDevo
[R] - Rejected
[P] - Pending
[A] - Approved
Board Footers
*/
// Edit these with your own icons, or use the ones provided.
var apURL = "http://wimg.co.uk/ToD.png"; // Codes that have been accepted.
var unURL = "http://wimg.co.uk/yHg.png"; // Codes that have yet to be inspected
var hlURL = "http://wimg.co.uk/Vfr.png"; // Codes that are pending inspection.
var reURL = "http://wimg.co.uk/kTm.png"; // Codes that have been rejected.
// No need to edit below.
var allLinks=document.getElementsByTagName("a");
for(var i=0;i<allLinks.length;i++){
if(allLinks[i].href.match(/display&thread=/gi) && allLinks[i].parentNode.parentNode && allLinks[i].parentNode.parentNode.parentNode.previousSibling.previousSibling){
makeIMG(/\[A\]/g,apURL,'[A]',0); makeIMG(/\[P\]/g,hlURL,'[P]',0); makeIMG(/\[R\]/g,reURL,'[R]',0);
var nP=allLinks[i].parentNode.parentNode.parentNode.previousSibling.previousSibling;
if(!allLinks[i].innerHTML.match(/\[(A|R|P)\]/g)&&nP&& !nP.innerHTML.match(/sticky/gi)){makeIMG("",unURL,'[?]',1);}
}
}
function makeIMG(n,u,a,o){
with(allLinks[i]){ var nx="<img src='" + u + "' border='0' alt='"+a+"' />";
if(o){innerHTML=nx+" "+innerHTML;
}else if(innerHTML.match(n)){innerHTML=innerHTML.replace(n, nx);}
}
}
-->
</script>
~Mala