Page 1 of 1

Font Style Selector

Posted: Wed Oct 22, 2008 10:12 am
by DavidIQ
To add a Font Style type selector, like I have here, do the following:

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>
Add after:

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>
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:

Code: Select all

[font={SIMPLETEXT}]{TEXT}[/font]
For HTML Replacement enter:

Code: Select all

<span style="font-family: {SIMPLETEXT};">{TEXT}</span>
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

Re: Font Style Selector

Posted: Mon Dec 21, 2009 12:33 pm
by Marcin
I guess it is a small mistake. Should be so

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="Font" selected="selected">Font</option>
      <option value="Arial">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> 
If that:

Code: Select all

<option value="Arial" selected="selected">Arial</option> 
then you can not select Arial, or I am mistaken? :)

Re: Font Style Selector

Posted: Mon Dec 21, 2009 12:59 pm
by DavidIQ
That's just the default. ;)

Re: Font Style Selector

Posted: Tue May 17, 2011 10:32 pm
by beeboard
Hey guys,

just poking around a little bit tonight, and was interested if there is a way to add fonts to this mod, that could be used universally and not just through my machine. I'm a bit unaware of some compatibility issues, etc...

Re: Font Style Selector

Posted: Tue May 17, 2011 10:53 pm
by DavidIQ
If you assign a font to text that the machine the page is accessed through does not have the text will be displayed using the machine's default text.

Re: Font Style Selector

Posted: Mon Jun 27, 2011 1:14 am
by Clair
DavidIQ wrote:To add a Font Style type selector, like I have here, do the following:

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>
Add after:

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>
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:

Code: Select all

[font={SIMPLETEXT}]{TEXT}[/font]
For HTML Replacement enter:

Code: Select all

<span style="font-family: {SIMPLETEXT};">{TEXT}</span>
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
thank u so much u have guts to run this forum david..........