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
FuelPHP-s learning curve compared to CodeIgniter
Underneath 2.0 will be a complete rewrite, as some different architectural choices have been made to fix issues with the current 1.x architecture. These mainly have to do with the context in which the code should run, compared to the global context…
Comment by
WanWizard
October 2012
permalink
Multiple File Uploads
Exactly the same way as for one file, so in one go. If you need different validation rules (or save rules) for each of them, you'll have to keep your configuration generic, and register a callback (there's an example with a closure in the…
Comment by
WanWizard
October 2012
permalink
FuelPHP - CodeIgniter Upload Class adapted
No problem. If someone has a decided not to use something provided by the framework that means we're doing something wrong. Either in code or in documentation. So I tend to ask about it, to understand the reasoning behind it. There a simple ex…
Comment by
WanWizard
October 2012
permalink
FuelPHP - CodeIgniter Upload Class adapted
In our upload class, per file processing is done via callbacks you can register. Sort of like hooks in the CI world, but then defined dynamically in your controller. We have choosen for this solution because there are a million and one ways you mig…
Comment by
WanWizard
October 2012
permalink
Alter database table through oil
You can't, and shouldn't, modify existing migrations. Migrations are an incremental process, so create "the next one" for each alteration you want to make. The framework knows it has already installed that migration, so it won…
Comment by
WanWizard
October 2012
permalink
FuelPHP - CodeIgniter Upload Class adapted
Can you explain what your issues where? I honestly don't see the difference: // CodeIgniter example function do_upload() { $config['upload_path'] = './uploads/'; $config['allowed_types'] = 'gif|jpg|png&…
Comment by
WanWizard
October 2012
permalink
need help in installation/deployment: error throw new \Database_Exception('No MySQLi Connection', 0)
You've configured the db.php config file in the correct environment directory? If you haven't set an environment, FuelPHP will default to 'development', so you need to configure app/config/development/db.php. If you have used th…
Comment by
WanWizard
October 2012
permalink
Multilingual Site
No.
Comment by
WanWizard
October 2012
permalink
CodeSniffer coding standards
Will certainly do. I had a stab at this a few months ago, but never completed it.
Comment by
WanWizard
April 2012
permalink
Multilingual Site
I assume that should be return array ( 'form' => 'Entry form :name', // and the rest here ); If you store this in app/lang/en/test.php, you can load it with: Lang::load('test', true); and get a string us…
Comment by
WanWizard
October 2012
permalink
Forms, Fieldsets, ORM and tags
My forms.php config file looks identical to the standard, but with an extra array level so I can add more: return array( 'default' => array( 'prep_value' => true, 'auto_id' => tru…
Comment by
WanWizard
October 2012
permalink
Multilingual Site
Start by reading the documentation: http://docs.fuelphp.com/classes/lang.html.
Comment by
WanWizard
October 2012
permalink
404 Error Accessing My Controller
If you don't install FuelHP according to the instructions in the documentation, you're in for a lot of work due to rewrite misery. So don't use 'localhost' but setup your virtual hosts properly. On your FuelPHP virtual host…
Comment by
WanWizard
October 2012
permalink
Correct way of working with ViewModels and Form/Fieldset
You need to define the fieldset in your controller, because thats where you have to do the validation and where the processing of the validated fieldset is. The rest can go into the Viewmodel without problems, just pass the fieldset object to it, h…
Comment by
WanWizard
October 2012
permalink
Multilingual Site
Use language files, in combination with the language code set in your app/config/config.php. Then in your views do something like ... There are a lot of ways to determine the language to be used, so I don't have a clear answer for that. You…
Comment by
WanWizard
October 2012
permalink
HMVC Request throws Warning
Fieldset is a multiton, the named fieldset objects will exist for the duration of the entire request. So if you have code that creates a fieldset object called 'login', you can't have other code doing the same (or run the same bit of…
Comment by
WanWizard
October 2012
permalink
Extending Validation class
If the error refers to "required/dropdown" then you have specified your rules wrong. There is no slash separator in defining validation rules. And you should not extend core classes this way, FuelPHP isn't CodeIgniter. Either use &qu…
Comment by
WanWizard
October 2012
permalink
Extending Validation class
* moved to General. this is a question, not a tip/tutorial *
Comment by
WanWizard
October 2012
permalink
EAV with ORM
Found the idea so cool I just went and implemented it in 1.4/develop. Haven't documented it yet, and you have to manually do the cascade config, but other then that it works fine.
Comment by
WanWizard
October 2012
permalink
EAV with ORM
Thinking about this a little bit more: it might be possible to virtually flatten it. Since the model uses getters and setters for model properties, maybe it's an option to: - add a new "relation type EAV", which defines which relati…
Comment by
WanWizard
October 2012
permalink
EAV with ORM
A structure like this is normal normalized database design, and not a problem defining this in ORM models, it's just a collection of one-to-many's. An EAV on the other hand is a variable data collection. You could see it as a 'virtua…
Comment by
WanWizard
October 2012
permalink
Formatting Error Messages
The validation config should not be in your config.php, it should be in app/config/validation.php. And whether or not the result is formatted depends on the method called: - error() will return the raw error message or messages - show_errors() wi…
Comment by
WanWizard
October 2012
permalink
ninjauth setup
Which version of Fuel are you on? That looks like an error that has been fixed some time ago.
Comment by
WanWizard
November 2011
permalink
using both simpleauth and ninjauth
You could have a look at http://github.com/fuel/depot, it has a working auth+ninjauth combo.
Comment by
WanWizard
February 2012
permalink
Read only query
You can't with ORM. With DB, you'll have to wrap the IF in a DB::expr(), to avoid escaping issues. As for the result, if you do a normal execute(), the DB result class returns direct driver results, for example in case of the MySQLi drive…
Comment by
WanWizard
October 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,368
Last Active
3:49AM
Roles
Administrator