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
Extending Core\Asset or adding a domain
As I wrote, the asset class supports multiple instances. So use something like: // create the remote and local instance Asset::forge('remote',array('paths'=>array(),'url'=>'http://assets.domain.com/'));…
Comment by
WanWizard
January 2012
permalink
Extending Core\Asset or adding a domain
If you're on 1.1/develop, you can create multiple asset instances, each with it's own configuration.
Comment by
WanWizard
January 2012
permalink
Is there something similar to Kohana's $orm_model->loaded property?
You could use $model->is_new()...
Comment by
WanWizard
January 2012
permalink
Extend & replace module controller and view
It's standard PHP to extend classes like this, so yes. In case \Users refers to a module called 'users', the module needs to be loaded (either via Fuel::add_module or via always_load in the config) to allow FuelPHP to find your Main_…
Comment by
WanWizard
January 2012
permalink
Extend & replace module controller and view
What do you mean by "the user controller". In FuelPHP there is no such thing. If you're referring to the Auth package, I use that for authentication and authorisation only. The users table should have a model like all other tables, a…
Comment by
WanWizard
January 2012
permalink
Is it bad pratice to pass ORM objects (or other complex objects) to views?
I don't see a reason why you shouldn't pass an ORM object to a view.
Comment by
WanWizard
January 2012
permalink
Phil's template library
A new theme class was introduced in v1.1. It does templating, it doesn't do partials yet. I'm working on that right now, but there is some debate on whether or not this should be part of the core.
Comment by
WanWizard
March 2011
permalink
Using config files within a module
I don't think anyone tried to store a database configuration in a module before, so you have a first! There are a few gotcha's you have to take into account. The one I think is important here is that the database drivers do a forced load …
Comment by
WanWizard
January 2012
permalink
Output filtering problem
Why do you use set_global() here? Do you have multiple views, or nested views loaded that need to access the $user variable? I've looked in the code of the view class, and I can't see any reason why this would be escaped. You're not …
Comment by
WanWizard
January 2012
permalink
Wildcard Domain. Handle in .htaccess or in Fuel?
This is how I would do it (apart from the map discussion to catch non-existent host names). What has to go into the site controller depends on what your application exactly does, I can't comment on that.
Comment by
WanWizard
January 2012
permalink
Session does not work
Yes, read the documentation. The syntax is Asset::js( array('jquery.js', script.js') ); Also, don't use Fuel\Core\Asset, use \Asset. Never access core classes directly. All of them are aliased to the global namespace to allow…
Comment by
WanWizard
January 2012
permalink
Wildcard Domain. Handle in .htaccess or in Fuel?
It depends on how the application is designed, and what functionality you're offering. If it is entirely modular, I would go for the single front controller. It can do it's thing based on http_host, and pass required customisation info on…
Comment by
WanWizard
January 2012
permalink
Output filtering problem
Which output is escaped where?
Comment by
WanWizard
January 2012
permalink
Right ORM model class names
This is the way FuelPHP's cascading filesystem works. The namespace of the class and the class name together determine where in the filesystem this class should be stored. When determining this, underscores will be translated to directory sepa…
Comment by
WanWizard
January 2012
permalink
How to Select only specific model fields and not ALL related fields?
You already can, see http://docs.fuelphp.com/packages/orm/relations/intro.html#/usage_rel_conditions You can do things like ->where('comments.user_id', 1) to add a where clause on a related object.
Comment by
WanWizard
January 2012
permalink
default routing unclear
Yes, it does. It's called "Named routes and reverse routing". There is something wrong with your setup, because you shouldn't have public in your URL. That might cause issues with rewriting too. try fuel.dev/public/index.php/hel…
Comment by
WanWizard
January 2012
permalink
including sub-views while keeping all assigned (local) vars
That works in your controller, but not if the view itself loads other views...
Comment by
WanWizard
December 2011
permalink
How do I make a task for a cronjob
And with reply to the original error: you can not call a FuelPHP php file directly. It needs the framework to be loaded and initialized, and that can only happen through the index.php file, or through the oil CLI utility. Having said that, there ar…
Comment by
WanWizard
November 2011
permalink
Database replication
Nope, that should be it.
Comment by
WanWizard
January 2012
permalink
Config::get('environment');
The environment is available in \Fuel::$env. I've never known it to be available in the global config?
Comment by
WanWizard
January 2012
permalink
Documentation: oil
you should not do a), it is fine were it is now. You only have to do b) if you have modified the default folder structure. The correct folder is the folder in which you have installed FuelPHP, which is the folder in which you find 'oil', …
Comment by
WanWizard
August 2011
permalink
ORM fieldset and the form Builder
The ExiteCMS code on github is only days old. I'll still working on the core. Getting the theme and widget engine running, being able to execute HMVC class to create widgets. Now that thats working I moved to crud operations, where the standar…
Comment by
WanWizard
January 2012
permalink
How should my ajax controller return JSON object
Ideally, your controller should extend Controller_Rest. Which will take care of all json business for you, internally you just work with arrays.
Comment by
WanWizard
January 2012
permalink
ORM fieldset and the form Builder
I have a Crud controller, which contains the basic code for the list, view, add, edit and delete actions. My controllers extend this controller, set the basic variables needed to operate, and some contain custom code in case the default actions are…
Comment by
WanWizard
January 2012
permalink
ORM fieldset and the form Builder
In general, you only keep the minimum in your models. Statically define the properties (like above), and add methods to the model to load data into the properties for the select options (which are only needed in crud operations on the model, there …
Comment by
WanWizard
January 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
1:10AM
Roles
Administrator