<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5160921211805958415</id><updated>2012-02-15T22:35:18.766-08:00</updated><category term='templates'/><category term='concepts'/><category term='knh'/><category term='views'/><category term='kohana'/><title type='text'>Kohana Framework Tutorial</title><subtitle type='html'>Learn Kohana framework with me</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://kohana-tutorial.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5160921211805958415/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://kohana-tutorial.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>AquilaX</name><uri>http://www.blogger.com/profile/00163681558256875339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>7</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5160921211805958415.post-9007067688407843217</id><published>2011-08-04T22:01:00.000-07:00</published><updated>2011-08-04T22:01:51.386-07:00</updated><title type='text'>New challenge</title><content type='html'>Ok, I'm done with making the Hacker News clone.&lt;br /&gt;&lt;br /&gt;If there is any interest, I could make a &lt;a href="https://github.com/aquilax/scif"&gt;scif&lt;/a&gt; clone in Kohana (SCIF is small anonymous forum, written for Code Igniter).&lt;br /&gt;&lt;br /&gt;If you're interested, please leave a comment here.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5160921211805958415-9007067688407843217?l=kohana-tutorial.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kohana-tutorial.blogspot.com/feeds/9007067688407843217/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kohana-tutorial.blogspot.com/2011/08/new-challenge.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5160921211805958415/posts/default/9007067688407843217'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5160921211805958415/posts/default/9007067688407843217'/><link rel='alternate' type='text/html' href='http://kohana-tutorial.blogspot.com/2011/08/new-challenge.html' title='New challenge'/><author><name>AquilaX</name><uri>http://www.blogger.com/profile/00163681558256875339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5160921211805958415.post-5062303228390352640</id><published>2010-10-16T08:49:00.000-07:00</published><updated>2010-10-16T08:49:09.508-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kohana'/><category scheme='http://www.blogger.com/atom/ns#' term='views'/><category scheme='http://www.blogger.com/atom/ns#' term='templates'/><title type='text'>Lessn 3: Making it pretty</title><content type='html'>In this lesson we'll add some style to the page and also make the home page look more complete.&lt;br /&gt;&lt;br /&gt;First let's add the CSS. I'm using the &lt;a href="http://developer.yahoo.com/yui/reset/"&gt;CSS reset from YUI&lt;/a&gt; which is rather short and gets the job done.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;/assets/css/style.css&lt;/b&gt;&lt;br /&gt;&lt;pre class="brush:css"&gt;body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td {margin:0;padding:0;}&lt;br /&gt;table {border-collapse:collapse;border-spacing:0;}&lt;br /&gt;fieldset,img {border:0;}&lt;br /&gt;address,caption,cite,code,dfn,em,strong,th,var {font-style:normal;font-weight:normal;}&lt;br /&gt;ol,ul {list-style:none;}&lt;br /&gt;caption,th {text-align:left;}&lt;br /&gt;h1,h2,h3,h4,h5,h6 {font-size:100%;font-weight:normal;}&lt;br /&gt;q:before,q:after {content:'';}&lt;br /&gt;abbr,acronym { border:0;}&lt;br /&gt;#wrapper{margin:0 10%; background-color:#f6f6ef}&lt;br /&gt;#header{background-color:#fcaf3e;padding:.2em;color:#000;margin:1em 0 0}&lt;br /&gt;#header a{color:#000}&lt;br /&gt;#content{background-color:#f6f6ef; padding:1em}&lt;br /&gt;.fr{float:right}&lt;br /&gt;.ar{text-align:right}&lt;br /&gt;body {color:#828282;font-family:Verdana;font-size:10pt;}&lt;br /&gt;.cohead, .cohead a{color:#828282; font-size:9pt}&lt;br /&gt;.comment{padding:.4em}&lt;br /&gt;.comment, .comment a{color:#000; font-size:9pt}&lt;br /&gt;textarea {color:#000000;font-family:Courier;font-size:10pt;}&lt;br /&gt;#cform{padding:1em 0}&lt;br /&gt;table td{padding:.1em}&lt;br /&gt;.vote a{color:#828282; text-decoration:none}&lt;br /&gt;.title span{font-size:8pt}&lt;br /&gt;.nbody{padding:1em 0}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Looks like the views loaded from views doesn't share the variables. That's why for now I'll define the $site_title as global variable in defaulttemplate.php&lt;br /&gt;&lt;br /&gt;classes/controller/defaulttemplate.php&lt;br /&gt;&lt;pre class="brush:php"&gt;public function after() {&lt;br /&gt;    /*&lt;br /&gt;     * Set the page title to $site_title if title is not set,&lt;br /&gt;     * otherwise create title 'path'&lt;br /&gt;     */&lt;br /&gt;    if ($this-&amp;gt;template-&amp;gt;title){&lt;br /&gt;      $this-&amp;gt;template-&amp;gt;title = $this-&amp;gt;template-&amp;gt;title.' » '.$this-&amp;gt;site_title;&lt;br /&gt;    } else {&lt;br /&gt;      $this-&amp;gt;template-&amp;gt;title = $this-&amp;gt;site_title;&lt;br /&gt;    }&lt;br /&gt;    View::bind_global('site_title', $this-&amp;gt;site_title);&lt;br /&gt;    parent::after();&lt;br /&gt;  }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The header_tpl.php file becomes:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;views/blocks/header_tpl.php&lt;/b&gt;&lt;br /&gt;&lt;pre class="brush:php"&gt;&amp;lt;div id="header"&amp;gt;&lt;br /&gt;&amp;lt;?php&lt;br /&gt;echo '&amp;lt;b&amp;gt;'.html::anchor('/', $site_title).'&amp;lt;/b&amp;gt; | ';&lt;br /&gt;echo html::anchor('submit', __('submit')).' | ';&lt;br /&gt;echo html::anchor('latest', __('latest'));&lt;br /&gt;echo '&amp;lt;span class="fr"&amp;gt;';&lt;br /&gt;echo html::anchor('#', 'user');&lt;br /&gt;echo '&amp;lt;/span&amp;gt;';&lt;br /&gt;?&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;/pre&gt;&lt;br /&gt;To make the links work without &lt;b&gt;index.php&lt;/b&gt;, change the &lt;b&gt;bootstrap.php&lt;/b&gt; file (add empty &lt;b&gt;index_file&lt;/b&gt; element):&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush:php"&gt;Kohana::init(array(&lt;br /&gt;    'base_url'   =&amp;gt; '/',&lt;br /&gt;    'index_file'   =&amp;gt; '',&lt;br /&gt;));&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now the result should look like that:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_VnLjSNitd5E/TLnGkgHvZuI/AAAAAAAAFL0/PFZIgjn7cUo/s1600/style.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_VnLjSNitd5E/TLnGkgHvZuI/AAAAAAAAFL0/PFZIgjn7cUo/s1600/style.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Let's also change the look and functionality of the news:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;views/pages/news/index_tpl&lt;/b&gt;&lt;br /&gt;&lt;pre class="brush:php"&gt;&amp;lt;?php&lt;br /&gt;if ($news) {&lt;br /&gt;  foreach ($news as $row) {&lt;br /&gt;    echo '&amp;lt;table&amp;gt;';&lt;br /&gt;    echo '&amp;lt;tr&amp;gt;';&lt;br /&gt;    echo '&amp;lt;td class="vote"&amp;gt;'.html::anchor('#', '&amp;amp;#9652;').'&amp;lt;/td&amp;gt;';&lt;br /&gt;    echo '&amp;lt;td class="title"&amp;gt;';&lt;br /&gt;    echo html::anchor('news/'.$row['id'], html::entities($row['title']));&lt;br /&gt;    echo '&amp;lt;/td&amp;gt;';&lt;br /&gt;    echo '&amp;lt;/tr&amp;gt;';&lt;br /&gt;    echo '&amp;lt;tr&amp;gt;';&lt;br /&gt;    echo '&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;';&lt;br /&gt;    echo '&amp;lt;td class="cohead"&amp;gt;';&lt;br /&gt;    echo $row['points'].' by '.html::anchor('user/'.$row['user_id'], html::entities($row['user_name'])).' '.date('m.d.Y H.y', $row['created']).' | '.html::anchor('news/'.$row['id'], $row['comments'].__(' comments'));&lt;br /&gt;    echo '&amp;lt;/td&amp;gt;';&lt;br /&gt;    echo '&amp;lt;/tr&amp;gt;';&lt;br /&gt;    echo '&amp;lt;/table&amp;gt;';&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;?&amp;gt;&lt;/pre&gt;&lt;br /&gt;And the result is:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_VnLjSNitd5E/TLnI1oKXJ3I/AAAAAAAAFL4/ltkPD-7p550/s1600/style2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_VnLjSNitd5E/TLnI1oKXJ3I/AAAAAAAAFL4/ltkPD-7p550/s1600/style2.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Don't forget that the code for this project can be downloaded from:&amp;nbsp;&lt;a href="http://code.google.com/p/kohana-tutorial/"&gt;http://code.google.com/p/kohana-tutorial/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5160921211805958415-5062303228390352640?l=kohana-tutorial.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kohana-tutorial.blogspot.com/feeds/5062303228390352640/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kohana-tutorial.blogspot.com/2010/10/lessn-3-making-it-pretty.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5160921211805958415/posts/default/5062303228390352640'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5160921211805958415/posts/default/5062303228390352640'/><link rel='alternate' type='text/html' href='http://kohana-tutorial.blogspot.com/2010/10/lessn-3-making-it-pretty.html' title='Lessn 3: Making it pretty'/><author><name>AquilaX</name><uri>http://www.blogger.com/profile/00163681558256875339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_VnLjSNitd5E/TLnGkgHvZuI/AAAAAAAAFL0/PFZIgjn7cUo/s72-c/style.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5160921211805958415.post-4357328996926271337</id><published>2010-10-16T04:01:00.000-07:00</published><updated>2010-11-11T01:13:12.955-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='knh'/><title type='text'>Lesson 2 - Database and Models</title><content type='html'>In the previous lesson we created a bunch of files just to show a simple message in the browser. It may seem stupid but all these files will save us a lot of work. &lt;br /&gt;&lt;br /&gt;Now it's time to talk database.&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Our application will store the news, comments and user data in the database server, and in my case MySQL server. I created an database for the project called '&lt;b&gt;khn&lt;/b&gt;' and an user with access to the database.&lt;br /&gt;&lt;br /&gt;Our first table will contain the news:&lt;br /&gt;&lt;pre class="brush:sql"&gt;CREATE TABLE IF NOT EXISTS `news` (&lt;br /&gt;  `id` int(11) NOT NULL AUTO_INCREMENT,&lt;br /&gt;  `user_id` int(11) NOT NULL,&lt;br /&gt;  `user_name` varchar(100) NOT NULL,&lt;br /&gt;  `title` varchar(255) NOT NULL,&lt;br /&gt;  `body` text NOT NULL,&lt;br /&gt;  `comments` int(11) NOT NULL DEFAULT '0',&lt;br /&gt;  `points` int(11) NOT NULL DEFAULT '1',&lt;br /&gt;  `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,&lt;br /&gt;  PRIMARY KEY (`id`)&lt;br /&gt;) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;&lt;br /&gt;&lt;br /&gt;INSERT INTO `news` (`id`, `user_id`, `user_name`, `title`, `body`, `comments`, `points`, `created`) VALUES&lt;br /&gt;(1, 1, 'test 1', 'Test News 1', 'Test Body 1', 0, 1, '2010-10-16 13:45:49'),&lt;br /&gt;(2, 2, 'test 2', 'Test News 2', 'Test Body 2', 0, 2, '2010-10-16 13:45:49');&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;One table is enough for this lesson. To let Kohana know that we want to connect to a database, we must enable the database module. Open the &lt;b&gt;bootstrap.php&lt;/b&gt; file (located in the &lt;b&gt;application&lt;/b&gt; directory) and uncomment the following line:&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush:php"&gt;'database'   =&amp;gt; MODPATH.'database',   // Database access&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Next copy the &lt;b&gt;khn/modules/database/config/database.php&lt;/b&gt; file to the &lt;b&gt;application/config/&lt;/b&gt; directory and edit its content according to your configuration. Mine looks like that:&lt;br /&gt;&lt;pre class="brush:php"&gt;&amp;lt;?php defined('SYSPATH') or die('No direct access allowed.');&lt;br /&gt;&lt;br /&gt;return array&lt;br /&gt;(&lt;br /&gt; 'default' =&amp;gt; array&lt;br /&gt; (&lt;br /&gt;  'type'       =&amp;gt; 'mysql',&lt;br /&gt;  'connection' =&amp;gt; array(&lt;br /&gt;   /**&lt;br /&gt;    * The following options are available for MySQL:&lt;br /&gt;    *&lt;br /&gt;    * string   hostname     server hostname, or socket&lt;br /&gt;    * string   database     database name&lt;br /&gt;    * string   username     database username&lt;br /&gt;    * string   password     database password&lt;br /&gt;    * boolean  persistent   use persistent connections?&lt;br /&gt;    *&lt;br /&gt;    * Ports and sockets may be appended to the hostname.&lt;br /&gt;    */&lt;br /&gt;   'hostname'   =&amp;gt; 'localhost',&lt;br /&gt;   'database'   =&amp;gt; 'khn',&lt;br /&gt;   'username'   =&amp;gt; 'adsms',&lt;br /&gt;   'password'   =&amp;gt; 'adsms',&lt;br /&gt;   'persistent' =&amp;gt; FALSE,&lt;br /&gt;  ),&lt;br /&gt;  'table_prefix' =&amp;gt; '',&lt;br /&gt;  'charset'      =&amp;gt; 'utf8',&lt;br /&gt;  'caching'      =&amp;gt; FALSE,&lt;br /&gt;  'profiling'    =&amp;gt; TRUE,&lt;br /&gt; )&lt;br /&gt;);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;We'll create a model called Model_News, which will handle the news:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;application/classes/model/news.php&lt;/b&gt;&lt;br /&gt;&lt;pre class="brush:php"&gt;&amp;lt;?php&lt;br /&gt;/**&lt;br /&gt; * Description of news&lt;br /&gt; *&lt;br /&gt; * @author aquilax&lt;br /&gt; */&lt;br /&gt;class Model_News extends Model{&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;?&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Let's also add a method to get all the news for the home page:&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: php"&gt;/*&lt;br /&gt;   * Load the news for the first page&lt;br /&gt;   */&lt;br /&gt;  public function loadFirstPageNews($n){&lt;br /&gt;    return DB::select('id', 'title', 'user_id', 'user_name', 'comments', 'points', new Database_Expression('UNIX_TIMESTAMP(created) AS created'))&lt;br /&gt;      -&amp;gt;from('news')&lt;br /&gt;      -&amp;gt;order_by(new DatabaseExpression('(points - 1) / ((UNIX_TIMESTAMP(CURRENT_TIMESTAMP)-UNIX_TIMESTAMP(created))/3600 +2)^1.5'), 'DESC')&lt;br /&gt;      -&amp;gt;order_by('created')&lt;br /&gt;      -&amp;gt;limit($n)&lt;br /&gt;      -&amp;gt;execute()&lt;br /&gt;      -&amp;gt;as_array();&lt;br /&gt;  }&lt;br /&gt;&lt;/pre&gt;The order_by section is taken from &lt;a href="http://news.ycombinator.com/item?id=231209"&gt;this&lt;/a&gt; Hacker News comment.&lt;br /&gt;&lt;br /&gt;The DatabaseExpression class is used in the order_by function to prevent Kohana from escaping the expression, which breaks the resulting SQL.&lt;br /&gt;&lt;br /&gt;I'm using the Query_Builder functions because I feel more comfortable with them. You can try to use the ORM class or raw SQL, which in this case shoult look like that:&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush:sql"&gt;SELECT id, title, user_id, user_name, comments, points, UNIX_TIMESTAMP(created)&lt;br /&gt;FROM news&lt;br /&gt;ORDER BY (points - 1) / ((UNIX_TIMESTAMP(CURRENT_TIMESTAMP)-UNIX_TIMESTAMP(created))*3600 +2)^1.5 DESC&lt;br /&gt;LIMIT 30&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now we have a function, which returns news for the home page. Let's call it in the home controller's action_index:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;application/classes/controller/news&lt;/b&gt;&lt;br /&gt;&lt;pre class="brush:php"&gt;public function action_index(){&lt;br /&gt;    $this-&amp;gt;data['news'] = $this-&amp;gt;news-&amp;gt;loadFirstPageNews(30);&lt;br /&gt;    $this-&amp;gt;render();&lt;br /&gt;  }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;and change the view to print the news:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;application/views/pages/news/index_tpl.php&lt;/b&gt;&lt;br /&gt;&lt;pre class="brush: php"&gt;&amp;lt;?php&lt;br /&gt;if ($news) {&lt;br /&gt;  echo '&lt;ul&gt;';   foreach ($news as $row) {     echo '&lt;br /&gt;&lt;li&gt;'.html::entities($row['title']).'&lt;/li&gt;&lt;br /&gt;';   }   echo '&lt;/ul&gt;';&lt;br /&gt;}&lt;br /&gt;?&amp;gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5160921211805958415-4357328996926271337?l=kohana-tutorial.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kohana-tutorial.blogspot.com/feeds/4357328996926271337/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kohana-tutorial.blogspot.com/2010/10/lesson-2-database-and-models.html#comment-form' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5160921211805958415/posts/default/4357328996926271337'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5160921211805958415/posts/default/4357328996926271337'/><link rel='alternate' type='text/html' href='http://kohana-tutorial.blogspot.com/2010/10/lesson-2-database-and-models.html' title='Lesson 2 - Database and Models'/><author><name>AquilaX</name><uri>http://www.blogger.com/profile/00163681558256875339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5160921211805958415.post-8943799586585242756</id><published>2010-10-16T03:18:00.000-07:00</published><updated>2010-10-16T03:37:01.770-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='knh'/><title type='text'>Lesson 1 - Getting started</title><content type='html'>Let's get started with the site. This is roughly the structure we are looking for:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_VnLjSNitd5E/TLh3vQo9dJI/AAAAAAAAFLw/GEgvSCksM3s/s1600/site.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="174" src="http://4.bp.blogspot.com/_VnLjSNitd5E/TLh3vQo9dJI/AAAAAAAAFLw/GEgvSCksM3s/s400/site.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;First let's configure our application. &lt;b&gt;Kohana&lt;/b&gt;'s configuration file is located in application/bootstrap.php&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The file contains several sections. First are the configurations for the php environment. Set them according to your server configuration. I'll leave the rest untouched for now and will change only the default controller to &lt;b&gt;news&lt;/b&gt; as this will be my default controller for this application.&lt;br /&gt;&lt;br /&gt;Now the section looks like that:&lt;br /&gt;&lt;pre class="brush: php"&gt;/**&lt;br /&gt; * Set the routes. Each route must have a minimum of a name, a URI and a set of&lt;br /&gt; * defaults for the URI.&lt;br /&gt; */&lt;br /&gt;Route::set('default', '(&lt;controller&gt;(/&lt;action&gt;(/&lt;id&gt;)))')&lt;br /&gt; -&amp;gt;defaults(array(&lt;br /&gt;  'controller' =&amp;gt; 'news',&lt;br /&gt;  'action'     =&amp;gt; 'index',&lt;br /&gt; ));&lt;br /&gt;&lt;/id&gt;&lt;/action&gt;&lt;/controller&gt;&lt;/pre&gt;&lt;br /&gt;Next I'll enable the &lt;b&gt;.htaccess&lt;/b&gt; file. &lt;b&gt;Kohana&lt;/b&gt; comes with default &lt;b&gt;.htaccess&lt;/b&gt; which is located in the root directory of the framewark and is called &lt;b&gt;example.htaccess&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;First let's create default controller, which will handle all the template rendering for us:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;application/classes/controller/defaulttemplate.php&lt;/b&gt;&lt;br /&gt;&lt;pre class="brush: php"&gt;&amp;lt;?php&lt;br /&gt;defined('SYSPATH') or die('No direct script access.');&lt;br /&gt;/**&lt;br /&gt; * Description of defaulttemplate&lt;br /&gt; *&lt;br /&gt; * @author aquilax&lt;br /&gt; */&lt;br /&gt;class Controller_DefaultTemplate extends Controller_Template {&lt;br /&gt;&lt;br /&gt;  //The webpage title&lt;br /&gt;  private $site_title = 'Kohana Hacker News';&lt;br /&gt;  &lt;br /&gt;  //The default template&lt;br /&gt;  public $template = 'templates/default_tpl';&lt;br /&gt;&lt;br /&gt;  //This variable will hold the data passed to the views&lt;br /&gt;  public $data = array();&lt;br /&gt;&lt;br /&gt;  public function before() {&lt;br /&gt;    parent::before();&lt;br /&gt;&lt;br /&gt;    if($this-&amp;gt;auto_render) {&lt;br /&gt;      $this-&amp;gt;template-&amp;gt;title            = '';&lt;br /&gt;      $this-&amp;gt;template-&amp;gt;meta_keywords    = '';&lt;br /&gt;      $this-&amp;gt;template-&amp;gt;meta_description = '';&lt;br /&gt;      $this-&amp;gt;template-&amp;gt;meta_copywrite   = '';&lt;br /&gt;      $this-&amp;gt;template-&amp;gt;content          = '';&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  public function after() {&lt;br /&gt;    /*&lt;br /&gt;     * Set the page title to $site_title if title is not set,&lt;br /&gt;     * otherwise create title 'path'&lt;br /&gt;     */&lt;br /&gt;    if ($this-&amp;gt;template-&amp;gt;title){&lt;br /&gt;      $this-&amp;gt;template-&amp;gt;title = $this-&amp;gt;template-&amp;gt;title.' » '.$this-&amp;gt;site_title;&lt;br /&gt;    } else {&lt;br /&gt;      $this-&amp;gt;template-&amp;gt;title = $this-&amp;gt;site_title;&lt;br /&gt;    }&lt;br /&gt;    parent::after();&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  public function render($template = FALSE, $view = FALSE){&lt;br /&gt;    /*&lt;br /&gt;     * Force specific template&lt;br /&gt;     */&lt;br /&gt;    if ($template){&lt;br /&gt;      $this-&amp;gt;template = $template;&lt;br /&gt;    }&lt;br /&gt;    /*&lt;br /&gt;     * Use default view logic if $view is not forced&lt;br /&gt;     */&lt;br /&gt;    if (!$view){&lt;br /&gt;      $view = 'pages/'.$this-&amp;gt;request-&amp;gt;controller.'/'.$this-&amp;gt;request-&amp;gt;action.'_tpl';&lt;br /&gt;    }&lt;br /&gt;    $this-&amp;gt;template-&amp;gt;content = View::factory($view, $this-&amp;gt;data);&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;?&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Also the news controller:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;application/classes/controller/news.php&lt;/b&gt;&lt;br /&gt;&lt;pre class="brush: php"&gt;&amp;lt;?php&lt;br /&gt;/**&lt;br /&gt; * Description of news&lt;br /&gt; *&lt;br /&gt; * @author aquilax&lt;br /&gt; */&lt;br /&gt;class Controller_News extends Controller_DefaultTemplate{&lt;br /&gt;&lt;br /&gt;  public function  __construct($request) {&lt;br /&gt;    parent::__construct($request);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  public function action_index(){&lt;br /&gt;    $this-&amp;gt;render();&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;?&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;What remains is to create our views structure. Create the following directories in &lt;b&gt;application/views&lt;/b&gt;:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;application/views/blocks&lt;/b&gt; - will contain the partial elements and reusable blocks&lt;br /&gt;&lt;b&gt;application/views/pages&lt;/b&gt; - will contain the page views&lt;br /&gt;&lt;b&gt;application/views/templates&lt;/b&gt; -  - will contain the page templates&lt;br /&gt;&lt;br /&gt;We may create perfectly usable webpage without such complex view structure, but this will make our web application easily maintainable.&lt;br /&gt;&lt;br /&gt;Now let's populate the directories:&lt;br /&gt;This will be our default template:&lt;br /&gt;&lt;b&gt;application/views/templates/default_tpl.php&lt;/b&gt;&lt;br /&gt;&lt;pre class="brush:php"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;br /&gt;&amp;lt;html lang="en"&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;  &amp;lt;meta charset="utf-8" /&amp;gt;&lt;br /&gt;  &amp;lt;title&amp;gt;&amp;lt;?php echo $title ?&amp;gt;&amp;lt;/title&amp;gt;&lt;br /&gt;  &amp;lt;meta name="description" content="&amp;lt;?php echo $meta_description ?&amp;gt;" /&amp;gt;&lt;br /&gt;  &amp;lt;meta name="KEYWORDS" content="&amp;lt;?php echo $meta_keywords ?&amp;gt;" /&amp;gt;&lt;br /&gt;  &amp;lt;link rel="stylesheet" href="/assets/css/style.css" type="text/css" /&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;  &amp;lt;div id="wrapper"&amp;gt;&lt;br /&gt;    &amp;lt;div id="header"&amp;gt;&lt;br /&gt;&amp;lt;?php echo View::factory('blocks/header_tpl')-&amp;gt;render(); ?&amp;gt;&lt;br /&gt;    &amp;lt;/div&amp;gt;&lt;br /&gt;    &amp;lt;div id="main"&amp;gt;&lt;br /&gt;&amp;lt;?php echo $content ?&amp;gt;&lt;br /&gt;    &amp;lt;/div&amp;gt;&lt;br /&gt;    &amp;lt;div id="footer"&amp;gt;&lt;br /&gt;&amp;lt;?php echo View::factory('blocks/footer_tpl')-&amp;gt;render(); ?&amp;gt;&lt;br /&gt;    &amp;lt;/div&amp;gt;&lt;br /&gt;  &amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;It uses two block: &lt;b&gt;views/blocks/header_tpl.php&lt;/b&gt; and &lt;b&gt;views/blocks/footer_tpl.php&lt;/b&gt; which we will leave empty for now but make sure the files are created.&lt;br /&gt;&lt;br /&gt;Now let's create the folder &lt;b&gt;vews/pages/news/&lt;/b&gt;. Every controller with view will have it's own subdirectory in &lt;b&gt;pages&lt;/b&gt; and the default view name for the corresponding action will be called &lt;b&gt;[action_name]_tpl.php&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;In this case we want to create a view for the News controller's action index. The file will be:&lt;br /&gt;&lt;b&gt;views/pages/news/index_tpl.php&lt;/b&gt;&lt;br /&gt;&lt;pre class="brush:php"&gt;&amp;lt;?php&lt;br /&gt;  echo 'First page content goes here';&lt;br /&gt;?&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now open &lt;a href="http://knh.localhost/"&gt;http://knh.localhost/&lt;/a&gt; and if everything is fine, should be able to see the "First page content goes here" message.&lt;br /&gt;&lt;br /&gt;That was rather long and boring lesson but let's hope it will pay off.&lt;br /&gt;&lt;br /&gt;The source code for this project can be found at:&amp;nbsp;&lt;a href="http://code.google.com/p/kohana-tutorial/"&gt;http://code.google.com/p/kohana-tutorial/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5160921211805958415-8943799586585242756?l=kohana-tutorial.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kohana-tutorial.blogspot.com/feeds/8943799586585242756/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kohana-tutorial.blogspot.com/2010/10/lesson-1-getting-started.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5160921211805958415/posts/default/8943799586585242756'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5160921211805958415/posts/default/8943799586585242756'/><link rel='alternate' type='text/html' href='http://kohana-tutorial.blogspot.com/2010/10/lesson-1-getting-started.html' title='Lesson 1 - Getting started'/><author><name>AquilaX</name><uri>http://www.blogger.com/profile/00163681558256875339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_VnLjSNitd5E/TLh3vQo9dJI/AAAAAAAAFLw/GEgvSCksM3s/s72-c/site.png' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5160921211805958415.post-1142118081121403411</id><published>2010-10-14T21:16:00.000-07:00</published><updated>2010-10-14T21:17:50.654-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='concepts'/><title type='text'>pre-Lesson 2: What is MVC?</title><content type='html'>Kohana is &lt;b&gt;MVC&lt;/b&gt; framework. In this lesson, we will see what exactly the MVC letters mean and how to they fit in our application.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;MVC&lt;/b&gt; stands for Model View Controller. The Model-View-Controller concept is often used in in web development. It provides a convinient way to separate logic and interface.&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;b&gt;The Controller&lt;/b&gt; is the gateway to the application. Depending on the user input (url of the page or submitted data), the controler decides what operation should be performed and what output should be generated.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;The Model&lt;/b&gt; is the place where data is processed. It is the workforce of the application and gets the things done.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;The View&lt;/b&gt; is the presentation layer. It handles the output, which will be send back to the browser.&lt;br /&gt;&lt;br /&gt;So the tipical workflow of an MVC application is:&lt;br /&gt;&lt;br /&gt;User opens page -&amp;gt; the request hits the controller -&amp;gt; the controller decides what action should be performed -&amp;gt; the controller calls the model if necessary (loads data or performs action) -&amp;gt; the controller loads the view -&amp;gt; the view generates the page and sends it back to the browser&lt;br /&gt;&lt;br /&gt;There are some basic rules of thumb when dealing with MVC:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Keep your controllers on a diet. The controller gets hit on every request so it should be able to be as light as possible.&lt;/li&gt;&lt;li&gt;Load the model only if you'll interact with it. This will keep the memory usage low.&lt;/li&gt;&lt;li&gt;Don't use the model directly from the view. All the data the view needs should come from the controller.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5160921211805958415-1142118081121403411?l=kohana-tutorial.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kohana-tutorial.blogspot.com/feeds/1142118081121403411/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kohana-tutorial.blogspot.com/2010/10/pre-lesson-2-what-is-mvc.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5160921211805958415/posts/default/1142118081121403411'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5160921211805958415/posts/default/1142118081121403411'/><link rel='alternate' type='text/html' href='http://kohana-tutorial.blogspot.com/2010/10/pre-lesson-2-what-is-mvc.html' title='pre-Lesson 2: What is MVC?'/><author><name>AquilaX</name><uri>http://www.blogger.com/profile/00163681558256875339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5160921211805958415.post-3318067063350324802</id><published>2010-10-14T10:39:00.000-07:00</published><updated>2010-10-16T01:21:26.652-07:00</updated><title type='text'>pre-Lesson: Setting up the development box and installing kohana</title><content type='html'>I'll use Ubuntu Desktop for development and the first thing I do when starting a new project is to setup local subdomain for the project.&lt;br /&gt;&lt;br /&gt;First let's download the framework and create new directory for the project:&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: bash"&gt;cd /tmp&lt;br /&gt;wget http://kohanaframework.org/download/kohana-latest&lt;br /&gt;unzip kohana-3.0.8.zip&lt;br /&gt;sudo mv kohana /var/www/&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The next step is to create the virtual host for the project:&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: bash"&gt;sudo vim /etc/apache2/sites-available/kohana&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;And paste the following text:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;NameVirtualHost khn.localhost&lt;br /&gt;&lt;virtualhost khn.localhost=""&gt;&lt;br /&gt; ServerName khn.localhost&lt;br /&gt; DocumentRoot /var/www/kohana&lt;br /&gt;&lt;/virtualhost&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Save the file and create symbolic link to it in /etc/apache2/sites-enabled :&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: bash"&gt;sudo ln -s /etc/apache2/sites-enabled/kohana /etc/apache2/sites-enabled/001-kohana&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;And add the subdomain to the /etc/hosts file&lt;br /&gt;&lt;pre&gt;127.0.0.1       khn.localhost&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Next reload apache:&lt;br /&gt;&lt;pre class="brush: bash"&gt;sudo /etc/init.d/apache2 reload&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now open your browser and go to &lt;a href="http://khn.localhost/"&gt;http://khn.localhost&lt;/a&gt;. You should be able to see the Environment Tests page.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_VnLjSNitd5E/TLc-VwnenLI/AAAAAAAAFLs/M9BPzrJcqtM/s1600/ssh1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_VnLjSNitd5E/TLc-VwnenLI/AAAAAAAAFLs/M9BPzrJcqtM/s1600/ssh1.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Oops two red lines for errors. Fortunately they are easy to solve. I just have to make the cache and logs directories writable to the web server:&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: bash"&gt;sudo chmod a+w /var/www/kohana/application/logs/&lt;br /&gt;sudo chmod a+w /var/www/kohana/application/cache/&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Refresh the page again and we get nice green message saying:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span class="Apple-style-span" style="background-color: #38761d;"&gt;&lt;span class="Apple-style-span" style="color: white;"&gt;✔ Your environment passed all requirements.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #38761d;"&gt;&lt;span class="Apple-style-span" style="color: white;"&gt;Remove or rename the install.php file now.&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;Lets delete it and refresh again.&lt;br /&gt;&lt;pre class="brush: bash"&gt;sudo rm /var/www/kohana/install.php&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;If everything is OK, you should get nice thee welcome mesage:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;hello, world!&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Ok that was was all for pre-lesson.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5160921211805958415-3318067063350324802?l=kohana-tutorial.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kohana-tutorial.blogspot.com/feeds/3318067063350324802/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kohana-tutorial.blogspot.com/2010/10/pre-lesson-setting-up-development-box.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5160921211805958415/posts/default/3318067063350324802'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5160921211805958415/posts/default/3318067063350324802'/><link rel='alternate' type='text/html' href='http://kohana-tutorial.blogspot.com/2010/10/pre-lesson-setting-up-development-box.html' title='pre-Lesson: Setting up the development box and installing kohana'/><author><name>AquilaX</name><uri>http://www.blogger.com/profile/00163681558256875339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_VnLjSNitd5E/TLc-VwnenLI/AAAAAAAAFLs/M9BPzrJcqtM/s72-c/ssh1.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5160921211805958415.post-8413751948287079110</id><published>2010-10-14T09:57:00.000-07:00</published><updated>2010-10-16T00:29:59.888-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kohana'/><title type='text'>Getting to know Kohana</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://kohanaframework.org/media/img/kohana.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://kohanaframework.org/media/img/kohana.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;I've been using &lt;a href="http://codeigniter.com/"&gt;CodeIgniter&lt;/a&gt; for several years. It's a great framework, which gets the things done quickly without forcing you to change yor programming style.&lt;br /&gt;&lt;br /&gt;These days I decided to give &lt;a href="http://kohanaframework.org/"&gt;Kohana&lt;/a&gt; a try. It's a forked version of CodeIgniter so there should be some similarities.&lt;br /&gt;&lt;br /&gt;The project, that I'll try to create is a simple &lt;a href="http://news.ycombinator.com/"&gt;Hacker News&lt;/a&gt; clone. I'll be using the latest stable downloadable version of Kohana &lt;a href="http://kohanaframework.org/download"&gt;v3.0.8 "großen jäger"&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I've never used Kohana before. This tutorial is my way of learning it. If you notice something wrong or something that can be done better, just write a comment and I'll try to fix it.&lt;br /&gt;Also I'll borrow some parts of the code from another excelent Kohana 3 tutorial (http://www.dealtaker.com/blog/2009/11/20/kohana-php-3-0-ko3-tutorial-part-1/)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;N.B.&lt;/b&gt; English is not my native language. But I'll try to write correctly.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5160921211805958415-8413751948287079110?l=kohana-tutorial.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kohana-tutorial.blogspot.com/feeds/8413751948287079110/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kohana-tutorial.blogspot.com/2010/10/getting-to-know-kohana.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5160921211805958415/posts/default/8413751948287079110'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5160921211805958415/posts/default/8413751948287079110'/><link rel='alternate' type='text/html' href='http://kohana-tutorial.blogspot.com/2010/10/getting-to-know-kohana.html' title='Getting to know Kohana'/><author><name>AquilaX</name><uri>http://www.blogger.com/profile/00163681558256875339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
