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
Help with modules
You can't. It's a construction not supported by the autoloader. The autoloader only loads classes inside the classes folder, and the 'classes' folder has to be a sub-folder of your module folder. Inside your classes folder you c…
Comment by
WanWizard
March 2012
permalink
Help with modules
You can do that with the standard modules, I don't see a reason why you would need modules in modules. No matter what your construction, you'll have the problem of collision that you have to manage. For standard modules, that is the name …
Comment by
WanWizard
March 2012
permalink
Custom validation callbacks in ORM models?
No, you can't. There is only one validation object. You are however completely free on where you store your validation rules, they don't have to be in the model. I have an app that has a separate class that contains all custom rules that …
Comment by
WanWizard
March 2012
permalink
Help with modules
Whether in your app, a module or a package, classes have to go in 'classes'. There is no exception to that rule, that is how the autoloader works. I'm not sure what you want to achieve functionally. If you can describe that, maybe we…
Comment by
WanWizard
March 2012
permalink
where to register events?
I think the mistake is that the static class init method is called _init(). Note the underscore.
Comment by
WanWizard
March 2012
permalink
Custom validation callbacks in ORM models?
The validation documentation describes how to add custom validation. As an example, this (https://github.com/fuel/depot/blob/1.0/develop/fuel/modules/admin/classes/model/version.php) model in Depot uses a custom validation method.
Comment by
WanWizard
March 2012
permalink
Oil on a synology
Like any other command in linux, you can't just type it's name unless you have an alias setup for it, or it's in the path. Try typing "./oil" when in the directory you downloaded it in. Second thing is that it's a shel…
Comment by
WanWizard
March 2012
permalink
where to register events?
If you add it to the always_load classes list, and it's in app/classes/model/user in a file called activity.php, autoloading should work without problems. I use this in every application.
Comment by
WanWizard
March 2012
permalink
Forced rendering encodes html
FuelPHP encodes on output as a security measure. When you pass your partials (containing HTML) to you page view, they will be encoded, giving you this output. So you have to disable encoding manually when you pass HTML to a view: return View::forge…
Comment by
WanWizard
March 2012
permalink
where to register events?
If your class is called Model_User_Activity, this is what you should autoload (and not user_activity). FuelPHP doesn't care that it's a model, a class is a class...
Comment by
WanWizard
March 2012
permalink
upload pdf file on the admin
With all due respect, I think it is time you should start reading and trying to understand it before you grab your keyboard. FuelPHP is not a framework for the absolute beginner, and I don't have the time to keep answering questions that you c…
Comment by
WanWizard
March 2012
permalink
Difference between Asset::img() and Html::img()
Html::img() just generates the tag, with as source whatever you pass as parameter. Asset::img() expects a base name (like 'icons/google.png') which the Asset class will convert to the source for the tag based on it's configuration.…
Comment by
WanWizard
March 2012
permalink
Themes
Not that I'm aware of, FuelPHP is a development framework, not a CMS. Our depot project (http://github.com/fuel/depot) uses the Theme class and page templates, which you can use to see how that works.
Comment by
WanWizard
March 2012
permalink
Upload file max size in .htaccess
You don't specify the definition of "no luck". Doesn't work? Gives error? Something else? And in which environment? If you use PHP in CGI mode, php_value is not supported. If you get a 500 server error, your config is wrong. You…
Comment by
WanWizard
March 2012
permalink
How will changes in Package Management in 2.0 effect modules in 1.x projects ?
The initial plan was indeed to remove the difference (internally), since the technical differences between modules and packages are slim: - packages have a bootstrap, modules don't - modules are routable, packages not There some other differ…
Comment by
WanWizard
March 2012
permalink
ORM, CRUD and inserting records with many to many relations
Your code will not do something magical. In the end it's still PHP, with a form containing variables that are posted, that need to be validated, processed, passed to a model, and saved.
Comment by
WanWizard
March 2012
permalink
How will changes in Package Management in 2.0 effect modules in 1.x projects ?
First of all, Packages !== Modules. So don't mix discussions about either of them. There are two blogposts outlining the future of FuelPHP here: http://fuelphp.com/blog/2012/02/the-road-ahead and http://fuelphp.com/blog/2012/03/why-the-20-chan…
Comment by
WanWizard
March 2012
permalink
Loading module's db configuration when doing an add_module
add_module() only adds the module path to the autoloader, it doesn't call or execute something. Unlike packages, modules don't have a bootstrap that is called upon load. The only option is to always_load the module, and then call a class …
Comment by
WanWizard
March 2012
permalink
DOCROOT differs between oil tasks and regular classes
For everything served through your webserver, yes. But oil is a commandline utility, it doesn't have anything to do with your webserver.
Comment by
WanWizard
March 2012
permalink
example for creating module in fuelphp
http://fueldepot.exite.eu (staging site), source on http://github.com/fuel/depot. We're working on it, and at the same time trying to create a public application that can be used as an example of most of the functionality FuelPHP has to offer.
Comment by
WanWizard
July 2011
permalink
Many to Many relationships with additional attributes
Yes, on the relations table.
Comment by
WanWizard
March 2012
permalink
Subfolders in oil refine. is it possible?
No, this is currently not supported. Tasks don't follow the rules of the autoloader, they are loaded hardcoded. This will be remedied in 2.0.
Comment by
WanWizard
March 2012
permalink
Access to oil methods within app?
Afaik the oil classes are CLi driven, they expect a commandline.
Comment by
WanWizard
March 2012
permalink
upload pdf file on the admin
Have a close look at what you're trying to specify. DOCROOT always has a terminating slash, so DS isn't needed there. And if you need 'assets/pdf', why don't you put a DS in between the two?
Comment by
WanWizard
March 2012
permalink
ErrorException [ 4096 ] with phpquickprofiler
Which version of FuelPHP? I think this is fixed in 1.1/develop, line 266 should read: elseif( ! is_array($value) AND ! is_object($value))
Comment by
WanWizard
March 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,373
Last Active
12:01AM
Roles
Administrator