Thank you , you can comment on what you want
Posted by
anonymous
on Thursday, June 11, 2015
/
Comments: (4)
Kohana: A Lightweight PHP Framework
Posted by
anonymous
Labels:
kohana 3 video tutorials
/
Comments: (4)
Kohana 3 Building Kohana Auth app with Sessions and Database support
Posted by
anonymous
Labels:
kohana 3 video tutorials
/
Comments: (4)
Kohana 3.3.2 Configuration with WAMP - Step 3 of 3 (Creating modules, routing)
Posted by
anonymous
Labels:
kohana 3 video tutorials
/
Comments: (32)
You can see the code here:
https://github.com/Xackery/kohana/commit/f96f731573d117eb86057a5841f643a4f3cf0aa3
Kohana 3 Filter Class $_POST / $_GET
Posted by
anonymous
on Wednesday, December 29, 2010
Labels:
kohana 3 helper
/
Comments: (4)
Description of the producer
Here's a class that has come in super handy for me lately. I created it for use with Kohana v3. Basically, say you have an adminstrator backend to your website and you so you have a page for blog posts and one for blog categories. Simple enough. But you wanna give your users options to filter their results so they don't have to search through hundreds or thousands of blog posts every time they wanna find a certain post. Easy enough.
But then you have the problem where the user filters the results, finds the post they want, goes to edit it, then it sends them back to the list of all posts. But whoops, they forgot they wanted to change something else in that same post. Now they have to re-filter all over again and find it. VERY ANNOYING!
So with this class you can provide it with an array of keys to keep track of over multiple page loads. It keeps every controller and actions filters seperate so that you can easily use them throughout your controllers and views. So if you want to filter by 'Author' and 'Category' then the class will look for the keys 'author' and 'category' in either $_POST or $_GET and add them to the filters. Now when the user returns to that page, all filters will still be applied. It's a big time saver!
http://coreyworrell.com/blog/article/kohana-3-filter-class
Kohana 3 :: alternate 404 method
Posted by
anonymous
on Thursday, December 23, 2010
Labels:
kohana 3,
kohana 3 router
/
Comments: (1)
controller
<?php defined('SYSPATH') or die('No direct script access.');
if ( ! $this->_auth->logged_in('login'))
{
throw new Kohana_Exception('You are not allowed to view this resource.');
}
Kohana 3 :: 8 helpers
Posted by
anonymous
Labels:
kohana 3,
kohana 3 helper
/
Comments: (0)
Kohana 3 :: Kohana Date helper
Posted by
anonymous
Labels:
kohana 3,
kohana 3 helper
/
Comments: (0)
< ?php defined('SYSPATH') OR die('No direct access allowed.'); /** * Extend the Kohana Date helper */ class Date extends Kohana_Date { /** * Number of months in a year. Value will hold month name * * @static * @uses Date::hours * @return array Array from 1-12 with month names */ public static function months_with_name() { $months = Date::hours(); for ($i = 1; $i <= 12; $i++) { $timestamp = mktime(0, 0, 0, $i, 1, 2005); $months[$i] = date("M", $timestamp); } return $months; } /** * Checks whether a string is a date * * @static * @param string date * @return bool */ public static function is_date($str) { return (boolean) strtotime($str); } } // End Date
Kohana 3 :: blog article unique slug
Posted by
anonymous
Labels:
kohana 3,
kohana 3 Example
/
Comments: (0)
Post_Model
http://forum.kohanaframework.org/discussion/comment/17756/#Comment_17756
public function save() { $this->slug = $this->_unique_slug(url::title(empty($this->slug) ? $this->title : $this->slug)); return parent::save(); } private function _unique_slug($str) { static $i; $original = $str; while ($post = ORM::factory('post', $str) AND $post->loaded AND $post->id !== $this->id) { $str = $original.$i; $i++; } return $str; }
http://forum.kohanaframework.org/discussion/comment/17756/#Comment_17756
Kohana 3 :: Writing A Module
Posted by
anonymous
on Wednesday, December 22, 2010
Labels:
kohana 3,
kohana framework,
Module
/
Comments: (1)
In this tutorial we will cover how to build a module from scratch in Kohana 3. If you aren’t familiar with the Kohana framework then I recommend you read the beginners introduction to Kohana.
The Plan
We will be building a module that replaces Kohana’s own view layer (Kohana_View). It will use the PHP template library Twig. We want our own view layer to be API compatible with Kohana’s view layer. This will ensure that other modules work out of the box and that the only code the developer will need to alter in their application are the templates (so that they are Twig compatible). No code in any controller will need to be modified.
Because Kohana follows HMVC (see beginners introduction to Kohana) we will be calling our classView. This means that all calls in the application to the class of View will be to the View class in our module, not Kohana’s own View class.