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
Managing Assets in Themes and Template
Only 30 times. ;-) You only have to do it once. If you don't give the type, the path will be added for all known types: Theme::instance()->asset->add_path('/public/themes//assets/global/plugins');
Comment by
WanWizard
October 2014
permalink
Managing Assets in Themes and Template
Make sure the asset path in your theme config is configured correctly. It looks like it can't find the asset. And you can add alternative search paths to the Asset instance, but you have to do it manually, there is no support for it in Theme: …
Comment by
WanWizard
October 2014
permalink
Managing Assets in Themes and Template
In case of Theme, you need to use the Theme asset instance, to make sure the theme paths are used to load the asset: echo \Theme::instance()->asset->render('header'); and \Theme::instance()->asset->css("user", ar…
Comment by
WanWizard
October 2014
permalink
Managing Assets in Themes and Template
Use asset groups, and add the required assets to the group in the views that require them. And make sure the Views are rendered before the page template. Alternatively, use Theme for your views, that takes care of the correct rendering sequence aut…
Comment by
WanWizard
October 2014
permalink
My CSS and Java-Script files not loading
Cool. Happy coding!
Comment by
WanWizard
October 2014
permalink
My CSS and Java-Script files not loading
have you used a custom web.config, or the version included in the FuelPHP distribution? And what you mean by "system path" is what is in $base in your code snippet?
Comment by
WanWizard
October 2014
permalink
Should I define global constants in index.php or in fuel/app/bootstrap.php?
We do exactly the same.
Comment by
WanWizard
October 2014
permalink
has_access throws a warning when session times out.
Yes. Technically, if you have disabled the guest user support in the config, you can remove the guest user. However, any method that is user related, expects a user to be there. And that includes has_access. You can not say "does the current …
Comment by
WanWizard
October 2014
permalink
why fuelphp shoul use Web server apache 2.4+ ?
None. FuelPHP has no webserver dependencies, you can even use PHP 5.5's built-in webserver. It only has a PHP version dependency, and it requires the FileInfo PECL module.
Comment by
WanWizard
October 2014
permalink
Model_Soft with OrmAuth
At the moment all you can do is copy, because a class can only extend one other class.
Comment by
WanWizard
October 2014
permalink
How can i add multiple form fields to single database field
That would be a better option, but requires ORM. And in case of ORM, you can use the typing observer to do the serialisation or json encoding for you. But that wasn't the question. This suggests the use of Simpleauth, which stores data in a p…
Comment by
WanWizard
October 2014
permalink
has_access throws a warning when session times out.
You don't have the guest user enabled?
Comment by
WanWizard
October 2014
permalink
How can i add multiple form fields to single database field
Store the different fields in an array after validation, and either serialize() or json_encode() that array before you store the result in the database?
Comment by
WanWizard
October 2014
permalink
Logout from admin if some one login with the same username & password
The Auth package has a security feature that disables multiple concurrent logins by default. If you want to disable this feature, change the "multiple_logins" parameter in the app/config/auth.php config file to true. If you don't hav…
Comment by
WanWizard
October 2014
permalink
Fast way to do a simple app
There is no way to generate complex code at the moment, so you'll have to code the dropdown for users manually, which should not take more than 5 minutes. For the rest: 1. Install FuelPHP 2. Copy the auth.php config file from the Auth package…
Comment by
WanWizard
October 2014
permalink
Dynamic Menu in PHP/FuelPHP and Mysql
There are so many ways to generate forms, that it's virtually impossible to make something generic. For simple forms, you can use the fieldset class, which allows you to generate complete forms, or build forms using individual fieldset fields.…
Comment by
WanWizard
October 2014
permalink
How can i add multiple form fields to single database field
What do you mean? Can you be more specific?
Comment by
WanWizard
October 2014
permalink
using class variables
Even better: static::$country And I would advise against declaring something as private, unless you have a very good reason to do so. Use protected instead.
Comment by
WanWizard
October 2014
permalink
Upload: Odd behavior when saving file upload
Your Upload package isn't up to date. Change the version in the composer.json to "2.0.2", and run a composer update to fix it. When you have issues like this, try switching to the latest develop version first, to check if the issue …
Comment by
WanWizard
October 2014
permalink
Upload: Odd behavior when saving file upload
Very odd, because the after_save callback is only called if there wasn't an error. And even if the callback was called, it requires an instance of FileError to be returned to add an error. Can you post your entire upload config, so I can test …
Comment by
WanWizard
October 2014
permalink
Hooks in Fuel
I already have you the link to a complete example. It's not easy to give a simple example of an event-driven website, it requires a completely different architecture from MVC, which assumes one controller method == one web page. Instead, it r…
Comment by
WanWizard
October 2014
permalink
Using Auth permissions
No, area can be anything. But most of our apps are build of the same app platform, and that uses the module name as area. You mean something like has_access('area') ? And you're sure your code is up to date? As in 1.7.2, and not old…
Comment by
WanWizard
October 2014
permalink
Using Auth permissions
I can't really test that, because our App Framework is multi-lingual and has modules adding stuff (so your db contents fails in our apps on missing modules for "technician" and "orders"). But I can give you a dump of our te…
Comment by
WanWizard
October 2014
permalink
Hooks in Fuel
The example of the unregister() method contains a complete flow: http://docs.fuelphp.comclasses/event.html#/method_unregister So you define an event by registering it. That gives it a name, and an action in the form of anything callable. You can re…
Comment by
WanWizard
October 2014
permalink
Hooks in Fuel
Fuel has an event handler (which is called Event). The core also triggers events you can hook into. Both are documented. Fuel doesn't have a plugins system, it's a development framework, not a CMS or an eCommerce platform. If you want to …
Comment by
WanWizard
October 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,399
Last Active
8:54PM
Roles
Administrator