Changeset 3309 for branches

Show
Ignore:
Timestamp:
08/08/2008 07:24:50 PM (4 months ago)
Author:
Shadowhand
Message:

Fixed website for 2.2 release

Location:
branches/website
Files:
13 modified

Legend:

Unmodified
Added
Removed
  • branches/website/.htaccess

    r2957 r3309  
    99# Redirect to doc 
    1010RewriteRule ^user_guide(/.*)?$ http://doc.kohanaphp.com$1 [R=301,L] 
     11 
     12<IfModule !php5_module> 
     13RewriteRule .* http://127.0.0.1:2480/$0 [PT,L] 
     14</IfModule> 
    1115 
    1216# Installation directory 
  • branches/website/application/config/config.php

    r2786 r3309  
    11<?php defined('SYSPATH') or die('No direct script access.'); 
    22/** 
    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. 
    46 */ 
    5 $config['site_domain'] = IN_PRODUCTION ? $_SERVER['SERVER_NAME'] : 'localhost/kohanaphp.com/'; 
     7$config['site_domain'] = '/kohanaphp.com/'; 
    68 
    79/** 
    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. 
    913 */ 
    10 $config['site_protocol'] = 'http'; 
     14$config['site_protocol'] = ''; 
    1115 
    1216/** 
     
    2024 * Fake file extension that will be added to all generated URLs. Example: .html 
    2125 */ 
    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; 
    2334 
    2435/** 
     
    3243 
    3344/** 
    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 
    3650 */ 
    3751$config['global_xss_filtering'] = TRUE; 
    3852 
    3953/** 
    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. 
    4257 */ 
    43 $config['allow_config_set'] = TRUE; 
     58$config['enable_hooks'] = TRUE; 
    4459 
    4560/** 
    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 
    4777 * logging. Turning this off will disable ALL error pages. 
    4878 */ 
     
    5080 
    5181/** 
    52  * Enable or display statistics in the final output. Stats are replaced via 
     82 * Enable or disable statistics in the final output. Stats are replaced via 
    5383 * specific strings, such as {execution_time}. 
    5484 * 
    55  * @see http://doc.kohanaphp.com/general/configuration/config 
     85 * @see http://docs.kohanaphp.com/general/configuration 
    5686 */ 
    5787$config['render_stats'] = TRUE; 
     
    70100$config['modules'] = array 
    71101( 
     102        MODPATH.'archive',   // Compressed archives 
    72103        MODPATH.'auth',      // Authentication 
    73104        MODPATH.'forge',     // Form generation 
    74         // MODPATH.'gmaps',     // Google Maps Javascript generator 
    75         // MODPATH.'kobot',     // Kohana IRC bot 
    76105        // MODPATH.'kodoc',     // Self-generating documentation 
    77106        // 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!) 
    79112); 
  • branches/website/application/controllers/download.php

    r2823 r3309  
    2323 
    2424                // Release version, codename, and date 
    25                 $content->release_version = '2.1.2'; 
    26                 $content->release_codename = 'Diuturnal'; 
    27                 $content->release_date = strtotime('2008/06/10'); 
     25                $content->release_version = '2.2'; 
     26                $content->release_codename = 'efímera'; 
     27                $content->release_date = strtotime('2008/08/08'); 
    2828 
    2929                // Counter 
     
    3333                $content->modules = array 
    3434                ( 
     35                        'Archive' => Kohana::lang('download.archive_description'), 
    3536                        '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'), 
    3838                        'Kodoc' => Kohana::lang('download.kodoc_description'), 
     39                        'Payment' => Kohana::lang('download.payment_description'), 
    3940                ); 
    4041 
     
    6869                        'en_GB' => Kohana::lang('download.lang_en_GB'), 
    6970                        'de_DE' => Kohana::lang('download.lang_de_DE'), 
     71                        'es_AR' => Kohana::lang('download.lang_es_AR'), 
    7072                        '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'), 
    7276                        'nl_NL' => Kohana::lang('download.lang_nl_NL'), 
    7377                        // 'mk_MK' => Kohana::lang('download.lang_mk_MK'), 
    7478                        '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'), 
    7581                ); 
    7682 
     
    111117                                $source = IN_PRODUCTION 
    112118                                        ? '/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.'/'; 
    114120 
    115121                                // Directory prefix that will be added to the archive as the base directory 
     
    133139                                { 
    134140                                        // 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') 
    136142                                                continue; 
    137143 
     
    153159                                        foreach ($module_files as $file) 
    154160                                        { 
    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                                                } 
    157179                                        } 
    158180                                } 
  • branches/website/application/controllers/home.php

    r2794 r3309  
    55        public $auto_render = TRUE; 
    66 
    7         public function _remap() 
     7        public function __call($method, $args) 
    88        { 
    99                $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')); 
    1111        } 
    1212 
  • branches/website/application/controllers/license.php

    r2850 r3309  
    88        { 
    99                $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')); 
    1111        } 
    1212 
  • branches/website/application/controllers/news.php

    r2794 r3309  
    1313        { 
    1414                $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')); 
    1616        } 
    1717 
  • branches/website/application/controllers/tutorials.php

    r2808 r3309  
    55        public $auto_render = TRUE; 
    66 
    7         public function _default() 
     7        public function __call($method, $args) 
    88        { 
    99                $titles = array(); 
  • branches/website/application/hooks/multilang.php

    r2843 r3309  
    88 
    99// TLD => lang 
    10 $langs = Config::item('locale.tlds'); 
     10$langs = Kohana::config('locale.tlds'); 
    1111 
    1212if (isset($langs[TLD])) 
    1313{ 
    1414        // Set the language 
    15         Config::set('locale.language', $langs[TLD]); 
     15        Kohana::config_set('locale.language.0', $langs[TLD]); 
    1616} 
    1717 
  • branches/website/application/i18n/en_US/download.php

    r2803 r3309  
    44( 
    55        'title'                 => 'Download', 
     6        'archive_description'   => 'Compressed archive creation, supports zip, tar, gzip, and bzip.', 
    67        'auth_description'      => 'Simple authentication and user management. Uses <a href="http://doc.kohanaphp.com/libraries/orm">ORM</a> for models.', 
    78        'forge_description'     => 'Object-oriented form generation and templating.', 
    89        'media_description'     => 'Media caching, compression, and aggregation for CSS and Javascript files.', 
    910        '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.', 
    1012        'markdown_description'  => 'Text formatting tool that offers text to HTML markup with a natural syntax.', 
    1113        'swift_description'     => 'Feature-rich emailing library that supports HTML email, STMP connections, and many other features.', 
     
    1315        'lang_en_US'            => 'English (US)', 
    1416        'lang_en_GB'            => 'English (UK)', 
     17        'lang_es_AR'            => 'Spanish (Argentina)', 
     18        'lang_es_ES'            => 'Spanish', 
     19        'lang_de_DE'            => 'German', 
    1520        'lang_nl_NL'            => 'Dutch', 
     21        'lang_fi_FI'            => 'Finnish', 
    1622        'lang_fr_FR'            => 'French', 
    17         'lang_de_DE'            => 'German', 
     23        'lang_it_IT'            => 'Italian', 
    1824        'lang_mk_MK'            => 'Macedonian', 
    19         'lang_es_ES'            => 'Spanish', 
    2025        'lang_pl_PL'            => 'Polish', 
     26        'lang_pt_BR'            => 'Portuguese (Brazil)', 
     27        'lang_ru_RU'            => 'Russian', 
    2128        'zip_archive'           => 'Zip Archive', 
    2229        'total'                 => 'Total Downloads: %s', 
  • branches/website/application/views/layout.php

    r3215 r3309  
    22 
    33// HTML lang 
    4 $lang = substr(Config::item('locale.language'), 0, 2); 
     4$lang = substr(Kohana::config('locale.language.0'), 0, 2); 
    55 
    66// Base URL 
     
    88 
    99// Page suffix 
    10 $suffix = Config::item('core.url_suffix'); 
     10$suffix = Kohana::config('core.url_suffix'); 
    1111 
    1212?> 
     
    6464<!-- Start Language Picker --> 
    6565<ul id="languages"> 
    66 <?php foreach (Config::item('locale.tlds') as $tld => $i18n): ?> 
     66<?php foreach (Kohana::config('locale.tlds') as $tld => $i18n): ?> 
    6767<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,  
    6868'media/img/flags/', $i18n, '.png' ?>" width="16" height="11" /></a></li> 
  • branches/website/application/views/pages/tutorials/multilingual.php

    r1095 r3309  
    4747{ 
    4848        // Array of allowed languages 
    49         $locales = Config::item(\'locale.allowed_locales\'); 
     49        $locales = Kohana::config(\'locale.allowed_locales\'); 
    5050 
    5151        // Extract language from URL 
     
    9393 
    9494        // 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]); 
    9797 
    9898        // 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\'); 
    100100 
    101101        // Finally set a language cookie for 6 months 
     
    134134?> 
    135135 
    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> 
    137137 
    138138 
     
    199199                if ($lang === FALSE) 
    200200                { 
    201                         $lang = Config::item(\'locale.lang\'); 
     201                        $lang = Kohana::config(\'locale.lang\'); 
    202202                } 
    203203 
     
    234234                if ($lang === FALSE) 
    235235                { 
    236                         $lang = Config::item(\'locale.lang\'); 
     236                        $lang = Kohana::config(\'locale.lang\'); 
    237237                } 
    238238 
  • branches/website/application/views/pages/tutorials/page.php

    r1489 r3309  
    249249?> 
    250250<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 /> 
    252252Feel free to send any changes or improvements back to me at <?=html::mailto('jeremy.bush@kohanaphp.com')?>.</p> 
    253253<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> 
    254254 
    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  
    7676class Access_denied_Controller extends Controller { 
    7777 
    78         function _remap() 
     78        function __call($method, $args) 
    7979        { 
    8080                // Attempted access path, with "access_denied/" removed