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
8242
Activity
Generate: uses int in migration, mysql_timestamp in model observer
Model_Crud works differently from ORM. If you look in the code, you'll see that both properties are checked and used in the save() method. You should define the column as DATETIME when $_mysql_timestamp is true, and as INT if it's false. …
Comment by
WanWizard
April 2013
permalink
Random Session Destructions
That is weird, depending on the OS and the IP stack used, it has a preference for either IPv4 or IPv6. Usually it's 6 over 4. But whatever the preference, it should always be the same. If your client can connect to the webserver on IPv6, I see…
Comment by
WanWizard
April 2013
permalink
Set Fieldset field 'name' and 'id' on the fly?
It's up to you. It generates standard table rows, with array's for fieldnames, so it's very easy to copy the last time using a bit of javascript. Sometimes we do it this way, sometimes we use an automatic mechanism (if the one bef…
Comment by
WanWizard
April 2013
permalink
Introducting PDF Package for Fuel.
They are different. The one in fuel-packages is a fork of the TJS-Technology one, and has a far better interface. I use it on a daily basis. The only reason the TJS one "looks" newer is that it had a few commits to update the vendor pack…
Comment by
WanWizard
April 2013
permalink
Form::select
As I said, the second parameter is the selected value (or values):
Comment by
WanWizard
April 2013
permalink
Set Fieldset field 'name' and 'id' on the fly?
Oops. That should not be there. The tabular form feature comes from a Fieldset core extension we have been using in our applications, and the part that adds field icons hasn't made it into the fieldset code (because it's application speci…
Comment by
WanWizard
April 2013
permalink
Problem with Email::header()
Can you create a ticket for this at https://github.com/fuel/email/issues so it can be looked at?
Comment by
WanWizard
April 2013
permalink
Set Fieldset field 'name' and 'id' on the fly?
If you want to build a 1:N form, you might want to look at tabular forms, which supports exactly this, and creates the fieldnames as an array so you can add additional rows. See http://fuelphp.com/docs/classes/fieldset.html#one_to_many_forms for mo…
Comment by
WanWizard
April 2013
permalink
Check out some of the field
Ah, yeah, oops. forget the field()...
Comment by
WanWizard
April 2013
permalink
Form::select
The second parameter is used to identify the value or values to select. See http://docs.fuelphp.com/classes/form.html#/method_select
Comment by
WanWizard
April 2013
permalink
Model w/ no DB integration
A Model is a class like any other, you're not required to have your models extend Model_Crud or ORM. You can use a generic DataContainer design, such as the one we're using for Fuel v2: https://github.com/fuelphp/common/blob/develop/src/F…
Comment by
WanWizard
April 2013
permalink
Check out some of the field
Personally, I would do something like: if ($user->username == \Input::post('username')) { $val->delete_rule('unique'); } so, if it isn't changed, don't run the unique rule.
Comment by
WanWizard
April 2013
permalink
Check out some of the field
You can also store it in the session, then it's server side, and it can not be tampered with. If you don't want to validate the entire form, you can pass an array to $val->run(), just get Input::post(), remove username if it wasn'…
Comment by
WanWizard
April 2013
permalink
404 with controller_template
You're mixing two techniques. If you're using templates, and you want to assign a partial, assign a View object, not a Response object. If you return a Response object (and optionally a status), the template will be ignored. So if you wa…
Comment by
WanWizard
April 2013
permalink
Check out some of the field
For validation it shouldn't be a problem that some fields are not changed, they will contain the old values, which will be validated without problems (as they were validated earlier). As for unique, maybe this will help: http://fuelphp.com/for…
Comment by
WanWizard
April 2013
permalink
html feildset inside fieldset class
You can just add a second fieldset to the first: $parent = Fieldset::forge(); $child = Fieldset::forge(); $parent->add($child, 'child');
Comment by
WanWizard
April 2013
permalink
Dependency Injection in controller
You can not do that, a controller MUST have a constructor that is compatible. It's rather pointless to do this anyway, because controllers are called by the Request class, and MUST not be called by anything else. So you might have a second l…
Comment by
WanWizard
April 2013
permalink
Widgets
What do you mean by sufficient?
Comment by
WanWizard
April 2013
permalink
Widgets
You should do an HMVC request to a controller in the "gallery" module that will return the Viewmodel object. You should not call cross-context, that would cause your code to be tightly coupled. HMVC calls can be routed, so it's easy…
Comment by
WanWizard
April 2013
permalink
Session empty in my ajax controller (Controller_Rest)
No problem. If it is indeed a Warden issue, you might want to inform the maintainer to get it fixed.
Comment by
WanWizard
April 2013
permalink
Session empty in my ajax controller (Controller_Rest)
Since you're storing the session data in the database, you should be able to see what is stored in the session. It's a serialized array, so it should be readable.
Comment by
WanWizard
April 2013
permalink
Session empty in my ajax controller (Controller_Rest)
FuelPHP doesn't use PHP native sessions, and therefore $_SESSION does not exist. You interact with the session through the Session class: http://fuelphp.com/docs/classes/session/usage.html
Comment by
WanWizard
April 2013
permalink
Noob NinjAuth Question
No, because the Auth controller extends the Ninjauth controller, which in turn extends Controller. And not Controller_Template. So you can't use templates in any controller that does this, which is why I suggested not to do it this way, but c…
Comment by
WanWizard
April 2013
permalink
Noob NinjAuth Question
I assume you mean when you want to use ninjauth/classes/controller? That controller extends \Controller, and therefor doesn't have any template support. The best option would probably be not to use that controller, but copy it to your app (don…
Comment by
WanWizard
April 2013
permalink
MongoDB status and usage
That's why I said you should create a facade class for it, this should not be in a bootstrap. You need to be able to retrieve the instance. Look at https://github.com/fuel/core/blob/1.6/develop/classes/log.php for an example. This is implement…
Comment by
WanWizard
April 2013
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,368
Last Active
9:34AM
Roles
Administrator