|
Post by Wormopolis on Sept 15, 2010 16:05:25 GMT -8
Browser Tested: IE and FF placement: main footer
creates a drop down list of specific threads underneath the board description.
code:
<script type="text/javascript"> <!-- // Thread dropdown below description // By Wormopolis - [url]www.wormocodes.com[/url] // concept by rhondairv // do not repost - keep header intact
var dataArray=new Array(); dataArray['codedb']="Spotlight Codes|119:Code Index; 238:Daily Weather Changer; 295: ColorSmear; 304:SkinView"; dataArray['general']="Some Random Threads|19:Hiya!; 588:Cant Get to Headers&Footers?";
// dataArray[BOARD_ID]="DROP_TITLE|THREAD_ID:THREAD_TITLE; THREAD2_ID:THREAD2_TITLE; etc... "; //no ; after last thread title // DO NOT USE : or ; or | in titles or code will not work.
for (tds=document.getElementsByTagName('td'), mt=0; mt<tds.length; mt++) { if (tds[mt].width=='66%' && tds[mt].className.match(/windowbg/) && tds[mt].vAlign=='top') { var bname=tds[mt].firstChild.firstChild.href.match(/board=(.*?)$/) ? RegExp.$1 : ''; if (dataArray[bname]) { nwdv=document.createElement('div'); nwdv.align='center'; droptitle=dataArray[bname].split('|')[0]; var holdthisforme='<select class="tdd" onmouseover="pb_bubble=1" onmouseout="pb_bubble=0" onchange="pb_bubble=1; location.href=this.value"><option value="">'+droptitle+'</option>'; dropdata=dataArray[bname].split('|')[1].split(';'); for (tdrp=0; tdrp<dropdata.length; tdrp++) { holdthisforme+='<option value="/index.cgi?board='+bname+'&action=display&thread='+parseInt(dropdata[tdrp].split(':')[0])+'">'+dropdata[tdrp].split(':')[1]+'</option>'; } nwdv.innerHTML=holdthisforme+'</select>'; tds[mt].appendChild(nwdv); } } }
// --> </script>
preview: have a couple on the main page here.
|
|
|
Post by randie on Sept 21, 2010 23:03:03 GMT -8
Nice Code Wormo!
Can you add a class name to it?
Thanks man!
|
|
|
Post by Wormopolis on Sept 23, 2010 4:37:54 GMT -8
I thought I did.. I put id accidentally. now has class "tdd"
|
|
|
Post by rhondairv on Jan 13, 2011 11:13:51 GMT -8
please delete this, sorry
|
|
|
Post by Wormopolis on Jan 13, 2011 22:48:01 GMT -8
it wont let you delete your own post? weird.. I dont think I have anything in there to prevent it...
|
|
|
Post by rhondairv on Jan 13, 2011 23:13:12 GMT -8
I think i went blind or dumb. I see it now, but i did look then. lol sorry
|
|