1
0

vlibIni.php-dist 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <?php
  2. /* vim: set expandtab tabstop=4 shiftwidth=4: */
  3. // +----------------------------------------------------------------------+
  4. // | PHP version 4.3.x (and higher), tested with 5.1.4 |
  5. // +----------------------------------------------------------------------+
  6. // | Copyright (c) 2002-2006 Kelvin Jones, Claus van Beek, Stefan Deussen |
  7. // +----------------------------------------------------------------------+
  8. // | Authors: Kelvin Jones, Claus van Beek, Stefan Deussen |
  9. // +----------------------------------------------------------------------+
  10. //
  11. // $Id: vlibIni.php-dist 3041 2007-05-22 19:19:55Z b4rt $
  12. /*
  13. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  14. ; This file contains configuration parametres for use ;
  15. ; with the vLIB library. [ NOW A CLASS!! ] ;
  16. ; ;
  17. ; vLIB uses this file so that for future releases, you ;
  18. ; will not have to delve through all the php script ;
  19. ; again to set your specific variable/properties ..etc ;
  20. ; ;
  21. ; ---------------------------------------------------- ;
  22. ; ATTENTION: Do NOT remove any variable given in the ;
  23. ; configurations below as they will probably still be ;
  24. ; needed by vLIB. If you do not need a variable simply ;
  25. ; let it be. ;
  26. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  27. */
  28. if (!defined('vlibIniClassLoaded')) {
  29. define('vlibIniClassLoaded', 1);
  30. /**
  31. * vlibIni is a class used to store configuration parameters
  32. * for the vLIB library.
  33. *
  34. * @since 21/07/2002
  35. * @author Kelvin Jones, Claus van Beek, Stefan Deussen
  36. * @package vLIB
  37. * @access private
  38. */
  39. class vlibIni {
  40. /** config vars for vlibTemplate */
  41. function vlibTemplate () {
  42. return array(
  43. 'TEMPLATE_DIR' => '/usr/local/apache/htdocs/templates', // Default directory for your template files (full path) leave the '/' or '\' off the end of the directory.
  44. 'MAX_INCLUDES' => 2, // Drill depth for tmpl_include's
  45. 'GLOBAL_VARS' => 1, // if set to 1, any variables not found in a loop will search for a global var as well
  46. 'GLOBAL_CONTEXT_VARS' => 1, // if set to 1, vlibTemplate will add global vars (__SELF__, __REQUEST_URI__, __PARSE_TIME__) reflecting the environment.
  47. 'LOOP_CONTEXT_VARS' => 1, // if set to 1, vlibTemplate will add loop specific vars (see dokumentation) on each row of the loop.
  48. 'SET_LOOP_VAR' => 1, // Sets a global variable for each top level loops
  49. 'DEFAULT_ESCAPE' => 'html', // 1 of the following: html, url, sq, dq, none
  50. 'STRICT' => 0, // Dies when encountering an incorrect tmpl_* style tags i.e. tmpl_vae
  51. 'CASELESS' => 0, // Removes case sensitivity on all variables
  52. 'UNKNOWNS' => 'print', // How to handle unknown variables.
  53. // 1 of the following: ignore, remove, leave, print, comment
  54. // 1 of the following: ignore, remove, leave, print, comment
  55. 'TIME_PARSE' => '0', // Will enable you to time how long vlibTemplate takes to parse your template. You then use the function: getParseTime().
  56. 'ENABLE_PHPINCLUDE' => '0', // Will allow template to include a php file using <TMPL_PHPINCLUDE>
  57. 'ENABLE_SHORTTAGS' => '0', // Will allow you to use short tags in your script i.e.: <VAR name="my_var">, <LOOP name="my_loop">...</LOOP>
  58. /* the following are only used by the vlibTemplateCache class. */
  59. 'CACHE_DIRECTORY' => '/usr/local/apache/cgi-bin/vlibTemplateCache',
  60. // Directory where the cached filesystem
  61. // will be set up (full path, and must be writable)
  62. // '/' or '\' off the end of the directory.
  63. 'CACHE_LIFETIME' => 604800, // Duration until file is re-cached in seconds (604800 = 1 week)
  64. 'CACHE_EXTENSION' => 'vtc', // extention to be used by the cached file i.e. index.php will become index.vtc (vlibTemplate Compiled)
  65. 'DEBUG_WITHOUT_JAVASCRIPT' => 0 // if set to 1, the external debug window won't be displayed and the debug output is placed below every template output.
  66. );
  67. } // << end function vlibTemplate
  68. /** config vars for vlibDate */
  69. function vlibDate () {
  70. return array(
  71. 'DEFAULT_LANG' => 'en' // default language for the date displays
  72. );
  73. }// << end function vlibDate
  74. /** config vars for vlibSearchToSQL */
  75. function vlibSearchToSQL () {
  76. return array(
  77. 'MIN_WORD_LENGTH' => 3, // minimum length of word
  78. 'ALLOW_WILDCARDS' => 0, // whether to allow % and _ as wildcards in SQL LIKE '' clause
  79. 'ENCLOSE_FIELDS_WITH' => '', // i.e., enclose with ` will give you `search_field` LIKE ... Leave Empty for nothing
  80. 'DEFAULT_SEPERATOR' => 'OR', // default clause seperator, can have 'AND' or 'OR'
  81. // list of words that are not used in search
  82. 'STOP_WORDS' => 'a all an and are as at be but by can for from had have he her his in is it may not of on or that the there this to was where which will with you your'
  83. );
  84. }// << end function vlibSearchToSQL
  85. }// << end class vlibIni
  86. }
  87. ?>