Location: PHPKode > projects > Enigma > Enigma2/Enigma2_Install/modules/ModuleSettings.php
<?php
/*
*****************************************************************

 ModuleSettings.php
 
*****************************************************************
LSP: Lunabyte Systems Portal
Open-Source Project Inspired by Zef Hemel (hide@address.com)
*****************************************************************
Software Version:                  LSP 2.0 "Enigma 2"
Software by:                         Lunabyte Systems (http://www.lunabyte.net)
Copyright 2002-2005 by:       Lunabyte Systems (http://www.lunabyte.net)
Support, News, Updates at:    http://www.lunabyte.net
*****************************************************************
This program is free software; you may redistribute it and/or modify it 
under the terms of the provided license as published by Lunabyte Systems.

This program is distributed in the hope that it is and will be useful,                  
but WITHOUT ANY WARRANTIES; without even any implied warranty of           
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                        

See the "LSP_license.txt" file for details of the LSP license.
The latest version can always be found at http://www.lunabyte.net.
*****************************************************************
*/

if (!defined('ENIGMA'))
{
	die('<b>Access Violation</b><br />Direct Access to this location is not allowed.');
}
elseif (allowedTo('admin_forum'))
{

	/* Adding options to this list isn't hard.  The basic format for a checkbox is:
		array('check', 'nameInModSettingsAndSQL'),

	   And for a text box:
		array('text', 'nameInModSettingsAndSQL')
	   (NOTE: You have to add an entry for this at the bottom!)

	   In these cases, it will look for $txt['nameInModSettingsAndSQL'] as the description,
	   and $helptxt['nameInModSettingsAndSQL'] as the help popup description.

	Here's a quick explanation of how to add a new item:

	 * A text input box.  For textual values.
	ie.	array('text', 'nameInModSettingsAndSQL', 'OptionalInputBoxWidth',
			&$txt['OptionalDescriptionOfTheOption'], 'OptionalReferenceToHelpAdmin'),

	 * A text input box.  For numerical values.
	ie.	array('int', 'nameInModSettingsAndSQL', 'OptionalInputBoxWidth',
			&$txt['OptionalDescriptionOfTheOption'], 'OptionalReferenceToHelpAdmin'),

	 * A text input box.  For floating point values.
	ie.	array('float', 'nameInModSettingsAndSQL', 'OptionalInputBoxWidth',
			&$txt['OptionalDescriptionOfTheOption'], 'OptionalReferenceToHelpAdmin'),

	 * A check box.  Either one or zero. (boolean)
	ie.	array('check', 'nameInModSettingsAndSQL', null, &$txt['descriptionOfTheOption'],
			'OptionalReferenceToHelpAdmin'),

	 * A selection box.  Used for the selection of something from a list.
	ie.	array('select', 'nameInModSettingsAndSQL', array('valueForSQL' => &$txt['displayedValue']),
			&$txt['descriptionOfTheOption'], 'OptionalReferenceToHelpAdmin'),
	Note that just saying array('first', 'second') will put 0 in the SQL for 'first'.

	 * A password input box. Used for passwords, no less!
	ie.	array('password', 'nameInModSettingsAndSQL', 'OptionalInputBoxWidth',
			&$txt['descriptionOfTheOption'], 'OptionalReferenceToHelpAdmin'),

	For each option:
		type (see above), variable name, size/possible values, description, helptext.
	OR	make type 'rule' for an empty string for a horizontal rule.
	OR	make type 'heading' with a string for a titled section. */


	loadMLanguage('ModuleSettings');
	// if you'd like a help icon for a setting, be sure to add an entry to ModuleHelp.English.php

	// Shout Box Module setting arrays
	$shoutDirArray = array(
						array('0', $txt['shoutasc']),
						array('1', $txt['shoutdesc']),
					);
	$shoutScrollSpeedArray = array(
						array('1', $txt['scrollslowest']),
						array('2', $txt['scrollslower']),
						array('3', $txt['scrollmedium']),
						array('4', $txt['scrollfaster']),
						array('5', $txt['scrollfastest']),
					);
	$shoutScrollDirArray = array(
						array('up', $txt['scrollup']),
						array('down', $txt['scrolldown']),
						array('left', $txt['scrollleft']),
						array('right', $txt['scrollright']),
					);

	// Start Enigma settings
	$config_vars = array_merge($config_vars, array(

		array('heading', &$txt['labelmodule']),
			array('check', 'enablefaq'),
		array('rule'),
			array('check', 'enabledls'),
			array('text', 'dlsdir'),
			array('text', 'dlsurl'),
		array('rule'),
			array('int', 'maxlinksperpage'),
			array('int', 'maxlinksviewlinks'),
			array('check', 'disablelinkverify'),
		array('rule'),
			array('int', 'max_gb_entries_per_page'),
			array('check', 'disablegbverify'),
		array('heading', &$txt['labelshout']),
			array('select', 'shoutdir', $shoutDirArray),
			array('check', 'enablearchiveshout'),
			array('int', 'shoutlimit'),
			array('int', 'shoutmaxchr'),
			array('int', 'shoutsplitchr'),
			array('check', 'shoutsmileys'),
			array('check', 'disableshoutverify'),
			array('check', 'enablescrollshout'),
			array('int', 'shoutscrollwidth'),
			array('int', 'shoutscrollheight'),
			array('select', 'shoutscrollspeed', $shoutScrollSpeedArray),
			array('select', 'shoutscrolldir', $shoutScrollDirArray),
			array('int', 'shoutscrolldelay'),
	));
}
?>
Return current item: Enigma