Font Style Selector
Posted: Wed Oct 22, 2008 10:12 am
To add a Font Style type selector, like I have here, do the following:
Open styles/prosilver/templates/posting_buttons.html
Find:
Add after:
Then you need to create a custom BBCode in ACP. Go to the Posting tab and click on "Create a new BBCode".
For BBCode usage enter:
For HTML Replacement enter:
Leave the rest of the options alone and save. This is a quick way to add the drop-down without any provision for languages. You can add other options to the list as well but keep in mind that common fonts in Windows may not necessarily be common on a Mac or other OS and vice-versa in which case the text will be displayed in regular system-designated font. For a quick guide on this subject see:
http://www.ampsoft.net/webdesign-l/WindowsMacFonts.html
Open styles/prosilver/templates/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="addbbcode22" onchange="bbfontstyle('[font=' + this.options[this.selectedIndex].value + ']', '[/font]');this.selectedIndex = 0;" title="Font type: [font=Arial]Your Text[/font]">
<option value="Arial" selected="selected">Arial</option>
<option value="Times New Roman">Times New Roman</option>
<option value="Courier">Courier</option>
<option value="Comic Sans MS">Comic Sans MS</option>
<option value="Georgia">Georgia</option>
</select>
For BBCode usage enter:
Code: Select all
[font={SIMPLETEXT}]{TEXT}[/font]
Code: Select all
<span style="font-family: {SIMPLETEXT};">{TEXT}</span>
http://www.ampsoft.net/webdesign-l/WindowsMacFonts.html