commit | author | age
|
cf71a4
|
1 |
<?php |
b1a6a5
|
2 |
/** |
MC |
3 |
* vlibIni is a class used to store configuration parameters |
|
4 |
* for the vLIB library. |
|
5 |
* |
|
6 |
* @since 21/07/2002 |
|
7 |
* @author Kelvin Jones <kelvin@kelvinjones.co.uk> |
|
8 |
* @copyright 2002 Active Fish Group |
|
9 |
* @package vLIB |
|
10 |
* @access private |
|
11 |
*/ |
|
12 |
|
0191ab
|
13 |
|
cf71a4
|
14 |
/* vim: set expandtab tabstop=4 shiftwidth=4: */ |
T |
15 |
// +----------------------------------------------------------------------+ |
|
16 |
// | PHP version 4.0 | |
|
17 |
// +----------------------------------------------------------------------+ |
|
18 |
// | Copyright (c) 2002 Active Fish Group | |
|
19 |
// +----------------------------------------------------------------------+ |
|
20 |
// | Authors: Kelvin Jones <kelvin@kelvinjones.co.uk> | |
|
21 |
// +----------------------------------------------------------------------+ |
|
22 |
// |
|
23 |
// $Id: vlibIni.php,v 1.1 2003/07/08 12:31:10 platinum Exp $ |
|
24 |
|
|
25 |
/* |
|
26 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
|
27 |
; This file contains configuration parametres for use ; |
|
28 |
; with the vLIB library. [ NOW A CLASS!! ] ; |
|
29 |
; ; |
|
30 |
; vLIB uses this file so that for future releases, you ; |
|
31 |
; will not have to delve through all the php script ; |
|
32 |
; again to set your specific variable/properties ..etc ; |
|
33 |
; ; |
|
34 |
; ---------------------------------------------------- ; |
|
35 |
; ATTENTION: Do NOT remove any variable given in the ; |
|
36 |
; configurations below as they will probably still be ; |
|
37 |
; needed by vLIB. If you do not need a variable simply ; |
|
38 |
; let it be. ; |
|
39 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
|
40 |
*/ |
|
41 |
|
|
42 |
if (!defined('vlibIniClassLoaded')) { |
b1a6a5
|
43 |
define('vlibIniClassLoaded', 1); |
cf71a4
|
44 |
|
T |
45 |
|
0191ab
|
46 |
|
b1a6a5
|
47 |
class vlibIni{ |
cf71a4
|
48 |
|
b1a6a5
|
49 |
/** Returns $array of config vars for vlibTemplate */ |
MC |
50 |
public static function vlibTemplate() |
|
51 |
{ |
0191ab
|
52 |
|
99bf8f
|
53 |
$tpl_dir = ISPC_THEMES_PATH.'/'.$_SESSION['s']['theme'].'/templates'; |
d6af2b
|
54 |
$def_tpl_dir = ISPC_THEMES_PATH.'/default/templates'; |
b1a6a5
|
55 |
return array( |
cf71a4
|
56 |
|
b1a6a5
|
57 |
'INCLUDE_PATHS' => array($tpl_dir), // The path, searched BEVORE the template_dir is searched for the template-file |
d6af2b
|
58 |
|
b1a6a5
|
59 |
'TEMPLATE_DIR' => $def_tpl_dir, // Default directory for your template files (full path) |
MC |
60 |
// leave the '/' or '\' off the end of the directory. |
cf71a4
|
61 |
|
b1a6a5
|
62 |
'MAX_INCLUDES' => 10, // Drill depth for tmpl_include's |
cf71a4
|
63 |
|
b1a6a5
|
64 |
'GLOBAL_VARS' => 1, // if set to 1, any variables not found in a |
MC |
65 |
// loop will search for a global var as well |
cf71a4
|
66 |
|
b1a6a5
|
67 |
'GLOBAL_CONTEXT_VARS' => 1, // if set to 1, vlibTemplate will add global vars |
MC |
68 |
// reflecting the environment. |
cf71a4
|
69 |
|
b1a6a5
|
70 |
'LOOP_CONTEXT_VARS' => 1, // if set to 1, vlibTemplate will add loop specific vars |
MC |
71 |
// on each row of the loop. |
cf71a4
|
72 |
|
b1a6a5
|
73 |
'SET_LOOP_VAR' => 1, // Sets a global variable for each top level loops |
cf71a4
|
74 |
|
b1a6a5
|
75 |
'DEFAULT_ESCAPE' => 'none', // 1 of the following: html, url, sq, dq, none |
cf71a4
|
76 |
|
b1a6a5
|
77 |
'STRICT' => 0, // Dies when encountering an incorrect tmpl_* |
MC |
78 |
// style tags i.e. tmpl_vae |
cf71a4
|
79 |
|
b1a6a5
|
80 |
'CASELESS' => 0, // Removes case sensitivity on all variables |
cf71a4
|
81 |
|
b1a6a5
|
82 |
'UNKNOWNS' => 'ignore', // How to handle unknown variables. |
MC |
83 |
// 1 of the following: ignore, remove, leave,print, comment |
|
84 |
// 1 of the following: ignore, remove, leave, print, comment |
cf71a4
|
85 |
|
b1a6a5
|
86 |
'TIME_PARSE' => '0', // Will enable you to time how long vlibTemplate takes to parse |
MC |
87 |
// your template. You then use the function: getParseTime(). |
cf71a4
|
88 |
|
b1a6a5
|
89 |
'ENABLE_PHPINCLUDE' => '1', // Will allow template to include a php file using <TMPL_PHPINCLUDE> |
cf71a4
|
90 |
|
T |
91 |
|
b1a6a5
|
92 |
/* the following are only used by the vlibTemplateCache class. */ |
MC |
93 |
// pedro notes:: triggers a notice as its not set - was $conf['template']['cache_dir'], |
|
94 |
'CACHE_DIRECTORY' => ISPC_CACHE_PATH, |
|
95 |
// Directory where the cached filesystem |
|
96 |
// will be set up (full path, and must be writable) |
|
97 |
// '/' or '\' off the end of the directory. |
cf71a4
|
98 |
|
b1a6a5
|
99 |
'CACHE_LIFETIME' => 604800, // Duration until file is re-cached in seconds (604800 = 1 week) |
cf71a4
|
100 |
|
b1a6a5
|
101 |
'CACHE_EXTENSION' => 'vtc' // extention to be used by the cached file i.e. index.php will become |
MC |
102 |
// index.vtc (vlibTemplate Compiled) |
|
103 |
); |
cf71a4
|
104 |
|
b1a6a5
|
105 |
} // << end function vlibTemplate |
cf71a4
|
106 |
|
T |
107 |
|
|
108 |
|
b1a6a5
|
109 |
/** Returns $array of config vars for vlibDate */ |
MC |
110 |
public function vlibDate() |
|
111 |
{ |
|
112 |
return array( 'DEFAULT_LANG' => 'de' ); //* default language for the date displays |
|
113 |
} |
cf71a4
|
114 |
|
T |
115 |
|
b1a6a5
|
116 |
}// << end class vlibIni |
d9bb62
|
117 |
|
0191ab
|
118 |
} // << if Defined |
b1a6a5
|
119 |
?> |