Post by hpmad on Jul 11, 2008 19:50:06 GMT -8
Description:
This code puts three drop down menus in place of the UBBC buttons: one for UBBC, another for fonts, and the last one for font size. (The drop down for text colors is already a standard ProBoards feature.)
Global Footer
<script type="text/javascript">
<!--
/* UBBC, Font, and Font Size Drop Down by hpmad
Do not repost or claim without permission from creator
For more codes like this one go to: talkpark.proboards.com */
if(document.postForm){
var ubbc = document.postForm.color.parentNode.getElementsByTagName('a');
var ubbcCell = document.postForm.color.parentNode;
var ubbcSel = document.createElement('select');
ubbcSel[0] = new Option("UBBC Codes");
for(i=0;i<ubbc.length;i++){
if(!ubbc.firstChild.alt.match(/Font/)) ubbcSel[ubbcSel.length] = new Option(ubbc.firstChild.alt.replace(/\[|\]/,''), ubbc.href);
ubbc.parentNode.removeChild(ubbc);
i--;
}
var fontFSel = document.createElement('select');
fontFSel[0] = new Option('Font Face');
fontFSel[1] = new Option('Verdana','Verdana');
fontFSel[2] = new Option('Arial','Arial');
fontFSel[3] = new Option('Tahoma','Tahoma');
fontFSel[4] = new Option('Times New Roman','Times New Roman');
fontFSel[5] = new Option('Comic Sans MS','Comic Sans MS');
var fontSSel = document.createElement('select');
fontSSel[0] = new Option('Font Size');
for(i=1;i<7;i++) fontSSel = new Option(i,i);
ubbcSel.onchange = function(){ if(this[this.selectedIndex].value){ eval(this[this.selectedIndex].value); this.selectedIndex = 0; }}
fontFSel.onchange = function(){ if(this[this.selectedIndex].value){ add('[font='+this[this.selectedIndex].value+']','[/font]'); this.selectedIndex = 0; }}
fontSSel.onchange = function(){ if(this[this.selectedIndex].value){ add('[size='+this[this.selectedIndex].value+']','[/size]'); this.selectedIndex = 0; }}
ubbcCell.insertBefore(ubbcSel, document.postForm.color);
ubbcCell.insertBefore(document.createTextNode(' '), document.postForm.color);
ubbcCell.insertBefore(fontFSel,document.postForm.color);
ubbcCell.insertBefore(document.createTextNode(' '), document.postForm.color);
ubbcCell.insertBefore(fontSSel,document.postForm.color);
ubbcCell.insertBefore(document.createTextNode(' '), document.postForm.color);
}
//-->
</script>
This code puts three drop down menus in place of the UBBC buttons: one for UBBC, another for fonts, and the last one for font size. (The drop down for text colors is already a standard ProBoards feature.)
Global Footer
<script type="text/javascript">
<!--
/* UBBC, Font, and Font Size Drop Down by hpmad
Do not repost or claim without permission from creator
For more codes like this one go to: talkpark.proboards.com */
if(document.postForm){
var ubbc = document.postForm.color.parentNode.getElementsByTagName('a');
var ubbcCell = document.postForm.color.parentNode;
var ubbcSel = document.createElement('select');
ubbcSel[0] = new Option("UBBC Codes");
for(i=0;i<ubbc.length;i++){
if(!ubbc.firstChild.alt.match(/Font/)) ubbcSel[ubbcSel.length] = new Option(ubbc.firstChild.alt.replace(/\[|\]/,''), ubbc.href);
ubbc.parentNode.removeChild(ubbc);
i--;
}
var fontFSel = document.createElement('select');
fontFSel[0] = new Option('Font Face');
fontFSel[1] = new Option('Verdana','Verdana');
fontFSel[2] = new Option('Arial','Arial');
fontFSel[3] = new Option('Tahoma','Tahoma');
fontFSel[4] = new Option('Times New Roman','Times New Roman');
fontFSel[5] = new Option('Comic Sans MS','Comic Sans MS');
var fontSSel = document.createElement('select');
fontSSel[0] = new Option('Font Size');
for(i=1;i<7;i++) fontSSel = new Option(i,i);
ubbcSel.onchange = function(){ if(this[this.selectedIndex].value){ eval(this[this.selectedIndex].value); this.selectedIndex = 0; }}
fontFSel.onchange = function(){ if(this[this.selectedIndex].value){ add('[font='+this[this.selectedIndex].value+']','[/font]'); this.selectedIndex = 0; }}
fontSSel.onchange = function(){ if(this[this.selectedIndex].value){ add('[size='+this[this.selectedIndex].value+']','[/size]'); this.selectedIndex = 0; }}
ubbcCell.insertBefore(ubbcSel, document.postForm.color);
ubbcCell.insertBefore(document.createTextNode(' '), document.postForm.color);
ubbcCell.insertBefore(fontFSel,document.postForm.color);
ubbcCell.insertBefore(document.createTextNode(' '), document.postForm.color);
ubbcCell.insertBefore(fontSSel,document.postForm.color);
ubbcCell.insertBefore(document.createTextNode(' '), document.postForm.color);
}
//-->
</script>