Changeset 1070

Show
Ignore:
Timestamp:
11/09/2007 09:10:15 PM (13 months ago)
Author:
Shadowhand
Message:

Changes to website branch:

  • Switched download to use GET. This is technically more correct, and offers easier remote download capabilities.
  • Updated form styles to make the page easier to read.
  • Changed feed locations to the new URLs
Location:
branches/website/application
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • branches/website/application/controllers/download.php

    r1069 r1070  
    185185                ); 
    186186 
    187                 if (empty($_POST)) 
    188                 { 
    189                         // Fake POST data, for validation 
    190                         $_POST = array 
     187                if (empty($_GET)) 
     188                { 
     189                        // Fake validation data, so that we can pre-fill the form 
     190                        $validate = array 
    191191                        ( 
    192192                                'group' => 'standard', 
     
    197197                                ) 
    198198                        ); 
    199  
    200                         // Do not validate fake POST data 
    201                         $validate = FALSE; 
    202199                } 
    203200                else 
    204201                { 
    205                         $validate = TRUE; 
     202                        // Validate GET data 
     203                        $validate = $_GET; 
    206204                } 
    207205 
    208206                // Load validation 
    209                 $this->load->library('validation'); 
     207                $this->load->library('validation', $validate); 
    210208 
    211209                // Set rules 
     
    217215                )); 
    218216 
    219                 if ($validate AND $this->validation->run()) 
     217                if ( ! empty($_GET) AND $this->validation->run()) 
    220218                { 
    221219                        // Get current directory for return 
  • branches/website/application/libraries/MY_Controller.php

    r1063 r1070  
    4949                                'tutorials'  => 'Tutorials', 
    5050                                // External links 
    51                                 'http://kohanaphp.com/forums/'    => 'Forums', 
    52                                 'http://kohanaphp.com/user_guide/' => 'User Guide' 
     51                                'http://forums.kohanaphp.com/' => 'Forums', 
     52                                'http://api.kohanaphp.com/'    => 'API Manual' 
    5353                        ); 
    5454 
     
    101101                                } 
    102102 
    103                                 // Add the feed to the template 
    104                                 $feeds[$name] = feed::parse($filename, 3); 
     103                                // Add the feed to the sidebar 
     104                                // $this->template->sidebar->feeds[$name] = feed::parse($filename, 3); 
    105105                        } 
    106  
    107                         $this->template->sidebar->feeds = $feeds; 
    108106 
    109107                        // Auto-rendering 
  • branches/website/application/views/media/css/layout.css

    r1051 r1070  
    4949        #body ul, #body ol { padding-left: 1.5em; margin-bottom: 1em; list-style: square; line-height: 180%; } 
    5050        #body ol { list-style: decimal; } 
    51         #body form ul { padding-left: 0; list-style: none; } 
     51        #body form fieldset { padding: 0.5em 0; } 
     52        #body form .legend { display: block; padding: 0.5em; background: #ddefbd; } 
     53        #body form ul { display: block; padding: 0.5em 1em 0; list-style: none; } 
    5254        #body .intro { margin: 1em; margin-left: -4em; padding: 1em 2em; padding-left: 4em; background: #eaeee5; font-size: 1.6em; line-height: 1.4em; color: #8C9393; } 
    5355                #body .intro strong { text-transform: uppercase; font-weight: bold; font-size: 0.76em; color: #7b7d78; letter-spacing: -0.02em; white-space: nowrap; } 
  • branches/website/application/views/pages/download.php

    r1063 r1070  
    44 
    55 
    6 <?php echo form::open('download') ?>  
    7 <p>Choose your download type:</p> 
     6<?php echo form::open('download', array('method' => 'get')) ?>  
    87 
     8<fieldset><span class="legend">Choose your download type:</span> 
    99<ul> 
    10 <li><label><?php echo form::radio('group', 'minimal', ($this->validation->group == 'minimal')) ?> <strong>Tiny Flower (Minimal)</strong></label> &ndash; Included libraries: Session, Validation. Included helpers: array, cookie, form, html, security, url, and validation.</li> 
    11 <li><label><?php echo form::radio('group', 'standard', ($this->validation->group == 'standard')) ?> <strong>Naked Babe (Standard)</strong></label> &ndash; Additional libraries: Archive, Database, Encryption, Pagination, and Profiler. Additional helpers: date, download, feed, inflector, and text.</li> 
     10<li><label><?php echo form::radio('group', 'minimal', ($this->validation->group == 'minimal')) ?> <strong>Minimal</strong></label> &ndash; Included libraries: Session, Validation. Included helpers: array, cookie, form, html, security, url, and validation.</li> 
     11<li><label><?php echo form::radio('group', 'standard', ($this->validation->group == 'standard')) ?> <strong>Standard</strong></label> &ndash; Additional libraries: Archive, Database, Encryption, Pagination, and Profiler. Additional helpers: date, download, feed, inflector, and text.</li> 
    1212</ul> 
     13</fieldset> 
    1314 
    14 <p>Include the following vendor tools in my download:</p> 
    15  
     15<fieldset><span class="legend">Include the following vendor tools in my download:</span> 
    1616<ul> 
    1717<?php 
     
    2929?> 
    3030</ul> 
     31</fieldset> 
    3132 
    32 <p>Include the following languages in my download:</p> 
    33 <?php echo $this->validation->languages_error ?>  
     33<fieldset><span class="legend">Include the following languages in my download:</span> 
    3434<ul> 
    3535<?php 
     
    4545?> 
    4646</ul> 
     47</fieldset> 
    4748 
    48 <p>Choose your download format:</p> 
     49<fieldset><span class="legend">Choose your download format:</span> 
    4950<?php echo $this->validation->format_error ?>  
    5051<ul> 
     
    6162?> 
    6263</ul> 
     64</fieldset> 
    6365 
    64 <?php echo form::button(array('type' => 'submit', 'name' => 'download'), 'Download Kohana!') ?>  
     66<?php echo form::button(array('type' => 'submit'), 'Download Kohana!') ?>  
    6567<?php echo form::close() ?>  
  • branches/website/application/views/pages/tutorials/index.php

    r1054 r1070  
    66 
    77<ul> 
     8<li><?php echo html::anchor('tutorials/xss', 'XSS Attack Filtering') ?></li> 
    89<li><?php echo html::anchor('tutorials/page', 'Creating a Page Controller') ?></li> 
    9 <li><?php echo html::anchor('tutorials/xss', 'XSS Filtering') ?></li> 
    1010</ul>