Font Family Select Box
Posted: 11 Mar 2010, 06:20
Font Family Select Box
Author: opalelement
Description: The Font Family BBCode inserts a dropdown selectbox with several fonts to choose from
Installation: Open/styles/yourstyle/template/posting_buttons.html
Find:
Add after, on a new line:
We also need to create a BBCode
BBCode:
HTML:
Helpline:
Example:
Demo:
[font=Tahoma]Hello world[/font]
[font=Verdana]Hello world[/font]
[font=Arial Black]Hello world[/font]
[font=Comic Sans MS]Hello world[/font]
[font=Lucida Console]Hello world[/font]
[font=Palatino Linotype]Hello world[/font]
[font=MS Sans Serif4]Hello world[/font]
[font=System]Hello world[/font]
[font=Georgia1]Hello world[/font]
[font=Impact]Hello world[/font]
[font=Courier]Hello world[/font]
[font=Wingdings]Hello world[/font]
Author: opalelement
Description: The Font Family BBCode inserts a dropdown selectbox with several fonts to choose from
Installation: Open/styles/yourstyle/template/posting_buttons.html
Find:
Code: Select all
<select name="addbbcode20" onchange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]');this.form.addbbcode20.selectedIndex = 2;" title="{L_BBCODE_F_HELP}">
<option value="50">{L_FONT_TINY}</option>
<option value="85">{L_FONT_SMALL}</option>
<option value="100" selected="selected">{L_FONT_NORMAL}</option>
<option value="150">{L_FONT_LARGE}</option>
<option value="200">{L_FONT_HUGE}</option>
</select>
Code: Select all
<select name="addbbcodefont" onchange="bbfontstyle('[font=' + this.form.addbbcodefont.options[this.form.addbbcodefont.selectedIndex].value + ']', '[/font]');this.form.addbbcodefont.selectedIndex = 6;" title="Font style: [font=Tahoma]text[/font]">
<option style="font-family: Tahoma;" value="Tahoma">Tahoma</option>
<option style="font-family: Verdana;" value="Verdana">Verdana</option>
<option style="font-family: Arial Black;" value="Arial Black">Arial Black</option>
<option style="font-family: Comic Sans MS;" value="Comic Sans MS">Comic Sans MS</option>
<option style="font-family: Lucida Console;" value="Lucida Console">Lucida Console</option>
<option style="font-family: Palatino Linotype;" value="Palatino Linotype">Palatino Linotype</option>
<option value="" selected="selected">Font Family</option>
<option style="font-family: MS Sans Serif4;" value="MS Sans Serif4">MS Sans Serif4</option>
<option style="font-family: System;" value="System">System</option>
<option style="font-family: Georgia1;" value="Georgia1">Georgia1</option>
<option style="font-family: Impact;" value="Impact">Impact</option>
<option style="font-family: Courier;" value="Courier">Courier</option>
<option style="font-family: Symbol;" value="Symbol">Symbol</option>
</select>
We also need to create a BBCode
BBCode:
Code: Select all
[font={SIMPLETEXT}]{TEXT}[/font]
Code: Select all
<span style="font-family:{SIMPLETEXT};">{TEXT}</span>
Code: Select all
No helpline and remember to set "Display on posting" to no
Code: Select all
[font=Tahoma]Hello world[/font]
[font=Verdana]Hello world[/font]
[font=Arial Black]Hello world[/font]
[font=Comic Sans MS]Hello world[/font]
[font=Lucida Console]Hello world[/font]
[font=Palatino Linotype]Hello world[/font]
[font=MS Sans Serif4]Hello world[/font]
[font=System]Hello world[/font]
[font=Georgia1]Hello world[/font]
[font=Impact]Hello world[/font]
[font=Courier]Hello world[/font]
[font=Wingdings]Hello world[/font]
[font=Tahoma]Hello world[/font]
[font=Verdana]Hello world[/font]
[font=Arial Black]Hello world[/font]
[font=Comic Sans MS]Hello world[/font]
[font=Lucida Console]Hello world[/font]
[font=Palatino Linotype]Hello world[/font]
[font=MS Sans Serif4]Hello world[/font]
[font=System]Hello world[/font]
[font=Georgia1]Hello world[/font]
[font=Impact]Hello world[/font]
[font=Courier]Hello world[/font]
[font=Wingdings]Hello world[/font]