|
Post by Wormopolis on Dec 19, 2008 14:32:06 GMT -8
Browser tested: IE and FF Placement: Main Footer
Pulls last post info from a specific board and adds to News Fader Scroller.
<script type="text/javascript"> <!-- // pull latest post from a board v1.2 // by Wormopolis
var board_name='(announce|shouts|special)'; //edit board name here var msg_title = "LATEST NEWS:"; //edit the top of announcement var linkable_board=true; //make thread title a link to thread // dont need to edit below unless you want to change how it works
if (!location.href.match(/action=/i)) { var hmm = document.getElementsByTagName('a'); for (i=0; i<hmm.length; i++) { if (hmm[i].href.match(new RegExp("board="+board_name,'i'))&& !hmm[i].parentNode.innerHTML.match(/onclick/i) && hmm[i].parentNode.parentNode.width=='24%') { var msg_a= hmm[i].parentNode.innerHTML; var msg_time=msg_a.split(/\<br/i)[0]; var msg_auth=msg_a.split(/by /i)[1].split(/\<br/i)[0]; tmp=document.createElement('div'); tmp.appendChild(hmm[i].cloneNode(true)); var msg = (linkable_board ? tmp.innerHTML : hmm[i].innerHTML); var msg_final = msg_title + "<br>"+msg+"<br>"+msg_time+" by "+msg_auth; var fscroll = document.getElementById("fscroller"); if (fscroll) fContent[fContent.length]=msg_final; fscroll.parentNode.height=100; fscroll.style.valign="middle"; } } }
// --> </script>
Preview: (Ill get this soon)
|
|
|
Post by Wormopolis on Feb 2, 2010 11:45:29 GMT -8
edited to accomodate multiple boards
|
|