Location: PHPKode > scripts > GF PHP Calculator > gf-php-calculator/calc_settings.php
<?php

/* Settings Page For The Calculator */


/* ***** General Settings ***** */

	/* Enable Extra Functions (^3 ^3 & SqRt) */
	$Calculator['Enable_Extras'] = true;						// Use 'true' or 'false'


	/* Enable Use of pi */
	$Calculator['pi_value'] = 3.14159265;						// Leave 'false' to disable use of 'pi'


	/* Dropdown Boxes - Choose what to display for each action */
	$Calculator['Display_Add'] = 		"+";					// Addition (+)
	$Calculator['Display_Subtract'] = 	"-";					// Subtraction (-)
	$Calculator['Display_Multiply'] = 	"*";					// Multiplication (x)
	$Calculator['Display_Divide'] = 	"/";					// Division (/)

	$Calculator['Display_Square'] = 	"^2";
	$Calculator['Display_Cube'] = 		"^3";
	$Calculator['Display_SqRt'] = 		"SqRt";


	/* General Display */
	$Calculator['Display_DecimalPoints'] =	"2";					// Number of decimal points to display in the answer	
	

/* ***** Style Settings ***** */

	/* Input Box - Text Size (Pixels) */
	$Calculator['Input_Text_Size'] = "12";

	/* Input Box - Text Colour */
	$Calculator['Input_Text_Colour'] = "#000000";					// ASCII (#000000) or TEXT (black)

	/* Input Box - Background Colour */
	$Calculator['Input_BG_Colour'] = "#ffffff";					// ASCII (#ffffff) or TEXT (white)



	/* Dropdown Box - Text Size (Pixels) */
	$Calculator['Dropdown_Text_Size'] = "12";

	/* Dropdown Box - Text Colour */
	$Calculator['Dropdown_Text_Colour'] = "#000000";				// ASCII (#000000) or TEXT (black)

	/* Dropdown Box - Background Colour */
	$Calculator['Dropdown_BG_Colour'] = "#ffffff";					// ASCII (#ffffff) or TEXT (white)



	/* Error/Results - Text Size (Pixels) */
	$Calculator['Message_Text_Size'] = "14";

	/* Error/Results - Text Colour */
	$Calculator['Message_Text_Colour'] = "#000000";					// ASCII (#000000) or TEXT (black)
	
	/* Error/Results - Background Colour */
	$Calculator['Message_BG_Colour'] = "#ffffff";					// ASCII (#ffffff) or TEXT (white)

	/* Error/Results - Border Attributes */
	$Calculator['Message_Border_Size'] = "2";					// Border Size (Pixels)
	$Calculator['Message_Border_Style'] = "outset";					// Border Style (inset,outset,double,single, or dotted)
	$Calculator['Message_Border_Colour'] = "#000000";				// Border Colour - ASCII (#000000) or TEXT (black)

	$Calculator['Message_Padding'] = "5";						// Padding (Pixels)


/* ***** Error Messages ***** */

	$Calculator['Error_General'] = "An unknown error has occured whilst processing the calculation.";		// Default Error	

	$Calculator['Error_Number1_Empty'] = "You must fill in both fields to complete the calculation.";		// Error if first box is empty
	$Calculator['Error_Number2_Empty'] = "You must fill in both fields to complete the calculation.";		// Error if second box is empty

	$Calculator['Error_Number3_Empty'] = "You must fill in the field to complete the calculation.";			// Error if extras box is empty

	$Calculator['Error_Action_Blank'] = "There is no action defined.";						// Error if action is blank


	$Calculator['Error_Must_Be_Number'] = "You must enter numeric values to complete the calculation.";		// Error if text is inputted


	/* 	Result Messages - Use {NUM1} to display frst number, {NUM2} to display second number		*/
	/*	{NUM3} to display extras number, and {RESULT} to display the result of the calculation.		*/

	$Calculator['Result_Add'] = "After adding {NUM1} and {NUM2}, the result is: {RESULT}";
	$Calculator['Result_Subtract'] = "After subtracting {NUM2} from {NUM1}, the result is: {RESULT}";
	$Calculator['Result_Multiply'] = "After multiplying {NUM1} and {NUM2}, the result is: {RESULT}";
	$Calculator['Result_Divide'] = "After dividing {NUM1} into {NUM2}, the result is: {RESULT}";

	$Calculator['Result_Square'] = "After squaring {NUM3}, the result is: {RESULT}";
	$Calculator['Result_Cube'] = "After cubing {NUM3}, the result is: {RESULT}";
	$Calculator['Result_SquareRoot'] = "After square rooting {NUM3}, the result is: {RESULT}";	

?>
Return current item: GF PHP Calculator