root/trunk/inc/config.inc.php

Revision 2145, 4.3 kB (checked in by Peter, 3 years ago)

Clean up the config a bit so users don't have to alter the index to change what area is used by default. Instead, it can be configured in config.php, which is where one would expect it to be done.

Line 
1 <?php
2
3 ///////////////////////////////////////////////////////////////////
4 // Global CASCO configuration
5 //
6 // All project-specific configuration goes here.
7 // Any installation/deployment-specific configuration should go
8 // in local.inc.php (see below)
9 ///////////////////////////////////////////////////////////////////
10
11
12 ///////////////////////////////////////////////////////////////////
13 // bootstrap casco
14 ///////////////////////////////////////////////////////////////////
15
16 require_once('lib/casco/bootstrap.php');
17
18 // In case you have casco as an svn external under lib:
19 // require_once('lib/casco/casco/bootstrap.php');
20
21 // Use metasync? (this will automatically update the database schema as you change the casco models)
22 casco::$metasync = true;
23
24 // Allow caching? (this can be annoying in development, when using the database cache)
25 casco::$caching = true;
26
27 // Show debugging info? (this is deprecated and will probably be removed)
28 casco::$debug = false; 
29
30 ///////////////////////////////////////////////////////////////////
31 // Module registration
32 ///////////////////////////////////////////////////////////////////
33
34 // Register the casco modules that you will be using.
35 // by default, the $casco_path will be used to find the modules directories
36 // this can be overridden by adding optional parameters:
37 // - local path to the containing directory, ending with '/'
38 // - url to the containing directory, including http://, ending with '/'
39 // by default casco will try to find the module by its name
40 // in case there are more versions of an module, you can override this by adding a fourth parameter
41 // - module directory
42
43 // Example of registration where CASCO's directory has a different name:
44 // casco::register_module('casco', '', '', 'casco_stable');
45
46         //core modules
47 casco::register_module('casco');        
48 casco::register_module('casco_core_db_sql');
49 casco::register_module('casco_core_area51');
50 casco::register_module('casco_core_test');
51 casco::register_module('casco_phpunit');
52 casco::register_module('casco_core_cache_db');
53 casco::register_module('casco_core_account');
54 casco::register_module('casco_core_datafilter');
55 casco::register_module('casco_core_relations');
56 casco::register_module('casco_core_has_many');
57 casco::register_module('casco_core_crud');
58 casco::register_module('casco_core_model_session');
59 casco::register_module('casco_core_skinning');
60 casco::register_module('casco_core_admin_skin');
61
62 // Choose a database implementation by uncommenting one of the following:
63 //casco::register_module('casco_db_sql_pgsql');
64 //casco::register_module('casco_db_sql_mysql');
65
66         //optional modules
67 //casco::register_module('casco_mail');
68 //casco::register_module('casco_pluginpack');   //register this when you need some cool additional plugins
69 //casco::register_module('tinymce',        casco::$docroot.'lib/modules/', casco::$httproot.'lib/modules/');
70 //casco::register_module('casco_nested_forms'); //register this when you need multiple fields of related models in one form
71
72 //casco::register_module('flot', casco::$docroot.'lib/modules/', casco::$httproot.'lib/modules/');
73
74 // An "example application" packaged as a module.  You should disable this in real projects.
75 casco::register_module('example_carbase', casco::$docroot.'lib/modules/', casco::$httproot.'lib/modules/');
76
77 ///////////////////////////////////////////////////////////////////
78 // Global class overrides
79 ///////////////////////////////////////////////////////////////////
80
81 // globally override the url coded strategy class with a pretty url codec
82 // You almost always want this, but before you enable it please ensure
83 // CASCO is working correctly and set up rewriting rules
84 // (http://wush.net/trac/casco/wiki/URLRewriting)
85
86 casco::subclass('url', 'url_slashed');
87
88
89 ///////////////////////////////////////////////////////////////////
90 // Site-specific configuration
91 ///////////////////////////////////////////////////////////////////
92
93 // This determines what area is used when no area is supplied by the user in the URL
94 // area::$default_area = 'my_area';
95
96 if (!file_exists('inc/local.inc.php'))
97 {
98         die('Please configure your installation by copying inc/example.local.inc.php to local.inc.php and modifying it');
99 }
100 else
101 {
102         include_once('local.inc.php');
103 }
104
105 ///////////////////////////////////////////////////////////////////
106 // CASCO initialization
107 ///////////////////////////////////////////////////////////////////
108
109 // Always do this last!
110 casco::init();
111
112 ?>
Note: See TracBrowser for help on using the browser.