Post by Ross on Jan 7, 2006 18:09:09 GMT -5
Global Footer
What this code does is replaces the 'Admin Functions' buttons found in both threads and when in Advanced Moderation with a drop down menu listing the avalaible actions. Moderators would then choose the desired action such as 'lock' or 'move' from this menu.
<script type="text/javascript">
<!--
/* advanced mod drop down boxes by ross
support.proboards.com */
var td=document.getElementsByTagName("td");
for(e=0; e<td.length; e++) {
if(td[e].width=="100%" && (td[e].colSpan=="2" || td[e].colSpan=="8") && td[e].getElementsByTagName('img')[0].alt.match(/Admin Functions/)) {
var a = td[e].getElementsByTagName("a");
if(location.href.match(/board=/) && td[e].colSpan=="8") {
var advMod='<select onchange="if(this.options[this.selectedIndex].value) document.ammForm.nextaction.value=this.options[this.selectedIndex].value; document.ammForm.submit(); return true;"><option value="">Admin Functions</option><option value="">----------</option>';
for(r=0;r<a.length;r++) {
for(j=0;j<a[r].attributes.length;j++) {
if(a[r].attributes.item(j).nodeName.match(/onclick/i))
{
var val = a[r].attributes.item(j).nodeValue.split('\';doc')[0].split('lue=\'')[1];
var nam = (a[r].firstChild.alt.match(/\[(.+?)\]/))? RegExp.$1 : a[r].firstChild.alt;
advMod +='<option value="'+val+'">'+nam+'</option>';
break;
}
}
}
} else {
var advMod='<select onChange="if(this.options[this.selectedIndex].value) window.location=this.options[this.selectedIndex].value;"><option value="">Admin Functions</option><option value="">----------</option>'
for(r=0;r<a.length;r++) {
var val = a[r].href;
var nam = (a[r].firstChild.alt.match(/\[(.+?)\]/))? RegExp.$1 : a[r].firstChild.alt;
advMod+='<option value="'+val+'">'+nam+'</option>';
}
}
advMod+='</select>'
td[e].innerHTML=advMod;
}
}
//-->
</script>
What this code does is replaces the 'Admin Functions' buttons found in both threads and when in Advanced Moderation with a drop down menu listing the avalaible actions. Moderators would then choose the desired action such as 'lock' or 'move' from this menu.
<script type="text/javascript">
<!--
/* advanced mod drop down boxes by ross
support.proboards.com */
var td=document.getElementsByTagName("td");
for(e=0; e<td.length; e++) {
if(td[e].width=="100%" && (td[e].colSpan=="2" || td[e].colSpan=="8") && td[e].getElementsByTagName('img')[0].alt.match(/Admin Functions/)) {
var a = td[e].getElementsByTagName("a");
if(location.href.match(/board=/) && td[e].colSpan=="8") {
var advMod='<select onchange="if(this.options[this.selectedIndex].value) document.ammForm.nextaction.value=this.options[this.selectedIndex].value; document.ammForm.submit(); return true;"><option value="">Admin Functions</option><option value="">----------</option>';
for(r=0;r<a.length;r++) {
for(j=0;j<a[r].attributes.length;j++) {
if(a[r].attributes.item(j).nodeName.match(/onclick/i))
{
var val = a[r].attributes.item(j).nodeValue.split('\';doc')[0].split('lue=\'')[1];
var nam = (a[r].firstChild.alt.match(/\[(.+?)\]/))? RegExp.$1 : a[r].firstChild.alt;
advMod +='<option value="'+val+'">'+nam+'</option>';
break;
}
}
}
} else {
var advMod='<select onChange="if(this.options[this.selectedIndex].value) window.location=this.options[this.selectedIndex].value;"><option value="">Admin Functions</option><option value="">----------</option>'
for(r=0;r<a.length;r++) {
var val = a[r].href;
var nam = (a[r].firstChild.alt.match(/\[(.+?)\]/))? RegExp.$1 : a[r].firstChild.alt;
advMod+='<option value="'+val+'">'+nam+'</option>';
}
}
advMod+='</select>'
td[e].innerHTML=advMod;
}
}
//-->
</script>