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
file handle how to read file of csv format
The File Area class will do a realpath() on the basedir passed. So it can not be a relative directory like you have defined now. So it should be something like 'basedir' => DOCROOT.'assets/uploads/',
Comment by
WanWizard
February 2014
permalink
Auth package, how to save profile_fields
If you're accessing the user table using an ORM model, you need to use the typing observer, and define the data type of the profile_fields column as "serialize". It will make sure the data will be converted to an array on read, and …
Comment by
WanWizard
February 2014
permalink
CAnnot connect FuelPHP with PostgreSQL
You need to use the PDO driver. Just fill in the correct DSN value for pgsql and it should work without problems. Have you tried the documentation? There is even a configuration example using PostgreSQL: http://fuelphp.com/docs/classes/database/int…
Comment by
WanWizard
February 2014
permalink
There's a way to order an Auth_User by a profile field(metadata)?
That is going to be difficult, because metadata has mutliple values, so it's going to order on all of them. It might not produce the correct results, but you can try to use ->order_by('metadata.value')-> ...
Comment by
WanWizard
February 2014
permalink
Best way to create modules
Eh, was a bit too hasty, https://github.com/fuel/oil/pull/222 Ready, but not validated and merged yet. ;-) I'll try to find time for that today.
Comment by
WanWizard
February 2014
permalink
Best way to create modules
We don't do anything but modules, we only have extended core classes, base classes and generic helper classes in app/classes. A module is, from a code point of view, identical to app, it only has a namespace statement at the top of each file. …
Comment by
WanWizard
February 2014
permalink
FuelPHP suits me, but...
Thanks for the kudos!
Comment by
WanWizard
February 2014
permalink
FuelPHP suits me, but...
As to unit testing, you can ask PHPUnit to generate a code coverage report, which will generate some HTML that shows you exactly which class, method and line of code is covered by a unit test. If you really want to do that, perhaps you should look …
Comment by
WanWizard
February 2014
permalink
FuelPHP suits me, but...
Most of the changes mentioned in that post are not major, and most of them you will never even see. For example, in the v1 architecture, Input is global. Which means you can't pass GET and POST variables to an HMVC request, which in turn makes…
Comment by
WanWizard
February 2014
permalink
Upload class and extension case
Yes, you can. You need to register a 'before' event, which gets passed the file info array build up to that point. It is passed by reference, so you can change values in it. There's an example in the docs, with a closure that does …
Comment by
WanWizard
February 2014
permalink
Get the correct path from config inside a task
the DOCROOT is defined as the path to the frontloader. For index.php, that is your public folder, for oil that is your installation root folder. If you want to have your oil DOCROOT to point to the public folder (to it is identical to what index.ph…
Comment by
WanWizard
February 2014
permalink
how to send parameter in hmvc
For parameters in the URI. it works the same as for requests from the browser: you access them via the method arguments. For parameters passed through execute(), you access them in the controller method via $this->param().
Comment by
WanWizard
February 2014
permalink
file handle how to read file of csv format
To read any file, you can use file_get_contents(). If you need more security, for example because the location is user input, you can use the File, which allows you to restrict access to a specific area of the disk. Once read the data is in a strin…
Comment by
WanWizard
February 2014
permalink
FuelPHP suits me, but...
You can't find a deadline for v2, because there isn't one. It will be ready when it is. Any particular reason why you want to know? Most of the v2 changes are under the hood, there isn't a significant change in the API of the framew…
Comment by
WanWizard
February 2014
permalink
The configured locale en_US is not installed on your system. & Logs
Cool. Thanks for the kudos!
Comment by
WanWizard
February 2014
permalink
set_form_fields() how to set default value
What I meant was that the call to parent::set_form_fields() returns the populated fieldset. If the options list is static, you can do this, no problem. If it's dynamic and you need to generate multiple fieldsets, it's better to call set_…
Comment by
WanWizard
February 2014
permalink
Understanding OrmAuth - groups, roles
I would not even create a 'moderator' group, as I don't see the added value of it. They are both users. Ormauth works, as the name implies, with ORM models, so to assign a user to a role, fetch the user and the role record and relate…
Comment by
WanWizard
February 2014
permalink
set_form_fields() how to set default value
You mean you use the method to set or change the value of the model field property, instead of on the fieldset field object the method creates? As far as I know that is not supported. The properties array is meant to define parameters and defaults …
Comment by
WanWizard
February 2014
permalink
Pager.php Pear did not work in fuelphp ?
Why not use the frameworks own Pagination class?
Comment by
WanWizard
February 2014
permalink
Understanding OrmAuth - groups, roles
From the bottom up, everything starts with a permission definition. Which is defined using an 'area', a 'permission', and an optional list of possible 'actions'. These are just strings, so you can use any system that su…
Comment by
WanWizard
February 2014
permalink
The configured locale en_US is not installed on your system. & Logs
1) Change the configured locate to the correct one. Check what the exact locale is, on some OS'ses it is called "en_US.utf8" for example. 2) Just use the File class to open a file and write to it? Or if you need more features, create…
Comment by
WanWizard
February 2014
permalink
Pager.php Pear did not work in fuelphp ?
The problem of this message is that this Pager class is a piece of antique PHP4 rubbish... In PHP4, you had to define a method with the same name as the class, and this method was called as a constructor. In PHP5, your constructor method has to be …
Comment by
WanWizard
February 2014
permalink
Modules & config
Ok. Good luck with your migration.
Comment by
WanWizard
February 2014
permalink
Modules & config
Yes, you can: Config::load('module::file'); I'm not sure the module has to be loaded for this, but you can test that. but any hard-coded cross-module access is considered bad practice, as it violates loose coupling of modules, and …
Comment by
WanWizard
February 2014
permalink
Pager.php Pear did not work in fuelphp ?
Then you're perhaps in the wrong forum. But the message is very clear: "Non-static method Pager::factory() should not be called statically, assuming $this from incompatible context" It's not a static class, and factory() is not…
Comment by
WanWizard
February 2014
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,371
Last Active
May 14
Roles
Administrator