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
Body template with including parts
See http://docs.fuelphp.com/general/views.html, under "Nesting Views". Normally you would use a base controller, which would extend Controller_Template. In the before() method of that base controller you'll set everything up, and in …
Comment by
WanWizard
August 2012
permalink
Subdomain wildcard routing
Not that complicated. Make sure you're last route is: '(.*)' => 'catchall/index/$1', // route all to the catchall controller, index method In that index method you do your search thing. If not found, do an HMVC call w…
Comment by
WanWizard
August 2012
permalink
Subdomain wildcard routing
If you take that approach you're already in a routed controller, the routing process has been completed at that point. If your controller decides the URI is not for him, you can only feed the URI back into the routing engine using an HMVC call…
Comment by
WanWizard
August 2012
permalink
Implementing has_access method
I don't think it's going to be too much of a performance hit. And if that is the case, you can always consider caching the data (in Memcached for example). It would be cool if you can implement this as a package that extends Auth. Don…
Comment by
WanWizard
August 2012
permalink
Send mail from task
I wouldn't know why not. You could try removing the error supression (@) from the mail() function on that line, and see what the actual PHP error is?
Comment by
WanWizard
August 2012
permalink
Subdomain wildcard routing
Possible, but then you're basically going the 'mod_rewrite' route, but then in code. Extending a core class to hack this in whouldn't be my preferred approach. If you want to go that route it's better to modify $_SERVER in …
Comment by
WanWizard
August 2012
permalink
Subdomain wildcard routing
As this is information in the hostname and not in the URI, standard FuelPHP routing can not deal with this. There are two options: - route all requests to a single controller method (page/search for example), have that get the hostname and from tha…
Comment by
WanWizard
August 2012
permalink
Unclear on how to do this:
lol. And I need to hold back on using the letter 'b' too often. We assume the FuelPHP dev is familiar with namespaces (it's a prerequisite for using Fuel), so it's not documented as such.
Comment by
WanWizard
August 2012
permalink
Unclear on how to do this:
Yeah. What I meant was if you develop the habbit of writing \DB for every core class, no matter whether your in the global namespace or not, this problem can never happen. Alternatively, you can do use \DB as DB; at the top of your file, under the…
Comment by
WanWizard
August 2012
permalink
Unclear on how to do this:
Because your model is in the "Model" namespace, and the "DB" class is in global? If you don't specify a namespace, the class will be searched for in the current namespace. To avoid issues like this, I always prefix core cla…
Comment by
WanWizard
August 2012
permalink
logging response object information
1.3 is going to be released in a few weeks, upgrading from 1.2.x is peanuts, there is only one API change, related to the URI class. If not an option, extend the core class and overload the required methods. Do not modify core code, that will becom…
Comment by
WanWizard
August 2012
permalink
logging response object information
I would define a 'request_finished' event callback, and in that callback get the response using \Request::active()->response(); You would need v1.3, as this is new functionality.
Comment by
WanWizard
August 2012
permalink
Two doubts, hmvc and pagination
You pass parameters to an HMVC request using the parameter of the execute method: $params = Request::forge('some / route') ->set_method ('POST')->execute(array('myparam' => 'value')); If your HMVC…
Comment by
WanWizard
August 2012
permalink
logging response object information
Is this about your application performing a REST request, or about a browser sending a request to your application?
Comment by
WanWizard
August 2012
permalink
How to print a select tag with Fieldset?
That should work without problems. Switching to the form instance isn't very useful, Form::add is an alias for Fieldset::add, this should be enough $edit_fields = Fieldset::forge('edit_business') ->add_model('Model_Business…
Comment by
WanWizard
July 2012
permalink
Aliasing classes to global from packages and modules
There is no easy solution, and you definately want to avoid messing to much with the global namespace. You could make it variable, and part of the Auth setup, and use the default from the package if not set: Yourauth::set_model('\\Module\\Mo…
Comment by
WanWizard
August 2012
permalink
Starting new CMS project - use Fuel 2.0?
Awilum wrote on Wednesday 22nd of August 2012: I think it will be very difficult to upgrade the project from 1.x.x. to 2.x.x version That is definately not the plan, we will provide a 1.x API compatibility layer, and documentation on the steps t…
Comment by
WanWizard
August 2012
permalink
return an image directly from a controller
The issue here is that you would want to return only the binary image data, and nothing else. Unfortunately, even a die() or exit() in your code won't stop FuelPHP's event handler from doing it's thing, in this case run shutdown even…
Comment by
WanWizard
August 2012
permalink
Validate multiple uploaded files separately
After all validation of an uploaded file is done, the code loops over all defined errors, and tries to load the error message, overwriting any message already defined. So why some fields still have a custom message is beyond me. This issue is only …
Comment by
WanWizard
August 2012
permalink
Problem with Twig and FuelPHP
Disappointed about what?
Comment by
WanWizard
August 2012
permalink
Starting new CMS project - use Fuel 2.0?
https://github.com/fuelphp/fuelphp#how-to-install
Comment by
WanWizard
August 2012
permalink
Validate multiple uploaded files separately
Yes. You're using a reserved error number. The process() method internally only works with error numbers, the messages are added based on that number after all uploaded files have been processed. So because you use a reserved number, you messa…
Comment by
WanWizard
August 2012
permalink
Theme class and Template controller
Yes. But as I said, the Theme class doesn't use standard View objects, which means that the standard $this->template in the Template controller is useless as well. Check the Depot code on how to work around that ( Controller_Base_Template::…
Comment by
WanWizard
August 2012
permalink
[CREATE A PACKAGE] - how to do ?
You've added it as a core namespace, so you need to use \Djik to access the class.
Comment by
WanWizard
August 2012
permalink
Theme class and Template controller
Doesn't really matter. Depot extends Hybrid to allow REST methods in controllers, but that is not required. Where your views are searched depends on the configuration of the Theme class, there are quite a few options. But note that if you use …
Comment by
WanWizard
August 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,374
Last Active
5:26PM
Roles
Administrator