$text = 'standard';
if(valid::standard_text($text) == true){
echo "Valid standard text";
}else{
echo "Invalid standard text";
}
It is pretty strange the above should return "Valid standard text", though it is returning the opposite - though on the clients server it works fine.
I am kinda leaning towards ...
I'm using Kohana validation library and I want to set up my own user friendly error messages. The problem is that I generate the form dynamically, so field names are not know during development.
Can a set up error messages for the different validation rules (required, digit, ...) regardless the field name? How?
Note: I'm using Kohana v...
I'm using Kohana 3 and it's template controller. My main site template controller currently looks something like this:
<?php defined('SYSPATH') or die('No direct script access.');
abstract class Controller_SiteTemplate extends Controller_Template
{
public function before()
{
parent::before();
// Initialize defa...
Hello Guys. I'm investigating using Kohana for my next project. The site will consist of user registration (and hence user profiles) where users will have certain privileges. The site will also have an admin section where administrators can go to say block a user or delete a post or look at usage statistics for example. A good comparison...
Hi Guys,
could you help me with following questions.
How do i get the:
absolute/relative current url
http://www.example.com/subdir/controller/action
/subdir/controller/action
absolute/relative application url
http://www.example.com/subdir/
/subdir/
I could of course use native php to get it but i think i should rather use ko3 f...
Hi, I was using KohanaPHP ORM but I can't use it with my database table structure. So, I need a framework or library ORM to use with it.
With Kohana I need to follow a naming convention. I can't use a field name (foreign key) like 'idUnidadeMedida'.
Are there any suggestions?
Thank you.
...
Based on this documentation, I've implemented a catch all route which routes to an error page.
Here is the last route in my bootstrap.php
Route::set('default', '<path>', array('path' => '.+'))
->defaults(array(
'controller' => 'errors',
'action' => '404',
));
However I keep getting this exception thrown wh...
Hi all,
I'm working on a website which takes payment from a customer. I'm using Kohana 2.3.4 and have created a library to handle the payment gateway I use (www.eway.com.au). Basically I'm just using their sample code, copied into it's own class.
Anyway, the code works fine and I can make payments, etc. The issue I have is when the pay...
I'm using Kohana 3 to create a website that has two applications, an admin application and the actual site frontend. I have separated my folders to have the two applications separated, so the hierarchy looks as follows:
/applications
/admin
/classes
/controller
/...
/site
/classes
/control...
I'm trying to write a very simple cms (for learning purposes) in kohana 3 web framework.
I have my db schemas and i want to map it to ORM but i have problems with relations.
Schemas:articles and categories
One article has one category. One category might has many articles of course.
I think it is has_one relationship in article table....
I'm attempting to use a Model but I get a fatal error so I assume it doesn't autoload properly.
ErrorException [ Fatal Error ]: Class
'Properties_Model' not found
The offending controller line:
$properties = new Properties_Model;
The model:
class Properties_Model extends Model
{
public function __construct()
{
...
Hi all
I read http://forum.kohanaframework.org/comments.php?DiscussionID=5744&page=1#Item_0
and I want to use similar solution, but with db.
In my site controller after():
$theme = $page->get_theme_name(); //Orange
Kohana::set_module_path('themes', Kohana::get_module_path('themes').'/'.$theme);
$this->template = View::factory('lay...
Hi all,
I just started with the version 3 of the Kohana Framework.
I have worked a little with the $_has_many etc.
Now I have the table pages. The primary key is pageID. The table has a column called parentPageID. Now I want to make a ORM model who, when accesed like this $page->parent->find() returns the page identified by parentPageI...
I am trying to use ORM to access data stored, in three mysql tables 'users', 'items', and a pivot table for the many-many relationship: 'user_item'
I followed the guidance from http://stackoverflow.com/questions/1946357/kohana-3-orm-read-additional-columns-in-pivot-tables
and tried
$user = ORM::factory('user',1);
$user->items-...
I've got a page on a webapp that has about 13 images that are generated by my application, which is written in the Kohana PHP framework. The images are actually graphs. They are cached so they are only generated once, but the first time the user visits the page, and the images all have to be generated, about half of the images don't load...
Hey there,
I am having an issue with the Kohana 3 Auth module.
Both the Auth and ORM modules are enabled in the bootstrap.php , the sql tables are installed and the DB connection is fine. I have put in application/config/database.php and sessions.php as well as auth.php.
When I try to create new users doing this -
$user = ORM::fac...
Hello
I have installed Kohana in kohana directory in my xampp public folder.
When I try
url::base();
I've got only /kohana/, but I want to http://localhost/kohana/
Any chance for get this by Kohana, or I must standard PHP?
Regards
...
I need to setup a Kohana dev environment that allows me to make full use of shared module / system classes across separate applications. Each application typically belonging to a different client. I use Git for source control, but am struggling to come up with a clean deployment method that will allow me to pull only those parts of the d...
I have log in functionality that will check for a session, if it not there the user will be redirected via Request::instance()->redirect('managers/error/1');
In the error action in the managers controller I can't get the value 1 which represents a specific error msg.
How can I capture the value "1" from the url, I'm only using standard ...
I have a form with over 50 input fields. The input fields are divided into 5 jquery jabs within the form container. Here's a sample of what it looks like:
<form action="admin/save" method="post" enctype="multipart/form-data">
<input type="hidden" name="type" value="department" />
<input type="hidden" name="id" value="21" />
...