Love Fuel?
Donate
About
Forums
Discussions
Login
FuelPHP Forums
Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
WanWizard
a.k.a. WanWizard
Discussions
4
Comments
8243
Activity
I can not load the font
Fuel doesn't do anything with css, that's between your browser and the webserver. What is possible is that a rewrite rule in your .htaccess is not correct, and rewrites the request for the font file.
Comment by
WanWizard
December 2012
permalink
I can not load the font
Then maybe your css is somewhere else? Either use a full path, or the correct relative path. I don't know what the correct path is in your application.
Comment by
WanWizard
December 2012
permalink
I can not load the font
If you use relative paths in url(), the path is relative to the location of the css file you define it in. So assuming your css file in in assets/css, it should be src: url('../fonts/swz721n-webfont.eot');
Comment by
WanWizard
December 2012
permalink
Relation many to many filter WHERE IN
Use the chaining method, like you do for the remainder of the query. Start your code with: $query = $this->getOrmFrock()->query();then when you need to add something: if ( ! empty($something)) $query->where('field', 'IN'…
Comment by
WanWizard
December 2012
permalink
Relation many to many filter WHERE IN
I'm not sure the options array notation of query() supports WHERE IN. Might that be the issue?
Comment by
WanWizard
December 2012
permalink
Checkbox from Model
Form::checkbox() only creates a single checkbox, so the options thing does not apply. There's nothing difficult about it, use echo Form::checkbox('gender', 'Male', true);or echo Form::checkbox('gender', 'Male…
Comment by
WanWizard
December 2012
permalink
ORM support for databases which do not allow the LIMIT clause
You can already have a look: http://github.com/FrenkyNet/Cabinet.
Comment by
WanWizard
December 2012
permalink
Using layouts/Themes
template.php (assuming it's a view) will just be loaded. If a view is loading within a module context (i.e. the module controller is loaded by a Request) it will be loaded from the modules' views folder. And if not exist, the app and pac…
Comment by
WanWizard
December 2012
permalink
ORM support for databases which do not allow the LIMIT clause
Yes, that is on the roadmap when we switch from the old Kohana QB to our new QB (which is fully platform independent). You wouldn't want to remove the limit() functionality, as that will also remove it from SELECT statements and will render th…
Comment by
WanWizard
December 2012
permalink
Missing Arguments Controller Function Errors
public function action_getname($name = null) { if ($name === null) { // display your error message here and redirect somewhere.. } } You can also define a route for it, so if the URI doesn't match the route, the request wil…
Comment by
WanWizard
December 2012
permalink
Syntax error - "UPDATE users SET UserFirstName = WHERE UserId = " (ORM, SQL Anywhere)
Every RDBMS has it's own way of escaping en quoting strings in the SQL. For platform specific drivers, it's simple, as we could hardcode it. So for MySQL, a double quote is used for quoting, and a backtick for escaping. With PDO, that…
Comment by
WanWizard
December 2012
permalink
Checkbox from Model
Assuming you use a Fieldset, you add the checkbox values in the 'options' array of the field, as key-value pairs ( like array('1' => 'option 1', '2' => 'option 2') ). It will be posted as an ar…
Comment by
WanWizard
December 2012
permalink
Modules usage..
Classes go into the 'classes' folder, following the "cascading file system". A location of a file is determined as follows: - take the namespace and the classname, and concatenate them using a slash as separator - replace all sl…
Comment by
WanWizard
December 2012
permalink
Using layouts/Themes
There are two ways of dealing with the presentation layer, depending on the complexity you need. For normal template based layout, have your controller extend Controller_Template, and define the page template to load in the controller property. Thi…
Comment by
WanWizard
December 2012
permalink
Issues with expected Fuel\Core\Date parameter inside Typing observer
All date/time field types use the Date class, either as source or as destination. So if you define a field as "time_unix", it expects a Date object passed, which it will convert to a unix timestamp. As these fields are filled in by creat…
Comment by
WanWizard
December 2012
permalink
Config class Database Interface
The core functionality includes driver support for file based configuration storage, either in PHP array, INI, Yaml or json format. As it is driver based, it's not a problem to create a class called Config_Db, so you can do \Config::load('…
Comment by
WanWizard
December 2012
permalink
Pagination sample ?
I already posted that on December 7th. If you use the static interface, use echo \Pagination::create_links(); in your view. If you use an instance, like in the example above, you have to pass that instance to your view (disable encoding when you …
Comment by
WanWizard
December 2012
permalink
oil create on Windows
It creates the entire folder structure, with app, core and packages. Identical to the structure in the zip file, the only difference is that it will be a git repo clone, which allows you to update easier.
Comment by
WanWizard
December 2012
permalink
Database results are read-only
By default DB queries return their results in the drivers native format, for performance reasons. For example, in case of MySQL, MySQL_Result objects are returned. These objects are provided by the PHP driver, and are readonly. In FuelPHP, for se…
Comment by
WanWizard
December 2012
permalink
oil create on Windows
It runs a "git clone" in the background, which afiak doesn't work on Windows because there's no git binary available. Either install a git GUI that supports cloning and submodules, or download the zip from the website and instal…
Comment by
WanWizard
December 2012
permalink
Issues with expected Fuel\Core\Date parameter inside Typing observer
The typing observer expects a Date object as the source, not a string or anything else. I've written a Observer_Date for this purpose, in the properties of the observer definition I define the model properties that should be observed, and the …
Comment by
WanWizard
December 2012
permalink
Getting a primary key error trying to create a Model
You can try to replace the error message with throw new \FuelException('Primary key on model '.get_class().' cannot be changed.'); so you can see which on which model the key is reset.
Comment by
WanWizard
December 2012
permalink
Getting a primary key error trying to create a Model
It must be there somewhere, as it is an error you only get if a FK in a relation definition is a PK in the model it points to. Remove all relations, and see if the issue is gone. If so, add the relations one at the time until the problem appears ag…
Comment by
WanWizard
December 2012
permalink
Getting a primary key error trying to create a Model
Because the error isn't thrown on the save of the record, but on the processing of the related objects. Your Model_Profile has a belongs_to to Model_User, which doesn't seem correct. If the FK of that relation is in Model_Profile, it sho…
Comment by
WanWizard
December 2012
permalink
Session flash variable is not 'deleted'
Session data is processed in the shutdown event, and the end of the request, and after output has been send to the client. When you set a flash variable, it is in a 'new' state. It is marked as old when the session loads, and removed whi…
Comment by
WanWizard
December 2012
permalink
More Comments
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Apply for Membership
About
Username
WanWizard
Joined
January 2011
Visits
2,395
Last Active
July 6
Roles
Administrator