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
use routes.php to redirect filenames to controller?
In your app/config/config.php: /** * Routing settings */ 'routing' => array( /** * Whether URI routing is case sensitive or not */ 'case_sensitive' => true, /** * Whether to strip the extensio…
Comment by
WanWizard
August 2013
permalink
use routes.php to redirect filenames to controller?
You can not route on URI's with extensions unless you enable that in the config. Note that that will have all kinds of side-effects, so I advice against using it. It's better to use a rewrite rule for that, much more efficient too.
Comment by
WanWizard
August 2013
permalink
Opauth exampels in fuelphp docs
We've gotten more reports of this issue, all from people using Windows, so it might be related somewhere. We don't develop on Windows, and I personally don't have Windows at all, so it's difficult to pinpoint the issue. As to t…
Comment by
WanWizard
August 2013
permalink
FuelPHP - Building a page in blocks
You're not loading the entire framework for HMVC calls, you're just creating a secondary request, the overhead of that is quite limited (compared to the framework setup). It is the proper way to do it, lously coupled, and if you put it in…
Comment by
WanWizard
August 2013
permalink
Where clause in a relatd model
method chaining: Model::query()->where()... instead of Model::find('all', array(...)) But I checked, ORM does have group_by(), it does not have having().
Comment by
WanWizard
August 2013
permalink
Opauth exampels in fuelphp docs
A Message class was never part of Fuel, which examples are you talking about? Opauth is integrated into the Auth package, which already comes will all required migrations.
Comment by
WanWizard
August 2013
permalink
Why is Fuel so popular in Japan?
Very good question. You might have to ask them. There's even a FuelPHP book in Japanese.
Comment by
WanWizard
August 2013
permalink
Naming Conventions for ORM Models
I only use one single model, I don't see the reason for having two. And I have them all in the \Model namespace (or in the \\Model namespace).
Comment by
WanWizard
August 2013
permalink
Issue with 404 Handling
Your error message mentions: COREPATH/classes/controller/rest.php @ line 157 So you're already either using Controller_Rest or Controller_Hybrid. For both, it is required that you call the controllers before method, otherwise your controller w…
Comment by
WanWizard
August 2013
permalink
Where clause in a relatd model
I think with chaining you can, but I have never used it.
Comment by
WanWizard
August 2013
permalink
Issue with 404 Handling
Something in your code destroys $this->response. This is created as a new Response object in the before() method, which runs before the router does. Or does your controller have a before(), and you didn't call parent::before() ?
Comment by
WanWizard
August 2013
permalink
Where clause in a relatd model
Instead of a get_one(), try rows_limit(1)->get(); $archive = reset($archive). Related queries are generated using subqueries, which in combination with get_one() might not give you the result you expect.
Comment by
WanWizard
August 2013
permalink
How different routes can be pointed to same controller
You can use the last parameter on Request::forge(), set it to false to bypass the routing table.
Comment by
WanWizard
August 2013
permalink
How different routes can be pointed to same controller
Your route doesn't only have to match, you also have to indicate it's a variable that needs to be inserted on the righthand side. A route is a regex, so you do that with brackets: '(:segment)' => 'page/index/$1',
Comment by
WanWizard
August 2013
permalink
Print out all data
you can do ->as_array('id', 'alias') which will give you an indexed array with id => alias
Comment by
WanWizard
August 2013
permalink
Fieldset::build - using in views
to be complete: copy the default from fuel/core/config to app/config, then customize it.
Comment by
WanWizard
August 2013
permalink
Fieldset::build - using in views
FuelPHP encodes on output, all data you send from the controller to the view will be encoded for security reasons. If you don't want that, you have to send that variable to the view unencoded, using the set_safe() method, or using false as thi…
Comment by
WanWizard
August 2013
permalink
Password hash through Auth
If you want to retrieve data from it, you have to crypt it instead of hash it. Hashing is a one-way algorithm, Crypting is bidirectional.
Comment by
WanWizard
August 2013
permalink
User Profile Fields Unserialize Error
Just checked the code. The simpleauth driver does save a serialized array when you use create_user(). And as far as I can see from github history, it has always done so. So if you have NULL in your table, something weird is going on.
Comment by
WanWizard
August 2013
permalink
User Profile Fields Unserialize Error
create_user() indeed doesn't add it, Simpleauth has logic internally to deal with that. It was never made to be interacted with using a model. This should change, but that doesn't help you now (and all others already having an existing us…
Comment by
WanWizard
August 2013
permalink
User Profile Fields Unserialize Error
Is that your own model, or the model included in the Auth package (which is for Ormauth only)? The problem I think you have is that the Observer_Typing will not create an empty array for profile_fields that are NULL. An empty profile_fields column …
Comment by
WanWizard
August 2013
permalink
public Template and passing $data
View data is not global, it's local to the View object you pass it to. You pass the data to the "admin/dashboard" view, so the $subnav variable is only available in that view. If you need it in the template, pass it to the template: …
Comment by
WanWizard
August 2013
permalink
User Profile Fields Unserialize Error
Which version of Fuel, which Auth driver do you use, and what method do exactly call to get this error?
Comment by
WanWizard
August 2013
permalink
vhost config/.htaccess for nonstandard setup
:-) Glad to hear you've got it sorted.
Comment by
WanWizard
August 2013
permalink
vhost config/.htaccess for nonstandard setup
You want to install FuelPHP in a subfolder? That is not a problem whatsover, just install it there, then move everything in ./application/public one folder up, to ./application, as you don't need a docroot mount point anymore. After that, ht…
Comment by
WanWizard
August 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,389
Last Active
11:40AM
Roles
Administrator