|
Post by Wormopolis on Jan 5, 2010 13:22:46 GMT -8
Browser Tested: IE and FF placement: main footer
Create a Div with id of "before_" and category id (i.e. before_general) and this code will insert it into the boards table right before the category will also insert right before the info center if you have a div with id="before_infocenter"
Code:
<div id="before_general" style="display:none"> <table width="100%" bgcolor="000001"><tr><td><center><font color="FFFFFF">This<br>is<br>a<br>test<br><br>and done</font></center></td></tr></table> </div>
<script type="text/javascript"> <!-- // Inject HTML before category/infocenter // By Wormopolis - [url]wormocodes.proboards.com[/url] // keep header intact
if (!location.href.match(/noinject/)) { for (lnks=document.getElementsByTagName('a'),b=0; b<lnks.length; b++) { chk=document.getElementById('before_'+lnks[b].name); if (chk) { tmpplc=lnks[b].parentNode.parentNode; holdcols=lnks[b].parentNode.colSpan; nwRw=tmpplc.parentNode.insertRow(tmpplc.rowIndex); nwcl=nwRw.insertCell(0); with (nwcl) { className='catbg'; colSpan=holdcols; appendChild(chk); } chk.style.display=""; } } for (tds=document.getElementsByTagName('td'), tt=0; tt<tds.length; tt++) { if (tds[tt].className=='titlebg' && tds[tt].innerHTML.match(/info center/i) && tds[tt].colSpan==2) { tmpplc=tds[tt].parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode; chk=document.getElementById('before_infocenter'); if (chk) { tmpplc.parentNode.insertBefore(chk, tmpplc); chk.style.display=""; } break; } } } // --> </script>
you can have as many DIVs as you have categories as long as the div elements exist before the script.
|
|
|
Post by Wormopolis on Mar 4, 2011 2:45:38 GMT -8
version upgrade: now also allows something inserted before info center
|
|