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
Link table using Orm
If you have to write data to it, it isn't really a link table any more. It's a table having two one-to-many relations, and requires a model, a PK, and the relations setup correctly (so no many-many anymore).
Comment by
WanWizard
February 2013
permalink
about theme in fuelphp
Yes, that's how the theme works. But only if you use the Theme class, the View class is unware something like a theme exists, and will only load from the views folder. The Theme class will search the theme folder structure first, and will fal…
Comment by
WanWizard
February 2013
permalink
Accents problem in view
This CSV isn't an Excel (or other Windows) export by any chance? Windows exports are never in UTF-8, so you need to convert them to be usable. I struggled a lot with that recently.
Comment by
WanWizard
February 2013
permalink
Link table using Orm
I assume you mean by "link table" the relationship or through table in a many_many relationship? That table does not require a primary key, as long as you don't create a model for it and use that model. For normal many_many relations…
Comment by
WanWizard
February 2013
permalink
Access View from inside View
There is no easy way, a view is rendered in a "sandbox" to avoid variable leaking. If 'somedata' is a variable set on the view, it's available in the view as $somedata.
Comment by
WanWizard
February 2013
permalink
about theme in fuelphp
As for your last question: a theme info file follows the same structure and rules as a config file. So if it's a .php file, it should return an array. The Theme class itself doesn't use it at all. It's there to facilitate installable…
Comment by
WanWizard
February 2013
permalink
about theme in fuelphp
You can place the files where you want. You tell the Theme class where they are using the 'paths' and 'assets_folder' configuration items in the theme config file. In addition to that, Theme behaves a bit different depending on…
Comment by
WanWizard
February 2013
permalink
about theme in fuelphp
I assume he means http://fuelphp.com/docs/classes/theme/introduction.html ?
Comment by
WanWizard
February 2013
permalink
Extending error
The cascading file system works very simple. Take the namespace, and the class name, and stick them together with an underscore. Then replace all underscores and backslashes by slashes. Append APPPATH, and add ".php" to it. So, a class c…
Comment by
WanWizard
February 2013
permalink
fuel slow trace
If you find the cause, please let us know. We're constantly profiling the core to avoid issues like this, and we haven't seen this behaviour before.
Comment by
WanWizard
February 2013
permalink
Include ORM Package from external PHP File
What do you mean with 'external file'? The ORM package is an entire collection of files. If you mean: can I install the package outside the docroot(s), then yes, I do that all the time. Just add the path where you install them to the pack…
Comment by
WanWizard
February 2013
permalink
Extending error
The code does: foreach ($array['classes'] as $class) { if ( ! class_exists($class = ucfirst($class))) { throw new \FuelException('Always load class does not e…
Comment by
WanWizard
February 2013
permalink
fuel slow trace
Then I'm clueless. I've never seen such figures, Autoloader::load() is only a handful of lines of code, and doesn't do anything fancy other then loading class files. You don't have a class that contains an _init() static method …
Comment by
WanWizard
February 2013
permalink
Loading and saving an image to the database
If this is about uploading files, have you checked out the Upload class? And the Image class for loading and manipulating image files?
Comment by
WanWizard
February 2013
permalink
Loading and saving an image to the database
Isn't that a value as any other? The DB layer doesn't care what you want to save...
Comment by
WanWizard
February 2013
permalink
Extending error
You get that error when the file loaded does not contain the class expected. Note that the autoloader is case sensitive, so 'Extpage' !== 'ExtPage'. But in general there is no need to always_load classes, FuelPHP will autoload a…
Comment by
WanWizard
February 2013
permalink
fuel slow trace
It's logical that, in a call analysis, a lot of time is spend in the autoloader, given the fact that everyhing is a class and needs to be loaded. In most cases, business logic is very light, What is not logical, is that a call to the autoloade…
Comment by
WanWizard
February 2013
permalink
Future of Fuelphp ?
Absolutely not. We're going strong, we will go on. You don't need to be a 'team member' to contribute to the framework, almost 200 people already did, from simple one-liners to complete functionality like recently soft-delete an…
Comment by
WanWizard
February 2013
permalink
Performance of Module::load when loading all modules
It's better to load it where you need it, and keep everything together. Fuel is smart enough to detect that what you load is already loaded, and will abort the load immediatly, leaving the overhead limited to the method call. If speed is real…
Comment by
WanWizard
February 2013
permalink
How can I call a partial from another module?
Not sure you can have underscores in view filenames. You can't for all other files. And your Main module must be loaded for this to work, otherwise the module path is not known to the finder and the view will not be found.
Comment by
WanWizard
February 2013
permalink
How can I call a partial from another module?
The correct way of doing that is through HMVC. Have your user module call a controller method in your main method using Request::forge(), and have that method return the required view. Alternatively you can pass the theme instance to the request,…
Comment by
WanWizard
February 2013
permalink
When creating new model, do CRUD actions and views get created
Have a look at our "oil" commandline utility. The "scaffolding" feature can generate the basic outline of the controller, model, migrations and forms for you.
Comment by
WanWizard
February 2013
permalink
Cascading deletes and other FK functionality
Lots of questions in a single post... No, Fuel can not generate tables from models. Fuel uses migration files for database changes. You can use the "oil" commandline utility to generate both the model and the corresponding migration file.…
Comment by
WanWizard
February 2013
permalink
Fuelphp 1.5.1 log error: Call to a member function log() on a non-object
We aim to please. Check the website, online since about 2 hours. ;)
Comment by
WanWizard
February 2013
permalink
ErrorException [ Error ]: Class 'Model\Search' not found
See http://fuelphp.com/docs/general/coding_standards.html, under "File Naming".
Comment by
WanWizard
February 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,391
Last Active
4:09PM
Roles
Administrator