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
Multiple arguments to a task
I basically did exactly the same as you, so what did you change to make it work?
Comment by
WanWizard
January 2014
permalink
Multiple arguments to a task
No problem whatsover?
Comment by
WanWizard
January 2014
permalink
Auth Group & Roles
Both for Simpleauth and Ormauth, the user table has a group id column. Which means a user can only belong to one group (at any given time). If you want to assign the user to multiple groups, you would need a many-to-many relation, which isn't…
Comment by
WanWizard
January 2014
permalink
How to route from controller to _root_
If there is nothing else that has a single segment URI, you can define a route like '(:segment)' => 'store/view/$1',
Comment by
WanWizard
January 2014
permalink
How to set always_load config of Module inside config.php and call that from parser Twig.
Is the module loaded? If not, it's not accessable.
Comment by
WanWizard
January 2014
permalink
How to route from controller to _root_
Can you be more specific? You have a controller called Controller_Store, with an action action_name(), and you want to route "example.com/name" to it?
Comment by
WanWizard
January 2014
permalink
Auth Group & Roles
In general, a role is (related to) a job or a task a person performs. You are an Administrator, a Moderator, a Teacher, a Student, a Paymaster, a Financial controller, a Machine Operator, etc. A group is an arbitrary collection of users. Users, Gue…
Comment by
WanWizard
January 2014
permalink
How to set always_load config of Module inside config.php and call that from parser Twig.
Yes, why not? You already did it. The question is, where is it loaded into? This is called the 'config group', which basically is the first part of the config key. If you don't specify a group name (like you did) in always_load, it …
Comment by
WanWizard
January 2014
permalink
How to set always_load config of Module inside config.php and call that from parser Twig.
Config files don't have a namespace. If you don't specify a config group, the configuration will be loaded into a group with the same name as the file. Which in this case is "themes::themes", not "themes". If you want…
Comment by
WanWizard
January 2014
permalink
calling Model of Module from outside?
If you have a separate controller for your "service layer", you don't have to check for HMVC requests, as that is all it's receiving. It will keep your code clean as well. If the controller is accessable via the browser too, you…
Comment by
WanWizard
January 2014
permalink
calling Model of Module from outside?
A request returns a Response object: class Controller_Parent { public function action_index() { try { $result = Request::forge('child/index')->execute()->response()->body(); var_dum…
Comment by
WanWizard
January 2014
permalink
calling Model of Module from outside?
Using an HMVC call, i.e. a secondary request. To maintain loose coupling between the components of your application, you should not call the model directly, but call an "API" controller method in the users module using an HMVC request, ha…
Comment by
WanWizard
January 2014
permalink
Question on FuelPHP 2.0
Currently that will be 5.4, but the final version hasn't been decided on.
Comment by
WanWizard
January 2014
permalink
Fulltext search with ORM methods?
I think a partial upgrade is a bad idea, but if you insist, update the entire fuel/classes/database folder, changes are often done in multiple files. You don't want to run into other issues.
Comment by
WanWizard
January 2014
permalink
Fulltext search with ORM methods?
What exactly are you looking at, and how old is your code? Support for DB::expr() in where() clauses has been added 5 months ago, on August 1st 2013: https://github.com/fuel/core/commit/995311e5fbe95c7c8bed3f2f2d31794ed8c12543
Comment by
WanWizard
January 2014
permalink
Fulltext search with ORM methods?
What did you exactly try? ->where(\DB::expr('SOME SQL HERE'))-> should work without problems. The encapsulation is just that the SQL compiler doesn't see the sql as a literal, and tried to escape and quote it.
Comment by
WanWizard
January 2014
permalink
Url rewriting htaaccess
Because it's the other way around. FuelPHP works with URI segments, which is what the original rule creates (the one you commented). This however doesn't work with the CGI binary, so there we use the workaround of creating a fake query …
Comment by
WanWizard
January 2014
permalink
Url rewriting htaaccess
Sorry? Not sure what you mean. The default rewrite we include is: # deal with php5-cgi first RewriteRule ^(.*)$ index.php?/$1 [QSA,L] # for normal Apache installations RewriteRule ^(.*)$ i…
Comment by
WanWizard
January 2014
permalink
"Where" with null values
You're passing 'NULL', which is a string, so that is not going to work, you need to remove the quotes.
Comment by
WanWizard
January 2014
permalink
How to use OrmAuth
You don't, You should start with permissions, and then work your way up. Say you have a permission "lesson.biology", with actions "view", "edit", "delete" (and maybe others). You could then create the r…
Comment by
WanWizard
January 2014
permalink
How to use OrmAuth
I'd say: Teacher, Student, Administrator are roles, C1 etc are groups.
Comment by
WanWizard
January 2014
permalink
Ormauth get_groups() not working as expected. Docs example fails.
You're right, I should have checked the model code too. It's defined as Group -> hasmany -> User, User -> belongsto -> Group. So there is only one group possible per user (which is probably done for compatibility with Simple…
Comment by
WanWizard
January 2014
permalink
What is the default controller in subfolder?
There is no default controller name, not in any folder. There is only a default action. So with that url, it will try to load Controller_Admin, action_index(). Which does not exist, hence the 404.
Comment by
WanWizard
January 2014
permalink
How To Another Module Model Access?
Depends on how you have defined the namespace in the model, could be either \Bla2\Model_Bla2model (if the namespace is Bla2) or \Bla2\Model\Bla2model (if the namespace is Bla2\Model).
Comment by
WanWizard
January 2014
permalink
Router ErrorException [ Fatal Error ]: Class Inflector not found
I've seen this before, google "php turkish bug" and be amazed... ;-)
Comment by
WanWizard
January 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