Your browser must have JavaScript enabled in order to view this page.
 >  >
 
Welcome Guest#213 Login/register    Go to Bottom
Go to Top

Source for file dpuniverse-ini.php

Documentation is available at dpuniverse-ini.php

  1. <?php
  2. /**
  3.  * Provides named constants with global universe settings
  4.  *
  5.  * Change these constants to match your desired configuration. These constants
  6.  * define the settings and behavious of "the universe".
  7.  * See dpserver-ini.php for settings dealing with the server related settings.
  8.  *
  9.  * DutchPIPE version 0.4; PHP version 5
  10.  *
  11.  * LICENSE: This source file is subject to version 1.0 of the DutchPIPE license.
  12.  * If you did not receive a copy of the DutchPIPE license, you can obtain one at
  13.  * http://dutchpipe.org/license/1_0.txt or by sending a note to
  14.  * license@dutchpipe.org, in which case you will be mailed a copy immediately.
  15.  *
  16.  * @package    DutchPIPE
  17.  * @subpackage config
  18.  * @author     Lennert Stock <ls@dutchpipe.org>
  19.  * @copyright  2006, 2007 Lennert Stock
  20.  * @license    http://dutchpipe.org/license/1_0.txt  DutchPIPE License
  21.  * @version    Subversion: $Id: dpuniverse-ini.php 308 2007-09-02 19:18:58Z ls $
  22.  * @link       http://dutchpipe.org/manual/package/DutchPIPE
  23.  * @see        dpuniverse.php, dpserver-ini.php
  24.  */
  25.  
  26. /*
  27.  * Database settings
  28.  *
  29.  * DutchPIPE comes with MySQL sypport out of the box. If this works for you,
  30.  * leave DPUNIVERSE_MDB2_ENABLED set to FALSE and use the DPUNIVERSE_MYSQL_*
  31.  * constants.
  32.  *
  33.  * To use PHP PEAR's MDB2 database abstraction layer, make sure you have MDB2
  34.  * and the module for your database installed, for example by entering in a *NIX
  35.  * shell:
  36.  *
  37.  * $ pear install MDB2
  38.  * $ pear install MDB2#mysql
  39.  *
  40.  * This installs MDB2 and the MySQL module for it. Set DPUNIVERSE_MDB2_ENABLED
  41.  * to TRUE and complete the other DPUNIVERSE_MDB2_* constants.
  42.  */
  43.  
  44. /**
  45.  * MySQL host
  46.  *
  47.  * An empty string if MySQL is running on your local host is sufficient.
  48.  *
  49.  * @see        DPUNIVERSE_MYSQL_USER, DPUNIVERSE_MYSQL_PASSWORD,
  50.  *              DPUNIVERSE_MYSQL_DB
  51.  */
  52. define('DPUNIVERSE_MYSQL_HOST''');
  53.  
  54. /**
  55.  * MySQL user name
  56.  *
  57.  * @see        DPUNIVERSE_MYSQL_HOST, DPUNIVERSE_MYSQL_PASSWORD,
  58.  *              DPUNIVERSE_MYSQL_DB
  59.  */
  60. define('DPUNIVERSE_MYSQL_USER''<youruser>');
  61.  
  62. /**
  63.  * MySQL password
  64.  *
  65.  * @see        DPUNIVERSE_MYSQL_HOST, DPUNIVERSE_MYSQL_USER, DPUNIVERSE_MYSQL_DB
  66.  */
  67. define('DPUNIVERSE_MYSQL_PASSWORD''<yourpass>');
  68.  
  69. /**
  70.  * MySQL database name, "dutchpipe" by default
  71.  *
  72.  * @see        DPUNIVERSE_MYSQL_HOST, DPUNIVERSE_MYSQL_USER,
  73.  *              PUNIVERSE_MYSQL_PASSWORD
  74.  */
  75. define('DPUNIVERSE_MYSQL_DB''dutchpipe');
  76.  
  77.  
  78. /**
  79.  * Enable MDB2 database abstraction layer instead of using MySQL without it?
  80.  *
  81.  * @see        DPUNIVERSE_MDB2_PEAR_PATH, $DPUNIVERSE_MDB2_DSN,
  82.  *              $DPUNIVERSE_MDB2_CONNECT_OPTIONS
  83.  */
  84. define('DPUNIVERSE_MDB2_ENABLED'FALSE);
  85.  
  86. /**
  87.  * Path to PEAR installation
  88.  *
  89.  * Leave empty if it is already in the include path, which is most likely the
  90.  * case.
  91.  *
  92.  * @see        DPUNIVERSE_MDB2_ENABLED, $DPUNIVERSE_MDB2_DSN,
  93.  *              $DPUNIVERSE_MDB2_CONNECT_OPTIONS
  94.  */
  95. define('DPUNIVERSE_MDB2_PEAR_PATH''');
  96.  
  97. /**
  98.  * Database Data Source Name (DSN) in array format
  99.  *
  100.  * Enter your database settings here. The array has the following format.
  101.  *
  102.  * $GLOBALS['DPUNIVERSE_MDB2_DSN'] = array(
  103.  *     'phptype'  => false,
  104.  *     'dbsyntax' => false,
  105.  *     'username' => false,
  106.  *     'password' => false,
  107.  *     'protocol' => false,
  108.  *     'hostspec' => false,
  109.  *     'port'     => false,
  110.  *     'socket'   => false,
  111.  *     'database' => false,
  112.  *     'new_link' => false,
  113.  *     'service'  => false, // only in oci8
  114.  * );
  115.  *
  116.  * Usually a lot of options can be skipped as your database provides defaults
  117.  * for them. See the links below to the PEAR manual for more information.
  118.  * Examples for a number of databases can be found below.
  119.  *
  120.  * @see        http://pear.php.net/manual/en/package.database.mdb2.intro-dsn.php,
  121.  *              http://pear.php.net/manual/en/package.database.mdb2.intro-connect.php,
  122.  *              $DPUNIVERSE_MDB2_CONNECT_OPTIONS, DPUNIVERSE_MDB2_ENABLED,
  123.  *              DPUNIVERSE_MDB2_PEAR_PATH
  124.  */
  125. $GLOBALS['DPUNIVERSE_MDB2_DSN'array(
  126.     'phptype' => 'mysql',
  127.     'database' => 'dutchpipe',
  128.     'username' => '<youruser>',
  129.     'password' => '<yourpass>'
  130. );
  131.  
  132. /*
  133. $GLOBALS['DPUNIVERSE_MDB2_DSN'] = array(
  134.     'phptype' => 'mysqli',
  135.     'database' => 'dutchpipe',
  136.     'username' => '<youruser>',
  137.     'password' => '<yourpass>'
  138. );
  139.  
  140. $GLOBALS['DPUNIVERSE_MDB2_DSN'] = array(
  141.     'phptype' => 'sqlite',
  142.     'database' => '/path/to/dutchpipe.db',
  143.     'options' => 'mode=0666'
  144. );
  145.  
  146. $GLOBALS['DPUNIVERSE_MDB2_DSN'] = array(
  147.     'phptype'  => 'pgsql',
  148.     'username' => '<youruser>',
  149.     'password' => '<yourpass>',
  150.     'database' => 'dutchpipe'
  151. );
  152. */
  153.  
  154. /**
  155.  * Optional runtime configuration settings for this database
  156.  *
  157.  * See the link below to the PEAR manual for more information.
  158.  *
  159.  * @see        http://pear.php.net/manual/en/package.database.mdb2.intro-connect.php,
  160.  *              $DPUNIVERSE_MDB2_DSN, DPUNIVERSE_MDB2_ENABLED,
  161.  *              DPUNIVERSE_MDB2_PEAR_PATH
  162.  */
  163. $GLOBALS['DPUNIVERSE_MDB2_CONNECT_OPTIONS'array();
  164.  
  165.  
  166. /**
  167.  * File owner
  168.  *
  169.  * What user owns the *NIX files and is running the server? Don't run DutchPIPE
  170.  * under "root". Windows users can ignore this.
  171.  */
  172. define('DPUNIVERSE_FILE_OWNER''dutchpipe');
  173.  
  174. /*
  175.  * If you just installed DutchPIPE, haven't changed the directory structure
  176.  * and just want it up and running, you're done here. Make sure you adjusted
  177.  * dpserver-ini.php.
  178.  */
  179.  
  180. /*
  181.  * Pathnames
  182.  *
  183.  * Leave these untouched if the DutchPIPE directory structure wasn't changed.
  184.  */
  185.  
  186. /**
  187.  * Path to the root of the DutchPIPE installation
  188.  *
  189.  * Defaults to the mother directory of the directory this file is in.
  190.  * Leave this untouched if the DutchPIPE directory structure wasn't changed.
  191.  */
  192. define('DPUNIVERSE_ROOT_PATH'realpath(dirname(__FILE__'/..''/');
  193.  
  194. /**
  195.  * Path to the library directory
  196.  *
  197.  * Leave this untouched if the DutchPIPE directory structure wasn't changed.
  198.  */
  199. define('DPUNIVERSE_LIB_PATH'DPUNIVERSE_ROOT_PATH 'lib/');
  200.  
  201. /**
  202.  * Path to the script directory
  203.  *
  204.  * Leave this untouched if the DutchPIPE directory structure wasn't changed.
  205.  */
  206. define('DPUNIVERSE_SCRIPT_PATH'DPUNIVERSE_ROOT_PATH 'script/');
  207.  
  208. /**
  209.  * Path to the universe directory
  210.  *
  211.  * Excludes trailing /, unlike {@link DPUNIVERSE_PATH} and other paths. Leave
  212.  * this untouched if the DutchPIPE directory structure wasn't changed.
  213.  *
  214.  * @see        DPUNIVERSE_PATH
  215.  */
  216. define('DPUNIVERSE_BASE_PATH'DPUNIVERSE_ROOT_PATH 'dpuniverse');
  217.  
  218. /**
  219.  * Path to the universe directory
  220.  *
  221.  * Includes trailing /, unlike {@link DPUNIVERSE_BASE_PATH}. Leave this
  222.  * untouched if the DutchPIPE directory structure wasn't changed.
  223.  *
  224.  * @see        DPUNIVERSE_BASE_PATH
  225.  */
  226. define('DPUNIVERSE_PATH'DPUNIVERSE_BASE_PATH '/');
  227.  
  228. define('DPUNIVERSE_PREFIX_PATH'DPUNIVERSE_BASE_PATH);
  229. /**
  230.  * Path to the universe's page directory
  231.  *
  232.  * Leave this untouched if the DutchPIPE directory structure wasn't changed.
  233.  */
  234. define('DPUNIVERSE_PAGE_PATH''/page/');
  235.  
  236. /**
  237.  * Path to the universe's standard building block directory
  238.  *
  239.  * Leave this untouched if the DutchPIPE directory structure wasn't changed.
  240.  */
  241. define('DPUNIVERSE_STD_PATH''/std/');
  242.  
  243. /**
  244.  * Path to the universe's object directory
  245.  *
  246.  * Leave this untouched if the DutchPIPE directory structure wasn't changed.
  247.  */
  248. define('DPUNIVERSE_OBJ_PATH''/obj/');
  249.  
  250. /**
  251.  * Path to the universe's NPC directory
  252.  *
  253.  * Leave this untouched if the DutchPIPE directory structure wasn't changed.
  254.  */
  255. define('DPUNIVERSE_NPC_PATH''/npc/');
  256.  
  257. /**
  258.  * Path to the universe's include directory
  259.  *
  260.  * Leave this untouched if the DutchPIPE directory structure wasn't changed.
  261.  */
  262.  
  263. define('DPUNIVERSE_INCLUDE_PATH''/include/');
  264.  
  265. /**
  266.  * Path to the publicly reachable web directory
  267.  *
  268.  * The absolute path after the host name of the URL.
  269.  * If DutchPIPE is installed on http://www.example.com/, this path is /.
  270.  * On http://www.example.com/subdir/ it would be /subdir/.
  271.  *
  272.  * @see        DPUNIVERSE_WWW_URL
  273.  */
  274. define('DPUNIVERSE_WWW_PATH'DPUNIVERSE_ROOT_PATH 'public/');
  275.  
  276. /**
  277.  * URL to the publicly reachable web directory
  278.  *
  279.  * Leave this untouched if the DutchPIPE directory structure wasn't changed.
  280.  *
  281.  * @see        DPUNIVERSE_WWW_PATH
  282.  */
  283. define('DPUNIVERSE_WWW_URL''/');
  284.  
  285. /**
  286.  * Path to the publicly reachable web images directory
  287.  *
  288.  * Leave this untouched if the DutchPIPE directory structure wasn't changed.
  289.  *
  290.  * @see        DPUNIVERSE_IMAGE_URL
  291.  */
  292. define('DPUNIVERSE_IMAGE_PATH'DPUNIVERSE_WWW_PATH 'images/');
  293.  
  294. /**
  295.  * URL to the publicly reachable web images directory
  296.  *
  297.  * Leave this untouched if the DutchPIPE directory structure wasn't changed.
  298.  *
  299.  * @see        DPUNIVERSE_IMAGE_PATH
  300.  */
  301. define('DPUNIVERSE_IMAGE_URL'DPUNIVERSE_WWW_URL 'images/');
  302.  
  303. /**
  304.  * Path to the publicly reachable standard avatar images directory
  305.  *
  306.  * Leave this untouched if the DutchPIPE directory structure wasn't changed.
  307.  *
  308.  * @see        DPUNIVERSE_AVATAR_STD_URL
  309.  */
  310. define('DPUNIVERSE_AVATAR_STD_PATH'DPUNIVERSE_IMAGE_PATH 'ava_std/');
  311.  
  312. /**
  313.  * URL to the publicly reachable standard avatar images directory
  314.  *
  315.  * Leave this untouched if the DutchPIPE directory structure wasn't changed.
  316.  *
  317.  * @see        DPUNIVERSE_AVATAR_STD_PATH
  318.  */
  319. define('DPUNIVERSE_AVATAR_STD_URL'DPUNIVERSE_IMAGE_URL 'ava_std/');
  320.  
  321. /**
  322.  * Are users allowed to upload their own avatar?
  323.  *
  324.  * TRUE to enable, FALSE to disable. The GD library must be enabled on your PHP
  325.  * installation. This constant is ignored when GD is not enabled.
  326.  */
  327. define('DPUNIVERSE_AVATAR_CUSTOM_ENABLED'TRUE);
  328.  
  329. /**
  330.  * Path to the publicly reachable custom avatar directory of guests
  331.  *
  332.  * Leave this untouched if the DutchPIPE directory structure wasn't changed.
  333.  *
  334.  * @see        DPUNIVERSE_AVATAR_CUSTOM_GUEST_URL
  335.  */
  336. define('DPUNIVERSE_AVATAR_CUSTOM_GUEST_PATH'DPUNIVERSE_IMAGE_PATH
  337.     . 'ava_cus_gst/');
  338.  
  339. /**
  340.  * URL to the publicly reachable custom avatar directory of guests
  341.  *
  342.  * Leave this untouched if the DutchPIPE directory structure wasn't changed.
  343.  *
  344.  * @see        DPUNIVERSE_AVATAR_CUSTOM_GUEST_PATH
  345.  */
  346. define('DPUNIVERSE_AVATAR_CUSTOM_GUEST_URL'DPUNIVERSE_IMAGE_URL
  347.     . 'ava_cus_gst/');
  348.  
  349. /**
  350.  * Path to the publicly reachable custom avatar directory of registered users
  351.  *
  352.  * Leave this untouched if the DutchPIPE directory structure wasn't changed.
  353.  *
  354.  * @see        DPUNIVERSE_AVATAR_CUSTOM_REG_URL
  355.  */
  356. define('DPUNIVERSE_AVATAR_CUSTOM_REG_PATH'DPUNIVERSE_IMAGE_PATH
  357.     . 'ava_cus_reg/');
  358.  
  359. /**
  360.  * URL to the publicly reachable custom avatar directory of registered users
  361.  *
  362.  * Leave this untouched if the DutchPIPE directory structure wasn't changed.
  363.  *
  364.  * @see        DPUNIVERSE_AVATAR_CUSTOM_REG_PATH
  365.  */
  366. define('DPUNIVERSE_AVATAR_CUSTOM_REG_URL'DPUNIVERSE_IMAGE_URL
  367.     . 'ava_cus_reg/');
  368.  
  369. /**
  370.  * Path to the directory with CAPTCHA images
  371.  *
  372.  * :WARNING: This directory should NOT be web enabled for the public
  373.  *
  374.  * Leave this untouched if the DutchPIPE directory structure wasn't changed.
  375.  */
  376. define('DPUNIVERSE_CAPTCHA_IMAGES_PATH'DPUNIVERSE_SCRIPT_PATH
  377.     . 'captcha_images/');
  378.  
  379. /**
  380.  * Path to the directory with HTML templates
  381.  *
  382.  * Leave this untouched if the DutchPIPE directory structure wasn't changed.
  383.  */
  384. define('DPUNIVERSE_TEMPLATE_PATH'DPUNIVERSE_ROOT_PATH 'template/');
  385.  
  386. /*
  387.  * System options
  388.  */
  389.  
  390. /**
  391.  * Experimental, currently not functional, leave it on FALSE
  392.  *
  393.  * @ignore
  394.  */
  395. define('DPUNIVERSE_RUNKIT'FALSE);
  396.  
  397. /**
  398.  * Error reporting level
  399.  *
  400.  * Which PHP errors to report, according to
  401.  * {@link http://www.php.net/manual/en/ref.errorfunc.php#errorfunc.constants}
  402.  *
  403.  * By default all messages including "strict" messages are shown.
  404.  */
  405. define('DPUNIVERSE_ERROR_REPORTING'E_ALL E_STRICT);
  406.  
  407. /*
  408.  * Site behaviour
  409.  */
  410.  
  411. /**
  412.  * How many secs each cycle for resetDpObject to be called in objects
  413.  */
  414. define('DPUNIVERSE_RESET_CYCLE'3600);
  415.  
  416. /**
  417.  * Minimum registered user name length
  418.  *
  419.  * @see        DPUNIVERSE_MAX_USERNAME_LEN
  420.  */
  421. define('DPUNIVERSE_MIN_USERNAME_LEN'3);
  422.  
  423. /**
  424.  * Maximum registered user name length
  425.  *
  426.  * @see        DPUNIVERSE_MIN_USERNAME_LEN
  427.  */
  428. define('DPUNIVERSE_MAX_USERNAME_LEN'12);
  429.  
  430. /**
  431.  * Is it mandatory for the browser to report a user agent string?
  432.  *
  433.  * Every browser reports a user agent string to the web server, such as:
  434.  * "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322;
  435.  * .NET CLR 2.0.50727)" or
  436.  * "Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.0.4) Gecko/20060508
  437.  * Firefox/1.5.0.4".
  438.  *
  439.  * Browsers which don't report such a string get an error message if this
  440.  * constant is set to TRUE.
  441.  *
  442.  * Usually, the only "browsers" with do not report a user agent string are
  443.  * harvest bots by spammers. However, it seems sometimes this leads to undesired
  444.  * effects, in which case you can set this constant to FALSE.
  445.  */
  446. define('DPUNIVERSE_USERAGENT_MANDATORY'TRUE);
  447.  
  448. /**
  449.  * Default message for invalid commands
  450.  */
  451. define('DPUNIVERSE_ACTION_DEFAULT_FAILURE',
  452.     dp_text('What? Enter <tt>help</tt> for a list of commands.<br />'));
  453.  
  454. /**
  455.  * How many secs must be a connection be dead before a user is thrown out?
  456.  *
  457.  * @see        DPUNIVERSE_LINKDEATH_SHOWMSGTIME, DPUNIVERSE_BOT_KICKTIME,
  458.  *              DPUNIVERSE_LINKDEATH_SHOWBOTTIME
  459.  */
  460. define('DPUNIVERSE_LINKDEATH_KICKTIME'15);
  461.  
  462. /**
  463.  * How many secs after someone is thrown do we show a message?
  464.  *
  465.  * The linkdeath user object may be destroyed when single other user enters that
  466.  * page.
  467.  *
  468.  * @see        DPUNIVERSE_LINKDEATH_KICKTIME, DPUNIVERSE_BOT_KICKTIME,
  469.  *              DPUNIVERSE_LINKDEATH_SHOWBOTTIME
  470.  */
  471. define('DPUNIVERSE_LINKDEATH_SHOWMSGTIME'5);
  472.  
  473. /**
  474.  * How many secs after a bot (e.g. Google searchbot) is thrown out
  475.  *
  476.  * @see        DPUNIVERSE_LINKDEATH_KICKTIME, DPUNIVERSE_LINKDEATH_SHOWMSGTIME,
  477.  *              DPUNIVERSE_LINKDEATH_SHOWBOTTIME
  478.  */
  479. define('DPUNIVERSE_BOT_KICKTIME'40);
  480.  
  481. /**
  482.  * How many secs after a bit is thrown do we show a message
  483.  *
  484.  * Bot may be destroyed when single other user enters that page.
  485.  *
  486.  * @see        DPUNIVERSE_LINKDEATH_KICKTIME, DPUNIVERSE_LINKDEATH_SHOWMSGTIME,
  487.  *              DPUNIVERSE_BOT_KICKTIME
  488.  */
  489. define('DPUNIVERSE_LINKDEATH_SHOWBOTTIME'5);
  490.  
  491. /**
  492.  * Maximum number of objects to reset per "cycle"
  493.  */
  494. define('DPUNIVERSE_MAX_RESETS'10);
  495.  
  496. /**
  497.  * Used by DutchPIPE.org in the title bar
  498.  */
  499. define('DPUNIVERSE_NAVLOGO'sprintf(dp_text('<img src="%snavlogo.gif"
  500. align="left" width="73" height="15" border="0" alt="DutchPIPE"
  501. style="margin-top: 1px" />Home')DPUNIVERSE_IMAGE_URL));
  502.  
  503. /**
  504.  * Administrators registered user names separated by the # character
  505.  */
  506. define('DPUNIVERSE_ADMINISTRATORS''Lennert');
  507. ?>

Documentation generated on Mon, 03 Sep 2007 22:20:43 +0200 by phpDocumentor 1.3.0RC6

Click me!
Guest#213
 
 
 
  Go to Top
 
 
Input Field OptionsClose Input Field Go to Top
 
Legal Notices | Copyright © 2006, 2007 Lennert Stock. All rights reserved. Last update: Mon Sep 03 2007, 21:50 CET.