|
Post by Wormopolis on Sept 15, 2010 20:17:14 GMT -8
Browser Tested: IE and FF placement: main footer
Will insert a new column to the right of the info center HTML that you can insert new HTML into. put whatever you want to add inside the accompanying div.
code:
<div id="infocenter_extras" style="display:none"> <!-- PUT ALL THE HTML STUFF YOU WANT INSIDE THIS DIV --> <center> <img src="http://i197.photobucket.com/albums/aa250/WORMOPOLIS/worm_unblink.jpg" alt="[avatar]"><br> <font size='2'>Welcome to WormoCodes!</font> </center> </div>
<script type="text/javascript"> <!-- // Extra Column in infocenter // version 2.0 // By Wormopolis - www.wormocodes.com // keep header intact - do not repost
if (pb_action=='home') { var test=document.getElementsByTagName("td"); for (i=0; i<test.length;i++) { if (test[i].innerHTML.match("Info Center")&& !test[i].innerHTML.match(/TABLE/i) && test[i].colSpan==2) { var nwtbl=document.createElement('table'); nwtbl.width='100%'; trow=nwtbl.insertRow(0); nwtbl.style.height='100%'; for (orow=test[i].parentNode.parentNode.parentNode.rows, j=orow.length-1; j>0; j--) { trow.parentNode.insertBefore(orow[j],trow.parentNode.firstChild); } nwtbl.deleteRow(-1); var nwrw=test[i].parentNode.parentNode.parentNode.insertRow(-1); nwrw.insertCell(0); nwrw.insertCell(0); nwrw.cells[0].width="80%"; nwrw.cells[0].style.height='100%'; nwrw.cells[1].className='windowbg'; nwrw.cells[1].align="center"; var df=document.createDocumentFragment(); while (document.getElementById('infocenter_extras').firstChild) df.appendChild(document.getElementById('infocenter_extras').firstChild); nwrw.cells[1].appendChild(df); nwrw.parentNode.parentNode.cellSpacing=0; nwrw.parentNode.parentNode.cellPadding=0; nwrw.cells[0].appendChild(nwtbl); break; } } } //--> </script>
Preview: using it on main page (though hookworm does interesting things to it)
|
|
|
Post by Wormopolis on Sept 16, 2010 11:58:50 GMT -8
bug fix: I keep setting the pb_action instead of comparing it.
|
|
wildgoosespeeder
Code Helper
Tiers are for strangers!
Posts: 530
wildgoosespeeder said 161 great things
|
Post by wildgoosespeeder on Jan 2, 2011 1:49:11 GMT -8
bug fix: I keep setting the pb_action instead of comparing it. That problem has at times got the best of me. One time it shut down an entire forum.
|
|
|
Post by Streamstrider on Apr 19, 2011 12:51:13 GMT -8
I have a small problem. XD I tried this code on one of my forums (not open yet, so no worries there) and it changes the info center styling a little. Here is my forum. Would it be possible to collapse the info center borders to 1px (and include a 1px black border around the added column), retain the normal title padding, and perhaps expand the "active users in the past 24 hours" vertically to fill up the extra space?
|
|
|
Post by Wormopolis on Apr 19, 2011 15:52:15 GMT -8
recopy.
|
|
|
Post by Streamstrider on Apr 19, 2011 16:00:16 GMT -8
No change.
|
|
|
Post by Wormopolis on Apr 19, 2011 22:58:19 GMT -8
alright.. weird.. but ok. recopy again.
|
|
|
Post by Streamstrider on Apr 20, 2011 14:45:04 GMT -8
Well, the black blobs are gone, but the 2px borders remain. XD I tried a code that removes borders, and it worked to remove them, but I don't want to remove them. XD
|
|
|
Post by Wormopolis on Apr 20, 2011 15:12:27 GMT -8
after this line:
nwtbl.style.height='100%';
add this one
nwtbl.cellSpacing='0';
|
|
|
Post by Streamstrider on Apr 22, 2011 6:24:36 GMT -8
THANK YOU! It works. Much much much gratitude.
|
|
|
Post by Wormopolis on Apr 23, 2011 12:26:48 GMT -8
not a problem
|
|
|
Post by Streamstrider on May 1, 2011 11:48:46 GMT -8
New problem. XD The c-box is acting strange. When we insert a message, we have to reload the entire page to see it, and it resets the name section. I don't know if it's the info center code or just the c-box itself.
|
|
|
Post by Wormopolis on May 1, 2011 23:21:51 GMT -8
I will try a new method tomorrow. Its a long day tomorrow so bear with me.
|
|
|
Post by Streamstrider on May 2, 2011 13:54:54 GMT -8
I'm patient. No worries.
|
|
|
Post by Wormopolis on May 2, 2011 16:55:56 GMT -8
version upgrade 2.0: used a document fragment method
|
|