Simple Machine Codes
April 18, 2019, 01:41:16 pm
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to SMC, the best place for your SMF For Free Codes
  Home Help Search Arcade Gallery Affiliates Code Index Staff List Calendar Members Login Register  

Add more Fonts

Pages: [1]   Go Down
Author Topic: Add more Fonts  (Read 554 times)
Agent Moose

Offline Offline

Gender: Male
Posts: 2,672

View Profile WWW
« on: June 28, 2009, 12:06:53 pm »

<script type="text/javascript">
var FontFace = new Array();var w = 0;
FontFace[w++] = "Arial";
FontFace[w++] = "Arial Black";
FontFace[w++] = "Arial Narrow";
FontFace[w++] = "Book Antiqua";
FontFace[w++] = "Century Gothic";
FontFace[w++] = "Comic Sans MS";
FontFace[w++] = "Courier New";
FontFace[w++] = "Fixedsys";
FontFace[w++] = "Franklin Gothic Medium";
FontFace[w++] = "Garamond";
FontFace[w++] = "Georgia";
FontFace[w++] = "Lucida Console";
FontFace[w++] = "Lucida Sans Unicode";
FontFace[w++] = "Microsoft Sans Serif";
FontFace[w++] = "Palatino Linotype";
FontFace[w++] = "System";
FontFace[w++] = "Tahoma";
FontFace[w++] = "Times New Roman";
FontFace[w++] = "Trebuchet MS";
FontFace[w++] = "Verdana";

var Options = "";
//Created by Agent Moose (
Options += "<option value='" + FontFace[x] + "'>" + FontFace[x] + "</option>";
$("a img[src*='bbc/face.gif']").each(function(){
var Selection = "<select id='FONT' style='margin-bottom: 1ex;'><option value='' selected='selected'>Change Font</option>" + Options + "</select>";
$(this).parent().after(Selection); = "none";
$("#FONT option").click(function(){
surroundText('[font=' + this.value.toLowerCase() + ']', '[/font]', document.forms.postmodify.message); this.selectedIndex = 0; document.forms.postmodify.message.focus(document.forms.postmodify.message.caretPos);

Original Request:,796.0.html

This code will replace the Font Face type () with a selection box, alowing you to choose a font that you would like to use.

Easy and Effective Smiley

If you would like to add more fonts, add more of these lines:
FontFace[w++] = "FONT NAME";

If you would like to remove any of the fonts that are already in the code, you may go ahead and do so.

Enjoy Smiley
Report Spam   Logged

Pages: [1]   Go Up
Jump to:  

Powered by EzPortal
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum | Buy traffic for your forum/website

Powered by SMF | SMF © 2016, Simple Machines
Privacy Policy