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
Many projects with one framework and tasks.
OIl knows where to find tasks. Tasks are in a fixed namespace, they don't follow the cascading file system rules, and are not loaded by the autoloader. like Migrations, they are a special type of class. For a beginner when it comes fo FuelPHP,…
Comment by
WanWizard
April 2013
permalink
Search Form
I know it is not very helpful, I was very clear about that. If you say you can do it in "regular old PHP" easily, than you know exactly how to implement it. Which means the question is not "Search form", the question is "ho…
Comment by
WanWizard
April 2013
permalink
SSL redirect issues using AWS ELB
I have something similar, all our internet facing webservers are behind reverse proxies. These will inject RequestHeader add X-Frontend-HTTPS on in the virtual host definition that proxies the request. On the frontend server itself, I capture this…
Comment by
WanWizard
April 2013
permalink
ORM issue order_by, limit, offset, relations
Upgrade to 1.6/develop, or wait until 1.6 is released (which will happen in the next few weeks).
Comment by
WanWizard
April 2013
permalink
Search Form
That doesn't work any different in FuelPHP then in other frameworks, or in native PHP. You'll need a form where a user can type in search criteria, optionally a parser (so you can have searches for "this" AND "that"), …
Comment by
WanWizard
April 2013
permalink
Auth Group Driver has_access check
Auth was entirely designed by Jelmer, I only made changes/improvements. Definitely sounds like a bug then.
Comment by
WanWizard
April 2013
permalink
REST application continues after $this->response is returned
If you're doing the Auth check this way, you bypass the entire parent router. Which is what does all format detection, so when your 403 is returned, all that code hasn't been executed. This is exactly why we introduced the option to defin…
Comment by
WanWizard
April 2013
permalink
Auth Group Driver has_access check
Don't trust the Auth documentation. I wrote is using "reverse engineering" because Jelmer never documented it. And I might have missed something that only exists in his brain...
Comment by
WanWizard
April 2013
permalink
subquery in select orm
get_query() returns the SQL as a string, so that will never work. You should be able to just pass the query itself: $query = \Model_User::query()->select($subquery);
Comment by
WanWizard
April 2013
permalink
Models not loading when files are transferred from a windows server to a linux server
Lol. Always time for a learning moment...
Comment by
WanWizard
April 2013
permalink
How to use Smarty parser with fuelphp? (Noob question)
Make sure the parser package is loaded (for example in the always_load section of your config), and give your views the extension '.smarty'. Then all you have to do is to replace View::forge('myview'); by View::forge('my…
Comment by
WanWizard
April 2013
permalink
Models not loading when files are transferred from a windows server to a linux server
It's quite simple. The Fuel coding standards stipulate that ALL folder and filenames should be lower case. So if you have something that is not completely lowercase, then there's your culprit...
Comment by
WanWizard
April 2013
permalink
Auth Group Driver has_access check
Please create a ticket for this at http://github.com/fuel/auth/issues. You might have to do some debugging, as Jelmer, who wrote the Auth package, is no longer part of the team, we'll have to dive into it as well, trying to understand why it …
Comment by
WanWizard
April 2013
permalink
REST application continues after $this->response is returned
How do you insert these headers, and how do you do the request? There is nothing in the REST controller that would default to "text/html", the only way it would return that response is if that is detected in the request. If you do the req…
Comment by
WanWizard
April 2013
permalink
Help designing relating models
The ORM cascades save's by default, so if you save a parent, it will also save all children (if they are new of have changed values).
Comment by
WanWizard
April 2013
permalink
How to make Edit form
Yes, that looks fine. Create your fieldset like this: $advert = Model_Advert::find($advert_id); $fieldset = Fieldset::forge('advert_form')->add_model('Model_Advert')->populate($advert); and in your view: echo $fieldset-…
Comment by
WanWizard
April 2013
permalink
Help designing relating models
The error message seams pretty clear. $list->items is a string, and not an array. So you have to figure out where it got set or reset as a string. You don't have a column in your lists tables named "items"? You can't have a c…
Comment by
WanWizard
April 2013
permalink
REST application continues after $this->response is returned
Then your 1.6 is not up to date (it has been added recently). You can define 'basic' or 'digest' for client authentication mechanisms, or any other string to define the method that will take care of your authentication, and sho…
Comment by
WanWizard
April 2013
permalink
How to make Edit form
i've checked the code in one of our apps, but we don't do anything special. If you define an ORM property as a checkbox, the Fieldset will automatically check it if the field has a non-zero value.
Comment by
WanWizard
April 2013
permalink
REST application continues after $this->response is returned
REST calls should not be redirected, you should return a 403 status, optionally with an error message. if you're in < 1.6, it's nothing more then something like: public function router() { if ( ! \Auth::check()) { $this…
Comment by
WanWizard
April 2013
permalink
How to make Edit form
Building a fieldset generates the input field, the label, the default value, and everything around it, so it completely replaces manual form building using the Form class. A snippet from one of my controllers: http://www.snipr.it/~Dr
Comment by
WanWizard
April 2013
permalink
Help designing relating models
many-many, It's the only relation type that uses a relationship table. All other relation types have the FK in on of the tables.
Comment by
WanWizard
April 2013
permalink
Help designing relating models
That is exactly the point of such a table. It links one record at the left of the relation to one record at the right of the relation, so both left and right remain unique. So you'll get something like list_id | user_id 1 | 1 1 …
Comment by
WanWizard
April 2013
permalink
Help designing relating models
That is exactly like my last example, what I called "Listuser". Size shouldn't really be an issue, records are retrieved on primary key, which should always be indexed. It will definitely more straining in the database engine if you…
Comment by
WanWizard
April 2013
permalink
How to make Edit form
With a fieldset, you can either generate the entire form in one go using echo $fieldset->build(); in the form (you need to pass the fieldset object to the view). You can also generate the form a field at the time, using echo $fieldset->fie…
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,369
Last Active
6:13PM
Roles
Administrator