<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
      <title>All Discussions - Kohana Forums</title>
      <link>http://forum.kohanaframework.org/discussions/feed.rss</link>
      <pubDate>Sat, 04 Feb 12 07:56:39 -0600</pubDate>
         <description>All Discussions - Kohana Forums</description>
   <language>en-CA</language>
   <atom:link href="/discussions/feed.rss" rel="self" type="application/rss+xml" />
   <item>
      <title>ORM Validation Kohana 3.2</title>
      <link>http://forum.kohanaframework.org/discussion/9462/orm-validation-kohana-3.2</link>
      <pubDate>Sat, 06 Aug 2011 05:35:10 -0500</pubDate>
      <dc:creator>serega</dc:creator>
      <guid isPermaLink="false">9462@/discussions</guid>
      <description><![CDATA[<p>Здраствуйте! Что то я не как не могу осилить валидацию в моделях на kohana 3.2. В версиях 3.0.x все с этим было как то проще и понятней. На данный момент столкнулся с проблемой, что валидация вообще не обращает внимания на поля с паролями, знаю что это как то связано с хешированием пароля и пробывал разные способы из мануала и из решений показаных здесь на форуме, но к сожалению проблема остается. Валидация не реагирует на пустое поле с паролем и не выводит сообщение об ошибке, а если пароль заполнен, то нет ни какой реакции на поле с повторным паролем.</p>

<p>модель:</p>

<pre>
    public function rules()
    {
        return array(
            'email' =&gt; array(
                array('not_empty'),
                array('min_length', array(':value', 6)),
                array('max_length', array(':value', 127)),
                array('email'),
                array(array($this, 'unique'), array('email', ':value')),
            ),
            'password' =&gt; array(
                array('not_empty'),
                array('min_length', array(':value', 5)),
            ),
        );
    }
    
    public function filters()
    {
        return array(
            'email' =&gt; array(
                array('trim'),
                array('strtolower'),
            ),
            'password' =&gt; array(
                array('trim'),
                array(array(Auth::instance(), 'hash')),
            )
        );
    }
    
    public function register(array $data)
    {
        $extra = Model_User::get_password_validation($data)-&gt;rule('password', 'not_empty');
        
        $this-&gt;values(array(
            'email'    =&gt; $data['email'],
            'password' =&gt; $data['password'],
            'created'  =&gt; time(),
        ))-&gt;create($extra);
        
        $this-&gt;add('roles', ORM::factory('role', array('name' =&gt; 'login')));
        
        return $this;
    }
</pre>

<p>Вообще с паролями какой то костыль получается, зачем например правила для пароля надо указывать дважды? В методе rules() и потом еще при отдельной проверке (а нормально все равно не работает). Короче это сильно запутывает и озадачивает новичка.</p>

<p>Так же прошу обьяснить по поводу правил валидации, есть к примеру следующие правила в модели:</p>

<pre>
    public function rules()
    {
        return array(
            'url' =&gt; array(
                // ...
            ),
            'name' =&gt; array(
                // ...
            ),
            'description' =&gt; array(
                // ...
            ),
        );
    }
</pre>

<p>Как вы делаете если например нужно изменить только url? То есть отправляете форму в которой только поле url, валидация ведь тогда будет ругаться что не указаны name и description. Создавать для этого отдельный метод в котором снова правило для url прописывать?</p>
]]></description>
   </item>
   <item>
      <title>on development all ok, on production always 404..</title>
      <link>http://forum.kohanaframework.org/discussion/10326/on-development-all-ok-on-production-always-404..</link>
      <pubDate>Tue, 31 Jan 2012 17:25:19 -0600</pubDate>
      <dc:creator>MarcoCapoferri</dc:creator>
      <guid isPermaLink="false">10326@/discussions</guid>
      <description><![CDATA[<p>Hi all. It's a long time that i don't use kohana so maybe my errors are some stupid things but with those i can't go on...</p>

<p>I have only one route in my application which is <code>Route::set('default', '(&lt; controller &gt;((/&lt; action &gt;)/&lt; id &gt;))')</code> and then i specify the default controller and the default action.</p>

<p>On the development machine when i try to rewach my kohana application i type localhost/application/controller/action/id and everything is fine.</p>

<p>On my production machine the address is http://example.com/subsitename/otherfolder/controller/action/id
substename and otherfolder are two existing directories and my application works fine only when i omit controller action and id.</p>

<p>someone can explain me how can i do?</p>

<p>Thanks in advance
Marco</p>
]]></description>
   </item>
   <item>
      <title>Kohana 3 ORM: Multiple joins</title>
      <link>http://forum.kohanaframework.org/discussion/10344/kohana-3-orm-multiple-joins</link>
      <pubDate>Fri, 03 Feb 2012 02:58:56 -0600</pubDate>
      <dc:creator>arnoldgamboa</dc:creator>
      <guid isPermaLink="false">10344@/discussions</guid>
      <description><![CDATA[<p>I have Kohana ORM/Mysql query problem. I hope you can help.</p>

<p>To start of, here's the diagram of tables:</p>

<p><a href="http://dl.dropbox.com/u/1246624/members_topics_articles.jpg" target="_blank" rel="nofollow">http://dl.dropbox.com/u/1246624/members_topics_articles.jpg</a></p>

<p>Here's my ORM definitions:</p>

<p>MEMBERS has many TOPICS through MEMBERS_TOPICS</p>

<p>ARTICLES has many TOPICS though ARTICLES_TOPICS</p>

<p>TOPICS has many MEMBERS though MEMBERS_TOPICS</p>

<p>TOPICS has many ARTICLES though ARTICLES_TOPICS</p>

<p>Think of it as a mailing list where you have members that has chosen topics of articles in which topics are also assigned to particular topics.</p>

<p>I couldn't figure out how to make a single query so I can return joined results and send an email to individual members with articles they only chose through the topics they've chosen.</p>

<p>I hope to receive wisdom with mysql/kohana ninjas around. :D</p>

<p>-Arnold</p>
]]></description>
   </item>
   <item>
      <title>ErrorException [ Fatal Error ]: Access to undeclared static property: Request::$method</title>
      <link>http://forum.kohanaframework.org/discussion/10349/errorexception-fatal-error-access-to-undeclared-static-property-requestmethod</link>
      <pubDate>Fri, 03 Feb 2012 14:53:34 -0600</pubDate>
      <dc:creator>DantePasquale</dc:creator>
      <guid isPermaLink="false">10349@/discussions</guid>
      <description><![CDATA[<p>Hi, I'm following the article for forms with validation at: <a href="http://kohanaframework.blogspot.com/2010/11/kohana-3-example-of-model-with.html" target="_blank" rel="nofollow">http://kohanaframework.blogspot.com/2010/11/kohana-3-example-of-model-with.html</a>
and am trying to work this into my code for my site. I'm getting the error above in the controller (mine is named 'contact' where the example uses 'news') I'm not sure what to be looking at here, but I think it has something to do with nesting too much stuff in the controller action???</p>

<pre><code>APPPATH/classes/controller/contact.php [ 49 ]

44         $view = View::factory('pages/contact')
45             -&gt;bind('validator', $validator)
46             -&gt;bind('errors', $errors)
47             -&gt;bind('recent_contacts', $recent_contacts);
48 
49         if (Request::$method == "POST") {
50             //added the arr::extract() method here to pull the keys that we want
51             //to stop the user from adding their own post data
52             $validator = $contact_model-&gt;validate_contact(arr::extract($_POST,array('email','subject','payload')));
53             if ($validator-&gt;check()) {
54                 //validation passed, add to the db
</code></pre>

<p>How should one debug this type of error? Thanks, Danté</p>
]]></description>
   </item>
   <item>
      <title>Reading MySQL results generated by Kohana ORM - NOT using foreach</title>
      <link>http://forum.kohanaframework.org/discussion/10342/reading-mysql-results-generated-by-kohana-orm-not-using-foreach</link>
      <pubDate>Thu, 02 Feb 2012 21:54:17 -0600</pubDate>
      <dc:creator>saeho85</dc:creator>
      <guid isPermaLink="false">10342@/discussions</guid>
      <description><![CDATA[<p>Hello,</p>

<p>When using the ORM to generate an array, I understand that a "foreach" method can be used to print out all the data in this array.
However, is there a way to allow the array to be loaded by the primary ID?</p>

<p>For example, it'd be nice if I could load $table-&gt;1234 instead of being forced to do $table-&gt;0-&gt;1234</p>
]]></description>
   </item>
   <item>
      <title>Sending mail using Zend_Mail</title>
      <link>http://forum.kohanaframework.org/discussion/10350/sending-mail-using-zend_mail</link>
      <pubDate>Fri, 03 Feb 2012 15:38:37 -0600</pubDate>
      <dc:creator>understand_me</dc:creator>
      <guid isPermaLink="false">10350@/discussions</guid>
      <description><![CDATA[<p>HI i'm currently working on how to send email using zend framework, i'm currently new to frameworking just studied it and i want to incorporate zend's email to kohana.</p>

<p>i already put this code on my application/bootstrap.php</p>

<pre><code><br />if ($path = Kohana::find_file('vendor', 'Zend/Loader'))
{
    ini_set('include_path',
    ini_get('include_path').PATH_SEPARATOR.dirname(dirname($path)));

    require_once 'Zend/Loader/Autoloader.php';
    Zend_Loader_Autoloader::getInstance();
}
</code></pre>

<p>then on my model i put this just checking if it found the zend library</p>

<p><code>$mailer = new Zend_Mail;</code></p>

<p>i get an error</p>

<p><code>class Zend_Mail not found</code></p>

<p>did i do something wrong?? please help</p>

<p>i already put zend in my application/vendor/zend</p>
]]></description>
   </item>
   <item>
      <title>kohana::list_files v. php scandir</title>
      <link>http://forum.kohanaframework.org/discussion/10337/kohanalist_files-v.-php-scandir</link>
      <pubDate>Thu, 02 Feb 2012 12:56:29 -0600</pubDate>
      <dc:creator>DantePasquale</dc:creator>
      <guid isPermaLink="false">10337@/discussions</guid>
      <description><![CDATA[<p>Hi,
I'm trying to read in a directory of images -- just the file names, so I can generate some html to tie into a 3rd party gallery. I tried using kohana::list_files but I keep getting an empty array returned, making me think I don't know the proper path. However for scandir() the path works fine. How should I be using list_files?</p>

<pre><code>    $path_normal = APPPATH.'/views/assets/images/photos/main/Normal';
$path_large = APPPATH.'/views/assets/images/photos/main/Normal';
$dir_normal = '/assets/images/photos/main/Normal';
$dir_large = '/assets/images/photos/main/Normal';

$normal_pix = array();
$large_pix  = array();

$normal_pix = Kohana::list_files($path_normal);
$large_pix  = Kohana::list_files($path_large);

$normal_pix = scandir($path_normal);
$large_pix  = scandir($path_large);
</code></pre>

<p>Thanks</p>
]]></description>
   </item>
   <item>
      <title>External Libraries</title>
      <link>http://forum.kohanaframework.org/discussion/10348/external-libraries</link>
      <pubDate>Fri, 03 Feb 2012 14:04:51 -0600</pubDate>
      <dc:creator>understand_me</dc:creator>
      <guid isPermaLink="false">10348@/discussions</guid>
      <description><![CDATA[<p>Hello kohana Community,
         Is there another way to add external libraries? I followed 
         <a href="http://www.dealtaker.com/our-blog/2010/06/02/kohana-php-3-0-ko3-tutorial-part-9/" target="_blank" rel="nofollow">http://www.dealtaker.com/our-blog/2010/06/02/kohana-php-3-0-ko3-tutorial-part-9/</a>
         Seems there was some changes i dont know. Can you direct me to a link or a tutorial so that i can see one. I have been googling but i can't find what i'm looking for. THis is my last resort. By the way i'm new to kohana. Please bear with me</p>
]]></description>
   </item>
   <item>
      <title>Проблема с правильным выводом валидации(Auth, Registration)</title>
      <link>http://forum.kohanaframework.org/discussion/10319/problema-s-pravilnym-vyvodom-validaciiauth-registration</link>
      <pubDate>Mon, 30 Jan 2012 16:16:55 -0600</pubDate>
      <dc:creator>zedorf</dc:creator>
      <guid isPermaLink="false">10319@/discussions</guid>
      <description><![CDATA[<p>Здравствуйте всем!
У меня следующая, возможно не самая больная проблема , но она довольно сильно меня напрягает.</p>

<p>Сейчас занят конструированием сайта, остановился на валидации в методе /register/.</p>

<p>Версия Коханы 3,2.Обшарил уже что только мог , мб кто знает что где "подкрутить".</p>

<p>Сам метод:</p>

<pre><code>public function action_register() {   
    if (isset($_POST['register'])){
        $data = Arr::extract($_POST, array('username', 'password', 'telefon', 'fio', 'password_confirm', 'email'));
        $users = ORM::factory('user');
        try {
            $users-&gt;create_user($_POST, array(
                'username',
                'fio',
                'telefon',
                'password',
                'email',
            ));

            $role = ORM::factory('role')-&gt;where('name', '=', 'login')-&gt;find();
            $users-&gt;add('roles', $role);;
            $this-&gt;request-&gt;redirect();
        }
        catch(ORM_Validation_Exception $e)
        {
            $errors = $e-&gt;errors('auth');
        }
    }

    $auth_register = View::factory('index/auth/v_auth_register')
            -&gt;bind('errors', $errors)
            -&gt;bind('data', $data);
    // Вывод в шаблон
    $this-&gt;template-&gt;page_title = 'Регистрация';
    $this-&gt;template-&gt;block_center = array($auth_register);

}

public function action_logout() {

}
}
</code></pre>

<p>Модель:</p>

<p>class Model_User extends Model_Auth_User {
  public function labels()
    {
        return array(</p>

<pre><code>        'username' =&gt; 'Логин',

        'email' =&gt; 'E-mail',

        'fio' =&gt; 'ФИО',

        'telefon' =&gt; 'Телефон',

        'password' =&gt; 'Пароль',

        'password_confirm' =&gt; 'Повторить пароль',

    );
}
public function rules()
{
    return array(
                    'username' =&gt; array(
            array('not_empty'),
            array('max_length', array(':value', 32)),
            array(array($this, 'unique'), array('username', ':value')),
        ),
                   'password' =&gt; array(
            array('not_empty'),
        ),
        'email' =&gt; array(
            array('not_empty'),
            array('email'),
            array(array($this, 'unique'), array('email', ':value')),
        ),
        'fio' =&gt; array(
            array('not_empty'),
        ),
        'telefon' =&gt; array(
            array('not_empty'),
        ),
    );
}
    }
</code></pre>

<p>Валидация ну стандарт и вот что дописал:</p>

<p>application\messages\auth\user.php</p>

<pre><code>return array(
    'unique' =&gt; 'Поле ":field" уже существует',
    'no_user' =&gt; 'Неверный логин или пароль',
 ); 
</code></pre>

<p>В application\messages\auth\user\</p>

<p>Создал _external.php тут пусто.</p>

<p>HTML Code(блок вывода ошибок, дальше там все стандарт):</p>

<pre><code> &lt;?if(isset($errors)):?&gt; 
 &lt;div id="site_errors" style="padding: 20px 10px 10px 0px;"&gt;
 &lt;div id="site_errors_top"&gt;&lt;/div&gt;
 &lt;div id="site_errors_cent" align="left"&gt;
 &lt;p&gt;Найдены следующие ошибки:&lt;/p&gt;
 &lt;?foreach($errors as $error):?&gt;
 &lt;p style="padding-bottom:5px;"&gt;&lt;font style="color:red;font-size:12px;"&gt;&lt;?=$error?&gt;&lt;/font&gt;&lt;/p&gt;
 &lt;?endforeach?&gt;
 &lt;?foreach($errors['_external'] as $er):?&gt;
 &lt;p style="padding-bottom:5px;"&gt;&lt;font style="color:red;font-size:12px;"&gt;&lt;?=$er?&gt;&lt;/font&gt;&lt;/p&gt;
 &lt;?endforeach?&gt;
 &lt;/div&gt;
 &lt;div id="site_errors_bottom"&gt;&lt;/div&gt;
 &lt;/div&gt;
 &lt;?endif?&gt;
</code></pre>

<p>Ну и сам результат работы выглядит примерно так:</p>

<p><a href="http://s018.radikal.ru/i528/1201/bb/0bf59a0b5933.png" target="_blank" rel="nofollow">http://s018.radikal.ru/i528/1201/bb/0bf59a0b5933.png</a></p>

<p>Проблема в выводящимся Array.</p>
]]></description>
   </item>
   <item>
      <title>ORM.Добавление и обновление</title>
      <link>http://forum.kohanaframework.org/discussion/10347/orm.dobavlenie-i-obnovlenie</link>
      <pubDate>Fri, 03 Feb 2012 13:03:16 -0600</pubDate>
      <dc:creator>rockwill</dc:creator>
      <guid isPermaLink="false">10347@/discussions</guid>
      <description><![CDATA[<p>Всем привет.
Возможно искал плохо и тема уже обсуждалась, так что не судите строго.
Допустим, есть модель User и модель City...Причем City $_has_many Users =)
У меня есть суперлегкий способ забрать из модели User информацию о городе...а как мне так же просто и аккуратно сменить город, если я не знаю его ID , а только название (без доп. запроса на получение ID)? Предусматривает ли ORM такую возможность?</p>
]]></description>
   </item>
   <item>
      <title>Kohana module &quot;Comments&quot;</title>
      <link>http://forum.kohanaframework.org/discussion/10343/kohana-module-comments</link>
      <pubDate>Fri, 03 Feb 2012 02:23:26 -0600</pubDate>
      <dc:creator>trane294</dc:creator>
      <guid isPermaLink="false">10343@/discussions</guid>
      <description><![CDATA[<p>Who have module "comments" for kohana 3.2?</p>
]]></description>
   </item>
   <item>
      <title>Custom ORM Queries</title>
      <link>http://forum.kohanaframework.org/discussion/10341/custom-orm-queries</link>
      <pubDate>Thu, 02 Feb 2012 17:24:59 -0600</pubDate>
      <dc:creator>marklocker</dc:creator>
      <guid isPermaLink="false">10341@/discussions</guid>
      <description><![CDATA[<p>So I want to generate an ORM object from some SQL, and it's advanced SQL (it uses a number mathematical functions, for example). As I can't build this particular query in the normal way (e.g. <code>ORM::Factory('model')-&gt;where('name', '=', 'fred')-&gt;find()</code>) What is the best way of achieving this?</p>
]]></description>
   </item>
   <item>
      <title>Less module for Kohana</title>
      <link>http://forum.kohanaframework.org/discussion/10345/less-module-for-kohana</link>
      <pubDate>Fri, 03 Feb 2012 07:21:04 -0600</pubDate>
      <dc:creator>luglio7</dc:creator>
      <guid isPermaLink="false">10345@/discussions</guid>
      <description><![CDATA[<p>I've created a less module for kohana. 
It's a simple wrapper for the lessphp project.</p>

<p>Enjoy :)</p>

<p><a href="https://github.com/designofseven/kohana_less" target="_blank" rel="nofollow">https://github.com/designofseven/kohana_less</a></p>
]]></description>
   </item>
   <item>
      <title>I&#039;m getting error</title>
      <link>http://forum.kohanaframework.org/discussion/10334/i039m-getting-error</link>
      <pubDate>Thu, 02 Feb 2012 03:20:44 -0600</pubDate>
      <dc:creator>raindropz</dc:creator>
      <guid isPermaLink="false">10334@/discussions</guid>
      <description><![CDATA[<p>I'm new in kohana and I need your help. 
<code>
&lt;?php defined('SYSPATH') or die('No direct script access.');
class Controller_Messages extends Controller_Application {

    public function action_index()
    {
        //Passing data via the factory method
        URL::redirect();
    }
    public function action_get_messages(){
        $messages = array(
                'This is test message one',
                'This is test message two',
                'This is test message three'
        );
                $this-&gt;response-&gt;body(View::factory('profile/messages'))
            -&gt;set('messages', $messages);   
    }
}
</code>
view 
<code>
Public Profile for &lt;?php //echo $username; ?&gt;</code></p>

<h3>Recent Messages:</h3>

&lt;?php foreach ($messages as $message) : ?&gt;

<p class="message">
&lt;?php echo $message; ?&gt;
</p>

<p>&lt;?php endforeach; ?&gt;

I get this error
<code>
ErrorException [ Notice ]: Undefined variable: messages</code></p>

<p>APPPATH\views\profile\messages.php [ 3 ]</p>

<pre>
1 Public Profile for &lt;?php //echo $username; ?&gt;
2 Recent Messages:
3 &lt;?php foreach ($messages as $message) : ?&gt;
</pre>

<p>please move if I posted this in wrong section. thanks.</p>
]]></description>
   </item>
   <item>
      <title>Модуль Kohana &quot;Комментарии&quot;</title>
      <link>http://forum.kohanaframework.org/discussion/10332/modul-kohana-kommentarii</link>
      <pubDate>Thu, 02 Feb 2012 02:02:59 -0600</pubDate>
      <dc:creator>trane294</dc:creator>
      <guid isPermaLink="false">10332@/discussions</guid>
      <description><![CDATA[<p>Установил модуль для коханы <a href="https://github.com/theshock/kohana-modules/tree/master/comments" target="_blank" rel="nofollow">https://github.com/theshock/kohana-modules/tree/master/comments</a>. Установил на страницу, но при добавлении комментария пишет:
ErrorException [ Fatal Error ]: Call to undefined method Request::instance()</p>

<p>protected function redirect (Model_Comment $comment) {
        $r = Request::instance();
        $r-&gt;redirect($r-&gt;uri);
    }</p>
]]></description>
   </item>
   <item>
      <title>how to hide nav on the next page</title>
      <link>http://forum.kohanaframework.org/discussion/10339/how-to-hide-nav-on-the-next-page</link>
      <pubDate>Thu, 02 Feb 2012 15:56:21 -0600</pubDate>
      <dc:creator>charliedesigner</dc:creator>
      <guid isPermaLink="false">10339@/discussions</guid>
      <description><![CDATA[<p>I have a page called default.php in a templates folder. The nav is in this default.php to show up in all the pages on my website.
How can i hide the global nav on pages that i don't want to show.</p>

<p>Please help and thanks so much</p>
]]></description>
   </item>
   <item>
      <title>Structure to support both web and api?</title>
      <link>http://forum.kohanaframework.org/discussion/10336/structure-to-support-both-web-and-api</link>
      <pubDate>Thu, 02 Feb 2012 04:56:55 -0600</pubDate>
      <dc:creator>Surfer</dc:creator>
      <guid isPermaLink="false">10336@/discussions</guid>
      <description><![CDATA[<p>Hi,</p>

<p>In my latest project I want to build a web frontend with a RESTful API on the backend. In my previous projects I had controllers using the models for both api actions and web actions resulting in a lot of duplicated code. I would use two separate "template" controllers for the API and web. My question, is there a smarter and cleaner way to do this with Kohana? It would be nice if all data handling goes through the API and only the API uses the models and validates the data. For all AJAX requests on the web frontend I would use the API, but how should the web controllers be structured? I would still need to have web controllers and views to support the website. Can I use HMVC for this?
I was planning on using oAuth 2 to authorize when using the API. Any ideas on how to implement oAuth 2 as 2 legged auth on the web frontend?</p>

<p>Any ideas or pointers?</p>

<p>Thanks!</p>
]]></description>
   </item>
   <item>
      <title>Session Timeouts</title>
      <link>http://forum.kohanaframework.org/discussion/10338/session-timeouts</link>
      <pubDate>Thu, 02 Feb 2012 14:23:37 -0600</pubDate>
      <dc:creator>jmhobbs</dc:creator>
      <guid isPermaLink="false">10338@/discussions</guid>
      <description><![CDATA[<p>I'm having trouble keeping my users logged in for more than about half an hour, which is the default session expiration time for PHP.</p>

<p>I'm using native sessions (I believe), and edited my session config at APPPATH/config/session.php</p>

<pre><code>   return array(
     'native' =&gt; array(
       'lifetime' =&gt; 259200,
     ),
   );
</code></pre>

<p>It doesn't seem to be effective.</p>

<p>Am I missing something?</p>
]]></description>
   </item>
   <item>
      <title>Best pattern for supporting mobile version</title>
      <link>http://forum.kohanaframework.org/discussion/10340/best-pattern-for-supporting-mobile-version</link>
      <pubDate>Thu, 02 Feb 2012 15:56:44 -0600</pubDate>
      <dc:creator>enridp</dc:creator>
      <guid isPermaLink="false">10340@/discussions</guid>
      <description><![CDATA[<p>I searched for this on the forum but there's not much (I feel like if old posts are not returned in the search).<br />
Anyway, I'm analyzing 2 options right now:</p>

<blockquote>
  <p><strong>first:</strong> I've opted for a solution with just one URL, that is the mobile and the desktop version has the same URL, there isn't subdomains like m.mysite.com, or mysite.com/mobile/ or differents routes, I think this is the cleaner solution, is better for SEO, and you can share links without pain. If you have an argument against that I'll be happy to read it :)</p>
</blockquote>

<p><strong>1)</strong> Create a different View_Model for every View_Model of your desktop version, then you end with something like: <code>View_Product</code> and <code>View_Mobile_Product</code> (I think is better View_Product_Mobile but due to the autoload I will end with a lot of "mobile.php" files and inside a new folder "product", and that's not nice).<br />
<code>View_Mobile_Product</code> extends from <code>View_Product</code>.<br />
Then I'm using a session value for reading if it's a mobile request or not (if the session doesn't exist then I'm using the user_agent for detecting it). And passing that value to the View_Model Factory.  The factory creates the right View_Model using always the name of the "desktop" view_model (I think this give us more freedom and is more secure than just concatening <code>Mobile_</code> before using the View_Model factory (for example we could use a list of exlusions in our factory for using the desktop VM if they are equal and then avoid DRY, also we can change in a future the name convention of our VM_mobiles and we need to change only the factory, and finally we can't make a mistake forgetting the "Mobile_" before the factory in some part of our code).</p>

<p><strong>2)</strong> taking advantage of the Cascade system of Kohana and using <em>multipl</em> applications. Maybe something like this:<br />
Convert the current application code into a module (and add support for the transparent extension).<br />
Create different applications (different folders, for example <code>application_desktop</code>, <code>application_mobile</code>).<br />
Put only the code that is unique for every application in the application_* folders (using transparent_extension).<br />
Set the application folder based on everything you want (mobile detection, session inside index.php.<br />
I think this could be the best design, we don't need special names, factories, etc and we have everything separated and clean, but with a started project I'm afraid of the refactoring needed for this.</p>

<p><strong>3)</strong> ???</p>

<p>What do you think?<br />
How are you doing this in your projects?<br />
Thanks !</p>
]]></description>
   </item>
   <item>
      <title>hello, i&#039;m new here</title>
      <link>http://forum.kohanaframework.org/discussion/10333/hello-i039m-new-here</link>
      <pubDate>Thu, 02 Feb 2012 03:09:41 -0600</pubDate>
      <dc:creator>raindropz</dc:creator>
      <guid isPermaLink="false">10333@/discussions</guid>
      <description><![CDATA[<p>My name is Rey mario from Philippines. I need your help.</p>
]]></description>
   </item>
   <item>
      <title>kostache - when to use partials &amp; append to partials in extended layout?</title>
      <link>http://forum.kohanaframework.org/discussion/10309/kostache-when-to-use-partials-append-to-partials-in-extended-layout</link>
      <pubDate>Thu, 26 Jan 2012 11:58:39 -0600</pubDate>
      <dc:creator>rolf</dc:creator>
      <guid isPermaLink="false">10309@/discussions</guid>
      <description><![CDATA[<p>When do you decide to make something a partial in some layouts/templates? Is it some sort of rule of thumb to make it a separate file as soon as you use it more than once?</p>

<p>As a follow up question: I have some (often used) partials defined in the base layout class (like a sidebar with navigation or a header). What is the correct way to extend the partials array in a few layouts that share a partial, which is a small template used by a handful of pages? For example a product list <code>li</code> item, or some <code>dl</code> list acting as meta data every now and then.</p>

<p>Thanks for any "this is how I do it" insights</p>
]]></description>
   </item>
   <item>
      <title>Kohana 3.2 - phpBB library - working with abstract methods</title>
      <link>http://forum.kohanaframework.org/discussion/10229/kohana-3.2-phpbb-library-working-with-abstract-methods</link>
      <pubDate>Mon, 09 Jan 2012 06:53:00 -0600</pubDate>
      <dc:creator>diggersworld</dc:creator>
      <guid isPermaLink="false">10229@/discussions</guid>
      <description><![CDATA[<p>Hello,</p>

<p>I'm trying to implement a phpBB library into Kohana so that I can make my website communicate with a forum.
However on including phpBB files to allow this I get errors about abstract methods.</p>

<p>Please see a full description of the issue here: <a href="http://stackoverflow.com/questions/8788298/kohana-3-2-phpbb-library-working-with-abstract-methods" target="_blank" rel="nofollow">http://stackoverflow.com/questions/8788298/kohana-3-2-phpbb-library-working-with-abstract-methods</a></p>

<p>I would like to know how I can get around this without modifying the phpBB files.</p>

<p>Cheers,
Thomas.</p>
]]></description>
   </item>
   <item>
      <title>Websites Built Using Kohana</title>
      <link>http://forum.kohanaframework.org/discussion/346/websites-built-using-kohana</link>
      <pubDate>Sun, 20 Apr 2008 06:04:56 -0500</pubDate>
      <dc:creator>spirit</dc:creator>
      <guid isPermaLink="false">346@/discussions</guid>
      <description><![CDATA[This was a post in the old forum so, to see the progression of Kohana apps I put it back here.<br /><br /><h3>Zombor</h3><br /><a rel="nofollow" href="http://www.splashanddashracine.com">http://www.splashanddashracine.com</a><br /><a rel="nofollow" href="http://www.amazingeye.com">http://www.amazingeye.com</a><br /><a rel="nofollow" href="http://www.wisconsinfestivals.org">http://www.wisconsinfestivals.org</a><br /><a rel="nofollow" href="http://www.radd-cpa.org">http://www.radd-cpa.org</a><br /><a rel="nofollow" href="http://www.revivalforamerica.com">http://www.revivalforamerica.com</a><br /><a rel="nofollow" href="http://www.metroracine.com">http://www.metroracine.com</a><br /><br /><h3>Geert De Deckere</h3><br /><a rel="nofollow" href="http://www.kohanajobs.com/">http://www.kohanajobs.com/</a> (Official Kohana job board)<br /><a rel="nofollow" href="http://www.idoe.be/">http://www.idoe.be/</a> (Personal company/portfolio)<br /><a rel="nofollow" href="http://www.natuurlijkewijnen.be/">http://www.natuurlijkewijnen.be/</a> (Natural wines webshop)<br /><a rel="nofollow" href="http://www.fietsenkris.be/">http://www.fietsenkris.be/</a> (Bicycle shop)<br /><br /><h3>Slith</h3><br /><a rel="nofollow" href="http://www.tslarmor.com">http://www.tslarmor.com</a> (A limited edition collection of handmade sterling silver jewelry designed by the The Seventh Letter Crew.)<br /><br /><h3>Edam</h3><br /><a rel="nofollow" href="http://www.gamepackpro.com">http://www.gamepackpro.com</a><br /><br /><h3>mGee</h3><br /><a rel="nofollow" href="http://04064.com/">http://04064.com/</a> (A showcase of mGee amateur photography)]]></description>
   </item>
   <item>
      <title>Generating emails from models using Views</title>
      <link>http://forum.kohanaframework.org/discussion/10335/generating-emails-from-models-using-views</link>
      <pubDate>Thu, 02 Feb 2012 03:54:33 -0600</pubDate>
      <dc:creator>matino</dc:creator>
      <guid isPermaLink="false">10335@/discussions</guid>
      <description><![CDATA[<p>Hi,<br />
Right now to send an email I generate the html using <code>View::factory</code> in controller and pass it to model function that actually sends the email.<br />
Is this good practice or should I rather generate email content directly inside the model function?<br />
What are the pros and cons of both solutions?</p>
]]></description>
   </item>
   <item>
      <title>session problem with ie and chrome</title>
      <link>http://forum.kohanaframework.org/discussion/10303/session-problem-with-ie-and-chrome</link>
      <pubDate>Tue, 24 Jan 2012 05:24:43 -0600</pubDate>
      <dc:creator>sineld</dc:creator>
      <guid isPermaLink="false">10303@/discussions</guid>
      <description><![CDATA[<p>Hello,</p>

<p>Everthing works great with Firefox and Safari with my Kohana 3.2 (auth + orm)
but keeps regenerating session files with IE and Chrome.</p>

<p>I have searched over forums and tried suggestions but neither worked.</p>

<p>Please help.</p>
]]></description>
   </item>
   <item>
      <title>ORM - join instead lazy loading</title>
      <link>http://forum.kohanaframework.org/discussion/10318/orm-join-instead-lazy-loading</link>
      <pubDate>Mon, 30 Jan 2012 05:07:42 -0600</pubDate>
      <dc:creator>matino</dc:creator>
      <guid isPermaLink="false">10318@/discussions</guid>
      <description><![CDATA[<p>Hi,<br />
I have a relation <code>order - customer</code>. To get customer name from order I do <code>$order-&gt;customer-&gt;name</code> but this of course generates additional <code>SELECT</code> query.<br />
In case I want to display 1k orders and their customer data on 1 page, I'll get 1k additional <code>SELECT</code> queries. Is there anyway to use join instead but still operate on ORM object - not array (so to get the customer name like above: <code>$order-&gt;customer-&gt;name</code>)?</p>
]]></description>
   </item>
   <item>
      <title>Problem with Auth and Subdomen modules</title>
      <link>http://forum.kohanaframework.org/discussion/10299/problem-with-auth-and-subdomen-modules</link>
      <pubDate>Mon, 23 Jan 2012 13:28:07 -0600</pubDate>
      <dc:creator>gidrosoldat</dc:creator>
      <guid isPermaLink="false">10299@/discussions</guid>
      <description><![CDATA[<p>Hello, I have a local domain 'kohana' with other language subdomains 'en.kohana' and 'lt.kohana' (<a href="https://github.com/jeanmask/subdomain" target="_blank" rel="nofollow">https://github.com/jeanmask/subdomain</a>).</p>

<p>My Auth module works only for a one subdomain, where I am logging in.. For example, if I successful logged in 'kohana' domain, and then I'am going to the 'en.kohana' subdomain, I must to login one more time.</p>

<p>When I'am adding to bootstrap.php <code>Cookie::$domain = ".kohana";</code>, I can't login in my subdomains, only in domain.</p>

<p>Could you help me?</p>
]]></description>
   </item>
   <item>
      <title>ProfilerToolbar for kohana 3.2</title>
      <link>http://forum.kohanaframework.org/discussion/10310/profilertoolbar-for-kohana-3.2</link>
      <pubDate>Fri, 27 Jan 2012 03:46:22 -0600</pubDate>
      <dc:creator>Alert</dc:creator>
      <guid isPermaLink="false">10310@/discussions</guid>
      <description><![CDATA[<p>ProfilerToolbar it is another implementation of the DebugToolbar, but has additional features.<br />
— SQL queries with EXPLAIN;<br />
— cache log;<br />
— routes and params of use route;<br />
— does not use jQuery;<br />
— does not need include images;<br />
and some other.<br /></p>

<p>look the <a rel="nofollow" href="http://alertdevelop.ru/projects/profilertoolbar">DEMO</a><br />
project on <a rel="nofollow" href="https://github.com/Alert/profilertoolbar">github.com</a></p>

<p>I hope that module will prove useful.</p>
]]></description>
   </item>
   <item>
      <title>Problem with Kohana sessions in third-party code</title>
      <link>http://forum.kohanaframework.org/discussion/10331/problem-with-kohana-sessions-in-third-party-code</link>
      <pubDate>Thu, 02 Feb 2012 01:09:13 -0600</pubDate>
      <dc:creator>lurker</dc:creator>
      <guid isPermaLink="false">10331@/discussions</guid>
      <description><![CDATA[<p>Hi everybody.</p>

<p>Somewhere in my Kohana login() action I create a flag:
    Session::instance()-&gt;set( 'wysiwyg_upload_privilege', true );</p>

<p>Then I want to check that flag in third-party module (actually, it's TinyMCE plugin):
    session_name('session');
    session_start();
    if (!isset($_SESSION['wysiwyg_upload_privilege'])) die('Unauthorized access');</p>

<p>The problem is that third-party module doesn't know about Kohana and its classes. Kohana (at least it's ORM module) stores some objects in SESSION. 
So in session_start() I get:
    Warning: Class __PHP_Incomplete_Class has no unserializer</p>

<p>Of course, I can handle this warning or just suppress it. But thats seems to be a wrong way.
What can I do with that?</p>
]]></description>
   </item>
   </channel>
</rss>
