|
Post by DEER on Jan 15, 2012 12:54:37 GMT -5
Not sure if anyone else uses these, but I do, as I prefer them over stretch tables (Not sure why- perhaps because stretchies need skill to make. Skill I do not possess. xD)
[If I've posted in the wrong place, forgive me, I tend to muddle things. ^^;]
Anyway, this is a code by wormopolis that allows the scrolling divs in regular ol' posting. I can happily display what it does if asked.
It goes in the global footer, beneath the enhanced table tags, if you would care to implement it. It's really quite lovely, so I hope you do <3
<script type="text/javascript"> <!-- // scrollerDiv UBBC in posts // By Wormopolis - [url]www.wormocodes.com[/url]
// use [scrolly:flags][/scrolly] in post around text // flags are: // h(n) height, n=height in pix // w(n) width, n=width in pix // sx scroll x direction // sy scroll y direction // c(hex) color, hex=color in hex // flags seperated by commas: [scrolly:h(100),w(50),sy] blah blah blah [/scrolly]
for (tds=document.getElementsByTagName('td'), i=0; i<tds.length; i++) {
if (tds[i].width=="80%" && tds[i].className.match(/windowbg/) && tds[i].vAlign=="top" && tds[i].innerHTML.match(/\[scrolly(?:\:(.*?))?\]([\s\S]*?)\[\/scrolly\]/i) && !tds[i].innerHTML.match(/\[norunubbc\]/)) { flgs=RegExp.$1; lovetext=RegExp.$2; tmp='<div class="postDiv'+(flgs.match(/ac\(([\w\s]+?)\)/) ? ' '+RegExp.$1:'')+'" style="'+(flgs.match(/h\((\d+)\)/) ? 'height:'+RegExp.$1+';' : '')+(flgs.match(/w\((\d+)\)/) ? 'width:'+RegExp.$1+';' : '')+(flgs.match(/sx/) ? 'overflow-x:auto; white-space: nowrap;' : '')+(flgs.match(/sy/) ? 'overflow-y:auto;' : '')+(flgs.match(/c\((\w+)\)/) ? 'background-color:'+RegExp.$1+';' : '') +(flgs.match(/as\((.+?)\)/) ? RegExp.$1+';':'')+'" '+(flgs.match(/sx/) ? 'noWrap="nowrap" ' : '') + '>'+ lovetext + '</div>';
postCell=tds[i].getElementsByTagName('table')[0].rows[1].cells[0]; postCell.innerHTML=postCell.innerHTML.replace(/\[scrolly(?:\:(.*?))?\]([\s\S]*?)\[\/scrolly\]/i,tmp);
i--; } }
--> </script>
|
|
CROW
Head Admin
[M:0]^#seniormember#packmember#helpful
Posts: 92
|
Post by CROW on Jan 15, 2012 17:59:04 GMT -5
Thank you a lot! Your code has been added to Limbo I've actually never seen this code before and I like it a lot.
|
|