Changeset 469 for trunk/modules/user_guide
- Timestamp:
- 09/02/2007 09:34:20 AM (15 months ago)
- Location:
- trunk/modules/user_guide/views/user_guide
- Files:
-
- 1 added
- 4 modified
-
content/general/configuration.php (modified) (2 diffs)
-
content/helpers/cookie.php (added)
-
content/kohana/installation.php (modified) (1 diff)
-
css/layout.php (modified) (1 diff)
-
menu.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/user_guide/views/user_guide/content/general/configuration.php
r454 r469 1 Article status [Draft] requires [ Writing] Configuring the Framework, add remaining entries1 Article status [Draft] requires [Editing] Configuring the Framework, add remaining entries 2 2 # Configuration 3 3 Kohana adopts the philosophy of *convention* over *configuration*. The goal is to minimize user configuration. Where configuration is required or enabled, sensible defaults are utilised. 4 4 5 System configuration is specified by entries in files located in folder */application/config/* .5 System configuration is specified by entries in files located in folder */application/config/* 6 6 7 7 Configuration files are ordinary text files with a default *php* file extension. 8 8 9 The primary configuration file is <file> /application/config/config</file> System wide configuration is9 The primary configuration file is <file>application/config/config</file> System wide configuration is 10 10 specified here and is required for every new installation. 11 11 … … 15 15 ### Base URL 16 16 Specifies the url which points to the base or root of your application. 17 Format: 18 <pre>config item domain name /[subdirectory/]</pre> 17 <pre> 18 base_url domain name/[subdirectory/] 19 19 <code> 20 20 $config['base_url'] = 'http://'.$_SERVER['SERVER_NAME'].'/kohana/'; 21 21 </code> 22 </pre> 22 23 *base_url* is **mandatory** and requires a correct server domain that **must** terminate with a "**/**" 23 24 24 25 ### Front Controller 25 Specifies the name of the system *Front Controller*, usually <file>index</file>, but may be renamed.26 Format: 27 <pre>config item [front controller name]</pre> 26 Specifies the name of the system <definition>Front Controller</definition>, usually <file>index</file>, but may be renamed. 27 <pre> 28 index_page [front controller name] 28 29 <code> 29 30 $config['index_page'] = 'index.php'; 30 31 </code> 31 *index_page* is **optional**. If your web server supports dynamic url re-writing. The front controller 32 may be dynamically removed fron the uri path. Set this item to blank if you are using re-writes. 32 </pre> 33 *index_page* is **optional**. If your web server supports dynamic URL re-writing. The front controller 34 may be dynamically removed fron the URI path. Set this item to blank if you are using re-writes. 33 35 34 ### U rlSuffix35 Specifies the suffix which should be dynamically added to the uripath.36 Format: 37 <pre>*url_suffix* [suffix]</pre> 36 ### URL Suffix 37 Specifies the suffix which should be dynamically added to the URI path. 38 <pre> 39 url_suffix [suffix] 38 40 <code> 39 41 $config['url_suffix'] = '.html'; 40 42 </code> 41 *url_suffix* is **optional** You may specify any valid extension as a suffix. Set to blank to remove. 43 </pre> 44 *url_suffix* is **optional**. You may specify any valid extension as a suffix. Set to blank to remove. 42 45 43 46 ### Permitted URI Characters 44 47 Specifies the characters which the system will allow as part of a uniform resource indicator. 45 Format: 46 <pre>*permitted_uri_chars* character set</pre> 48 <pre> 49 permitted_uri_chars character set 47 50 <code> 48 51 $config['permitted_uri_chars'] = 'a-z 0-9~%.:_-'; 49 52 </code> 50 *permitted_uri_chars* is **mandatory** A minimal character set must be specified or the system cannot function. 53 </pre> 54 *permitted_uri_chars* is **mandatory**. A minimal character set must be specified or the system cannot function. 51 55 52 56 **Security Note:** It is recommended that the default character set be used, to secure the system against 53 hacking attempts. Additional characters may be configured, but please be aware of the security implication. 57 hacking attempts. Additional characters may be configured, but please be aware of the security implication. 58 59 ### Locale 60 Specifies the system locale using the standard two letter abbreviation. 61 <pre> 62 locale international language abbreviation 63 <code> 64 $config['locale'] = 'en'; 65 </code> 66 </pre> 67 *locale* is **mandatory**. Kohana default is English. 68 69 ### Include Paths 70 Specifies additional locations the system should search for resources. 71 <pre> 72 include_paths [file path names] 73 <code> 74 $config['include_paths'] = array 75 ( 76 'modules/user_guide' 77 ); 78 </code> 79 </pre> 80 *include_paths* is **optional**. Kohana will always search the application path first, then any defined 81 include paths, and finally the system path. Primary resources are libraries, helpers and views. 82 83 ### Enable Hooks 84 Specifies the enabling of system Hooks 85 <pre> 86 enable_hooks boolean 87 <code> 88 $config['enable_hooks'] = FALSE; 89 </code> 90 </pre> 91 *enable_hooks* is **mandatory**. By default Hooks are disabled. If you plan to add to hooks into your 92 application, you will activate them by setting this entry to *TRUE*. 93 94 ### SubClass Prefix 95 Specifies the prefix for user extensions to Core Kohana classes. 96 <pre> 97 subclass_prefix prefix_ 98 <code> 99 $config['subclass_prefix'] = 'MY_'; 100 </code> 101 </pre> 102 *subclass_prefix* is **mandatory**. Core class extensions must be prefixed. 103 By convention the prefix "My_" is used. You may change this prefix, provided it terminates with an *underscore*. If you are not extending Core classes, you may safely leave the default setting. 104 105 ### Timezone 106 Specifies an standard international timezone for the system. 107 <pre> 108 timezone [zone/location] 109 <code> 110 $config['timezone'] = ''; 111 </code> 112 </pre> 113 *timezone* is **optional**. By default, the setting is blank and Kohana will use the timezone supplied by 114 PHP on the server. An example timezone would be "Africa/Johannesburg". 115 116 ## Autoloader Entries 117 To maintain a small footprint, resources are manually loaded in your Controller. In Applications where 118 a resource is utilised across many Controllers, you may specify that Kohana automatically loads the resource and makes it available to all Controllers. 119 120 Such resources would typically be databases, libraries (session), and helpers (url). 121 <pre> 122 resource type [resource name[,resource name…]] 123 <code> 124 $config['libraries'] = 'session, encrypt'; 125 </code> 126 </pre> 127 Note: If you are specifying that a resource is autoloaded, you still need to ensure that the resource is 128 correctly configured, via it's own configuration file. For example, if you autoload the Cookie Helper, 129 then you must check that cookies are correctly configured for your system in <file>application/config/cookie</file> 130 131 ## Configuration Files 132 The following files are used for Class configuration. 133 134 * <file>application/config/cookie</file> configures Cookies, used by the [Cookie helper](<?php echo url::base(TRUE).'user_guide/helpers/cookie' ?>) class. 135 * <file>application/config/database</file> configures Databases, used by the Database class. 136 * <file>application/config/encryption</file> configures Encryption, used by the Encryption class. 137 * <file>application/config/log</file> configures Logging, used by the Log class. 138 * <file>application/config/pagination</file> configures Pagination, used by the Pagination class. 139 * <file>application/config/routes</file> configures Routing, used by the Routing class. 140 * <file>application/config/session</file> configures Sessions, used by the Session class. 141 142 143 <p></p> 144 *[PHP]: PHP Hypertext Processor 145 *[URI]: Uniform Resource Indicator 146 *[URL]: Uniform Resource Locator -
trunk/modules/user_guide/views/user_guide/content/kohana/installation.php
r447 r469 5 5 If you are new to Kohana, we suggest following the steps below: 6 6 7 1. Unzip the Kohana package you downloaded, into a temporary directory. (Eg. /kohana)7 1. Unzip the Kohana package you downloaded, into a temporary directory. (Eg. */kohana*) 8 8 2. Prepare a place on your web server to upload the Kohana files to. 9 9 * Examples: 10 * /var/www/html(Using the web server *DOCUMENT ROOT*)11 * /var/www/html/kohana(Using a sub-directory of root)10 * */var/www/html* (Using the web server *DOCUMENT ROOT*) 11 * */var/www/html/kohana* (Using a sub-directory of root) 12 12 3. Using an FTP client, upload the Kohana files to your web server. 13 13 * Your server directory should now contain the following files and folders<br /> 14 <code>15 index.php<br />16 -- application<br />17 -- modules<br />18 -- system19 </code>20 4. Using a Text Editor, open the file <file> /application/config/config</file>14 <code> 15 index.php<br /> 16 -- application<br /> 17 -- modules<br /> 18 -- system 19 </code> 20 4. Using a Text Editor, open the file <file>application/config/config</file> 21 21 * Set the configuration item *base_url* to the name of the directory you uploaded Kohana into 22 22 * Examples: 23 1. The sub directory *kohana* of the server named *localhost*<br /> 24 <code> 25 $config['base_url'] = 'http://'.$_SERVER['SERVER_NAME'].'/kohana/';<br /> 26 can be accessed via this url: http://localhost/kohana 27 </code> 28 2. The *DOCUMENT ROOT* of the server named *example.com*<br /> 29 <code> 30 $config['base_url'] = 'http://'.$_SERVER['SERVER_NAME'].'/';<br /> 31 can be accessed via this url: http://example.com 32 </code> 23 1. The sub directory *kohana* of the server named *localhost* can be accessed via this URL: http://localhost/kohana 24 <code> 25 $config['base_url'] = 'http://'.$_SERVER['SERVER_NAME'].'/kohana/'; 26 </code> 27 2. The *DOCUMENT ROOT* of the server named *example.com* can be accessed via this URL: http://example.com 28 <code> 29 $config['base_url'] = 'http://'.$_SERVER['SERVER_NAME'].'/'; 30 </code> 33 31 5. Test your Installation 34 32 * Open your favourite web browser and point it at the URL defined in *base_url* 35 * You r should now be viewing the "Welcome page" of the Kohana User Guide, on your server33 * You should now be viewing the "Welcome page" of the Kohana User Guide, on your server. 36 34 37 35 38 36 **Congratulations!** <br /> 39 37 You can explore your new Kohana Framework by reading the User Guide, a good place 40 to start would be [Getting Started](<?php echo url::base( ).'user_guide/kohana/starting'?>)38 to start would be [Getting Started](<?php echo url::base(TRUE).'user_guide/kohana/starting'?>) 41 39 42 40 ## Experiencing Problems? 43 41 If you were not able to view the Kohana User Guide on your server after installing, we recommend 44 reading the [Toubleshooting](<?php echo url::base( ).'user_guide/troubleshoot'?>) page of the user42 reading the [Toubleshooting](<?php echo url::base(TRUE).'user_guide/troubleshoot'?>) page of the user 45 43 guide for more help. 46 44 -
trunk/modules/user_guide/views/user_guide/css/layout.php
r461 r469 41 41 #body ul { list-style: circle; } 42 42 #body li { padding: 0.1em 0; } 43 #body code { background: #eee; font-size: 1.1em; border: dotted 1px; padding: 0.5em; font-family: monospace; display: block; } 43 44 #footer { padding: 0 1em; background: #fff; line-height: 2em; } 44 45 #loading { position: absolute; top: 0; right: 0; z-index: 9999; width: 32px; height: 32px; background: transparent url(spinner.gif) center center no-repeat; } -
trunk/modules/user_guide/views/user_guide/menu.php
r458 r469 45 45 'Helpers' => array 46 46 ( 47 'Cookie', 47 48 'File', 48 49 'Html',
