|
Post by Isa The Great on Jul 26, 2009 10:32:53 GMT -5
This code will add a copyright message including the poster's name after each post, right above the signature area. It works for guests too.
<script type="text/javascript"> <!-- /* add a copyright to every user's post by california */
var copyright="©2008, <i>#username#</i>, All Rights Reserved.";
var td=document.getElementsByTagName("td"); if(location.href.match(/action=(display|search2)/)){ for(i=0;i<td.length;i++){ var tda=td[i].getElementsByTagName("a"); if(td[i].width=="20%" && td[i].className.match(/windowbg/)){ if(tda.length>2){ if(tda[1].name) dname = tda[2].innerHTML; else dname = tda[1].innerHTML; }else{ var dname = (td[i].innerHTML.match(/<\/a>\s?(\w+)\s?</i)) ? RegExp.$1 : 'guest'; } } if(td[i].colSpan=="3" && td[i].vAlign=="bottom"){ td[i].innerHTML=copyright.replace(/#username#/gi,dname)+td[i].innerHTML; } } } // --> </script>
Board Footers, global okay
Edit the message in cyan. The red will be replaced with the user's display name, so make sure it appears somewhere in the message as #username#, and do not change it.
|
|