- Timestamp:
- 08/08/2008 07:24:50 PM (4 months ago)
- Location:
- branches/website
- Files:
-
- 13 modified
-
.htaccess (modified) (1 diff)
-
application/config/config.php (modified) (5 diffs)
-
application/controllers/download.php (modified) (6 diffs)
-
application/controllers/home.php (modified) (1 diff)
-
application/controllers/license.php (modified) (1 diff)
-
application/controllers/news.php (modified) (1 diff)
-
application/controllers/tutorials.php (modified) (1 diff)
-
application/hooks/multilang.php (modified) (1 diff)
-
application/i18n/en_US/download.php (modified) (2 diffs)
-
application/views/layout.php (modified) (3 diffs)
-
application/views/pages/tutorials/multilingual.php (modified) (5 diffs)
-
application/views/pages/tutorials/page.php (modified) (1 diff)
-
application/views/pages/tutorials/remove_index.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/website/.htaccess
r2957 r3309 9 9 # Redirect to doc 10 10 RewriteRule ^user_guide(/.*)?$ http://doc.kohanaphp.com$1 [R=301,L] 11 12 <IfModule !php5_module> 13 RewriteRule .* http://127.0.0.1:2480/$0 [PT,L] 14 </IfModule> 11 15 12 16 # Installation directory -
branches/website/application/config/config.php
r2786 r3309 1 1 <?php defined('SYSPATH') or die('No direct script access.'); 2 2 /** 3 * Domain name, with the installation directory. Default: localhost/kohana/ 3 * Base path of the web site. If this includes a domain, eg: localhost/kohana/ 4 * then a full URL will be used, eg: http://localhost/kohana/. If it only includes 5 * the path, and a site_protocol is specified, the domain will be auto-detected. 4 6 */ 5 $config['site_domain'] = IN_PRODUCTION ? $_SERVER['SERVER_NAME'] : 'localhost/kohanaphp.com/';7 $config['site_domain'] = '/kohanaphp.com/'; 6 8 7 9 /** 8 * Default protocol used to access the website. Default: http 10 * Force a default protocol to be used by the site. If no site_protocol is 11 * specified, then the current protocol is used, or when possible, only an 12 * absolute path (with no protocol/domain) is used. 9 13 */ 10 $config['site_protocol'] = ' http';14 $config['site_protocol'] = ''; 11 15 12 16 /** … … 20 24 * Fake file extension that will be added to all generated URLs. Example: .html 21 25 */ 22 $config['url_suffix'] = '.html'; 26 $config['url_suffix'] = ''; 27 28 /** 29 * Length of time of the internal cache in seconds. 0 or FALSE means no caching. 30 * The internal cache stores file paths and config entries across requests and 31 * can give significant speed improvements at the expense of delayed updating. 32 */ 33 $config['internal_cache'] = IN_PRODUCTION ? 3600 : FALSE; 23 34 24 35 /** … … 32 43 33 44 /** 34 * Enable or disable global XSS filtering of GET, POST, and SERVER data. This 35 * option also accepts a string to specify a specific XSS filtering tool. 45 * Enable or disable global XSS filtering of GET, POST, and COOKIE data. 46 * Supported options: 47 * FALSE - Disable global XSS filtering (NOT RECOMMENDED) 48 * TRUE - Enable internal XSS filtering 49 * htmlpurifier - Use HTMLPurifier for XSS filtering 36 50 */ 37 51 $config['global_xss_filtering'] = TRUE; 38 52 39 53 /** 40 * Enable or disable dynamic setting of configuration options. By default, all 41 * configuration options are read-only. 54 * Enable or disable hooks. Setting this option to TRUE will enable 55 * all hooks. By using an array of hook filenames, you can control 56 * which hooks are enabled. Setting this option to FALSE disables hooks. 42 57 */ 43 $config[' allow_config_set'] = TRUE;58 $config['enable_hooks'] = TRUE; 44 59 45 60 /** 46 * Enable or display displaying of Kohana error pages. This will not affect 61 * Log thresholds: 62 * 0 - Disable logging 63 * 1 - Errors and exceptions 64 * 2 - Warnings 65 * 3 - Notices 66 * 4 - Debugging 67 */ 68 $config['log_threshold'] = 1; 69 70 /** 71 * Message logging directory. 72 */ 73 $config['log_directory'] = APPPATH.'logs'; 74 75 /** 76 * Enable or disable displaying of Kohana error pages. This will not affect 47 77 * logging. Turning this off will disable ALL error pages. 48 78 */ … … 50 80 51 81 /** 52 * Enable or dis playstatistics in the final output. Stats are replaced via82 * Enable or disable statistics in the final output. Stats are replaced via 53 83 * specific strings, such as {execution_time}. 54 84 * 55 * @see http://doc .kohanaphp.com/general/configuration/config85 * @see http://docs.kohanaphp.com/general/configuration 56 86 */ 57 87 $config['render_stats'] = TRUE; … … 70 100 $config['modules'] = array 71 101 ( 102 MODPATH.'archive', // Compressed archives 72 103 MODPATH.'auth', // Authentication 73 104 MODPATH.'forge', // Form generation 74 // MODPATH.'gmaps', // Google Maps Javascript generator75 // MODPATH.'kobot', // Kohana IRC bot76 105 // MODPATH.'kodoc', // Self-generating documentation 77 106 // MODPATH.'media', // Media caching and compression 78 // MODPATH.'shoutbox', // Shoutbox demo module 107 // MODPATH.'gmaps', // Google Maps integration 108 // MODPATH.'archive', // Archive utility 109 // MODPATH.'payment', // Online payments 110 // MODPATH.'unit_test', // Unit testing 111 // MODPATH.'object_db', // New OOP Database library (testing only!) 79 112 ); -
branches/website/application/controllers/download.php
r2823 r3309 23 23 24 24 // Release version, codename, and date 25 $content->release_version = '2. 1.2';26 $content->release_codename = ' Diuturnal';27 $content->release_date = strtotime('2008/0 6/10');25 $content->release_version = '2.2'; 26 $content->release_codename = 'efímera'; 27 $content->release_date = strtotime('2008/08/08'); 28 28 29 29 // Counter … … 33 33 $content->modules = array 34 34 ( 35 'Archive' => Kohana::lang('download.archive_description'), 35 36 'Auth' => Kohana::lang('download.auth_description'), 36 'Forge' => Kohana::lang('download.forge_description'), 37 'Media' => Kohana::lang('download.media_description'), 37 'Gmaps' => Kohana::lang('download.gmaps_description'), 38 38 'Kodoc' => Kohana::lang('download.kodoc_description'), 39 'Payment' => Kohana::lang('download.payment_description'), 39 40 ); 40 41 … … 68 69 'en_GB' => Kohana::lang('download.lang_en_GB'), 69 70 'de_DE' => Kohana::lang('download.lang_de_DE'), 71 'es_AR' => Kohana::lang('download.lang_es_AR'), 70 72 'es_ES' => Kohana::lang('download.lang_es_ES'), 71 // 'fr_FR' => Kohana::lang('download.lang_fr_FR'), 73 'fi_FI' => Kohana::lang('download.lang_fi_FI'), 74 'fr_FR' => Kohana::lang('download.lang_fr_FR'), 75 'it_IT' => Kohana::lang('download.lang_it_IT'), 72 76 'nl_NL' => Kohana::lang('download.lang_nl_NL'), 73 77 // 'mk_MK' => Kohana::lang('download.lang_mk_MK'), 74 78 'pl_PL' => Kohana::lang('download.lang_pl_PL'), 79 'pt_BR' => Kohana::lang('download.lang_pt_BR'), 80 'ru_RU' => Kohana::lang('download.lang_ru_RU'), 75 81 ); 76 82 … … 111 117 $source = IN_PRODUCTION 112 118 ? '/home/kohana/checkout/kohana_releases/'.$content->release_version.'/' 113 : '/Volumes/Media/Sites/Kohana/ releases/'.$content->release_version.'/';119 : '/Volumes/Media/Sites/Kohana/tags/'.$content->release_version.'/'; 114 120 115 121 // Directory prefix that will be added to the archive as the base directory … … 133 139 { 134 140 // Skip i18n directory, it's added manually 135 if (($dir = substr($file, strrpos($file, '/') + 1)) === 'i18n' OR $dir === 'vendor')141 if (($dir = basename($dir)) === 'i18n' OR $dir === 'vendor') 136 142 continue; 137 143 … … 153 159 foreach ($module_files as $file) 154 160 { 155 // Add module files 156 $this->add_files($source, $prefix, 'modules/'.strtolower($file).'/', $archive); 161 foreach (glob($source.'modules/'.strtolower($file).'/*', GLOB_ONLYDIR) as $dir) 162 { 163 // Skip i18n files, they are added manually 164 if (($dir = basename($dir)) === 'i18n' OR $dir === 'vendor') 165 continue; 166 167 // Add module files 168 $this->add_files($source, $prefix, 'modules/'.strtolower($file).'/'.$dir.'/', $archive); 169 } 170 171 foreach ($download['languages'] as $lang) 172 { 173 if (is_dir($source.'modules/'.strtolower($file).'/i18n/'.$lang)) 174 { 175 // Add module language files 176 $this->add_files($source, $prefix, 'modules/'.strtolower($file).'/i18n/'.$lang.'/', $archive); 177 } 178 } 157 179 } 158 180 } -
branches/website/application/controllers/home.php
r2794 r3309 5 5 public $auto_render = TRUE; 6 6 7 public function _ remap()7 public function __call($method, $args) 8 8 { 9 9 $this->template->title = Kohana::lang('home.title'); 10 $this->template->content = View::factory('pages/home/home_'. Config::item('locale.language'));10 $this->template->content = View::factory('pages/home/home_'.Kohana::config('locale.language.0')); 11 11 } 12 12 -
branches/website/application/controllers/license.php
r2850 r3309 8 8 { 9 9 $this->template->title = Kohana::lang('license.title'); 10 $this->template->content = View::factory('pages/license/license_'. Config::item('locale.language'));10 $this->template->content = View::factory('pages/license/license_'.Kohana::config('locale.language.0')); 11 11 } 12 12 -
branches/website/application/controllers/news.php
r2794 r3309 13 13 { 14 14 $this->template->title = 'GoPHP5'; 15 $this->template->content = View::factory('pages/news/gophp5_'. Config::item('locale.language'));15 $this->template->content = View::factory('pages/news/gophp5_'.Kohana::config('locale.language.0')); 16 16 } 17 17 -
branches/website/application/controllers/tutorials.php
r2808 r3309 5 5 public $auto_render = TRUE; 6 6 7 public function _ default()7 public function __call($method, $args) 8 8 { 9 9 $titles = array(); -
branches/website/application/hooks/multilang.php
r2843 r3309 8 8 9 9 // TLD => lang 10 $langs = Config::item('locale.tlds');10 $langs = Kohana::config('locale.tlds'); 11 11 12 12 if (isset($langs[TLD])) 13 13 { 14 14 // Set the language 15 Config::set('locale.language', $langs[TLD]);15 Kohana::config_set('locale.language.0', $langs[TLD]); 16 16 } 17 17 -
branches/website/application/i18n/en_US/download.php
r2803 r3309 4 4 ( 5 5 'title' => 'Download', 6 'archive_description' => 'Compressed archive creation, supports zip, tar, gzip, and bzip.', 6 7 'auth_description' => 'Simple authentication and user management. Uses <a href="http://doc.kohanaphp.com/libraries/orm">ORM</a> for models.', 7 8 'forge_description' => 'Object-oriented form generation and templating.', 8 9 'media_description' => 'Media caching, compression, and aggregation for CSS and Javascript files.', 9 10 'kodoc_description' => 'Dynamic self-generated documentation. (Beta!)', 11 'payment_description' => 'Provides merchant and payment gateway wrappers. Supports Authorize.net, PayPal, Trident, Trust Commerce, and YourPay.', 10 12 'markdown_description' => 'Text formatting tool that offers text to HTML markup with a natural syntax.', 11 13 'swift_description' => 'Feature-rich emailing library that supports HTML email, STMP connections, and many other features.', … … 13 15 'lang_en_US' => 'English (US)', 14 16 'lang_en_GB' => 'English (UK)', 17 'lang_es_AR' => 'Spanish (Argentina)', 18 'lang_es_ES' => 'Spanish', 19 'lang_de_DE' => 'German', 15 20 'lang_nl_NL' => 'Dutch', 21 'lang_fi_FI' => 'Finnish', 16 22 'lang_fr_FR' => 'French', 17 'lang_ de_DE' => 'German',23 'lang_it_IT' => 'Italian', 18 24 'lang_mk_MK' => 'Macedonian', 19 'lang_es_ES' => 'Spanish',20 25 'lang_pl_PL' => 'Polish', 26 'lang_pt_BR' => 'Portuguese (Brazil)', 27 'lang_ru_RU' => 'Russian', 21 28 'zip_archive' => 'Zip Archive', 22 29 'total' => 'Total Downloads: %s', -
branches/website/application/views/layout.php
r3215 r3309 2 2 3 3 // HTML lang 4 $lang = substr( Config::item('locale.language'), 0, 2);4 $lang = substr(Kohana::config('locale.language.0'), 0, 2); 5 5 6 6 // Base URL … … 8 8 9 9 // Page suffix 10 $suffix = Config::item('core.url_suffix');10 $suffix = Kohana::config('core.url_suffix'); 11 11 12 12 ?> … … 64 64 <!-- Start Language Picker --> 65 65 <ul id="languages"> 66 <?php foreach ( Config::item('locale.tlds') as $tld => $i18n): ?>66 <?php foreach (Kohana::config('locale.tlds') as $tld => $i18n): ?> 67 67 <li><a class="<?php if ($tld === TLD) echo 'active' ?>" href="<?php echo preg_replace('/(?<=kohanaphp\.)[a-z.]+/', $tld, $base_url, 1), Router::$current_uri, $suffix, Router::$query_string ?>"><img alt="<?php echo $i18n ?>" src="<?php echo $base_url, 68 68 'media/img/flags/', $i18n, '.png' ?>" width="16" height="11" /></a></li> -
branches/website/application/views/pages/tutorials/multilingual.php
r1095 r3309 47 47 { 48 48 // Array of allowed languages 49 $locales = Config::item(\'locale.allowed_locales\');49 $locales = Kohana::config(\'locale.allowed_locales\'); 50 50 51 51 // Extract language from URL … … 93 93 94 94 // Store locale config values 95 Config::set(\'locale.lang\', $lang);96 Config::set(\'locale.language\', $locales[$lang]);95 Kohana::config_set(\'locale.lang\', $lang); 96 Kohana::config_set(\'locale.language\', $locales[$lang]); 97 97 98 98 // Overwrite setlocale which has already been set before in Kohana::setup() 99 setlocale(LC_ALL, Config::item(\'locale.language\').\'.UTF-8\');99 setlocale(LC_ALL, Kohana::config(\'locale.language\').\'.UTF-8\'); 100 100 101 101 // Finally set a language cookie for 6 months … … 134 134 ?> 135 135 136 <p>Note that from this point <tt>Kohana::lang()</tt> will pull text from the i18n/locale folder based on the language in the URL. Also, know that the current language now is available via <tt> Config::item('locale.lang')</tt>.</p>136 <p>Note that from this point <tt>Kohana::lang()</tt> will pull text from the i18n/locale folder based on the language in the URL. Also, know that the current language now is available via <tt>Kohana::config('locale.lang')</tt>.</p> 137 137 138 138 … … 199 199 if ($lang === FALSE) 200 200 { 201 $lang = Config::item(\'locale.lang\');201 $lang = Kohana::config(\'locale.lang\'); 202 202 } 203 203 … … 234 234 if ($lang === FALSE) 235 235 { 236 $lang = Config::item(\'locale.lang\');236 $lang = Kohana::config(\'locale.lang\'); 237 237 } 238 238 -
branches/website/application/views/pages/tutorials/page.php
r1489 r3309 249 249 ?> 250 250 <p>Here we load the page from the model, and also cleverly show a 404 status if the page doesn't exist (the database result would be FALSE).</p> 251 <p>I have provided a whole <?= html::file_anchor( Config::item('core.index_page', TRUE).'tutorials/download/page_tutorial.zip', 'application')?> for you to look at, pick apart or use on your own projects.<br />251 <p>I have provided a whole <?= html::file_anchor(Kohana::config('core.index_page', TRUE).'tutorials/download/page_tutorial.zip', 'application')?> for you to look at, pick apart or use on your own projects.<br /> 252 252 Feel free to send any changes or improvements back to me at <?=html::mailto('jeremy.bush@kohanaphp.com')?>.</p> 253 253 <p>It includes a basic authentication system for administrating pages, a FCKeditor for easy editing of pages, and some basic HTML views to get you going.</p> 254 254 255 <p><strong><?= html::file_anchor( Config::item('core.index_page', TRUE).'tutorials/download/page_tutorial.zip', 'Download Tutorial Files') ?></strong></p>255 <p><strong><?= html::file_anchor(Kohana::config('core.index_page', TRUE).'tutorials/download/page_tutorial.zip', 'Download Tutorial Files') ?></strong></p> -
branches/website/application/views/pages/tutorials/remove_index.php
r2320 r3309 76 76 class Access_denied_Controller extends Controller { 77 77 78 function _ remap()78 function __call($method, $args) 79 79 { 80 80 // Attempted access path, with "access_denied/" removed
