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
$page and $current_page in Pagination
It still does that, have you set the uri_segment correctly? It defaults to 3, which is a URI like "/controller/method/".
Comment by
WanWizard
November 2012
permalink
MSSQL Support
If you mean: support for MSSQL, the answer is "virtually non-existent". It depends a bit on which MSSQL version, the biggest issue with the older versions is the absense of LIMIT and OFFSET which are heavily used by ORM. All other stuff …
Comment by
WanWizard
November 2012
permalink
FuelPHP and Namespaces
How you do this depends a bit on whether you use composers autoloader, of FuelPHP's autoloader. This article (http://tomschlick.com/2012/11/01/composer-with-fuelphp/) might give you some pointers on working with composer.
Comment by
WanWizard
November 2012
permalink
ORM on save escape
There is no code in the ORM that would touch data by itself, so the encoding most come from elsewhere. Also, the ORM will only update the fields that are changed, so the fact that all fields are updated must be related to something external that mo…
Comment by
WanWizard
November 2012
permalink
FuelPHP and Namespaces
To add to this, The Autoloader supports PSR-0 compliant libraries. In the bootstrap, in the add_namespace() call, add 'true' as third parameter to indicate it's a PSR-0 namespace, and your classes will load fine. Technically you can…
Comment by
WanWizard
November 2012
permalink
order_by related model's field first
What version of FuelPHP are you on? This issue was reported (https://github.com/fuel/orm/issues/134) and fixed about 2 months ago.
Comment by
WanWizard
November 2012
permalink
Fuel1.4 - No database selected and config files are empty?
The idea is that all defaults are in the core, in your app you only put the config values you want to override.
Comment by
WanWizard
November 2012
permalink
Spelling in Oil Scaffold ?
The Oil generation convention is that table names are plural. And the plural for "person" is "people", not "persons".
Comment by
WanWizard
November 2012
permalink
Display User Info on Every Page?
Correct. Create a base controller where you do all your global stuff, and have your controllers extend the base controller instead of Controller_Template.
Comment by
WanWizard
November 2012
permalink
Task and oil
Tasks (and Migrations) don't follow the cascading filesystem principe, and aren't autoloadable. So a class called "Admin_Stockvn" will be loaded from "admin_stockvn.php" in the tasks folder, no subdirectories are suppo…
Comment by
WanWizard
November 2012
permalink
DRY method of defining model columns and using UUIDs instead of auto_increment IDs
I do exactly the same. I have an application where each table has a create, an update and a userid field. I just created a base model that extends Orm\Model, which defines these properties, and the observers needed to make them work. The Models the…
Comment by
WanWizard
November 2012
permalink
ORM related limit ignored
This has been asked so many times. See http://fuelphp.com/docs/packages/orm/intro.html#/troubleshooting for the explaination.
Comment by
WanWizard
November 2012
permalink
set_message for specific field?
That is currently not possible, messages are linked to rules, not to field names. Adding this feature is on the roadmap, but probably not before 2.0. As a workaround you can create a custom validation rule method, and set the message in there.
Comment by
WanWizard
November 2012
permalink
$page and $current_page in Pagination
You're doing a $page-- first, which is not needed. So remove that, and remove the +1.
Comment by
WanWizard
November 2012
permalink
Input post ignored?
Very odd. I'm clueless. I can't explain why $_POST would be empty on a form post. Do you have this everywhere or only in this particular example? If the method is "POST", then a redirect can't be causing this.
Comment by
WanWizard
November 2012
permalink
Problem with Config::get('language') in Fuel 1.4/master
This is indeed the current workaround.
Comment by
WanWizard
November 2012
permalink
related models
Yes, you can. FuelPHP uses 'dot-notation' to identify subelements, you would identify the 'field' table in the 'related_model' object using 'related_model.field'.
Comment by
WanWizard
November 2012
permalink
Input post ignored?
Input::post() should return the entire $_POST array, and any non-empty array is true. So if you do a var_dump(Input::post()); what does it say? Haven't extended a class that broke something?
Comment by
WanWizard
November 2012
permalink
Fieldset Validation (Required* Javascript Popup)
The browser does, it's part of the HTML5 specification. See http://blog.oldworld.fr/index.php?post/2010/11/17/HTML5-Forms-Validation-in-Firefox-4 for a piece about firefox. The DZone articles describe how you could style them, I thought that t…
Comment by
WanWizard
November 2012
permalink
Fieldset Validation (Required* Javascript Popup)
It's not a javascript popup, it's HTML5 client-side validation, see (for example) http://css.dzone.com/articles/html5-form-validation-style. The Fieldset by default only uses the 'required' attribute.
Comment by
WanWizard
November 2012
permalink
Input post ignored?
Can't find an immediate fault in the code, so no clue at the moment. If $_POST is empty, then I would first check the rendered form. Can you dump Input::method() before that if? If that is not POST, perhaps you have a redirect somewhere that …
Comment by
WanWizard
November 2012
permalink
Problem with Config::get('language') in Fuel 1.4/master
Ideally you should set your default language in the config file, instead of using NULL. But that still causes problems if you want to switch language. Problem is that language is a request context parameter, but when Views or Viewmodels are lazy re…
Comment by
WanWizard
November 2012
permalink
Change created_at field datatype to datetime
Not the way you think, oil just generates migrations, it doesn't change the database. You can start a the Oil console on the commandline and then just type a DB::query() command, but I think it's easier to do it directly either through th…
Comment by
WanWizard
November 2012
permalink
Change created_at field datatype to datetime
But if you insist, --mysql-timestamp will do the trick. So it is configurable.
Comment by
WanWizard
November 2012
permalink
Using Redis subscribe method
Can you create a ticket for this at http://github.com/fuel/core/issues, with the use case, and this proposed solution? This response will get lost otherwise.
Comment by
WanWizard
November 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,396
Last Active
4:18PM
Roles
Administrator