<?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>Wed, 16 May 12 21:48:39 -0500</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>Auth module returns &#039;1&#039;</title>
      <link>http://forum.kohanaframework.org/discussion/10761/auth-module-returns-0391039</link>
      <pubDate>Wed, 16 May 2012 05:35:33 -0500</pubDate>
      <dc:creator>disconv</dc:creator>
      <guid isPermaLink="false">10761@/discussions</guid>
      <description><![CDATA[<p>For some reason when i do this :</p>

<pre><code>&lt;?php if(Auth::instance()-&gt;logged_in()) : ?&gt;


&lt;?php endif; ?&gt;
</code></pre>

<p>There is a '1' on the screen.
I have no idea where this comes from :s
Anyone had the same problem?</p>

<p>The auth module seems to work because when I do</p>

<pre><code>&lt;?php echo Auth::instance()-&gt;get_user(); ?&gt;
</code></pre>

<p>It gives me the ID of the user, but the '1' is still there.</p>

<p>Wkr,
Nick</p>
]]></description>
   </item>
   <item>
      <title>мультиязычность сайта</title>
      <link>http://forum.kohanaframework.org/discussion/10530/multiyazychnost-sayta</link>
      <pubDate>Sat, 10 Mar 2012 22:25:44 -0600</pubDate>
      <dc:creator>varz62</dc:creator>
      <guid isPermaLink="false">10530@/discussions</guid>
      <description><![CDATA[<p>хотелось бы на сайте с несколькими языками иметь ссылки вида
mysite.com/ru/main - для русского языка
mysite.com/en/main - для английского
как в этом случае настроить роутинг?</p>
]]></description>
   </item>
   <item>
      <title>Модуль Navigation</title>
      <link>http://forum.kohanaframework.org/discussion/10753/modul-navigation</link>
      <pubDate>Mon, 14 May 2012 03:56:06 -0500</pubDate>
      <dc:creator>ButscH</dc:creator>
      <guid isPermaLink="false">10753@/discussions</guid>
      <description><![CDATA[<p>Всем привет.</p>

<p>Появилось время и я выложил модуль генерации навигации по сайту на <code>Github</code>.</p>

<p>В модуль я включил пример инициализации модуля в контроллере и пример карты сайта с рабочего проекта.</p>

<p>Модуль полностью рабочий и используется в ряде проектов.</p>

<p>Если возникнут проблемы, пишите, помогу чем смогу :)</p>

<p><a href="https://github.com/butschster/Kohana-navigation" target="_blank" rel="nofollow">https://github.com/butschster/Kohana-navigation</a></p>

<p>Хотелось бы развивать этот модуль, т.к. вряд ли найдется лучшее решение.</p>

<p>Еще не помешало бы сделать рефакторинг кода и привести стиль кода к используемому в <code>Kohana</code></p>
]]></description>
   </item>
   <item>
      <title>Task queue system</title>
      <link>http://forum.kohanaframework.org/discussion/10760/task-queue-system</link>
      <pubDate>Tue, 15 May 2012 11:31:31 -0500</pubDate>
      <dc:creator>Surfer</dc:creator>
      <guid isPermaLink="false">10760@/discussions</guid>
      <description><![CDATA[<p>Hi,</p>

<p>I want to build a task queue system that will post-process uploaded images. Basically once a photo has been uploaded to the server I want to add a task to a queue that will upload a file to S3. If the upload fails the task remains until it succeeds. Similar tasks will happen when a photo should be deleted. The system would also be used to post to Facebook API and re-try when tasks fail. I am guessing the easiest way initiate the tasks would be through a cron call but maybe also having a deamon running? I use MySQL as a db store.</p>

<p>Any ready to use modules that can be recommended for this? I found the minion module but if I understand it correctly it's not a queue based system?</p>

<p>Thanks!</p>
]]></description>
   </item>
   <item>
      <title>Kohana users from Romania</title>
      <link>http://forum.kohanaframework.org/discussion/10135/kohana-users-from-romania</link>
      <pubDate>Tue, 20 Dec 2011 09:39:02 -0600</pubDate>
      <dc:creator>feketegy</dc:creator>
      <guid isPermaLink="false">10135@/discussions</guid>
      <description><![CDATA[<p>I'm wondering if there are any Kohana users / developers from Romania?</p>
]]></description>
   </item>
   <item>
      <title>Kohana101</title>
      <link>http://forum.kohanaframework.org/discussion/10744/kohana101</link>
      <pubDate>Fri, 11 May 2012 07:39:58 -0500</pubDate>
      <dc:creator>biakaveron</dc:creator>
      <guid isPermaLink="false">10744@/discussions</guid>
      <description><![CDATA[<p>Немного запоздало, но решил все же создать отдельный топик. Некоторое время назад я начал писать учебник для начинающих по Kohana. Выбрана версия 3.2, самая актуальная на тот момент (да и сейчас тоже). Помимо возможностей ядра фреймворка, планирую описать базовые модули - ORM, Database, Auth. Это планируемый минимум.</p>

<p>На данный момент написаны далеко не все статьи, т.к. это требует немало усилий и времени (это не перевод официального гайда, а собственное произведение). Предлагаю ознакомиться с ним, приму любую критику и пожелания, как в части содержания, так и по структуре статей.</p>

<ul>
<li><a rel="nofollow" href="https://github.com/biakaveron/kohana101-ru">Модуль на Гитхабе</a></li>
<li><a rel="nofollow" href="http://101.brotkin.ru/guide/kohana101">Live-версия</a></li>
</ul>

<p>Кроме того, в данном топике буду сообщать о новых статьях по мере их добавления.</p>
]]></description>
   </item>
   <item>
      <title>i18n: Script to extract all string values that should be translated</title>
      <link>http://forum.kohanaframework.org/discussion/9802/i18n-script-to-extract-all-string-values-that-should-be-translated</link>
      <pubDate>Thu, 06 Oct 2011 22:59:57 -0500</pubDate>
      <dc:creator>Wouter</dc:creator>
      <guid isPermaLink="false">9802@/discussions</guid>
      <description><![CDATA[Does anyone has a script (or other best practice), that finds all string values that have to be translated in order to support another language? What about finding translations that aren't in use anymore?<br /><br />Something that includes the following:<br />* Parse all views and extract all string values in <code>__('...')</code> tags<br />* Parse other files to extract <code>__(</code> escaped strings? (EG in some controllers I have <code>$this-&gt;_title = __('Title of Controller');</code><br />* Get all string values from all message files<br /><br />Any best practices / suggestions / scripts?]]></description>
   </item>
   <item>
      <title>ORM, has_many, count and order_by</title>
      <link>http://forum.kohanaframework.org/discussion/10759/orm-has_many-count-and-order_by</link>
      <pubDate>Tue, 15 May 2012 09:42:46 -0500</pubDate>
      <dc:creator>ekersten</dc:creator>
      <guid isPermaLink="false">10759@/discussions</guid>
      <description><![CDATA[<p>I have a table that holds countries and another table that holds an entry for each medal the country has earned.</p>

<p>What I need to do is get the countries with the medal count and order the list by that count.</p>

<p>Is there any way to do this with ORM.</p>

<p>My current solution was to override the save method on the medal model to update a medal_count field on the countries table, but it seems far from ok.</p>

<p>Thanks in advance</p>
]]></description>
   </item>
   <item>
      <title>Request action form view</title>
      <link>http://forum.kohanaframework.org/discussion/10755/request-action-form-view</link>
      <pubDate>Mon, 14 May 2012 16:07:29 -0500</pubDate>
      <dc:creator>pt0</dc:creator>
      <guid isPermaLink="false">10755@/discussions</guid>
      <description><![CDATA[<p>Could you explain me what I am doing wrong?</p>

<p>In view I got:</p>

<p><code>
&lt;?php $form_type = Request::current()-&gt;action == 'add' ? 'Create New' : 'Edit' ?&gt;
</code>
In controller, the action in defined, but it keeps giving me:</p>

<p><code>Non-static method Kohana_Request::action() should not be called statically</code></p>
]]></description>
   </item>
   <item>
      <title>Issues accessing $_FILES?</title>
      <link>http://forum.kohanaframework.org/discussion/10757/issues-accessing-_files</link>
      <pubDate>Tue, 15 May 2012 02:42:17 -0500</pubDate>
      <dc:creator>MasterGberry</dc:creator>
      <guid isPermaLink="false">10757@/discussions</guid>
      <description><![CDATA[<p>I have an ajax call being made to my script, and I seem to be having issues with the $_FILES global variable.  Using their actual php script (non-kohana) it work's  fine.  On mine its giving issues though.</p>

<p>When I json_encoded $_FILES to check if the index 'files' existed (which it does) i got this:</p>

<pre>{"files":{"name":["1000MS.png"],"type":["image\/png"],"tmp_name":["C:\\xampp\\tmp\\phpE547.tmp"],"error":[0],"size":[598358]}}</pre>

<p>I don't understand why then when I use: <code>$_FILES['files']</code> it gives me issues...does anyone see something that I am overlooking?  Or is Kohana doing something to the $_FILES?</p>
]]></description>
   </item>
   <item>
      <title>Neo4j</title>
      <link>http://forum.kohanaframework.org/discussion/10406/neo4j</link>
      <pubDate>Wed, 15 Feb 2012 09:25:08 -0600</pubDate>
      <dc:creator>Surfer</dc:creator>
      <guid isPermaLink="false">10406@/discussions</guid>
      <description><![CDATA[<p>I have recently started looking at graph db's as they seem to make more sense than traditional rdbms for sites that do a lot of joins such as social network sites etc.
The neo4j db looks quite nice. It even has the Lucene serach engine built in. Has anyone tried this db and used it with Kohana?</p>

<p>Thanks!</p>
]]></description>
   </item>
   <item>
      <title>Understanding Kohana</title>
      <link>http://forum.kohanaframework.org/discussion/10758/understanding-kohana</link>
      <pubDate>Tue, 15 May 2012 05:01:49 -0500</pubDate>
      <dc:creator>ivenius12</dc:creator>
      <guid isPermaLink="false">10758@/discussions</guid>
      <description><![CDATA[<p>Kohana version: 3.1.4</p>

<p>Hey,
I'm trying to understand how does kohana work by making my own simple project based on the MVC pattern. I've already made it to invoke the default controller from the Request class such as it is done in kohana, but I have no idea how to display a template with some text passed to it from the default controller. In kohana, controllers extend Controller_Template, in which there is nothing but two methods, before() and the after(). Before() just loads the template (I'll take care of View::factory later), and after()...well, what does it do actually?</p>

<p>Well, the main question is: do before() method is called automatically even if it only exists in a class which is extended by a class being invoked? How is it done in kohana, I couldn't find anywhere a code responsible for that, maybe it's just tiredness :P).</p>

<p>And what is responsible for displaying template view and passing something to it? In my kohana's controller I only have two things which can do anything: $this-&gt;template-&gt;content = ..., which passes an information to the template; and these before() and the after() methods existing in template class. How is it working? Thanks for help :)</p>
]]></description>
   </item>
   <item>
      <title>Memory leak?</title>
      <link>http://forum.kohanaframework.org/discussion/10720/memory-leak</link>
      <pubDate>Fri, 04 May 2012 23:07:45 -0500</pubDate>
      <dc:creator>arnoldgamboa</dc:creator>
      <guid isPermaLink="false">10720@/discussions</guid>
      <description><![CDATA[<p>I have a potential memory leak here. It's probably Kohana's. I hope to get insights from you. (Been trying to debug this script for days, I finally gave up last night).</p>

<p>Here's what this script does:</p>

<p>Basically, this is a Background Worker (hosted at Pagodabox). That's the reason why it's an infinite while loop. Step by step:</p>

<ol>
<li>It tries to get one unprocessed article</li>
<li>It then gets the related information from related tables</li>
<li>It saves the info to a table (emailerscheds)</li>
<li>Naturally, since only one article record is fetched from the table, it goes back to top and get another article.</li>
<li>And starts with 1 again.</li>
</ol>

<p>Problem: memory is not cleared after the first record and eventually, the allocated memory, however huge, it is runs out. I would have to think that since you're processing a new database object, the memory will have to be cleared. But it's not the case.</p>

<p>I've tried different approaches you can think of the clear the memory. I've tried making variables NULL, unset(), I've declared gc_enable, gc_collect_cycles(), I've tried to make the script sleep by 60 seconds hoping that the garbage collector will do his job during lull moments (<em>wink</em> -- I know I'm crazy). I thought ORM is the issue, so I tried DB. I've tried turning profiling off -- which helped by the way, but isn't the problem first and foremost. I've tried __destruct.</p>

<p>Memory still runs out.</p>

<p>You might say that probably the data sets are huge. It is. But the thing is, this can process about 3 to 4 article records before it runs out of memory. Meaning, it can actually process at least one. And I'm hoping that after 1 record, memory is freed.</p>

<p>NEED HELP. BADLY. :D Thanks for taking time.</p>

<hr />

<p>public function action_grab_article_topics()</p>

<pre><code>{
    gc_enable();

    $x = 1;
    while ($x == 1)
    {

        // $articles = ORM::factory('article')
        //   -&gt;where('sent', '=', 0)
        //   // -&gt;limit(1)
        //   -&gt;find();

        $articles = DB::select()
                -&gt;from('articles')
                -&gt;where('sent', '=', 0)
                -&gt;as_object()
                -&gt;execute()
                -&gt;current();

        $topics = array();
        //foreach ($articles as $a)
        //{
            //$topics = $articles-&gt;topics-&gt;find_all()-&gt;as_array();
        if ($articles)
        {   
            $topics = DB::select('topic_id')
                    -&gt;from('articles_topics')
                    -&gt;where("article_id", '=', $articles-&gt;id);

            if (! empty($topics))
            {
                $members = DB::select('members.id', 'members.email', 'members_topics.topic_id', 'topics.topic_name')
                        -&gt;from('members_topics')
                        -&gt;join('members')
                        -&gt;on('members.id', '=', 'members_topics.member_id')
                        -&gt;join('topics')
                        -&gt;on('topics.id', '=', 'members_topics.topic_id')
                        -&gt;where('members_topics.topic_id', 'IN', $topics)
                        // -&gt;limit(20)
                        -&gt;as_object()
                        -&gt;execute();

                foreach ($members as $m)
                {
                    $topic_id = $m-&gt;topic_id;
                    $topic_name = $m-&gt;topic_name;

                    $data = array(
                                "member_id" =&gt; $m-&gt;id,
                                "topic_id" =&gt; $topic_id,
                                "article_id" =&gt; $a-&gt;id,
                                "topic_name" =&gt; $topic_name,
                                "title" =&gt; $a-&gt;title,
                            );

                        $emailersched = ORM::factory('emailersched')-&gt;values($data)-&gt;save();

                        unset($m);

                 }

                $members-&gt;__destruct();

            //sleep(2);

            //$m = NULL;
            }

            $data = array('sent'=&gt; time());

            $query = DB::update('articles')
                    -&gt;set($data)
                    -&gt;where('id', '=', $articles-&gt;id)
                    -&gt;execute();

             // $articles-&gt;sent = time();
             // $articles-&gt;save();


            //}

         //echo "done";
            //$a = NULL;
            //$articles-&gt;__destruct();

            $articles = NULL;
            $topics = NULL;
            unset($articles);
            unset($topics);

            }

        gc_collect_cycles();
        //sleep(60);

    }
}
</code></pre>
]]></description>
   </item>
   <item>
      <title>htaccess doesn&#039;t rewrite index.php in Kohana</title>
      <link>http://forum.kohanaframework.org/discussion/10749/htaccess-doesn039t-rewrite-index-php-in-kohana</link>
      <pubDate>Sun, 13 May 2012 13:05:54 -0500</pubDate>
      <dc:creator>azazelo</dc:creator>
      <guid isPermaLink="false">10749@/discussions</guid>
      <description><![CDATA[<p>i made search of my problem in google and did not find any useful information.</p>

<p>So everything was ok before i removed the site to other host. this worked well</p>

<h1>Turn on URL rewriting</h1>

<p>RewriteEngine On</p>

<h1>Installation directory</h1>

<p>RewriteBase /</p>

<h1>Protect hidden files from being viewed</h1>

<p>
    Order Deny,Allow
    Deny From All
</p>

<h1>Protect application and system files from being viewed</h1>

<p>RewriteRule ^(?:application|modules|system)\b.* index.php/$0 [L]</p>

<h1>Allow any files or directories that exist to be displayed directly</h1>

<p>RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d</p>

<h1>Rewrite all other URLs to index.php/URL</h1>

<p>RewriteRule .* index.php/$0 [PT]</p>

<p>but when i removed the site to other host the index.php doesn't rewrite anymore.</p>

<p>apache version on the host is 2.2.22</p>

<p>when i write on browser</p>

<p><a href="http://verana.ge/index/page" target="_blank" rel="nofollow">http://verana.ge/index/page</a></p>

<p>it gives me 404 error</p>

<p>but on</p>

<p><a href="http://verana.ge/index.php/index/page/" target="_blank" rel="nofollow">http://verana.ge/index.php/index/page/</a></p>

<p>works well</p>

<p>bootstrap configuration is this :</p>

<pre><code> 'base_url'   =&gt; '/',
 'index_file' =&gt; FALSE,
</code></pre>

<p>i contacted to sys admin of my host and he gave me log file which says</p>

<p>/var/www/virtual/verana.ge/htdocs/.htaccess: RewriteLog not allowed here</p>

<p>on the same host i have wordpress site and its htaccess file lokes like this and works</p>

<h1>BEGIN WordPress</h1>

<p>
RewriteEngine On
RewriteBase /college/
RewriteRule ^index&#46;php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /college/index.php [L]
</p>

<h1>END WordPress</h1>

<p>rewrite log says</p>

<p>[verana.ge/sid#21cbdd98][rid#21e0ad78/initial] (3) [perdir /var/www/virtual/verana.ge/htdocs/] strip per-dir prefix: /var/www/virtual/verana.ge/htdocs/ -&gt;</p>

<p>can you tell me please where is and what is the problem</p>

<p>Thank you in advance</p>
]]></description>
   </item>
   <item>
      <title>Kohana ORM Access Information</title>
      <link>http://forum.kohanaframework.org/discussion/10746/kohana-orm-access-information</link>
      <pubDate>Sat, 12 May 2012 00:51:14 -0500</pubDate>
      <dc:creator>markerpower</dc:creator>
      <guid isPermaLink="false">10746@/discussions</guid>
      <description><![CDATA[<p>Tables:</p>

<pre><code>categories {category_id, category_title}
forums {forum_id, forum_title}
categories_forums {id_category, id_forum}
topics {topic_id, topic_title}
forums_topics{id_forum, id_topic}
posts {post_id, post title}
topics_posts {id_topic, id_post}
</code></pre>

<p>Models:</p>

<pre><code>class Model_Category extends ORM {

protected $_primary_key = 'category_id';

protected $_has_many = array(
    'forums'=&gt; array(
        'model' =&gt; 'forum',               
        'through' =&gt; 'categories_forums',   
        'far_key' =&gt; 'id_forum',     
        'foreign_key' =&gt; 'id_category'  
        ),
    );
}

class Model_Forum extends ORM {

protected $_primary_key = 'forum_id';

protected $_belongs_to = array(
    'categories'=&gt; array(
        'model' =&gt; 'category',                
        'through' =&gt; 'categories_forums',   
        'far_key' =&gt; 'id_category',       
        'foreign_key' =&gt; 'id_forum'   
        ),
    );

protected $_has_many = array(
    'topics'=&gt; array(
        'model' =&gt; 'topic',                
        'through' =&gt; 'forums_topics',    
        'far_key' =&gt; 'id_topic',       
        'foreign_key' =&gt; 'id_forum'   
        ),
    );
}

class Model_Topic extends ORM {

protected $_primary_key = 'topic_id';

protected $_belongs_to = array(
    'forums'=&gt; array(
        'model' =&gt; 'forum',                
        'through' =&gt; 'forums_topics',    
        'far_key' =&gt; 'id_forum',       
        'foreign_key' =&gt; 'id_topic'   
        ),
    );

protected $_has_many = array(
    'posts'=&gt; array(
        'model' =&gt; 'post',                
        'through' =&gt; 'topics_posts',    
        'far_key' =&gt; 'id_post',       
        'foreign_key' =&gt; 'id_topic'   
        ),
    );
}

class Model_Post extends ORM {

protected $_primary_key = 'post_id';

protected $_belongs_to = array(
    'topics'=&gt; array(
        'model' =&gt; 'topic',                
        'through' =&gt; 'topics_posts',    
        'far_key' =&gt; 'id_topic',       
        'foreign_key' =&gt; 'id_post'   
        ),
    );
}
</code></pre>

<p>So far I have the following:</p>

<pre><code>foreach ($categories as $category) :
echo $category-&gt;category_title;
foreach ($category-&gt;forums-&gt;find_all() as $forum) :
echo $forum-&gt;forum_title;
$num_topics = $forum-&gt;topics-&gt;count_all(); echo $num_topics;
$num_posts = $forum-&gt;topics-&gt;posts-&gt;count_all(); echo $num_posts;
endforeach;
endforeach;
</code></pre>

<p>The problem is echo $num_posts displays 0. I'm guessing I'm accessing posts wrong. How do I do it?</p>
]]></description>
   </item>
   <item>
      <title>cache or session in a serach form</title>
      <link>http://forum.kohanaframework.org/discussion/10756/cache-or-session-in-a-serach-form</link>
      <pubDate>Mon, 14 May 2012 21:54:27 -0500</pubDate>
      <dc:creator>ZHOUDELUN</dc:creator>
      <guid isPermaLink="false">10756@/discussions</guid>
      <description><![CDATA[<p>I'd like to cache my search conditions which collected from a post form.Just like age &gt;20 or gender is male. Then I can get the search right soon when I click next page if I use a pagination.   who can give me a demo? or some help . thinks very much.</p>
]]></description>
   </item>
   <item>
      <title>Is Kohana really up for it?</title>
      <link>http://forum.kohanaframework.org/discussion/10754/is-kohana-really-up-for-it</link>
      <pubDate>Mon, 14 May 2012 08:41:28 -0500</pubDate>
      <dc:creator>drgomesp</dc:creator>
      <guid isPermaLink="false">10754@/discussions</guid>
      <description><![CDATA[<p>First of all, I don't want to start here one of those lame discussions about framework comparisons, or start any kind of revolution.</p>

<p>What I'm interested in is to point some of the good and bad points about Kohana that makes me - and other developers - to choose it aside from another another frameworks.</p>

<p>One of the major things that makes me happy about developing with Kohana is the speed - and by that I mean development speed. Kohana is, in my opinion, the framework that most speeds up the development process, in comparison to some of the major frameworks out there.</p>

<p>Another great thing about Kohana - again, in my opinion - is the reduced learning curve. It's just simple to develop with Kohana.</p>

<p>But there is a point the is making me rethink the use of Kohana for newer projects, and that is <strong>coupling</strong>.</p>

<p>Kohana, being a full-stack framework, is fast and self-sufficient. But as any other full-stack frameworks, it makes you - in some sense - couple your project's code to it.</p>

<p>Think about a project built with Kohana that needs to change the core framework because of whatever reasons - and, in my experience, that is a common thing to happen. That is pretty close to becoming a huge problem that we usually call <strong>rework</strong>.</p>

<p>When we develop, for instance, with Symfony 2 components as minor frameworks to solve minor problems, we tend to think more about decoupling.</p>

<p>I don't know if you guys agree on that point, and Symfony 2 is just an example - not a good or bad one.</p>

<p>I know that we can always write our code in a sense that cares for decoupling - in fact, there are some design patterns for that, such as decorator and adapter.</p>

<p>The question is: is Kohana - by Kohana I mean the whole community, including me - going to start worrying about that or that's just a consequence of being a full-stack solution?</p>

<p>Again I ask: please don't flame on this topic. Let's have a nice and calm conversation.</p>
]]></description>
   </item>
   <item>
      <title>Local cache problem Kohana 3.2?</title>
      <link>http://forum.kohanaframework.org/discussion/10736/local-cache-problem-kohana-3-2</link>
      <pubDate>Wed, 09 May 2012 06:29:27 -0500</pubDate>
      <dc:creator>pt0</dc:creator>
      <guid isPermaLink="false">10736@/discussions</guid>
      <description><![CDATA[<p>First of all, I am not sure how to name it, the thing I encountered. Cache module was not activated (if it would have any to do with it).</p>

<p>I updated one function in model. When I rendered it, got the bug that the var has not been passed  from controller to a view. So I spent like 2 days trying to find what is the problem. Everything was fine I wanted to give up... but... 
I updated the view file with new name, changed the code (factory view) in controller and bootstrap and it worked! I switched back again to the old name convention of the view (updated bootstrap and controller) and it was working like nothing has been changed.... I am now confused.</p>

<p>What could be the reason?</p>
]]></description>
   </item>
   <item>
      <title>Модуль Sidebar</title>
      <link>http://forum.kohanaframework.org/discussion/10752/modul-sidebar</link>
      <pubDate>Mon, 14 May 2012 03:02:04 -0500</pubDate>
      <dc:creator>ButscH</dc:creator>
      <guid isPermaLink="false">10752@/discussions</guid>
      <description><![CDATA[<p>Всем привет.</p>

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

<p><a rel="nofollow" href="http://clip2net.com/s/1UR4T"><img src="http://clip2net.com/clip/m11450/1336982319-clip-28kb.jpg" alt="1336982319-clip-28kb" /></a></p>

<p>Если кому нибудь будет нужен, то вот:
<a href="https://github.com/butschster/Kohana-sidebar" target="_blank" rel="nofollow">https://github.com/butschster/Kohana-sidebar</a></p>

<h2>Пример использования</h2>

<h3>controller</h3>

<h4>action ....:</h4>

<pre><code>$this-&gt;sidebar = array(
    array(
        'type' =&gt; Sidebar::DATERANGE,
        'label' =&gt; __('Date'),
        'data' =&gt; array(
            array(
                'value' =&gt; $date['from'],
                'label' =&gt; __('From'),
            ),
            array(
                'value' =&gt; $date['to'],
                'label' =&gt; __('To'),
            )
        )
    ),
    array( 
        'type' =&gt; Sidebar::DATERANGE, // Date range with time
        'label' =&gt; 'Дата',
        'data' =&gt; array(
            array(
                array(
                    'value' =&gt; $date_range[0],
                    'label' =&gt; __('From'),
                ),
                array(
                    'value' =&gt; $time_range[0],
                    'name' =&gt; 'time_from'
                )
            ),
            array(
                array(
                    'value' =&gt; $date_range[1],
                    'label' =&gt; __('To'),
                ),
                array(
                    'value' =&gt; $time_range[1],
                    'name' =&gt; 'time_to'
                )
            )
        )
    ),      
    new Sidebar_Fields_Separator(__('Payments')),
    array(
        'type' =&gt; Sidebar::CHECKBOX,
        'value' =&gt; 1,
        'name' =&gt; 'only_error',
        'label' =&gt; __('Only with errros'),
        'checked' =&gt; $only_error == 1
    ),
    new Sidebar_Fields_Separator,
    array(
        'type' =&gt; Sidebar::SELECT,
        'name' =&gt; 'pids[]',
        'options' =&gt; $providers,
        'selected' =&gt; $pids,
        'size' =&gt; Sidebar_Fields_Select::AUTO_SIZE, // размер списка равен кол-ву элементов
        'label' =&gt; __('Providers'),
    ),
    new Sidebar_Fields_Separator(__('Search')),
    array(
        'type' =&gt; Sidebar::INPUT,
        'label' =&gt; __('Receipt number'),
        'name' =&gt; 'receipt',
        'value' =&gt; $receipt,
        'id' =&gt; 'test'
    ),
);
</code></pre>

<h4>action after:</h4>

<pre><code>if($this-&gt;sidebar !== NULL)
{
    $sidebar = new Sidebar($this-&gt;sidebar);
    $this-&gt;sidebar = $sidebar-&gt;render($this-&gt;respath);

    $styles[] = 'resources/css/sidebar.css';
}
</code></pre>
]]></description>
   </item>
   <item>
      <title>Пару вопросов по исключениям и порядку выполнения</title>
      <link>http://forum.kohanaframework.org/discussion/10751/paru-voprosov-po-isklyucheniyam-i-poryadku-vypolneniya</link>
      <pubDate>Sun, 13 May 2012 15:25:11 -0500</pubDate>
      <dc:creator>rockwill</dc:creator>
      <guid isPermaLink="false">10751@/discussions</guid>
      <description><![CDATA[<p>Привет, дружное русскоязычное сообщество:)</p>

<p>В общем, есть пару вопросов к знатокам. Если все расписывать очень долго, приведите плз хотя бы ссылку на статью/мануал.</p>

<ol>
<li><p>В общем, допустим, я хочу проверить что элемент с каким-то ID существует, принадлежит текущему пользователю и т.д. и в случае, если это не так, я хочу это обработать. Валидация в этом случае не самый удобный вариант, так как эти проверки не являются пользовательским вводом, как правило. Чутье мне подсказывет, что нужно в случае неудачи бросать исключение. Как такое реализовать в Kohana, чтобы, скажем, выводить user-friendly предупреждения?</p></li>
<li><p>Каков порядок формирования и вывода страницы в Kohana ? Все скрипты js я подключаю в одном месте (за тегом ) и мне бывает нужно "в самый последний момент" подключить еще скрипты. Но сделать не получается, так как в контроллере все виды уже сформированы и привязаны. Как быть? :)</p></li>
</ol>

<p>п.с.
может какого-то бреда написал. Надеюсь, все все поняли :)</p>
]]></description>
   </item>
   <item>
      <title>Изменение конфига через скрипт</title>
      <link>http://forum.kohanaframework.org/discussion/10750/%D0%98zmenenie-konfiga-cherez-skript</link>
      <pubDate>Sun, 13 May 2012 14:49:29 -0500</pubDate>
      <dc:creator>b52keks</dc:creator>
      <guid isPermaLink="false">10750@/discussions</guid>
      <description><![CDATA[<p>Подскажите возможно ли через скрипт изменять параметры конфига?</p>
]]></description>
   </item>
   <item>
      <title>Хранение констант</title>
      <link>http://forum.kohanaframework.org/discussion/10734/hranenie-konstant</link>
      <pubDate>Wed, 09 May 2012 03:28:21 -0500</pubDate>
      <dc:creator>userfor</dc:creator>
      <guid isPermaLink="false">10734@/discussions</guid>
      <description><![CDATA[<p>Начал только изучать Kohana. 
Раньше на самописной cms для путей к некоторым директориям, которые меняются редко, прописывал в файле конфигурации константы, например,
 define(PATH_TO_IMG = 'images');</p>

<p>Посоветуйте где лучше хранить константы в kohana?</p>

<p>В bootstrap нельзя, а в index (точка входа) не дело.</p>
]]></description>
   </item>
   <item>
      <title>Мультиязычность и смена дизайна в Kohana</title>
      <link>http://forum.kohanaframework.org/discussion/10748/multiyazychnost-i-smena-dizayna-v-kohana</link>
      <pubDate>Sun, 13 May 2012 03:33:33 -0500</pubDate>
      <dc:creator>byvlad</dc:creator>
      <guid isPermaLink="false">10748@/discussions</guid>
      <description><![CDATA[<p>Добрый день!
Хочу сделать мультиязычность на основе данных браузера, т.е.:
определяем язык браузера, проверяем есть ли такой язык в системе, если нету задаем en-us, далее записываем его в cookie и больше туда не соваемся, далее смена дизайна:
точно так же, определяем что это за устройство, если iphone etc. - touch, mac win - default, nokia - mobile и записываем его в cookie, и больше никогда не трогаем.
Мультиязычность на основе i18n (&lt;?=__('Hello!')?&gt;), помогите реализовать, код я уже написал, подскажите куда вставить.</p>
]]></description>
   </item>
   <item>
      <title>What unittest combinations are you using.</title>
      <link>http://forum.kohanaframework.org/discussion/10747/what-unittest-combinations-are-you-using-</link>
      <pubDate>Sat, 12 May 2012 17:54:49 -0500</pubDate>
      <dc:creator>rjd22</dc:creator>
      <guid isPermaLink="false">10747@/discussions</guid>
      <description><![CDATA[<p>This question has been bothering me for some time now and after reading the following thread I think more people are interested in discussing this.: <a href="http://forum.kohanaframework.org/discussion/10738/looking-for-a-orm-alternative-big-data-site-and-api#Item_3" target="_blank" rel="nofollow">http://forum.kohanaframework.org/discussion/10738/looking-for-a-orm-alternative-big-data-site-and-api#Item_3</a></p>

<p>We have:</p>

<ul>
<li>Behat: Outside in BDD</li>
<li>PHPspec: Inside out BDD</li>
<li>PHPunit: TDD</li>
</ul>

<p>What kind of combinations are you using for unittesting your application? Do you use one or multiple. And if you use multiple what to you test and how do you test it? I would love to see some examples on how you test models, controllers, view-models and libraries.</p>
]]></description>
   </item>
   <item>
      <title>Проблема с массивом в шаблоне</title>
      <link>http://forum.kohanaframework.org/discussion/10735/problema-s-massivom-v-shablone</link>
      <pubDate>Wed, 09 May 2012 03:29:04 -0500</pubDate>
      <dc:creator>byvlad</dc:creator>
      <guid isPermaLink="false">10735@/discussions</guid>
      <description><![CDATA[<p>Вообщем такая проблема, так передаю данные в вывод:
$content = View::factory('/gb/index')
                    -&gt;bind('records', $records)
                    -&gt;bind('records_total', $total);</p>

<p>$records = Model::factory('Guestbook')-&gt;get_records();
$total = Model::factory('Guestbook')-&gt;get_records_total();</p>

<p>$this-&gt;response-&gt;body($content);</p>

<p>В самом шаблоне var_dump($records); - работает нормально.
Пишу: &lt;?php foreach($records AS $row) : ?&gt;
и дебаггер отвечает - Undefined variable: records</p>

<p>Для наглядности снял видео - http://d.pr/v/i1BY</p>

<p>Кстати если передать через bind_global, то работает.
Через set так же не работает.</p>
]]></description>
   </item>
   <item>
      <title>FacebookAuth module for Kohana 3.2</title>
      <link>http://forum.kohanaframework.org/discussion/10642/facebookauth-module-for-kohana-3-2</link>
      <pubDate>Tue, 10 Apr 2012 11:18:15 -0500</pubDate>
      <dc:creator>mobal</dc:creator>
      <guid isPermaLink="false">10642@/discussions</guid>
      <description><![CDATA[<p>Hi!</p>

<p>I just updated my (first) module for Kohana 3.2, called "FacebookAuth". If u want to implement facebook login, use it!</p>

<p>Link: <a href="https://github.com/mobal/kohana-facebookauth-module" target="_blank" rel="nofollow">https://github.com/mobal/kohana-facebookauth-module</a></p>

<p>Modified facebook.php (Facebook SDK), now using Kohana's Session manager!</p>

<p>Waiting for feedback! Bugreport, ideas etc.</p>

<p>Thanks!</p>

<p>mobal,</p>
]]></description>
   </item>
   <item>
      <title>Query Building: On In</title>
      <link>http://forum.kohanaframework.org/discussion/10733/query-building-on-in</link>
      <pubDate>Wed, 09 May 2012 03:25:29 -0500</pubDate>
      <dc:creator>rickyk586</dc:creator>
      <guid isPermaLink="false">10733@/discussions</guid>
      <description><![CDATA[<p>How can I do this:</p>

<p>$query
  -&gt;join('table')
    -&gt;on('name', 'IN', array('foo', 'bar'))</p>

<p>It create this query:
JOIN <code>table</code> ON (<code>name</code> IN <code>foo</code> AS <code>bar</code>)</p>

<p>But I want:
JOIN <code>table</code> ON (<code>name</code> IN ('foo', 'bar'))</p>

<p>Using an array for a WHERE IN clause works, but for a JOIN ON, it does not.</p>
]]></description>
   </item>
   <item>
      <title>Looking for a ORM alternative (big data site and api)</title>
      <link>http://forum.kohanaframework.org/discussion/10738/looking-for-a-orm-alternative-big-data-site-and-api</link>
      <pubDate>Wed, 09 May 2012 14:45:46 -0500</pubDate>
      <dc:creator>ricardovf</dc:creator>
      <guid isPermaLink="false">10738@/discussions</guid>
      <description><![CDATA[<p>Hi folks! Me and my company uses Kohana for the foundation of our software for almost two years now. I really like kohana and we added some nice things to it.</p>

<p>We are finishing a Portal that let the user explore the Educational results of 10 millions of students here in Brasil. Its really works fast, but now we started to benchmark it cause we are developing an API and a tool that deals with a lot of data together.</p>

<p>I know ORM is not recommend for this kind of thing, so i would like to hear some suggestions and this can maybe be an opportunity to rethink how Kohana Database and ORM works, as this is core to any Framework.</p>

<p>The API was really taking a long time when returning 5000 thousands results, so i started to investigate and found that the problem is the __construct and __set methods of ORM are really doing heavy stuff.</p>

<p>So ORM is great for bootstrap, but it really does not handle a lot of cases. So what are you guys using? I never used Doctrine, but it seems to do the work.</p>

<p>On ORM, if you can implement a Identity Map (<a href="http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/working-with-objects.html#entities-and-the-identity-map" target="_blank" rel="nofollow">http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/working-with-objects.html#entities-and-the-identity-map</a>) feature i guess it would bring a lot of benefit and maybe we could get rid of the ORM-&gt;with calls. What do you think?</p>

<pre><code>  Kohana::$profiling &amp;&amp; ($benchmark = Profiler::start('ORM', 'Model_City')); // Be sure to only profile if it's enabled
  $slows = array();
  for($ii = 0; $ii &lt; 5000; $ii++) {
    //$fuck[] = new Model_Entity_City();
    $slow = new Model_Entity_City();

    $slow-&gt;id = $ii;
    $slow-&gt;name = $ii;
    $slow-&gt;lat = $ii;
    $slow-&gt;lon = $ii;

    $slows[] = $slow;
  }

  isset($benchmark) &amp;&amp; Profiler::stop($benchmark); // Stop the benchmark

  Kohana::$profiling &amp;&amp; ($benchmark = Profiler::start('ORM', 'stdClass')); // Be sure to only profile if it's enabled
  $slows = array();
  for($ii = 0; $ii &lt; 5000; $ii++) {
    //$fuck[] = new Model_Entity_City();
    $slow = new stdClass();

    $slow-&gt;id = $ii;
    $slow-&gt;name = $ii;
    $slow-&gt;lat = $ii;
    $slow-&gt;lon = $ii;

    $slows[] = $slow;
  }

  isset($benchmark) &amp;&amp; Profiler::stop($benchmark); // Stop the benchmark
</code></pre>

<p>The results are below: http://postimage.org/image/4a1r60her</p>
]]></description>
   </item>
   <item>
      <title>Auth User Agent, Auth Expires</title>
      <link>http://forum.kohanaframework.org/discussion/10745/auth-user-agent-auth-expires</link>
      <pubDate>Fri, 11 May 2012 14:54:59 -0500</pubDate>
      <dc:creator>ricardovf</dc:creator>
      <guid isPermaLink="false">10745@/discussions</guid>
      <description><![CDATA[<p>Hi again!</p>

<p>I wanna share 2 points that i found when using Kohana ORM Auth in a project:</p>

<p>First is User Agent on Auth (ORM): The ORM Auth uses this <code>$token-&gt;user_agent === sha1(Request::$user_agent)</code> to check if the token is valid. This is not good cause if the browser gets updated or the SO receives a patch the token will be considered invalid and the user will not be auto logged in. So i changed it to:</p>

<p><code>$token-&gt;user_agent === sha1( implode(',', Request::user_agent(array('browser', 'platform'))) )</code></p>

<p>So insted of <code>Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_6) AppleWebKit/536.10 (KHTML, like Gecko) Chrome/20.0.1123.4 Safari/536.10</code> it sets the sha1 hash with <code>Chrome,Mac OS X</code></p>

<p>And of course i changed the <code>_login</code> method where the token is created when the <code>$remmeber</code> option is true.</p>

<p>The next thing is on the <code>auto_login</code> method. Every time <code>auto_login</code> is called it should update the <code>expires</code> property of the token and the cookie. It could also regenerate a new token and cookie for more securety, but i dont think its needed. Here is the result on the <code>auto_login</code> method:</p>

<p>`          // We need to increment the lifetime of the token. (If we want more secure stuff we could generate a new token to replace this.)
          $token-&gt;expires = time() + $this-&gt;_config['lifetime'];</p>

<pre><code>      $token-&gt;save();

      // Set the new token expires on the cookie too
      Cookie::set('authautologin', $token-&gt;token, $this-&gt;_config['lifetime']);

      // Complete the login with the found data
      $this-&gt;complete_login($token-&gt;user);`
</code></pre>

<p>Oh, i did not open a ticket/pull_request cause i did not receive a confirmation email from redmine. The user is ricardovf.</p>

<p>Would be nice if you can put this on 3.3</p>
]]></description>
   </item>
   <item>
      <title>WAMP/XAMP reccomendations</title>
      <link>http://forum.kohanaframework.org/discussion/10628/wampxamp-reccomendations</link>
      <pubDate>Thu, 05 Apr 2012 17:43:42 -0500</pubDate>
      <dc:creator>Dave Stewart</dc:creator>
      <guid isPermaLink="false">10628@/discussions</guid>
      <description><![CDATA[<p>Hey folks,</p>

<p>I've been out of backend / Kohana development for a while, but it looks like I'm going to be back into it for the next 6 months or so. Also, it's time for a system reinstall, so I'm looking to reinstall back-end systems afresh, and wondered if anyone has a setup they use that they would recommend.</p>

<p>Ideally, I'm looking for the following:</p>

<ul>
<li>Windows, Apache, MySQL, PHP</li>
<li>PHP 4.49 and 5.3, with the correct switching to SQL version when switching PHP version</li>
<li>Some kind of control panel to manage all this (WAMP/XAMP/other)</li>
<li>Some kind of control panel support for virtual hosts (I can't be bothered to set up hosts, vhosts.conf and folders each time I want to create a virtual host)</li>
<li>A local mail server that actually works (I never did manage to get Mercury up and running with WAMP)</li>
</ul>

<p>I find the whole setup-side of backend pretty dry, and ideally would like as much of this taken care of by a package if possible, but am happy to get my hands dirty to connect some of the dots if needs be.</p>

<p>Cheers,
Dave</p>
]]></description>
   </item>
   </channel>
</rss>
