|
Post by Wormopolis on Jul 1, 2009 2:03:29 GMT -8
Browser Tested: IE and FF placement: main footer Uses the built in pagedrop function from ProBoards to display a list of sub-boards that will disappear after about 2 seconds if you move your mouse out of it. code: <style type="text/css"> .sbdd { text-decoration: underline} </style>
<script type="text/javascript"> <!-- // sub-board drop down using pagespan functions from ProBoards // v1.61 // by Wormopolis - wormocodes.proboards.com // do not repost - keep header intact
var moveDropToBottom=true; //move (sub-boards) to bottom of cell
var useBoardInclusion=false; //set true if you want only certain boards to have drop var boardsToIncludeThen="board1|board2|board3"; //seperate by |
if (!location.href.match(/nopagedrop/)) { var removePageSpan = ""; var pageSpan = document.getElementById('pagedropmenu'); var boardsToIncludeThen=new RegExp('('+boardsToIncludeThen+')$','');
function load_subboards_PageSpan(obj,stuff) { pageSpan = document.getElementById('pagedropmenu'); var curleft = curtop = 0; if (obj.offsetParent) { curleft = obj.offsetLeft; curtop = obj.offsetTop; while (obj = obj.offsetParent) { curleft += obj.offsetLeft; curtop += obj.offsetTop; } } pageSpan.innerHTML=stuff.innerHTML; pageSpan.style.cssText = "position: absolute; top: "+ (curtop+12) +"px; left: "+curleft+"px; display: ;"; }
var fjumpList=document.getElementById('forumjump').options;
for (tds=document.getElementsByTagName('td'), i=0; i<tds.length; i++) { if (tds[i].width=="66%" && tds[i].className.match(/windowbg/) && tds[i].align=="left" && tds[i].firstChild.innerHTML.match(/sub-board/)) { bname=tds[i].getElementsByTagName('a')[0].href.split('board=')[1]; btitle=tds[i].getElementsByTagName('b')[0].innerHTML; dest=tds[i].firstChild.firstChild.nextSibling; if (dest.innerHTML.match(/viewing/i)) dest=dest.nextSibling; dest_stuff=dest.innerHTML; if (useBoardInclusion && bname.match(boardsToIncludeThen) || !useBoardInclusion) { dest.innerHTML='<span onmouseover="load_subboards_PageSpan(this,this.nextSibling);window.clearTimeout(removePageSpan);" onmouseout="hidePageSpan(event,1);" style="cursor: pointer;" class="pagejump"><font class="sbdd">'+dest_stuff.replace('(','[').replace(')',']') +'</font></span>'; if (moveDropToBottom) { tds[i].appendChild(document.createElement('br')); tds[i].appendChild(dest); } holdstuff=dest.appendChild(document.createElement('span')); holdstuff.style.display="none"; rgxp=new RegExp("\\\/index.cgi\\\?board="+bname+"$","i"); for (j=0; j<fjumpList.length; j++) { if (fjumpList[j].value.match(rgxp)) { while (fjumpList[j+1] && fjumpList[j+1].innerHTML.match(/-{3}\s/)) { holdstuff.innerHTML+="<a onmouseover='window.clearTimeout(removePageSpan);' href='"+ fjumpList[j+1].value +"'>"+ fjumpList[j+1].innerHTML.replace('--- ','') +"</a><br>"; j++; } break; } } } } } } // --> </script>
Preview: using it on main page here, but I dont have many sub-boards. To see it work without remodel: CLICK HERE
|
|
|
Post by Wormopolis on Aug 14, 2009 17:19:20 GMT -8
version 1.01 bug fix if sub-board has a similar name to another board
|
|
catori
Not New Member
Posts: 2
catori said 0 great things
|
Post by catori on Nov 30, 2009 20:43:37 GMT -8
Great code! But I'm having a problem with the dropdown, it seems it wont disappear after two seconds like you said it would, it just kind of stays unless I put my mouse over a different dropdown... and as you know, it just continues. Is there a way to fix this? My sites here undercloudcover.proboards.com/index.cgi
|
|
|
Post by Wormopolis on Nov 30, 2009 22:40:36 GMT -8
Its working for me on you rsite in both IE 7 and FF3. are you using a different browser then that?
|
|
catori
Not New Member
Posts: 2
catori said 0 great things
|
Post by catori on Dec 1, 2009 12:15:47 GMT -8
Nah, its working now, must have been a glitch! Sorry about that.
|
|
|
Post by Wormopolis on Dec 1, 2009 16:53:32 GMT -8
sometimes a timeout will get a hiccup. hope you like it!
|
|
|
Post by Wormopolis on Apr 8, 2010 21:54:53 GMT -8
version upgrade 1.5:
fixed bug when sub-board was last board in forum jump. added in styling for the activation link added variable that allows you to move drop down to bottom of cell.
|
|
Pharmerphil
Not New Member
Posts: 18
Pharmerphil said 0 great things
|
Post by Pharmerphil on Feb 11, 2011 2:04:47 GMT -8
can this be made to be "board selective" I have a few boards with sub boards, but would like only a couple to have this feature? thanx in advance
|
|
|
Post by Wormopolis on Feb 11, 2011 7:14:46 GMT -8
that can be done. would it be easier to make it board inclusive or exclusive?
|
|
Pharmerphil
Not New Member
Posts: 18
Pharmerphil said 0 great things
|
Post by Pharmerphil on Feb 12, 2011 3:45:57 GMT -8
that can be done. would it be easier to make it board inclusive or exclusive? Inclusive please
|
|
|
Post by Wormopolis on Feb 12, 2011 15:47:04 GMT -8
posted - version upgrade 1.6: board inclusion option
|
|
Pharmerphil
Not New Member
Posts: 18
Pharmerphil said 0 great things
|
Post by Pharmerphil on Feb 13, 2011 4:16:11 GMT -8
THANKS A Lot!! ;D
|
|
|
Post by Wormopolis on Feb 13, 2011 16:08:45 GMT -8
did that work out for you then?
|
|
|
Post by Wormopolis on Mar 31, 2011 14:48:04 GMT -8
that link goes to a dead page.
|
|
|
Post by Wormopolis on May 24, 2011 22:51:53 GMT -8
version upgrade 1.61: bug fix caused by last revision
|
|