Ross
eCreations Staff
Posts: 1,768
|
Post by Ross on Oct 25, 2005 0:44:14 GMT
Main Footer, Displays the Mods of each board in a 'drop down' menu below that board.
<script type="text/javascript"> <!-- /* moderator listings on main page in drop down menus */
var i = document.getElementsByTagName('i'); for(m=0; m<i.length; m++) { if(i[m].innerHTML.match(/Moderator/)) { sel = document.createElement('select'); sel.onchange = function() { if(this.options[this.selectedIndex].value) window.location = this.options[this.selectedIndex].value; } opt = document.createElement('option'); opt.appendChild(document.createTextNode('Moderators')); sel.appendChild(opt); a = i[m].getElementsByTagName('a'); while(a[0]) { opt = document.createElement('option'); opt.value = a[0].href; name = (a[0].firstChild.nodeType == '1')? a[0].firstChild.innerHTML : a[0].innerHTML; opt.appendChild(document.createTextNode(name)); sel.appendChild(opt); i[m].removeChild(a[0]); } i[m].parentNode.parentNode.onclick = function(){ } i[m].parentNode.replaceChild(sel, i[m]) } } //--> </script>
|
|
Richie
Veteran
^ Yes, That's me V_V
Posts: 624
|
Post by Richie on Nov 3, 2005 18:57:43 GMT
Suggestion for A Version 2 of this code: maybe make it so when the mods SN is selected, it'll take them to that user's profile in a new window.
|
|
|
Post by Michael on Nov 3, 2005 21:02:33 GMT
Suggestion for A Version 2 of this code: maybe make it so when the mods SN is selected, it'll take them to that user's profile & if possible, open it in a new window. Well, if you were to test this code out, you'll see that when you click on a mods name, it does bring them to their profile.
|
|
Richie
Veteran
^ Yes, That's me V_V
Posts: 624
|
Post by Richie on Nov 3, 2005 21:29:11 GMT
ok, your right. i edit my last post too.
|
|
Ross
eCreations Staff
Posts: 1,768
|
Post by Ross on Nov 3, 2005 22:16:39 GMT
Suggestion for A Version 2 of this code: maybe make it so when the mods SN is selected, it'll take them to that user's profile in a new window. Some browsers would class that as a Pop-Up and block it. Could be a pain for some members.
|
|
|
Post by pitprincess on Jan 7, 2006 12:09:15 GMT
Can I make a button my self for the mod box or does it have to be the one in the script?
|
|