The following query returns one row as expected when run from phpmyadmin.
SELECT units . * , locations . *
FROM units, locations
WHERE units.id = '1'
AND units.location_id = locations.id
LIMIT 0 , 30
But when I try to do it in Kohana 3:
$unit = DB::select('units.*', 'locations.*')
->from('units', 'locations')
->where('units.id', '...
currently I have this setup in our simple-hosts.conf:
url.rewrite-once = (
".*.(js|ico|gif|jpg|png|css|php|htm)(?.*)?$" => "$0",
"/slapi" => "/slapi/index.php"
)
Works great, except the above fails when I have a dot in the query string:
?url=http://google.com
My regexpy is not 1337
...
I'm learning framework KohanaPhp 3 and I have a problem with adding a module called kolanos-Kohana-captcha.
What I've done so far is:
I copied the directory kolanos-kohana-captcha into modules directory
Copied kolanos-kohana-captcha/config/captcha.php to file application/config/captcha.php
Edited the file and added Bootstrap.php
...
Im searching open source CMS based on kohana.
I want to see ideas used in admin section and all idea for cms.
Please show me smth.
...
Hi guys!
I have a month of free time and I've decided to launch my own website. It's going to be big and have dymanic content where different users with different roles can perform modifications to the site. Place comments, rate stores, list items, etc.
This sound like a perfect opportunity for me to expand my horizons and learn a PHP ...
Hello, I've recently chose Kohana for a new project I'm doing
And quite frankly, it's going a bit slow due to lack of resources.
I've stumbled again and again on problems that I can't find a solution to
Examples are probably the hardest to come by, so I'm considering
Switching, especially because I'm only starting and I am still able...
I try to get into mysite/user so that application/classes/controller/user.php should be working, now this is my file tree:
code of controller/user.php:
<?php defined('SYSPATH') OR die('No direct access allowed.');
class Controller_User extends Controller_Default
{
public $template = 'user';
function action_index()
{
//$v...
I am building a staff area for a website, which is completely different to the main brochure style site.
I have 2 Kohana systems setup. I realise they can both share the same system and modules folder.
Now, with the second one, I want to make the main template view a view in a different folder.
I tried this in my base controller
$thi...
Hi
I'm running a Kohana setup on my local apache server. I've created a 'htdocs' folder which houses the index.php file in the kohana directory. So that the system files are not available to visitors. Now I wan't to remove index.php from the URL everytime I visit another controller, so I've tried fooling around with the .htaccess provid...
Hi all, I need to able to access controller methods from a model using the Kohana V2.3 framework. At the moment I'm passing the controller object (by ref.) to the model on creation which works perfectly fine but I can't help think there is a more "cleaner" way - does anybody have any suggestions? Would Kohana V3 resolve this with its HMV...
I am trying to retrieve the XML data for Google Calendar. Authentication and retrieval all works. However, when I retrieve the events, gd: data isn't included as the protocol reference documents it would be (http://code.google.com/apis/calendar/data/2.0/developers_guide_protocol.html#RetrievingWithoutQuery)
Some error messages I'm runni...
I've got a site built on top of Kohana 2.3 which I now have to make all links https.
I set this in application/config/config.php.
$config['site_protocol'] = 'https';
This makes all links on the site use the https protocol.
Except, when I first enter the site via http, it will not automatically forward to https.
Is there a way to ma...
So, I think i understand the cascading filesystem in it's basic terms, but I can't seem to wrap my head around the 'H'ierachy structure of the MVC. Could anyone tell me the advantages of using HMVC over MVC and it's basic intended functionality?
Thanks for your time!
...
.I'm trying to set up a multi language website with kohana v3, following this tutorial: http://kerkness.ca/wiki/doku.php?id=example_of_a_multi-language_website
Routing to a controller or action within i.e. website/controller/action seems to work as the url is properly redirected to website/lang/controller/action.
However this is not w...
I'm completely new to this framework and I'm trying to find some sample CRUD application to get started with Kohana 3.
There is a tutorial and information in the unofficial Kohana 3 Wiki (http://kerkness.ca/wiki/doku.php), but event there, there are some aspects that are not covered (the model, validation, etc).
...
I'm trying to run a query through the ORM like this:
SELECT * from table where (fname like 'string%' or lname like 'string%')
AND (fname like 'string2%' or lname like 'string2%');
Here's what i have so far:
$results = ORM::factory('profiles');
foreach ($strings as $string) {
$result->where('fname', 'like', "$string%");
$r...
We're developing a software that will manage users and I need to build an application with Kohana 3 and Auth Module. My application will allow just login. I don't need to append a salt to the passwords when user log in. How could i do that?
Thank you.
EDIT:
I know, its wrong but I changed the core. Now I encrypt password without the sa...
I have a website on Kohana and I'm planning to have it multi-language.
Now I know the way with i18n folder and inside each language folder
there's some sort of strings.php file..
But I want a dynamic way (on DB) so I could change the values whenever I want
through the website.
Is there any common table schema that is usually used f...
I have a table of Hits, Articles and Categories
Now, a Hit belongs_to an Article/Category (depends on where it was done).
so I have a column on Hits table with the name 'parenttype'
That tells me 'Article' or 'Category'.
I wrote in the Hit model (extends ORM)
protected $_belongs_to= array(
'page' => array('model'=> $this->parent...
Hi!
New to Kohana... I was wondering if it's possible to use regex for setting up a route that handles all requests except for one, 'main_page' for example?
Thanks for your time
...